[android-developers] Installing apk package from my application
Hi, I'm trying to write an application which will install the apk from a specified location. The code I've added is public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); File apkFile = new File(/data/install_flashplayer.apk); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(apkFile), application/vnd.android.package-archive); int reqCode = 0; startActivityForResult(intent,reqCode); Log.v(REsult,reqCode = +reqCode); } This is installing the install_flashplayer.apk from the location /data. The problem i'm facing is that after the package is installed, it shows a messagebox with the button Done. I'm expecting the behaviour of pressing Done button should close the application itself rather than only closing the messagebox. Right now, It closes the message box and package installer and shows my application. Can anyone help me how to get notified that Done button is pressed and how to close the application once it is clicked? Thanks, Maha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re : Re: Application installation
Hi, Looks like the path of apk is wrong and it shoudn't be start with file:/// protocol. Place your apk in android_asset and give the path direclty like Uri.parse(/android_asset/otherApk.apk Thanks, Maha 2011/5/31 Jérôme Beau javar...@gmail.com Hello Mah and all, I have exactly the same problem as Surfer has, with the two conditions you mention met. I have sign my application with the platform (SDK for the moment, a real one later on) key+cert, and have android:sharedUserId=android.uid.system (as well as the granted android.permission.INSTALL_PACKAGES permission) in my manifest. But still, after running : Intent myIntent = new Intent(Intent.ACTION_PACKAGE_INSTALL, Uri.parse( file:///android_asset/otherApp.apk)); myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(myIntent); I still get an exception with No Activity found to handle Intent { act=android.intent.action.PACKAGE_INSTALL dat=file:///android_asset/otherApp.apk flg=0x1000 } Does this mean this no system activity (such as the PackageInstallActivity) is able to handle such an intent ? Thanks for your help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] npapi plugin for android
Hi, NPAPI plugin is available right from Donut. I never used sdk to develop the plugin. Download the source code and the sample plugin is available in source code itself. In Android FROYO code, the sample plugin is there in development/samples/BrowserPlugin. Thanks, Maha On Tue, Dec 21, 2010 at 6:48 PM, bill dr bilel...@gmail.com wrote: hi, I am trying to write an npapi plugin for android browser. i found that the android 2.2 sdk supply only the pluginstub interface for that purpose. has anyone any idea about the manner that we could implement that interface. is there any example to clarify that issue. Please help me, all clues are welcome. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Profiler tool for Android device
Hi, We are developing third-party browser plugin. We are testing it on the Android Froyo device. We want to use profiler tools for optimization of C++ code. Can anybody tell profiler tools for Android Froyo. Traceview is not listing C++ functions. Thanks, Maha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en