| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 25 septembre 2020 - 14:30 |
Salut tout le monde, je ne comprends pas sur windev mobile 25 le lance appli semble ne pas fonctionner !
ToastAffiche("lancement ",toastCourt,cvMilieu,chCentre) bLancé = LanceAppli("com.android.chrome") ToastAffiche("résultat lancement "+bLancé,toastCourt,cvMilieu,chCentre) SI ErreurDétectée ALORS ToastAffiche("erreur "+ErreurInfo(),toastCourt,cvMilieu,chCentre) FIN
ça affiche lancement et c'est tout, l'application (chrome là pour l'exemple mais pareil avec tout) n'est pas lancée
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 23 novembre 2020 - 14:24 |
Problème toujours présent, pas de solutions?
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 164 messages Popularité : +10 (10 votes) |
|
Posté le 23 novembre 2020 - 17:00 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 164 messages Popularité : +10 (10 votes) |
|
Posté le 23 novembre 2020 - 17:05 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 23 novembre 2020 - 18:10 |
Merci beaucoup j'ai également un code java mais qui ne fonctionne pas non plus, étrange à priori le lanceAppli fonctionnait avant que je ne modifie l'appli (version windev mobile 22 ou 24) mais j'ai pas du tout touché à cette partie là Activity activity = getActiviteEnCours(); Intent intent = activity.getPackageManager().getLaunchIntentForPackage(sPackageName); if (intent != null) { try { activity.startActivity(intent); } catch (ActivityNotFoundException err) { appelProcedureWL("ToastAffiche","Echec de [startActivity]"); } } else { appelProcedureWL("ToastAffiche","getPackageManager (" + sPackageName + ") est NULL"); }
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 1 603 messages Popularité : +64 (70 votes) |
|
Posté le 24 novembre 2020 - 08:09 |
Bonjour,
Rechercher dans les FAQ : LanceAppli Il y a peut-être une explication...
-- Cordialement François |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 24 novembre 2020 - 08:42 |
François SCHAAL a écrit :
Bonjour,
Rechercher dans les FAQ : LanceAppli Il y a peut-être une explication...
-- Cordialement François
Merci pour le conseil mais en cherchant lanceAppli j'ai rien d'interessant dans la FAQ
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 1 603 messages Popularité : +64 (70 votes) |
|
Posté le 24 novembre 2020 - 09:40 |
Oui j'ai confondu LanceAppliAssociée et lanceAppli Je ne vois pas trop l'utilité du lanceAppli pour lancer Chrome par exemple...
-- Cordialement François |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 164 messages Popularité : +10 (10 votes) |
|
Posté le 24 novembre 2020 - 09:56 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 24 novembre 2020 - 10:02 |
François SCHAAL a écrit :
Oui j'ai confondu LanceAppliAssociée et lanceAppli Je ne vois pas trop l'utilité du lanceAppli pour lancer Chrome par exemple...
-- Cordialement François C'était pour tester avec une appli au pif, le but c'est de lancer une autre application à moi
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 24 novembre 2020 - 10:03 |
KotlinIsland a écrit :
je sais pas ce qui n'allait pas avec mon code java ça fonctionne avec celui ci merci à tous
Context myContext = getContexteApplication(); String NomApp = sPackageName; // change it with the package you want to open PackageManager manager; //FLAG_ACTIVITY_NEW_TASK Intent i = new Intent(Intent.ACTION_MAIN); manager = myContext.getPackageManager(); i = manager.getLaunchIntentForPackage(NomApp); i.addCategory(Intent.CATEGORY_DEFAULT); myContext.startActivity(i);
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 164 messages Popularité : +10 (10 votes) |
|
Posté le 24 novembre 2020 - 10:08 |
Autant pour moi, voici le code qui fonctionne bien :
import android.content.Intent; import android.content.ComponentName; import android.net.Uri; public static void StartChrome() { Intent intent = new Intent("android.intent.action.MAIN"); intent.setComponent(ComponentName.unflattenFromString("com.android.chrome/com.google.android.apps.chrome.Main")); intent.addCategory("android.intent.category.LAUNCHER"); intent.setData(Uri.parse("https://ntic974.blogspot.com")); getActiviteEnCours().startActivity(intent); }
-- https://github.com/reuniware https://stackoverflow.com/users/10922639/kotlinisland |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 164 messages Popularité : +10 (10 votes) |
|
Posté le 24 novembre 2020 - 10:10 |
erbl a écrit :
KotlinIsland a écrit : Le code Java que j'ai donné hier fonctionne bien, je l'ai testé. -- https://github.com/reuniwarehttps://stackoverflow.com/users/10922639/kotlinislandje sais pas ce qui n'allait pas avec mon code java ça fonctionne avec celui ci merci à tous Context myContext = getContexteApplication(); String NomApp = sPackageName; // change it with the package you want to open PackageManager manager; //FLAG_ACTIVITY_NEW_TASK Intent i = new Intent(Intent.ACTION_MAIN); manager = myContext.getPackageManager(); i = manager.getLaunchIntentForPackage(NomApp); i.addCategory(Intent.CATEGORY_DEFAULT); myContext.startActivity(i); -- Ce n'est pas l'outil le plus important mais la manière de s'en servir
Attention, tu utilises getContexteApplication(), ce qui ne devrait pas fonctionner sur Android 10. Je te conseille de remplacer par getActiviteEnCours().
-- https://github.com/reuniware https://stackoverflow.com/users/10922639/kotlinisland |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 24 novembre 2020 - 11:41 |
merci pour ce conseil ! après test ça marche très bien sur mon smartphone Android 10, tout bon pour moi
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 164 messages Popularité : +10 (10 votes) |
|
Posté le 24 novembre 2020 - 14:16 |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 201 messages Popularité : +6 (10 votes) |
|
Posté le 24 novembre 2020 - 15:01 |
ouai merci en tout cas, suite à ton message j'ai quand même refait un test pour être sûr
-- Ce n'est pas l'outil le plus important mais la manière de s'en servir |
| |
| |
| | | |
|
| | |