I am working on providing automatic updates to my application. I am able to connect to our FTP server, download the apk and invoke the Android package installer. I have other steps listed after the installation process, like deleting the downloaded apk..etc. But once I invoke the Android Package installer my current thread exits throwing the following message:
"Not granting permission android:permission.INSTALL_PACKAGES to package.com.csg.android (protectionLevel =3 flags=0x8be46)"
I need help in resolving this problem that I am having. Reasons this is occuring and the way around to deal with them?
Any help is greatly appreciated.
Thanks, Navin
EDIT:
After reading through initial comments I got for my post, I thought I will clarify the question once again and add the code that I am using.
here is the code`
File file = new File(getFilesDir(), filename);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file),
"application/vnd.android.package-archive");
startActivity(intent);
deleteFiles();
`
And yes, I also added the uses-permission tag for the INSTALL_PACKAGES.
As I said in my original post, I am able to invoke the Package installer and I am getting the install prompts and the installation process goes through successfully. But the problem I have is with the steps after the installation that I coded..i.e the execution of the function deleteFiles();
My thread gets terminated performing startActivity(intent), which I suppose handles the control to package Installer and invokes the installation process. When I checked the logcat log file to see what made the thread terminate, I found the message that I posted above about the protectionLevel. I hope I am clear now. Help is appreciated.
And yes I did search for this protectionLevel issue in other posts and I didn't find any info about that.
Thanks, NavinC