[DEV/LIBRARY]Amazfit Communication: 2 way communication for Pace/Stratos inc internet

Search This thread

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,427
7,691
253
23
Salford, Greater Manchester, UK
quinny898.co.uk
Amazfit Communication Library

The Amazfit Communication Library is a reverse engineered and modified version of the Huami "Transporter" class (and its subclass "TransporterClassic"), along with its dependencies. This allows both sending and receiving data on both the phone and the watch, using the same library.

Bascially, this allows apps on the watch to access data via a companion app on the phone. To make this easier, this library comes hand in hand with the "AmazfitInternetCommunication" app, which can be installed on the phone and allows apps on the watch to access the internet and perform simple requests, with data in response.

However, you can use this library with your own companion app on the phone to access any data the phone app has access to, for example a companion app on the phone with access to calendar appointments would allow a watch app to display events on a calendar, on the watch.

Usage
See the GitHub repo for the latest code and guide for addition of the library. You can also compile it if you wish.

Amazfit Internet Companion
Amazfit Internet Companion is a generic and open source internet companion app for the Amazfit Pace and Stratos. It allows apps developed with the Amazfit Communication library to access the internet over Bluetooth via a phone's internet connection. As a developer, rather than having to develop your own companion app, you can simply have your users install the companion app and it'll handle the rest, so long as you use the internet functions in the library (LocalURLRequest). Link them to the thread or use your own guide, linking to the latest APK from the repo to use this.

Alternatively, you can develop your own companion app. This could be used for loads of things, for example a companion app could provide a watch app with the calendar events on the phone, provided the phone app had the right permissions and formatted the data correctly. If you want to make your own companion app, feel free to use the Internet Companion app as a base
 

Klaus3d

Member
Mar 23, 2018
26
7
0
Hi Quinny, thanks for your great work. Did you make tests of how much this affects the battery life, egg with your train app?
Is it possible to run this in as a background service on watch?
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,427
7,691
253
23
Salford, Greater Manchester, UK
quinny898.co.uk
Hi Quinny, thanks for your great work. Did you make tests of how much this affects the battery life, egg with your train app?
Is it possible to run this in as a background service on watch?

I've not done proper tests but I've had it running for a few days with no noticeable effect on the life. Yes, you should be able to use a background service on the watch, if you need an app on the watch to always be available for receiving information from the phone - but bear in mind that the watch only has 512MB of RAM, so a running service is more taxing on the watch compared to a phone. You may be better off with a background service on the phone that stores the information you wish to send to the watch, which then responds to the watch app when it's run - an ondemand request if you will
 
  • Like
Reactions: sime23

tombolger

New member
Oct 26, 2014
4
0
0
I've not done proper tests but I've had it running for a few days with no noticeable effect on the life. Yes, you should be able to use a background service on the watch, if you need an app on the watch to always be available for receiving information from the phone - but bear in mind that the watch only has 512MB of RAM, so a running service is more taxing on the watch compared to a phone. You may be better off with a background service on the phone that stores the information you wish to send to the watch, which then responds to the watch app when it's run - an ondemand request if you will

So if the watch can get any data from the phone, does that mean I can run Wear apps, like the Hangouts Wear app, on the watch and use it as it works on a regular Wear device? If so that would be incredible.
 

delphiover

New member
Feb 25, 2020
4
0
0
still work for watches in 2020?

hello, I know it's been a while since the last time this topic was discussed, does anyone know how to inform without this package still working today? I recently purchased an amazfit verge and since my house is completely automated, I want to develop an app for personal use ... thanks!
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,427
7,691
253
23
Salford, Greater Manchester, UK
quinny898.co.uk
hello, I know it's been a while since the last time this topic was discussed, does anyone know how to inform without this package still working today? I recently purchased an amazfit verge and since my house is completely automated, I want to develop an app for personal use ... thanks!

Still works, not tested it on the Verge though. Should work the same, they use the same framework I think.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Amazfit Communication Library

    The Amazfit Communication Library is a reverse engineered and modified version of the Huami "Transporter" class (and its subclass "TransporterClassic"), along with its dependencies. This allows both sending and receiving data on both the phone and the watch, using the same library.

    Bascially, this allows apps on the watch to access data via a companion app on the phone. To make this easier, this library comes hand in hand with the "AmazfitInternetCommunication" app, which can be installed on the phone and allows apps on the watch to access the internet and perform simple requests, with data in response.

    However, you can use this library with your own companion app on the phone to access any data the phone app has access to, for example a companion app on the phone with access to calendar appointments would allow a watch app to display events on a calendar, on the watch.

    Usage
    See the GitHub repo for the latest code and guide for addition of the library. You can also compile it if you wish.

    Amazfit Internet Companion
    Amazfit Internet Companion is a generic and open source internet companion app for the Amazfit Pace and Stratos. It allows apps developed with the Amazfit Communication library to access the internet over Bluetooth via a phone's internet connection. As a developer, rather than having to develop your own companion app, you can simply have your users install the companion app and it'll handle the rest, so long as you use the internet functions in the library (LocalURLRequest). Link them to the thread or use your own guide, linking to the latest APK from the repo to use this.

    Alternatively, you can develop your own companion app. This could be used for loads of things, for example a companion app could provide a watch app with the calendar events on the phone, provided the phone app had the right permissions and formatted the data correctly. If you want to make your own companion app, feel free to use the Internet Companion app as a base
    1
    Hi Quinny, thanks for your great work. Did you make tests of how much this affects the battery life, egg with your train app?
    Is it possible to run this in as a background service on watch?

    I've not done proper tests but I've had it running for a few days with no noticeable effect on the life. Yes, you should be able to use a background service on the watch, if you need an app on the watch to always be available for receiving information from the phone - but bear in mind that the watch only has 512MB of RAM, so a running service is more taxing on the watch compared to a phone. You may be better off with a background service on the phone that stores the information you wish to send to the watch, which then responds to the watch app when it's run - an ondemand request if you will
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone