salimdz Posted December 25, 2010 Share Posted December 25, 2010 Bonjour, J’ai une application en deux version la premier lite (taille 668Ko), et le deuxième full (taille 3.37Mo), dans le démarrage de la version lite je veux vérifie la version d’android, si la version elle est 2.2 ou supérieur, j’installe la version full, et dans la version full je veux vérifie l’existante d’une version lite installer pour la désinstaller. J’attends voire aide Merci d’avance pour votre aide Bonne journée a+ Link to comment Share on other sites More sharing options...
Pierre87 Posted December 27, 2010 Share Posted December 27, 2010 généralement, on ne fait pas comme ça... soit tu fais une seule version, et ton code sait s'adapter tout seul aux version soit tu fais 2 versions, et tu t'arranges avec les filtres du Market pour limiter la visibilité de chaque version en fonction des version d'Android Link to comment Share on other sites More sharing options...
salimdz Posted December 28, 2010 Author Share Posted December 28, 2010 généralement, on ne fait pas comme ça... soit tu fais une seule version, et ton code sait s'adapter tout seul aux version soit tu fais 2 versions, et tu t'arranges avec les filtres du Market pour limiter la visibilité de chaque version en fonction des version d'Android bonjour, j'ai fait la version lite le temps que l'android 2.2 n'est pas généralisé, et mnt il y a plusieurs mobile sur android 2.2 pour ca je veux faire ca. a+ Link to comment Share on other sites More sharing options...
salimdz Posted January 24, 2011 Author Share Posted January 24, 2011 Bonjour, svp quelle est l'utilité de ca ACTION_PACKAGE_REMOVED ACTION_PACKAGE_ADDED bonne journée. a+ Link to comment Share on other sites More sharing options...
Naskel Posted January 25, 2011 Share Posted January 25, 2011 ACTION_PACKAGE_REMOVED Broadcast Action: An existing application package has been removed from the device. The data contains the name of the package. The package that is being installed does not receive this Intent. ACTION_PACKAGE_ADDED Broadcast Action: A new application package has been installed on the device. The data contains the name of the package. Note that the newly installed package does not receive this broadcast. En gros c'est un message envoyer par le système pour te dire qu'un nouveau package a été installé ou supprimé mais attention le package installé ou supprimé ne reçoit pas le message. Maintenant je pense pas que tu pourras forcer l'utilisateur à installer ta nouvelle version, tu pourras juste lui proposer de l'installer. Link to comment Share on other sites More sharing options...
salimdz Posted January 25, 2011 Author Share Posted January 25, 2011 Maintenant je pense pas que tu pourras forcer l'utilisateur à installer ta nouvelle version, tu pourras juste lui proposer de l'installer. bonjour, merci pour la réponse la chose que j'ai fait je propose l'installation de la nouvelle application, j'ai voulez dans la nouvelle application lancé la désinstallation des anciens applications avec la confirmation de l'utilisateur bien sur mais j'arrive pas a le faire. bonne journée a+ Link to comment Share on other sites More sharing options...
Naskel Posted January 25, 2011 Share Posted January 25, 2011 Uri packageURI = Uri.parse("package:com.android.myapp"); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); Ca va proposer à l'utilisateur de désinstaller le package. Link to comment Share on other sites More sharing options...
salimdz Posted January 25, 2011 Author Share Posted January 25, 2011 Uri packageURI = Uri.parse("package:com.android.myapp"); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); Ca va proposer à l'utilisateur de désinstaller le package. bonjour, merci pour votre aide. bonne journée a+ Link to comment Share on other sites More sharing options...
salimdz Posted January 26, 2011 Author Share Posted January 26, 2011 Uri packageURI = Uri.parse("package:com.android.myapp"); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent); Ca va proposer à l'utilisateur de désinstaller le package. Bonjour, il me donne cette erreur : 01-25 20:10:54.665: ERROR/AndroidRuntime(444): Uncaught handler: thread main exiting due to uncaught exception 01-25 20:10:54.675: ERROR/AndroidRuntime(444): java.lang.RuntimeException: Unable to start activity ComponentInfo{dz.algerie.android.informationLite/dz.algerie.android.informationLite.Algerie}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.DELETE dat=dz.algerie.android.information11 } 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.os.Handler.dispatchMessage(Handler.java:99) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.os.Looper.loop(Looper.java:123) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.ActivityThread.main(ActivityThread.java:4203) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at java.lang.reflect.Method.invokeNative(Native Method) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at java.lang.reflect.Method.invoke(Method.java:521) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at dalvik.system.NativeStart.main(Native Method) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.DELETE dat=dz.algerie.android.information11 } 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1484) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1454) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.Activity.startActivityForResult(Activity.java:2660) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.Activity.startActivity(Activity.java:2704) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at dz.algerie.android.informationLite.Algerie.Delete_OldPackage(Algerie.java:178) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at dz.algerie.android.informationLite.Algerie.onCreate(Algerie.java:38) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 01-25 20:10:54.675: ERROR/AndroidRuntime(444): ... 11 more voila le Code : Uri packageURI = Uri.parse("dz.algerie.android.information11"); Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); startActivity(uninstallIntent) je cherche comment je peut vérifie l’existence d'installation d’un package. Merci d’avance. Bonne journée. a+ Link to comment Share on other sites More sharing options...
moritan Posted January 26, 2011 Share Posted January 26, 2011 Plusieurs remarque ce type d'application (capable d'en installer une autre) est interdite sur le market officiel. De plus je n'arrive pas à comprendre ton problème. Soit ton code est compatible avec toute les versions d'android soit il n'est compatible qu'a partir de la version 2.2. Il n'y a rien a gérer pour le développeur à part choisir la version minimum de son appli dans le manifest. Si tu choisi 1.5 ou 1.5 elle tournera en 2.2, Si tu choisi 2.1 ou 2.3 elle ne sera pas visible en 1.6 donc aucun soucis d'avoir une appli non compatible sur le téléphone Link to comment Share on other sites More sharing options...
salimdz Posted January 26, 2011 Author Share Posted January 26, 2011 Plusieurs remarque ce type d'application (capable d'en installer une autre) est interdite sur le market officiel. De plus je n'arrive pas à comprendre ton problème. Soit ton code est compatible avec toute les versions d'android soit il n'est compatible qu'a partir de la version 2.2. Il n'y a rien a gérer pour le développeur à part choisir la version minimum de son appli dans le manifest. Si tu choisi 1.5 ou 1.5 elle tournera en 2.2, Si tu choisi 2.1 ou 2.3 elle ne sera pas visible en 1.6 donc aucun soucis d'avoir une appli non compatible sur le téléphone bonjour, merci avant j'ai été débutant j'ai fait plusieurs version avec de modification pour tous les version android ..., et après j'ai compris que je peut faire une version pour toute les version d'android. je veux propose la désinstallation des anciens versions que j'ai fait. bonne soiré a+ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.