Commit graph

158 commits

Author SHA1 Message Date
20245d1d83 [strings] Regenerated
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-11-05 10:44:35 +02:00
813c1f54a0 [android] Disable the screen wake lock by default
Organic Maps drains the battery like crazy with default settings.

**Steps to reproduce:**

1. Install and run the app.
2. Lock your device and put it on a flat surface, with the screen facing up.
3. Pick up the device OR just tap on the screen.
4. The screen will automatically turn on, this is an Android feature.
5. Organic Maps will never allow the screen to go off after that.

Now, imaging this case happens while the phone is in a pocket. The battery may
The battery will completely drain before the user even notice that screen is on.
I see Organic Maps draining battery and burning screens on my devices regulary.

The problem is caused by two options which are enabled by default -
"Show on the lock screen" and "Allow the screen to sleep". The first option
adds the app to the lock screen (which is weird on its own). The second
option doesn't allow the phone's screen to go off.

This patch does the following:

- Inverts "Allow the screen to sleep" option to "Keep the screen on".
- Sets the default value of the option to OFF (=allow screen to sleep).
- Applies the option only in FOLLOW & FOLLOW_ROTATE location modes.
- Forces the screen to keep on during navigation no matter of the option.

To summarize, with enabled "Keep the screen on" the screen will be kept
on in the following cases:

- During navigation.
- FOLLOW and FOLLOW_ROTATE location modes.

Without the option, the screen will be kept on only during navigation.

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-11-05 10:44:35 +02:00
Viktor Govako
d14b20b8fa [android] Follow up ae42252f85.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
2023-11-04 10:11:02 +02:00
ae42252f85 [android] Remove unused code
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-11-02 17:53:46 -03:00
90757fdc65 [android] Symlink outdoors map style files into assets
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2023-11-02 09:50:46 -03:00
1b51261319 Fix layout land on little screen
Signed-off-by: Jean-BaptisteC <jeanbaptiste.charron@outlook.fr>
2023-11-01 22:50:30 +01:00
fb5b170643 Add about layout land
Signed-off-by: Jean-BaptisteC <jeanbaptiste.charron@outlook.fr>
2023-11-01 02:32:36 +01:00
Alexander Borsuk
47a9eae8be [android] Updated NDK to 26.1.10909125
Signed-off-by: Alexander Borsuk <me@alex.bio>
2023-10-30 09:34:19 +01:00
4c26c81101 Migrate to TextInputEditText
Signed-off-by: Jean-BaptisteC <jeanbaptiste.charron@outlook.fr>
2023-10-29 21:40:18 +01:00
227d923800 [android] Fix -Pfirebase and -Pandroidauto Gradle options
Make -Pfirebase to be equivalent to -Pfirebase=true as it was before.

Fixes regression added by 8d17e90b "Add compile-time flag for Android Auto"

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 10:59:56 -07:00
51200bd279 [android] Fix a crash in processNavigation() called after onDestroy()
```
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.activity.result.ActivityResultLauncher.launch(java.lang.Object)' on a null object reference
  at app.organicmaps.SplashActivity.processNavigation (SplashActivity.java)
  at app.organicmaps.MwmApplication.nativeProcessTask (MwmApplication.java)
  at app.organicmaps.MwmApplication.lambda$forwardToMainThread$0 (MwmApplication.java)
  at android.os.Handler.handleCallback (Handler.java:809)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:166)
  at android.app.ActivityThread.main (ActivityThread.java:7555)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:469)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:963)
```

Fixes #6190

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 10:32:52 -07:00
9f57918e63 [android] Disable obfuscation of code
Make debugging easier. The source code is available anyway.

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 09:14:47 -07:00
f14466fab7 [android] Tag JNI methods and enable R8 optimizations
R8 is not enabled for Debug, please test Beta or Release:

```
./gradlew -Parm64 runFdroidBeta
```

Results:

```
48534296 fdroid-beta-before.apk
45663208 fdroid-beta-after.apk
```

This patch saves almost 3MB or ~6%.

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 09:14:47 -07:00
4cadc099ba [android] Switch to use BundleCompat
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 09:02:49 -07:00
56d37dbe64 [android] Bump CompileSdkVersion to 34
```
Dependency 'androidx.core:core-ktx:1.12.0' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.

:app is currently compiled against android-33.

Recommended action: Update this project to use a newer compileSdk
of at least 34, for example 34.
```

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 09:02:49 -07:00
d4ccedf59b [android] Add FOREGROUND_SERVICE_LOCATION permission for Android 14
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-29 09:02:49 -07:00
Andrew Shkrob
f9c916abc7 [strings] Regenerated
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
2023-10-29 09:02:21 -07:00
Andrew Shkrob
7d85d74402 [android-auto] Increase minCarApiLevel
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
2023-10-29 09:00:32 -07:00
Andrew Shkrob
423c210344 [strings] Regenerated
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
2023-10-29 06:58:11 -07:00
Andrew Shkrob
ccd6b59d25 [android-auto] Navigation Screen refactoring
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
2023-10-29 06:58:11 -07:00
c784a56c0c [Android] Replace 'adb shell monkey ...' with 'adb shell am start ...'
Signed-off-by: S. Kozyr <s.trump@gmail.com>
2023-10-29 06:55:13 -07:00
68a15ccd2f [android] Fixing application launch on Android 13.
Signed-off-by: S. Kozyr <s.trump@gmail.com>
2023-10-29 06:55:13 -07:00
Vinod Patil
d82f6add10 [android] Smoother corners for the place page. fixes #6215.
Signed-off-by: Vinod Patil <61724808+vinodpatildev@users.noreply.github.com>
2023-10-29 08:28:52 +01:00
David Martinez
10f0eaf6a5 [strings] Regenerated
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
2023-10-28 16:25:49 -03:00
72384d5fad [strings] Regenerated
Signed-off-by: Gonzalo Pesquero <gpesquero@yahoo.es>
2023-10-23 22:44:59 +02:00
0867173168 Fix deprecations in build.gradle
Signed-off-by: Jean-BaptisteC <jeanbaptiste.charron@outlook.fr>
2023-10-22 23:15:11 +02:00
Harry Bond
766975d159 [strings] regenerated
Signed-off-by: Harry Bond <endim8@pm.me>
2023-10-20 23:37:33 +02:00
Viktor Govako
21d0d19be2 [android] Fixed isFirstLaunch regression. Follow up c0a7710f48.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
2023-10-17 13:26:33 -03:00
884371c4b5 [strings] Regenerated
Signed-off-by: Jean-BaptisteC <jeanbaptiste.charron@outlook.fr>
2023-10-15 11:39:02 +02:00
David Martinez
cfef25bdc7 [strings] Regenerated
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
2023-10-12 12:28:30 -03:00
meenbeese
26ea01d48e [strings] Regenerated
Signed-off-by: meenbeese <meenbeese@tutanota.com>
2023-10-11 23:27:43 +02:00
meenbeese
f861b2614d [strings] Rename the "list settings" key to "edit"
Signed-off-by: meenbeese <meenbeese@tutanota.com>
2023-10-11 23:27:43 +02:00
meenbeese
7654b81bb0 [bookmarks] Remove max limit to search bookmarks
Signed-off-by: meenbeese <meenbeese@tutanota.com>
2023-10-10 21:26:35 -03:00
Michał Brzozowski
dd14031aef [strings] Regenerated
Signed-off-by: Michał Brzozowski <www.haxor@gmail.com>
2023-10-10 11:52:56 -03:00
Alexander Borsuk
2ae80f01b1 [strings] Regenerated ar
Signed-off-by: Alexander Borsuk <me@alex.bio>
2023-10-08 05:30:34 +02:00
Keith Conger
97cb2e5f82 [android] Fix backurl usage
Signed-off-by: Keith Conger <keith.conger@blackboxembedded.com>
2023-10-07 11:16:56 -03:00
David Martinez
ff62ef79c8 [strings] Remove "Avoid on every route" on Android Auto
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
2023-10-07 13:45:54 +02:00
David Martinez
1fcef1a628 [strings] Regenerated
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
2023-10-07 13:45:54 +02:00
meenbeese
507caa7820 [strings] Remove "Avoid on every route" on Android
Co-authored-by: meenbeese <meenbeese@tutanota.com>
Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
2023-10-07 13:45:54 +02:00
Andrew Shkrob
ee3803bc4c [android-auto] Widgets fix
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
2023-10-06 20:49:43 -03:00
Harry Bond
ccd7fbfff7 [strings] regenerated
Signed-off-by: Harry Bond <endim8@pm.me>
2023-10-06 11:30:04 -03:00
9f6dfe336f [android] Add a comment why NavigationService cannot be STICKY
Fixes #6091

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-06 09:36:20 +03:00
233ec020c7 [android] Improve the changing of location refresh intervals
For all location modes other than NOT_FOLLOW location should be updated
as soon as possible. Also, keep in mind that Android updates GPS data
only once every second.

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-06 09:36:20 +03:00
Michał Brzozowski
b13b0a53c0 [strings] Regenerated
Signed-off-by: Michał Brzozowski <www.haxor@gmail.com>
2023-10-05 23:42:55 +02:00
Andrew Shkrob
0a53bd28a9 [android-auto] Fix deprecation warning in CarAppService
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
2023-10-05 08:48:43 +03:00
b44a1183c8 [android] Remove unused imports using Android Studio
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-05 08:42:20 +03:00
c0a7710f48 [android] Remove UpgradeReceiver
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-05 08:38:50 +03:00
Alexander Borsuk
be6b5d1316 [strings] Regenerated
Signed-off-by: Alexander Borsuk <me@alex.bio>
2023-10-04 13:23:34 +02:00
30c02a4c98 [android] Remove useless interfaces
Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2023-10-02 15:35:24 +03:00
Viktor Govako
0ba5edf098 [strings] Regenerated.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
2023-09-30 22:11:12 -03:00