google-certificate.keystore present in certificate folder[See the above git link]
Step 1: I run the code in emulator its works fine [but i need to put that google-certificate.keystore location in custom debug keystore[which present in Eclipse -> Windows -> Preference -> Android -> bulit]
Step 2: if i didnt put the location it gives java.lang.reflect.InvocationTargetException
if i connect developer cable and run it to Android device
if i follow step 1 it gives Installation error: INSTALL_FAILED_INVALID_INSTALL_LOCATION in console window
if i follow step 2 it installs in device but give same Exception
Edit:
here is a step to create as an apk file but i dont where should i enter that command
Edit: Added Manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yal"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".InstallInBackgroundSample"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The blog guy himself posts this in the comments:
What you want is not possible anymore without the phone manufacturers certificate or a rooted device.