云
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 順路Carpool APP ###### tags: `code` ### 一、 Idea的開始 專案從12月底開始發想, 當時剛好碰上了搶車票的返鄉投票潮,不幸地,我沒有搶到票。 我開始思考還有什麼樣的方式可以回家又不耗費重本? 搭公車的話,交通堵塞實在太慢了;搭計程車的話,又太貴了; 要找人一起共乘的話,又找不到人。 後來呢,我找到了 [共乘台灣](https://www.facebook.com/groups/317555698448325/) 這個臉書社團 - **司機們在這個社團張貼自己的路程, 而有意搭乘順風車的朋友們能在此社團集結在一起。 如此一來,司機能節省汽車成本而乘客可搭乘順風車分擔車錢, 共乘可以說是個雙贏的機制。** 因此最後我也藉由共乘,約定到了共乘夥伴,順利地返鄉投票。 但臉書社團終究不是專業的共乘平台, 社團的貼文性質並沒有即時更新資訊, 搜尋上也很不簡便。 **「如果能有一個為解決共乘司機及乘客的需求而誕生的即時配對平台有多好?」** 於是,共乘APP的點子就誕生了...! ### 二、 產品開發流程 團隊由Android (Java)、IOS (Swift)、後端 (C#) 共同開發, 首先繪製產品流程,再將此流程視覺化,完成產品動線。 ![](https://i.imgur.com/ceMWZnP.jpg) ###### 圖1. 產品流程草圖 ![](https://i.imgur.com/PHagqcC.jpg) ###### 圖2. 產品流程視覺化 ### 三、軟體架構及技術 共同討論完資料model參數後,我們使用甘特圖來控制團隊進度, 視情況在可完成期限內決定增刪功能, 以下是在此專案中最有心得的技術收穫。 #### 1. 使用MVP架構 由於套用了MVP架構, 我們可以將**UI畫面、多執行緒之需求呈現、資料來源串接切分開來,架構上各司其職**, 使用多型來替換資料來源串接的實作提高了很大的開發效率, 隨時可以將真正上線的後端串接實作(採用Retrofit),替換為假的測試資料。 如此一來就不需要等待後端實現完成功能,也能先行測試介面。 ![](https://i.imgur.com/h7TIPS6.png) 由於採用MVP架構來開發前端,程式碼的簡潔程度也大幅上升。 #### 2. Google Map Api串接 使用**Google Map SDK**來在UI上繪製地圖。 並直接藉由Google的APIs來完成一些細節服務,例如: 1. 用**Google Auto-Complete API** 來搜尋準確關鍵字。 2. 用**Google Geocoder API** 來取得地點的座標。 3. 用**Google Direction API** 取得兩點之間的導航路徑。 而這些技術,都是為了能夠讓司機規劃順風車行程。 ![](https://i.imgur.com/mR5AhQN.png =260x) #### 3. 司機與乘客即時位置更新之技術細節 由於目前版本並沒有採納推播技術,**即時位置的查詢跟更新多半依靠輪詢**。 前端偵測使用者的位置,當位置改變時,就傳遞座標至後端。 而同一時間也在另一個執行緒上輪詢對方的位置。 如此一來就能夠邊傳遞自己的位置,邊顯示對方的最新位置。 ![](https://i.imgur.com/ltIHGBe.png =260x) 但這樣的作法,造成很大的流量消耗,未來應使用Firebase來節省成本。 #### 4. 未完成的功能-推播、聊天室 未來會考慮使用Firebase Messaging來實現推播。 讓地圖的即時位置顯示,依靠推播來同步不同使用者的前端設備。 以及聊天室的功能,讓共乘的使用者之間具有溝通媒介。 ### 四、成果發表 為期一個月的雛形開發,最後得到**Cmoney程式營第二名的佳績**。 從這個專案的開發經驗中,我學到了許多寶貴的經驗, 作為未來擔任工程師時的一個基石: 1. 我學到如何有效地**跟後端溝通,理解後端的API文件**,教學相長。 尤其很多時候,後端並不瞭解前端要的資料是什麼,後端對API的固執設計, 將會讓前端變得非常難做事。此時此刻溝通就是比技術還要重要的解藥。 2. 技術上的架構分工,由於**採納了MVP架構**, 我不像之前那樣總是把技術實現都放進了Activity中, 對大型專案的掌握程度漸漸地提升。 3. 學到了諸多重要技術:使用**Retrofit**做到的與後端的API串接、 配合**Gson**做Json格式資料的解析、**Google Map**的API串接, 以及使用**Glide**作為圖片載入。 4. 越來越習慣在**Git版本控制**的環境下做事, 習慣在分支上面實現各項功能,而不是總在主枝幹上面做程式碼改動。 與夥伴解決衝突時,也越來越了解如何避開衝突。 一個月的期限內,多半都是自學開發,**明白原來自己能在期限之內,能靠自己解決許多技術上的問題,做到獨力開發的素養。並堅持與夥伴不斷溝通,協力創造足夠的產出跟價值,得到了第二名的榮譽,是最大的回饋,也證明了自己具有足夠的素養跟基礎,擔任APP工程師一職**。 > [PPT點我](https://docs.google.com/presentation/d/1ClJw4FJ2Px3LtOROAWBYqbrcWbb4mNRC/edit?dls=true) > [GitHub點我](https://github.com/ssandy13862/carpool) > [成果發表影片點我 (時間 29:30 - 35:00) ](https://www.facebook.com/bigbigengineer/videos/3255848914431782/)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully