#1770 Find my device not working with amazfit bip / android 10

Open
opened 2 weeks ago by susundberg · 8 comments

Before reporting a bug, please confirm the following:

  • I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
  • I have searched the issues, and I didn't find a solution to my problem / an answer to my question.

I got Gadgetbridge from:

  • F-Droid
  • I built it myself from source code (specify tag / commit)

Your issue is:

The phone does not ring when amazfit is connected and “settings->find my device” is clicked.

It does ring when the gadgetbridge app is on front and phone unlocked.

The amazfit shows correctly “found the device, ringing”.

Logs should be attached here:

10:38 - the Gadgetbridge app was on front and phone unlocked -> RINGS 10:40-10:41 - the Gadgetbridge app was in background but phone unlocked -> Nothing -- phone did not ring.

Your wearable device is:

Amazfit Bip amazfit fw: 1.1.5.02 hw 0.11.19.5

Your android version is:

Android 10 / Pixel 3A

Your Gadgetbridge version is:

Version 0.40.1

#### Before reporting a bug, please confirm the following: - [X] I have read the [wiki](https://github.com/Freeyourgadget/Gadgetbridge/wiki), and I didn't find a solution to my problem / an answer to my question. - [X] I have searched the [issues](https://github.com/Freeyourgadget/Gadgetbridge/issues), and I didn't find a solution to my problem / an answer to my question. ### I got Gadgetbridge from: * [X] F-Droid * [ ] I built it myself from source code (specify tag / commit) #### Your issue is: The phone does not ring when amazfit is connected and "settings->find my device" is clicked. It does ring when the gadgetbridge app is on front and phone unlocked. The amazfit shows correctly "found the device, ringing". Logs should be attached here: 10:38 - the Gadgetbridge app was on front and phone unlocked -> RINGS 10:40-10:41 - the Gadgetbridge app was in background but phone unlocked -> Nothing -- phone did not ring. #### Your wearable device is: Amazfit Bip amazfit fw: 1.1.5.02 hw 0.11.19.5 #### Your android version is: Android 10 / Pixel 3A #### Your Gadgetbridge version is: Version 0.40.1
susundberg commented 2 weeks ago
Poster

Here is clean log

  • At 11:58 the phone rang - the gadgetbridge was on active on phone
  • At 12:09 the phone did not ring - phone as unlocked but gadgetbridge not active running.

EDIT: Moved the paste to a bin: https://paste.ubuntu.com/p/kfF9hRdwW3/

Here is clean log * At 11:58 the phone rang - the gadgetbridge was on active on phone * At 12:09 the phone did not ring - phone as unlocked but gadgetbridge not active running. EDIT: Moved the paste to a bin: https://paste.ubuntu.com/p/kfF9hRdwW3/
susundberg commented 2 weeks ago
Poster

Googling with source code let me to find: https://developer.android.com/guide/components/activities/background-starts

Android 10 (API level 29) and higher place restrictions on when apps can start activities when the app is running in the background. These restrictions help minimize interruptions for the user and keep the user more in control of what's shown on their screen.

Googling with source code let me to find: https://developer.android.com/guide/components/activities/background-starts > Android 10 (API level 29) and higher place restrictions on when apps can start activities when the app is running in the background. These restrictions help minimize interruptions for the user and keep the user more in control of what's shown on their screen.
ashimokawa commented 2 weeks ago
Owner

@susundberg

Thanks,so, probably it would be enough to use this change:

The app has been granted the SYSTEM_ALERT_WINDOW permission by the user.

@susundberg Thanks,so, probably it would be enough to use this change: > The app has been granted the SYSTEM_ALERT_WINDOW permission by the user.
izzy commented 2 weeks ago

@susundberg hint: in case they get longer (the current one luckily wasn't that long, though almost), you can also use a pastebin service for logs (e.g. Framabin) or a “file dropper” like Framadrop, and then link to that :wink:

@susundberg hint: in case they get longer (the current one luckily wasn't that long, though almost), you can also use a pastebin service for logs (e.g. [Framabin](https://framabin.org/)) or a "file dropper" like [Framadrop](https://framadrop.org/), and then link to that :wink:
susundberg commented 2 weeks ago
Poster

@ashimokawa

It also states:

Note: Apps running on Android 10 (Go edition) cannot receive the SYSTEM_ALERT_WINDOW permission.

So i am not sure -- does that mean that Android 10 some editions shall receive permissions but only ‘Go’ does not.

@izzy I though of it, but some ppl prefer to avoid external pastes (for example https://help.ubuntu.com/community/ReportingBugs) so i decided to go with paste. Maybe the template could include a hint of using external paste service.

@ashimokawa It also states: > Note: Apps running on Android 10 (Go edition) cannot receive the SYSTEM_ALERT_WINDOW permission. So i am not sure -- does that mean that Android 10 some editions shall receive permissions but only 'Go' does not. @izzy I though of it, but some ppl prefer to avoid external pastes (for example https://help.ubuntu.com/community/ReportingBugs) so i decided to go with paste. Maybe the template could include a hint of using external paste service.
izzy commented 2 weeks ago

@susundberg For short snippets, it's always better to paste them directly (no jumping). Just when they get too long (disturbing the “reading flow”) they should be “outsourced” – or hidden behind a spoiler, like this:

Here comes my log, which is a bit longer (click me) not just one line :P

How it's done?

<details> 
  <summary>Here comes my log, which is a bit longer</summary>
   not just one line :stuck_out_tongue_winking_eye:
</details>

If you forgot: use a web search on “github spoiler”, one of the first results usually is a link to StackOverflow which has this as answer.

@ashimokawa could we include that hint somewhere? I like the spoiler variant, as it doesn't rely on any 3rd party service or opening external links, while still keeping things “streamlined”.

@susundberg For short snippets, it's always better to paste them directly (no jumping). Just when they get too long (disturbing the "reading flow") they should be "outsourced" – or hidden behind a spoiler, like this: <details> <summary>Here comes my log, which is a bit longer (click me)</summary> not just one line :P How it's done? ```html <details> <summary>Here comes my log, which is a bit longer</summary> not just one line :stuck_out_tongue_winking_eye: </details> ``` If you forgot: use a web search on "github spoiler", one of the first results usually is a link to StackOverflow which has this as answer. </details> @ashimokawa could we include that hint somewhere? I like the spoiler variant, as it doesn't rely on any 3rd party service or opening external links, while still keeping things "streamlined".
vanous commented 1 week ago
Collaborator

@izzy

i can try o modify the template and see if this works.

As for Android 10, over time this might be more and more a problem... see screenshot from another project's changelog (attached) and here:.

Edit: using < img > tag also works here too, cool, it only needs an edit as the attachment url is unknown during upload.

@izzy i can try o modify the template and see if this works. As for Android 10, over time this might be more and more a problem... see screenshot from another project's changelog (attached) and here:. <img src=https://codeberg.org/attachments/4e5755df-6a89-47d7-b84c-9ded521a28c2> Edit: using &lt; img &gt; tag also works here too, cool, it only needs an edit as the attachment url is unknown during upload.
susundberg commented 1 week ago
Poster

@vanous: dont know, but at least with my android 10 phone the app is working properly - havent tried database exports / imports but least the data is there and the logs file can be found.

Quick glancing about the syncthing issue (linked above) is that its syncing ALL the files from the phone to other, and scoped storage is restricting the apps ability to access “random files” -> as layman i would guess it should not be issue with gadgetbridge

Anyway, the only thing i have found not working is the find my device :)

@vanous: dont know, but at least with my android 10 phone the app is working properly - havent tried database exports / imports but least the data is there and the logs file can be found. Quick glancing about the syncthing issue (linked above) is that its syncing ALL the files from the phone to other, and scoped storage is restricting the apps ability to access "random files" -> as layman i would guess it should not be issue with gadgetbridge Anyway, the only thing i have found not working is the find my device :)
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.