android-intent

Start intent after Reboot

人盡茶涼 提交于 2020-02-23 06:13:09
问题 I have a GPS Service that gets GPS position every 60 seconds. It's working okay, but it doesn't do anything after phone reboot. I tried adding this in a BroadcastReceiver that is working after reboot but nothing happens. Any help would be great; I just need to load my Intents after reboot. //Start intents after reboot if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED")) { context.startService(new Intent(context, DashboardActivity.class)); } GPSActivity.java public int

Intent BOOT_COMPLETED not working on Huawei device

烈酒焚心 提交于 2020-02-23 05:39:28
问题 I want to listen to APN Changes in my Android App. Therefore I start a Service on android.intent.action.BOOT_COMPLETED . This Service starts a ContentObserver which listens to changes to content://telephony/carriers/preferapn . I tested this setup on a few different devices (e.g. LG Spirit with Android 5.0, Samsung A3 with 6.0, Emulator Nexus5 with 7.0 and Huawei P9 Lite with 7.0) On the Huawei phone onCreate of my Service is not called. My other approach with android.intent.action.ANY_DATA

How to use putExtra to open another app and send some data for it?

六月ゝ 毕业季﹏ 提交于 2020-02-21 14:00:09
问题 I have two apps (A, B) that I want to link them together. When the user is in app A, by clicking on a button I want to open app B and send some data to it. I used this method in app A to go app B and send some data to app B: public static boolean openApp(Context mContext, String packageName) { PackageManager manager = context.getPackageManager(); Intent goToEncyclopedia = manager.getLaunchIntentForPackage(packageName); if (goToEncyclopedia == null) { return false; } goToEncyclopedia

How to use putExtra to open another app and send some data for it?

对着背影说爱祢 提交于 2020-02-21 13:49:32
问题 I have two apps (A, B) that I want to link them together. When the user is in app A, by clicking on a button I want to open app B and send some data to it. I used this method in app A to go app B and send some data to app B: public static boolean openApp(Context mContext, String packageName) { PackageManager manager = context.getPackageManager(); Intent goToEncyclopedia = manager.getLaunchIntentForPackage(packageName); if (goToEncyclopedia == null) { return false; } goToEncyclopedia

How to use putExtra to open another app and send some data for it?

不羁岁月 提交于 2020-02-21 13:46:36
问题 I have two apps (A, B) that I want to link them together. When the user is in app A, by clicking on a button I want to open app B and send some data to it. I used this method in app A to go app B and send some data to app B: public static boolean openApp(Context mContext, String packageName) { PackageManager manager = context.getPackageManager(); Intent goToEncyclopedia = manager.getLaunchIntentForPackage(packageName); if (goToEncyclopedia == null) { return false; } goToEncyclopedia

How to use putExtra to open another app and send some data for it?

邮差的信 提交于 2020-02-21 13:45:29
问题 I have two apps (A, B) that I want to link them together. When the user is in app A, by clicking on a button I want to open app B and send some data to it. I used this method in app A to go app B and send some data to app B: public static boolean openApp(Context mContext, String packageName) { PackageManager manager = context.getPackageManager(); Intent goToEncyclopedia = manager.getLaunchIntentForPackage(packageName); if (goToEncyclopedia == null) { return false; } goToEncyclopedia

Android M startActivity battery optimization

纵然是瞬间 提交于 2020-02-20 01:37:36
问题 I'm developing an app that should alert an user if is near a place. and of course have to do that also if the phone is in idle. With DOZE now I understood that I have to whitelist my app, and to do that I saw that I can start an intent with the action request thanks to Buddy's answer in this post Intent intent = new Intent(); String packageName = context.getPackageName(); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); if (pm.isIgnoringBatteryOptimizations

Android M startActivity battery optimization

╄→尐↘猪︶ㄣ 提交于 2020-02-20 01:33:08
问题 I'm developing an app that should alert an user if is near a place. and of course have to do that also if the phone is in idle. With DOZE now I understood that I have to whitelist my app, and to do that I saw that I can start an intent with the action request thanks to Buddy's answer in this post Intent intent = new Intent(); String packageName = context.getPackageName(); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); if (pm.isIgnoringBatteryOptimizations

Android M startActivity battery optimization

自古美人都是妖i 提交于 2020-02-20 01:32:10
问题 I'm developing an app that should alert an user if is near a place. and of course have to do that also if the phone is in idle. With DOZE now I understood that I have to whitelist my app, and to do that I saw that I can start an intent with the action request thanks to Buddy's answer in this post Intent intent = new Intent(); String packageName = context.getPackageName(); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); if (pm.isIgnoringBatteryOptimizations

Android deep linking - Back stack

旧巷老猫 提交于 2020-02-18 07:38:33
问题 I am trying to implement deep linking in my Android application. I have been following this guide. I have an Android Activity that is started from and intent-filter in the Android manifest: <activity android:name=".MyActivity" android:parentActivityName=".MainActivity" > <intent-filter android:label="@string/filter_title_deep_link"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category