Hi All,
I am trying to start two Apps (Not mine) from my App. The aim, start a "video recorder" and an "upload to Google drive" with a button push.
I have extracted the code I am trying as "stand alone code". I have tried the "Package Name" and the "Launcher Name", same result.
All it does is bring up the settings menu. Neither APP is started.
Obviously I am missing something, any hints gratefully accepted.
I am trying to start two Apps (Not mine) from my App. The aim, start a "video recorder" and an "upload to Google drive" with a button push.
I have extracted the code I am trying as "stand alone code". I have tried the "Package Name" and the "Launcher Name", same result.
All it does is bring up the settings menu. Neither APP is started.
Obviously I am missing something, any hints gratefully accepted.
B4X:
#Region Project Attributes
#ApplicationLabel: RECORD
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#BridgeLogger: True
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private timer1 As Timer
Private myIntent1 As Intent
Private myIntent2 As Intent
Private jo As JavaObject
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)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
If FirstTime Then
StartCamera
StartUpload
timer1.Initialize("Timer1", 500)
timer1.Enabled = True
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub StartCamera
myIntent1.Initialize(myIntent1.ACTION_MAIN,"")
myIntent1.SetComponent("com.kimcy929.secretvideorecorder") 'From Package Does not work
'myIntent1.SetComponent("com.kimcy929.secretvideorecorder.VideoRecorderActivity_1") 'From Launcher Does not work
StartActivity(myIntent1)
' app:Background Video Recorder
' package:com.kimcy929.secretvideorecorder
' Launcher:com.kimcy929.secretvideorecorder.VideoRecorderActivity_1
End Sub
Sub StartUpload
myIntent2.Initialize(myIntent1.ACTION_MAIN,"")
myIntent2.SetComponent("com.icecoldapps.synchronizeultimate") 'From Package Does not work
'myIntent2.SetComponent("com.icecoldapps.synchronizeultimate") 'From Launcher Does not work
StartActivity(myIntent2)
' app:Synchronize Ultimate
' package:com.icecoldapps.synchronizeultimate
' Launcher:com.icecoldapps.synchronizeultimate.viewStart1
End Sub
Sub CloseActivities
jo.InitializeContext
jo.RunMethod("finishAffinity", Null)
End Sub
Sub Timer1_Tick
timer1.Enabled = False ' Stop Timer
CloseActivities
End Sub