PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 24 → Execute outher apk android
Execute outher apk android
Débuté par adrianoboller, 03 oct. 2014 16:10 - 2 réponses
Membre enregistré
2 969 messages
Popularité : +89 (91 votes)
Posté le 03 octobre 2014 - 16:10
//ExecRun - Funcional - Perfeito

import android.app.Activity;
import android.content.Intent;
import java.lang.*;
import android.util.*;
import java.lang.Exception;
import android.util.Log;

public static boolean ExecRun(String Aplicativo){
try {

if (Aplicativo == null){
return false;
}
else{
Intent Apk = getActiviteEnCours().getPackageManager().getLaunchIntentForPackage(Aplicativo);
getActiviteEnCours().startActivity(Apk);
return true;
}

}
catch(Exception e) {
Log.e("WM",e.toString());
return false;
}
}
Membre enregistré
2 969 messages
Popularité : +89 (91 votes)
Posté le 03 octobre 2014 - 16:11
In form windev mobile button

ExecRun("br.com.taxi62")
Posté le 19 décembre 2017 - 15:33
Good Night, Boller.

I saw, about many many resolutions explained for you to start the Others Apps its like Calc for example and others Apps, using the one main App build for us.

However, you not explain how stop one this Apps (outside main app), because the App have one function to active others apps, but how i will stop this same opened Apps? For example: Its possivel start the Calc App or Google Maps App across the command line below:

bStarted is boolean
// Starts the application
bStarted = ExeRun("com.google.android.apps.maps")

But my main doubt is: Its possible create onde button inside in the parent application that to close this same application that my app its open in lost? Please, tell me about one solution that i can use for this.

Thank you, and congratulations for all the help us and for your especial informations.

Willy