App crashes on Launch when made as system application - android

I developed an application that uses DJI SDK. When installed as an system application it crashes on Launch because its not able to load the libraries. It works fine when installed as normal application.
Steps followed to make system application
1)Rooted the device
2)Copied the .apk file to system/app directory
3)Rebooted the device
4)App was installed as default application but crashed on Launch
After commenting out the following line related to DJI SDK and followed the same steps as above. It worked fine as system app.
Helper.install(context);
The implementation of Helper class which is in DJI SDK is as below:
public static void install(Application app) {
Object var1 = null;
try {
System.loadLibrary("DexHelper_sdk");
if (PPATH != null) {
System.load(PPATH);
}
} catch (Error var3) {
;
}
String app_dataDir = app.getApplicationInfo().dataDir;
DexInstall.install(app, new File(app_dataDir + "/.cache_sdk/sdkclasses.jar"));
}
As far as my understanding the crash is because the system is failing to load the libraries.
My gradle looks similar as in the following link:
https://github.com/dji-sdk/Mobile-SDK-Android/blob/master/Sample%20Code/app/build.gradle

this issue has been fixed since 4.6 version of Android MSDK, pls try to update to the later version, right now the 4.7.1 has been released.

Related

Phoenix Library not working with Android 12

I am devloping one app which will restart after phone reboot for that I used Phoenix Third party library it is working upto Android pie version but for higher version it is not working.
Below is a code for that.
Build.gradle
implementation 'com.jakewharton:process-phoenix:2.0.0'
GlobalTool.Java
public static void restartApplication(Context context) {
Log.d("IN App restart:", "");
ProcessPhoenix.triggerRebirth(context);
}

How to configure a Android Multi Module APP to work with IBM Mobile Foudation Platfom 8.0's AppAuthenticity

We had a Android app that had work fine with IBM Mobile Foudation Platform 8.0' AppAuthenticity. So we had to split the app into multiple android modules, and AppAuthenticity has not work since.
When trying to login with AppAuthenticity enabled there is no response, ie the success or error callbacks are never fired.
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/authentication-and-security/application-authenticity/
IBM MFP Server Version: 8.0.2019022810.
IBM MFP Android SDK Version: 8.0.+
Gradle build tool : 3.1.1
Gradle 4.4
The problem happens with debug and release apks.
Log.d("TAG", "loginMobileFirst init"); // This appears in logcat
String securityCheckName = CaixaSecurityCheckChallengeHandler.SECURITY_CHECK_NAME;
WLAuthorizationManager.getInstance()
.login(securityCheckName, this.getCredencial(),
new WLLoginResponseListener() {
#Override
public void onSuccess() {
Log.d(TAG, "loginMobileFirst Success"); // This never appears in logcat
setLogged(true);
callBack.onSuccess(null);
}
#Override
public void onFailure(WLFailResponse wlFailResponse) {
Log.d(TAG, "loginMobileFirst Failure"); // This never appears in logcat
Log.d(TAG, "Erro no login: " + wlFailResponse.getErrorMsg());
callBack.onError(context.getString(R.string.api_error_sistema_indisponivel));
}
});
}
MobileFirst does not yet support app modules of Android. Please create a single apk for your app until this is supported.
Please open a request for enhancement at https://www.ibm.com/developerworks/rfe/execute?use_case=changeRequestLanding&BRAND_ID=0&PROD_ID=702&x=17&y=6
The problem was solved deleting the directory app/src/main/jniLibs. I believe that directory was included in a old version of IBM MFP (7.1)
Thank you, Folks!

Unable to use a native android plugin for Unity

I wish to use this native plugin for Android devices via Unity.
For some reason the plugin is just now working. When I run it on a real device the game crashes. I am using Unity 5.5.2f1 personal, my phone is Samsung Edge 6 with Marshmallow api.
I have placed the jar file inside Assest/Plugins/Android. I can't figure out what is the cause for this error. Do you know what is wrong here?
This is part of my code:
private AndroidJavaObject plugin;
void Start ()
{
plugin = new AndroidJavaClass("jp.kshoji.unity.sensor.UnitySensorPlugin").CallStatic<AndroidJavaObject>("getInstance");
//Init the ambienttemperature sensor
if (plugin != null)
{
plugin.Call("startSensorListening", "ambienttemperature");
}
}

Acr.Biometrics Xamarin plugin

I create Xamarin.Forms app and use Acr.Biometrics plugin. In PCL I check available finger print for device.
private async void AvailableBiometric()
{
bool available = await Biometrics.Instance.IsAvailable();
lblStatus.Text = available ? "Yes" : "No";
}
When I launch my app on Windows 10 emulator (UWP project), I get result false ("NO") and it's correct. But when I launch app on Android 6.0 (Emulator or real device with finger authorization), I get Exception "".
I find source code this plugis on GitHub. My Exception generate this plugin's code:
I don't understand what do I wrong and why for Windows app this Exception did not generate. If who know, please, help me.
I don't understand what do I wrong and why for Windows app this Exception did not generate.
I tried to only install Acr.Biometrics Package to PCL, and debugged UWP project. It also threw the exception.
If you want to use lib of Acr.Biometrics in Android and UWP platform,
please make sure you have installed Acr.Biometrics nuget package to Android and UWP project.
You can right click your solution--> Manage NuGet Package for solution-->select the Installedbutton-->left click Acr.Biometrics NuGet Package.
Check the xxx.Droid project option.And then press the install button. The installation is done later.
For Android support, you need to add the following to your AndroidManifest.xml:
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
Usage
In your shared/PCL library, simply check if the sensor is available:
protected async override void OnAppearing()
{
base.OnAppearing();
if (await Biometrics.Instance.IsAvailable())
{
var success = await Biometrics.Instance.Evaluate("Your custom message");
if (success)
{
//do some stuff
}
}
}

Android 6.0 permissions error Toast

I am updating the app I am working on to work on Android 6.0.
In the beginning the app would crash, but updating the gradle file to use the newest versions of external libs (intercom and GCM services) did the trick and the app runs smoothly.
The only problem is that on startup a Toast message is displayed with the text: "Please specify next permissions in your manifest file: android.permission.WRITE_EXTERNAL_STORAGE".
The permission is of course written in the manifest file.
I am assuming this has something to do with the runtime permissions mechanism that Android 6.0 introduces (the message doesn't appear when running with older version of Android).
Another annoying little issue is that the toast message doesn't appear when running with a debugger (using Android Studio 1.4).
How can I know what is causing this Toast to appear? Has anyone else encountered this problem?
Thank you!
I have experienced this issue in my project as well, and it turns out that the toast is from ubertesters SDK, I decompiled the jar file and this is what I found.
package com.ubertesters.sdk.utility;
public class StringProvider {
public StringProvider() {
}
public static String addPermission() {
return "Please specify next permissions in your manifest file: ";
}
public static String installLatestVersion() {
return "Please, install the latest Ubertesters Hub version.";
}
public static String install() {
return "Install";
}
}
I will suggest you to exclude ubertesters SDK in your release product flavour and you won't see this toast in the release build.
Ubertesters has not updated its Android SDK for more than a year ... http://ubertesters.com/knowledge-base/android-sdk/
Ubertesters is constantly updating SDK for Android. The issue with handling permissions on Android 6.0 is successfully fixed in the next SDK version.
Please feel free to check and user our latest SDK available on the website http://ubertesters.com/knowledge-base/android-sdk/

Categories

Resources