The refactored DiscoveryActivityV2 does not freeze anymore, even under
maximum scanning intensity on older phones, and seems to not have
introduced any regressions.
- Make ChartsHost independent from ChartsActivity
- Rename ChartsActivity to ActivityChartsActivity
- Rename AbstractChartFragment to AbstractActivityChartFragment
- Pull common charts logic to parent classes:
- From ActivityChartsActivity to AbstractChartsActivity
- From AbstractActivityChartFragment to AbstractChartsFragment
This also touches parts of the app not only used for bangle.js.
E.g. pending intents gets new flags from SDK 23 inclusive.
Bluetooth permissions are updated to work on SDK 31.
Permission handling is updated to the new way for doing it with
introduction of a new function. This is called for newer sdk versions.
bump Bangle.js flavor targetSdkVersion to 31
update comments re SDK 31
set the 'exported=true' I introduced to false instead - except for three places
add uses-permission for handling bluetooth in order to work on api >30
add if-blocks adding FLAG_IMMUTABLE to PendingIntents on api >30
add link to bluetooth documentation
Add comment to banglejs manifest. Add requirement annotation to ControlCenterv
bump compileSdkVersion to 31
add "OpenAppSettings" permission popup while working out individual permission popups on android 13
if SDK < 31 do permissions one by one, else send user to app info page to switch permissions manually
working solution, but needs cleaning
do some cleaning, not done though
remove some logging
remove import Log
tweak and remove toasts in new permissions handling
Change conditions `> Build.VERSION_CODES.Q` to `>= Build.VERSION_CODES.R` matching the style used everywhere else
Revert "Change conditions `> Build.VERSION_CODES.Q` to `>= Build.VERSION_CODES.R` matching the style used everywhere else"
This reverts commit 2929629ff43fbb685eb3d15e42459f321f68fa11.
Revert "add if-blocks adding FLAG_IMMUTABLE to PendingIntents on api >30"
This reverts commit ed8e1df7bb8b71fee745fbf9d10747d47c8f6cb8.
Pending intents gets `PendingIntent.FLAG_IMMUTABLE` if `(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)`.
Bangle.js: undo `@RequiresApi` code R
... to remove error in Android Studio where declared required api was
higher then minSDK version.
Use FLAG_MUTABLE for reply to test notification
This should fix Gadgetbridge crashing when replying to the test
notification from the debug activity. As reported here:
https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2924#issuecomment-917282
Change to use FLAG_IMMUTABLE/_MUTABLE from SDK 23
... as suggested by Android Studio. This is supposed to make the app
more secure by not allowing certain changes to pending intents where
they are not expected. If I understood correctly.
Add PendingIntentUtils class to manage mutability
Using objects instead of primitives, reading from correct JSON
Added unregisterReceiver for GenericWeatherReceiver
Added GenericWeatherReceiver to manifest
- adds initial device support
- can control driving forward/back/left/right
- probably could be implemented further:
- battery reading
- device name?
- lights on
- fast/slow speed mode
Add support for (explicit) service intents.
Add support for setting flags for intents.
Add support for setting multiple categories for intents.
Add ability for Gadgetbridge to wake the Android device and leave the
lock screen to start activities when it is sleeping. A new activity
'WakeActivity' is used for this. (Must use 'trusted device' in Android)
Add dismiss-button to 'display over other apps' permission pop up.
Bangle.js can send "gadgetbridge" as package info to accomodate the
different GB build variants/flavours.
Use only getContext() and not getApplicationContext() when executing
the intents.
...to allow intents to start activities on the android device.
Add pop-up asking for permission to "Display over other apps"
Add info for intents on Bangle.js
Add message to display on "Display over other apps" permission pop-up
Move permission to display over other apps to main build variant/flavor.
fix getting permission for display over other apps.
Clarify that permission to display over other apps is mainly for Bangle.js.
Adds Support for BLDC controller VESC connected to a BLE serial device like an HM10.
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2491
Co-authored-by: dakhnod <dakhnod@noreply.codeberg.org>
Co-committed-by: dakhnod <dakhnod@noreply.codeberg.org>
- rename some methods to better indicate their functions.
- make the notification filter to be allow or deny list,
solves #2256 and #336
- make app word filter to behave based on allow/deny settings.
- make Pebble notifications to honor the allow/deny settings.
- add generic "debug function" to Debug activity.
- add Message privacy mode settings, solves #2279
I saw a log line posted [here](https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/2118) that indicates that the permission requirement might be incorrect in the broadcast receiver. Removed it.
I also future-proofed the BLUETOOTH/BLUETOOTH_ADMIN permissions according to Android 12 Beta documentation, there's probably much more than this that has to be updated to be fully Android 12 compliant though.
Co-authored-by: TaaviE <taavi.eomae@gmail.com>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2331
Co-authored-by: TaaviE <taavie@noreply.codeberg.org>
Co-committed-by: TaaviE <taavie@noreply.codeberg.org>