android-os-handler

Force android app to open when it's installation complete

只谈情不闲聊 提交于 2021-01-28 00:23:35
问题 I'm running an android app to be the only app to run on the system, so, when boot-completed I launch the app and prevent the user from exiting it for any reason(which made me disable both navigation status bars). Then, to achieve an update to the app, I look if there is a new one, and if so, I run a background task to download the new update from the sftp server using jsch, and when the app finish downloading, I install the apk using ACTION_VIEW intent: Intent intent = new Intent(Intent

Working Directory: null Environment:?

孤人 提交于 2019-12-06 13:55:12
I am trying to run below code,I am using [1]: https://github.com/rbochet/Fast-Forward-Reboot this link. try { Runtime.getRuntime().exec( new String[] { "/system/bin/su", "-c", "reboot now" }); } catch (IOException e) { e.printStackTrace(); } And Error W/System.err﹕ java.io.IOException: Error running exec(). Command: [/system/bin/su, -c, reboot now] Working Directory: null Environment: null. PERMISSIONS android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_EXTERNAL_STORAGE android.permission.WRITE_INTERNAL_STORAGE android.permission.READ_INTERNAL_STORAGE android.permission.REBOOT. I

java.lang.NoClassDefFoundError: android.os.AsyncTask

廉价感情. 提交于 2019-12-06 05:41:35
问题 Weird error on Android 2.2 device . The following works in all devices and we never encountered this error until recently in GT-I5510 .Our app supports min sdk-level 8 .Clearing the app data from settings and starting the app fixed the issue but what i dont understand why its not able to find the class..Android support library is added . java.lang.NoClassDefFoundError: android.os.AsyncTask at com.example.android.library.stTest.stController.runTests(stController.java:228) at com.example

Can I detect if Android has killed the application (task process) from a Notification Intent / PendingIntent?

会有一股神秘感。 提交于 2019-11-28 07:06:28
The Android OS kills processes when it's low on memory. Scenario: Android kills the app process and I re-open it through either the Android launcher or the recent-task list (long press home button). I can check if Android killed my app process in the onCreate() method of the most recently viewed activity using: @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); if (savedInstanceState != null) { // Re-initialise things that killing the app would have destroyed } } However, if Android kills the app process and I re-open it through a Notification

Can I detect if Android has killed the application (task process) from a Notification Intent / PendingIntent?

有些话、适合烂在心里 提交于 2019-11-27 05:43:58
问题 The Android OS kills processes when it's low on memory. Scenario: Android kills the app process and I re-open it through either the Android launcher or the recent-task list (long press home button). I can check if Android killed my app process in the onCreate() method of the most recently viewed activity using: @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); if (savedInstanceState != null) { // Re-initialise things that killing the app would