D duneplodder Active Member Licensed User Longtime User Dec 21, 2011 #1 Still fairly new to Basic4Android, but really enjoying the learning process. A couple of questions: Say I have 2 separate B4A apps: "FirstApp" & "SecondApp" Is it possible to run SecondApp from within FirstApp? Is it possible to run SecondApp (or any other) from a Service?
Still fairly new to Basic4Android, but really enjoying the learning process. A couple of questions: Say I have 2 separate B4A apps: "FirstApp" & "SecondApp" Is it possible to run SecondApp from within FirstApp? Is it possible to run SecondApp (or any other) from a Service?
Erel B4X founder Staff member Licensed User Longtime User Dec 21, 2011 #2 You can start any application by sending the correct Intent. The easiest way to see the required Intent is to look at the unfiltered logs while manually starting the application. Upvote 0
You can start any application by sending the correct Intent. The easiest way to see the required Intent is to look at the unfiltered logs while manually starting the application.
D duneplodder Active Member Licensed User Longtime User Dec 21, 2011 #3 Thank you Erel, that's something else I've learned today! Upvote 0
D duneplodder Active Member Licensed User Longtime User Dec 21, 2011 #4 I've made progress on this. Some things I've learned: 1. The phone library must be selected in the Libs tab. 2. You need the exact package name - I was getting this slightly wrong & Erel's suggestion helps here. In my example it is "rms.Alarm" - you need the quotes. 3. I was able to run this from Service_Start Example Code: Code: Dim pm As PackageManager Dim in As Intent in.Initialize("","") in=pm.GetApplicationIntent("rms.Alarm") If in.IsInitialized Then StartActivity(in) End If Thanks to Erel & other people's examples. Last edited by a moderator: Dec 22, 2011 Upvote 0
I've made progress on this. Some things I've learned: 1. The phone library must be selected in the Libs tab. 2. You need the exact package name - I was getting this slightly wrong & Erel's suggestion helps here. In my example it is "rms.Alarm" - you need the quotes. 3. I was able to run this from Service_Start Example Code: Code: Dim pm As PackageManager Dim in As Intent in.Initialize("","") in=pm.GetApplicationIntent("rms.Alarm") If in.IsInitialized Then StartActivity(in) End If Thanks to Erel & other people's examples.