I have an ant script that builds&deploy a MFP app for android (wlapp and apk). I also upload the app to AppCenter.
The problem is that I cannot install (on a device - Huawei P6) the apk from the AppCenter using the AppCenter app - it downloads the app but the installation is not successful. The uploaded app is not signed.
Running the Android app from the MFP Studio works fine.
What steps do I have to perform in order to make the installation from AppCenter app work? Where can I see the logs from AppCenter?
Thanks!
Ant target:
<target name="build-android-windows" if="isWindows" description="Build the Android .apk" depends="">
<!-- These must be set in your local.properties file in the root of the android project.
This is sensitive information and is not checked into the repository
<fail unless="android.store" message="Property android.store missing" />
<fail unless="android.alias" message="Property android.alias missing" />
<fail unless="android.store.password" message="Property android.store.password missing" />
<fail unless="android.alias.password" message="Property android.alias.password missing" />
-->
<!-- use android.release_target if defined, otherwise default to 'release' -->
<property name="android.release_target" value="release"/>
<!-- call the project's build.xml to clean -->
<ant antfile="${src.dir}/apps/${curBrand}/android/native/build.xml" inheritAll="false" useNativeBasedir="true" target="clean"/>
<!-- call the project's build.xml to make a build -->
<ant antfile="${src.dir}/apps/${curBrand}/android/native/build.xml" inheritAll="false" useNativeBasedir="true" target="${android.release_target}" />
<!-- copy the file to build.dir -->
<copy file="${src.dir}/apps/${curBrand}/android/native/bin/${curBrand}-${android.release_target}-unsigned.apk" tofile="${build.dir}/android/${build.apk}" overwrite="true" failonerror="true"/>
</target>
As Vivin suggested in the comments, the AppCenter is not Google Play meaning it is not a "trusted source" at least from the device's perspective, thus you may need indeed to enable that option in Android's options.
The second option is as I mentioned - to sign the .apk. When you build directly from Eclipse it uses debug signing by default and goes straight into the device.