launch application

Monkey Forums/Monkey Beginners/launch application

hub(Posted 2016) [#1]
hi !
i'm searching a way to launch another application from my current monkey project and close my application. the other application is an editor coded with b4a)

(android kitkat).

Goodlookinguy(Posted 2016) [#2]
You'll have to 'extern' it yourself (I think. Unless someone already did so.). I found code here that would suggest how you go about launching another program,

It would go something like this (did not test, just giving hints essentially)...
#If Lang="java"
Class Example
    Function LaunchSomething:Void( package:String )

External File
class Example
    public static void LaunchSomething( String package )
        Intent launchIntent = getPackageManager().getLaunchIntentForPackage(package);

To call it, you would write...

hub(Posted 2016) [#3]
Have these errors :

(all my application extern java file)

imports ?

Goodlookinguy(Posted 2016) [#4]
The word "package" is a Java keyword I think. That was my bad. Just change that to something else like, "appPackage", or something.

hub(Posted 2016) [#5]

hub(Posted 2016) [#6]
perhaps a problem with context ?

Difficult to understand what's wrong and correct the code for me !

hub(Posted 2016) [#7]
perhaps miss some BBAndroidGame things ?

hub(Posted 2016) [#8]
i need some help with this. Could somebody help me ?
Apologize to bump this and many thanks if you have some ideas !