Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Install .apk file via code

Install .apk file via code

Put your problem here if it does not fit any of the other categories.

Install .apk file via code

Postby kums » Fri Dec 18, 2009 12:29 pm

Hi,

How can i install .apk file via coding part.

Can anyone help me.

Thanks
kums
Freshman
Freshman
 
Posts: 8
Joined: Wed Nov 18, 2009 8:50 am

Top

Postby kums » Mon Dec 21, 2009 8:42 am

Hi All,

Am used following code for .apk installation

File apkFile = new File("/sdcard/Trailers.apk");
Uri appUri = Uri.fromFile(apkFile);
PackageManager pManager = getPackageManager();
pManager.installPackage(appUri,listener,PackageManager.PERMISSION_GRANTED);


In Manifest am using :
<uses-permission android:name="android.permission.INSTALL_PACKAGES"></uses-permission>

but still i got error like below:

java.lang.SecurityException: Neither user 10027 nor current process has android.permission.INSTALL_PACKAGES.

How to solve this problem?
Help me.

Thanks
kums
Freshman
Freshman
 
Posts: 8
Joined: Wed Nov 18, 2009 8:50 am

Postby kums » Mon Dec 21, 2009 11:03 am

anybody can help me.

Still cant solve my problem
kums
Freshman
Freshman
 
Posts: 8
Joined: Wed Nov 18, 2009 8:50 am

Postby hellshady00 » Fri Dec 25, 2009 11:43 pm

You need to add
Code: Select all
<uses-permission android:name="android.permission.INSTALL_PACKAGES"></uses-permission>


to your AndroidManifest.xml
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests