How to start Power Manager of all android manufactures to enable background and push notification?

i have collected some intent from various post: private static final Intent[] POWERMANAGER_INTENTS = { new Intent().setComponent(new ComponentName(“com.miui.securitycenter”, “com.miui.permcenter.autostart.AutoStartManagementActivity”)), new Intent().setComponent(new ComponentName(“com.letv.android.letvsafe”, “com.letv.android.letvsafe.AutobootManageActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.startupmgr.ui.StartupNormalAppListActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.optimize.process.ProtectActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.appcontrol.activity.StartupAppControlActivity”)), new Intent().setComponent(new ComponentName(“com.coloros.safecenter”, “com.coloros.safecenter.permission.startup.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.coloros.safecenter”, “com.coloros.safecenter.startupapp.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.oppo.safe”, “com.oppo.safe.permission.startup.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.iqoo.secure”, “com.iqoo.secure.ui.phoneoptimize.AddWhiteListActivity”)), new Intent().setComponent(new ComponentName(“com.iqoo.secure”, “com.iqoo.secure.ui.phoneoptimize.BgStartUpManager”)), … Read more

Notifications fail to display in Android Oreo (API 26)

Per the comments on this Google+ post: those [warnings] are currently expected when using NotificationCompat on Android O devices (NotificationCompat always calls setSound() even if you never pass in custom sound). until the Support Library changes their code to use the AudioAttributes version of setSound, you’ll always get that warning. Therefore there’s nothing that you … Read more

Handling Push Notifications when App is NOT running

When your app is not running or killed and you tap on push notification this function will trigger; – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions so you should handle it like this, UILocalNotification *localNotif = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; if (localNotif) { NSString *json = [localNotif valueForKey:@”data”]; // Parse your string to dictionary }

didReceiveRemoteNotification not working in the background

Implementing didReceiveRemoteNotification and didReceiveRemoteNotification:fetchCompletionHandler is the correct way, but you also need to do the following: Make sure to register for remote notifications, see documentation here: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; return YES; } Also make sure to edit Info.plist and check the “Enable Background Modes” and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)