AlarmManager Firing In Emulator But Not On Physical Oreo Device
We are running some alarm services in the background and it's working in Oreo emulator, but on a real device it is not working. Can anyone tell why my code fails?
val alarmIntent = Intent(this, NetworkChangeReceiver::class.java) val pendingIntent = PendingIntent.getBroadcast(this, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT) val calendar = Calendar.getInstance() calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add(Calendar.MINUTE, 1) val manager = getSystemService(Context.ALARM_SERVICE) as AlarmManager manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.timeInMillis, 1000 * 60, pendingIntent)
another option is using work manager but it's working only every 15 min.
Background services it's not working in some devices like Vivo : ColorOs OnePlus : OxygenOs MI : FunTouchOs . . . .
More information check this below url. https://stackoverflow.com/a/52373492/7387028
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View