lordi / tickmate

One bit journal
GNU General Public License v3.0
109 stars 33 forks source link

Android Wear #57

Open Querschlag opened 8 years ago

Querschlag commented 8 years ago

A few weeks ago I got myself a Moto 360 and started thinking of good use cases for it. Since I'm still into habit tracking I wondered how a wearable would make this more comfortable. So I sat down and wrote an Android Wear companion app for Tickmate. It pulls the tracks from the device and lets you add and remove Ticks from your wrist + it shows you your weekly stats. I used the Android Wear MessageApi for reading/writing data, so the app won't work without your phone being nearby. I made this choice mostly because of privacy concerns, as the only other option - the Google DataApi - would sync your sensitive data through Google's Cloud services.

Check out my fork at: https://github.com/Querschlag/tickmate

Android Wear: Setting Multitick Android Wear: Weekly stats

lordi commented 8 years ago

Wow, that looks awesome! I don't have any experience with Android Wear apps (nor do I own any wearables yet), but I find it very interesting. Do you know if I can I try the companion app in the android studio simulator?

Querschlag commented 8 years ago

You can run the app with your physical device + the Android Emulator.

  1. Create a new ADB device with Android Wear and fire it up.
  2. Install the Android Wear App on your phone.
  3. Forward ports for emulator debugging on your computer. adb -d forward tcp:5601 tcp:5601
  4. Open the Android Wear app on your phone and start the pairing dialog. In the upper right menu you can choose to pair with an emulator.
  5. In Android Studio run the "app" configuration on your phone to install the service for wearable communication.
  6. Run the "wear" configuration on the Wear Emulator.

After that you should be able to see the data from Tickmate on your phone in the emulator.

Querschlag commented 8 years ago

Over the last few days I fixed a few bugs and a communication issue when wearable device and handset have different Android versions. Since I now use my Nexus 6P for testing I also implemented support for Android M permissions when importing/exporting the database.

For those of you that have an Android watch and like to test it on a real device - you can get a binary with the latest changes at: https://github.com/Querschlag/tickmate/releases/tag/v1.3.0

Make sure to backup your database first! You'll have to delete your current Tickmate installation in order to install the Android Wear version!

lordi commented 8 years ago

Nice to see progress! Why do you have to delete the Tickmate install?

Querschlag commented 8 years ago

It's because my APK file is signed with a different key than the Google PlayStore version. Android does not allow to update an app with an APK of different signature.

lordi commented 8 years ago

But in principle it would be possible to release a new version with the Wear App bundled - so that for non-wear users nothing would change, but wear users can use the companion app? Or is the companion Wear App a separate app?

Querschlag commented 8 years ago

My release already includes the Wear App. It's really just a matter of signing. User without wearables can use/update the app from Google Play as usual and if there are any Android Wear devices paired, the Watch App will be synced automatically after installation.

lordi commented 8 years ago

Sorry for the delay, I definitely want to accept this PR. But it might take some more time as I want to make sure that no user is affected negatively by it.

Querschlag commented 8 years ago

No problem. I had been busy with other projects lately. Unfortunately I was unable to further test the Travis config due to merge conflicts in the PR. Let me know when you need further input.

PanderMusubi commented 3 years ago

Would love to see this on contemporary WearOS