I am using a very basic launcher app whose only job is to start an app. The launcher works Ok and starts the relevant app, but other apps that are supposed to start at boot are not starting.
Has anyone any idea why this might be happening?
Has anyone any idea why this might be happening?
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddActivityText(main, <intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>)
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
startApp("com.my.app")
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub startApp(pkgName As String) As Boolean
Try
Dim Intent1 As Intent
Dim pm As PackageManager
Intent1 = pm.GetApplicationIntent (pkgName)
StartActivity (Intent1)
Return True
Catch
Return False
End Try
End Sub