Android App get killed in HUAWEI phone - android

Few days ago I moved to HUAWEI P9 phone and try to keep developing my app.
My new problem (have not seen it on other devices..) is that my app is getting killed after the screen turns off (not immeditaely but after a minute or too).
To be sure that the issue is not related to my application, I created the simple "hello world" application from the android studio, and the behavior is exactly the same.
I'm running Android 6.0 (API 23) on my device.
Any Idea why even the simplest app is getting killed after the screen is turned off?
Thanks!
Lior

You need to add your app in the 'protect application with battery saver' (under battery's option).
Hope this helps

Related

Does anyone knows why my Delphi FMX app opens from beginning after a while?

I am new in Delphi and start using Delphi 10.4.1 to develop Android apps. I use Samsung Galaxy Note 10 Light.
Unfortunately my apps starts from the beginning if I start using other apps or do some phone calls etc.
I tried to play with my phone settings to not the let my apps do battery optimized etc. but no use.
I compiled Debug - Release no chance at all.
I don't know if is there settings or something on my Delphi (I did try an Xamarin Apps, they keep stay exactly in the same screen even if I open it back after a day )
Please help !
Thanks

How to stop samsung device maintenance to put our app in sleep mode android?

I am developing one application in which there is Background Service, I want my application always run in background.
In Samsung device android 7.0 user can put the application in sleep mode, but I don't want user to do it because there is Background service is running.
Also it is good if I my app is listed in Unmonitered app list instead of direct listed in power saver mode.
When I install whatsapp it does that actually, it listed in Inmonitered app list.
Thanks.
Here I am suggesting for the only Samsung devices,
You can do it by using Knox SDK which is used to create the application with custom configuration for Samsung device,
Here also some link which helps you.
Response from Samsung moderator after question like same you
https://seap.samsung.com/forum-topic/applicationpolicyaddpackagetobatteryoptimizationwhitelist-does-not-work-normally
Maybe this all will help you.

Android: Spotify authentication doesn't work on Android 6.0 when installed via Playstore

I'm developing a Spotify-app on Android. The app already runs on Nougat and Oreo, but I'm still having problems with Android 6.0.
The Problem is if I install the app via Playstore, I'm stuck on the loading screen because I don't receive a correct response.
But now, if I install the exact same app from Android Studio, it works without any problems. This also makes debugging very difficult, because I can't use the debugger for Playstore apps.
Do you have any Ideas why? I've got the same problem on all 3 devices that run Android 6.0
I don't really have an answer for that, but I can't even get that far. Which Spotify API are you using? If you're able to get it to get that far, I may have hope haha

How to test android app that uses flashlight?

I'm currently developing an app for android that uses the flash. My miserable problem is that I don't have a device featuring a flashlight... Is there any emulator in the world that shows the flash state?
Thank you guys in advance!
José.
There is no emulator that can allow you test the flashlight. You need a real device for it.
You need to add the permission also to your manifest file - "android.permission.FLASHLIGHT"
If you are working with laptop then You can use bluestack to check your application related to flashlight it will work
The android emulator does not work with "flashlight apps".
I was also disappointed to hear this when I started developing my flashlight app quite some time ago. I haven't found a solution either, except for having a development device (my phone) to test the app on.
In general, it helps to have a development device on hand because the emulator is not always 100% accurate.
Best of luck.

Android app restarts after device language has changed

I'm working on a Android app that supports several languages. When I put it in background, change device language and then resume the app, it restarts and it seems like the Android system destroys it after changing device language. Do you know if this is what happens? If not, it's certainly regarded to my code, but I don't really know if Android system behaves this way. I've tested on devices with Android 4.3, 4.4, 4.0 versions. On 4.0 it doesn't happen always.
I would like to avoid the app restart, as I don't need to also change the app language along with the device's.
Thank you in advance.

Categories

Resources