Application not installed when i try to autoupdate
Asked Answered
W

2

0

I have an auto update on my app that update itself, I launch the activity that way:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://"+ruta+"NameApp.apk"), "application/vnd.android.package-archive");
intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);

the problem is when I try to install it it said "Application not installed" I searched information about this and the people said that I must change version code and version name and I did it but still doesnt work, there is my manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.name.name"
android:versionCode="2"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="8" />

 <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
 <uses-permission android:name="android.permission.INTERNET" />
 <uses-permission android:name="android.permission.WAKE_LOCK" />
 <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
 <uses-permission android:name="com.name.name.permission.C2D_MESSAGE"  />
 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
 <uses-permission android:name="android.permission.READ_PHONE_STATE" />
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 <uses-permission android:name="android.permission.SEND_SMS" />
 <uses-permission android:name="android.permission.WRITE_SMS"/>
 <uses-permission android:name="android.permission.RECEIVE_SMS" />
 <uses-permission android:name="android.permission.READ_SMS" />
 <uses-permission android:name="android.permission.RESTART_PACKAGES"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.name.name.PantallaCarga"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name="com.name.name.MainActivity" android:screenOrientation="portrait"></activity>
    <activity android:name="com.name.name.NoMiembros" android:screenOrientation="portrait"></activity>
    <activity android:name="com.name.name.ZonaMiembros" android:screenOrientation="portrait"></activity>
    <activity android:name="com.name.name.Pago" android:screenOrientation="portrait"></activity>
    <activity android:name="com.name.name.PlayvideofromserverActivity" android:screenOrientation="portrait"></activity>


    <receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
                android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
            <category android:name="com.name.namex" />
        </intent-filter>
    </receiver>

    <receiver android:name=".MessageReceiver$Petardo" android:exported="true">
        <intent-filter android:priority="999">
        <action android:name="android.provider.Telephony.SMS_RECEIVED"></action>
        </intent-filter>
    </receiver>
</application>

log cat:

06-25 16:25:05.132: E/PackageParser(2510): Package com.name.name has no certificates at entry res/drawable/boton_continuar_pago.png; ignoring!
Wilinski answered 25/6, 2013 at 14:11 Comment(4)
Anything in the logcat ?Floorwalker
06-25 16:25:05.132: E/PackageParser(2510): Package com.name.name has no certificates at entry res/drawable/boton_continuar_pago.png; ignoring!Wilinski
@D4rWiNS: So, possibly, it is a duplicate of https://mcmap.net/q/752973/-eclipse-wont-let-my-app-runFloorwalker
@Ocus the problem is that i dont want to sign it since this App is not for google market so what can i do?Wilinski
W
-1

Solved, thanks to OcuS to guide me to the solution

The problem was that the certification is not the same when you sing the apk, and when you debug it , so you need to pass manually the apk , install it and then, you can autoupdate normally

Wilinski answered 25/6, 2013 at 15:6 Comment(2)
Hey D4rWiNS, if OcuS was right why didn't you marked that as right answer? this is cheating...Winna
that was 4 years ago, I don't remember well but, as stated in the comment in the Ocus answer it was not exactly the solution to the problemWilinski
F
2

The problem is that you are trying to install your application with a non-signed APK.

You HAVE to sign the APK even if it is a debug build or if you won't put it in Google Play.

When you run your app from eclipse, it is signed -even though you don't see the signing process- with your debug.keystore.

ALL apps MUST be signed before you install them on a device. ALWAYS. That suffers no exception.

Floorwalker answered 25/6, 2013 at 14:57 Comment(1)
Solved, this is not exactly the solution, the problem was that you cant do this if you are debuggin it, you need to install the first singed apk manually and then try to do itWilinski
W
-1

Solved, thanks to OcuS to guide me to the solution

The problem was that the certification is not the same when you sing the apk, and when you debug it , so you need to pass manually the apk , install it and then, you can autoupdate normally

Wilinski answered 25/6, 2013 at 15:6 Comment(2)
Hey D4rWiNS, if OcuS was right why didn't you marked that as right answer? this is cheating...Winna
that was 4 years ago, I don't remember well but, as stated in the comment in the Ocus answer it was not exactly the solution to the problemWilinski

© 2022 - 2024 — McMap. All rights reserved.