bootcompleted

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

Get Network on android.intent.action.BOOT_COMPLETED

亡梦爱人 提交于 2020-01-16 04:26:33
问题 I've an app that has a receiver of android.intent.action.BOOT_COMPLETED and start a private VPN. But when I receive a android.intent.action.BOOT_COMPLETED the network isn't ready yet. What can I do to start a android.intent.action.BOOT_COMPLETED and wait to have a network status? for example I can have a android.intent.action.BOOT_COMPLETED but the phone has no internet connection, or I can have a android.intent.action.BOOT_COMPLETED and 5 seconds later a internet Access. 回答1: You could

android: use Intent.ACTION_BOOT_COMPLETED or …?

有些话、适合烂在心里 提交于 2020-01-06 09:57:20
问题 In the AndroidManifest file, I want to capture the BOOT_COMPLETED event when the user re-boots their device. I am adding this permission: "uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" I have seen two "intent-filters" used by others on Stackoverflow: "Intent.ACTION_BOOT_COMPLETED" and "android.intent.action.BOOT_COMPLETED" What is the preferred action string here? Please advise and explain. 回答1: Intent.ACTION_BOOT_COMPLETED == android.intent.action.BOOT_COMPLETED

android: use Intent.ACTION_BOOT_COMPLETED or …?

二次信任 提交于 2020-01-06 09:54:27
问题 In the AndroidManifest file, I want to capture the BOOT_COMPLETED event when the user re-boots their device. I am adding this permission: "uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" I have seen two "intent-filters" used by others on Stackoverflow: "Intent.ACTION_BOOT_COMPLETED" and "android.intent.action.BOOT_COMPLETED" What is the preferred action string here? Please advise and explain. 回答1: Intent.ACTION_BOOT_COMPLETED == android.intent.action.BOOT_COMPLETED

Android 2.2: How to make an app to run automaticly on startup & how to make an app start another app

时光毁灭记忆、已成空白 提交于 2020-01-01 11:53:32
问题 The topic pretty much says it all. 回答1: Use BroadcastReceiver that receives Intent of action BOOT_COMPLETED . in onReceive() method create an Intent for your activity: @Override public void onReceive(Context context, Intent intent) { Intent myIntent = new Intent(context, YourActivity.class); context.startActivity(myIntent); } 回答2: For the application on startup, you need to add the permission <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> to your manifest. Then do

Android adb shell am broadcast: Bad component name

六眼飞鱼酱① 提交于 2019-12-28 08:09:49
问题 I am trying to 'emulate' a reboot (or anything else with the adb shell am ) and am unable to figure out how to reference my component. Then again, maybe I don't even understand what is meant by a component. Below I first include a few example commands that don't work, then my manifest. Note that StartupReceiver is successfully called when the 'phone' boots. I just want to re-trigger it without a full reboot. Failed ADB commands: $ ./adb shell am broadcast -a android.intent.action.BOOT

Can't complete After Boot listener in Android

拟墨画扇 提交于 2019-12-23 05:37:07
问题 I can't start a service as soon as device boots. My service and receiver classes are as follows. package android_programmers_guide.BroadcastReceiver1; import java.util.ArrayList; import java.util.List; import java.util.Timer; import java.util.TimerTask; import android.app.ActivityManager; import android.app.Service; import android.content.Intent; import android.content.pm.PackageManager; import android.os.IBinder; import android.util.Log; import android.widget.Toast; public class MyService

broadcasting of BOOT_COMPLETED intent action does not work properly

不问归期 提交于 2019-12-19 09:08:08
问题 I have a receiver class listening on several actions but it can not catch the android.intent.action.BOOT_COMPLETED action. What I am doing wrong? here is my manifest file: <uses-sdk android:minSdkVersion="7" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <!--<receiver android:name=".OtherReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver>--> <receiver android:name="com.myApp.AppReceiver"

how to start my application when ever mobile restart or turn on

六眼飞鱼酱① 提交于 2019-12-17 21:22:47
问题 How do i set my application as startup application, so when ever mobile restarts or turned ON, my application starts. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.installedapps22" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" /> <application android:icon="@drawable/cherry_icon" android:label="@string/app_name"> <activity android:name="

BOOT COMPLETE is not working in Android (Redmi)

牧云@^-^@ 提交于 2019-12-17 20:31:36
问题 I am currently working on a application which includes Boot_Completed Broadcast receiver concept. I have tested this app in my Motorola Moto G Phone. The app runs fine and shows the Toast message. But when I test this app in XIAOMI Redmi 1S phone it doesn't show the Toast message. I have already seen many questions similar to my issue (like these - Question 1, Question 2, etc.) ... But I haven't got any solution to this problem. My Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest