I have set a timely notification of 30 minutes using JobScheduler, my app shows the notification in Android Emulator(Pixel 3 API 29 Q-10) after 30 minutes but not on my physical device(Samsung S8 Android 9 Pie).
The weird thing is the same notification shows up when I open the app after 30 minutes.
Are there any restrictions in android?
I have tried so far:
Running app in physical device using USB debugger mode, no errors.
Building the APK and installing it in the device separately
I found that, If the phone is in power saver mode or any battery optimized mode the notifications won't show up. Turning off power saver mode worked for me.
Related
Is there any way to lock recent app in Alcatel 1 phone. Because i've followed google guide and i didn't found any lock option in recent apps from feature view.
please help me to keep an app in lock mode for not killing the app when it is running long time.
Android version: 8.1.0
Is is possible to simulate the battery charging? I mean, I want to beat the phone (android) to beleive it is charging. The power cable is not connected, but the phone should detect, that it is connected.
Is it possible somehow?
Sure it is. Once you have installed Android Studio with Android Emulator, you can create new AVD (Android Virtual Device) aka Emulator, run your app on it and simulate battery level via Emulator settings. I checked it some time ago and it works fine.
I have a background service that handles network traffic for my app. The service returns START_STICKY and it works perfectly (restarts after app is swiped) on Emulated Google Pixel (Android 7.1.1) and on a physical Motorola G4 (Android 7.0).
However, when I test the same app on my OnePlus 2 (Android 6.0.1 - my main driver), the service just disappears when the app is swiped away without any trace or restart attempt...
If anyone has any ideas or suggestions I'd love to hear them.
I am using the latest Phonegap Push Plugin for my Phonegap Application. It's working fine below Nougat but in Nougat the same code does not work. I have tried to debug several times, also cross verified at server side if there is anything missing but found the device is not recognized by the GCMSender. Also everytime I uninstall and reinstall the Application the registered device token is same whereas in case of the Pre Nougat devices, it's always different after each uninstall and fresh install. The device I am having is Nexus 6P.
Finally after searching so much found the below answer:
Reboot your device since it must have got OTA update for Nougat.
System's cache partition might not have been cleared. Seems to be an issue in Nougat. Below are the steps for rebooting and found the same Push Notification code working in Nougat as well:
-Power down your device
-Press and hold Volume Down and Power simultaneously until you see the boot screen
-Use Volume Down to navigate to Recovery Mode
-Press Power to confirm
-Wait until you see the Android robot then hold down Power.
-Press and release Volume Up
-Navigate with Volume Down to the Wipe Cache Partition option
-Press Power to select
-Use Volume Down to highlight the Yes option
-Press Power to select
-Press Power to reboot
Reference Link: https://productforums.google.com/forum/#!topic/nexus/xEssjbdwpgk
I just installed the Android SDK on my Mac. When I connect my Nexus 4 phone (running 4.3) via USB, it shows up using the monitor tool, but after a minute, it disappears. Once it's gone, adb devices fails to show it as well.
I have turned on developer mode and since it shows up for a minute, I assume all that is working correctly.
The device is not going to sleep and the screen is not dimming. I can't figure out why it's disconnecting.
Any ideas? Is it something on the Mac side that's killing it? Nothing is showing up on the Mac's console logs when it disconnects.