Integrated SDK behave differently after PlayStore app bundling - java

I integrated 3rd party SDK to my Android app.
I tested staging and release build APK, no problem. The build is done using bitrise/BETA by crashlytics.
I downloaded the release app from Google Play Store.
The SDK throws persistent error/exception that does not appear during 2.
The SDK developer deducted that the cause may be from the missing checksum, which is generated using this piece of code:
mChecksumMD5 = Util.calculateMD5(new File(mContext.getApplicationInfo().nativeLibraryDir+"/libxyz.so"));
I suspect it may be due to app bundling, which is not present during build via bitrise/BETA. I tried to use bundled app using bundle tools (https://github.com/google/bundletool/releases) for staging build and it doesn't have any problem (bitrise staging vs bundled staging are all ok). So is there something different about the app bundling happening in Google Play Store? What may cause this unexpected exception?

Related

Native Android foreground location service crashing Flutter application

I want to get location updates in background when app is minimized. So I created a demo Flutter application with a service in native Android which I can run in foreground to get the continuous location updates for application and it is working fine as my expectation it is updating locations in notifications (for test).
Then I tried to implement same service with actual Flutter application with same service mentioned in manifest file same as demo application but my application is crashing on starting so I can't debug and in addition to that I don't get any error in building.
My main Flutter application is working fine without the location service implementation so only issues is after implementation it causes crashing.
What could be the issue and solution for this problem or how can I find out what is the problem?
I am doing same thing in original Flutter application same as in this dart code of demo application. How can I investigate this problem?
I am adding my answer regarding the question mentioned above.
in my case, it was not a foreground service which was crashing application but the issue was that As the flutter is growing framework, We get lot of updates & changes. With one of those Flutter update, Flutter updated plugin registration process for app on native side so some plugin with older version dependencies doesn't get registered with app as flutter doesn't support FlutterView(deprecated) anymore.
Note: Always make sure your plugin dependencies are updated to latest version of its dependencies in pubspec.yaml.
For me, My main application and demo application created for foreground was working according to my expectation but when I merge them it was crashing because camera plugin dependency version was too old. Second thing you can do is which can also reduce chances of error due to androidx compatibilty as well. Though, it is not too tough to do in old app as well.
Note : Create new flutter project and move your all dart code to new application.
Please be careful while doing this option.
-- Don't forget to add permissions in manifest files which you are accessing in app.
-- Don't forget to add assets and resources used on native side if you have added or changed.
-- Don't forget to set version according to version of old app.
-- Don't forget to make changes in your gradle files if any of app dependencies use that configurations like minimum sdk, targetSdk, etc... (if it applies in your case)
If you don't find this useful you can run your android side code in android studio and can find out what is the problem by debugging that code and fix it. Thanks

How to configure Android App Bundles to publish apk (PWA) on Google Play?

I have created an application using TWA (com.github.GoogleChrome: custom-tabs-client).
But when publishing Google shows me an optimization error message and suggests to optimize using the Android App Bundles.
After reading a lot of information in Google, I was able to add the Dynamic Feature Module and enable minification. As a result, the apk was reduced to 700kb from 2mb, but Google still does not accept it.
Tell me please how to configure the assembly so that Google could approve the application?
When building the application, you should select the assembly through the Android App Bundles
After assembly, you need to upload aab file instead of apk in google play
solution

Block the app after installation by Google Protect

When installing an application on Android 7, Google's protection system prevents it from installing and displays the following message:
Play Protect doesn't recognise this app's developer. Apps from unknown developers can sometimes be unsafe.
How can i fix it?
Go to Build Type tab. Select release mode and set:
Signing Config to the config . (The one you just created).
Sync your gradle . Enjoy!
Android Build Types
Yes, it's usually caused by an APK manually installed without downloading it from PlayStore.
The Protect informs the user about the potential problems about installing this kind of App.
You can disable the Protect from Android Settings page or (maybe) room the PlayStore Settings.

AOSP and access to Google Play Services

I am developing for a device that uses AOSP (https://source.android.com/). This device is a Garmin 780 (https://buy.garmin.com/en-US/US/p/569748). The custom build does not include any Google Apps.
I'm new to Android dev, so I'm a bit lacking in the ecosystem knowledge.
I was hoping that someone could explain to me how the OS would handle having an application installed which uses some of the Google Play Services API's (e.g. https://developers.google.com/android/reference/packages).
I've installed an APK that uses:
com.google.android.gms:play-services-analytics
com.google.android.gms:play-services-auth
The application runs. I would have thought that it would fail to run if the libraries were not present. Or are they bundled with the apps APK?
When using the Device File Explorer in Android Studio and checking out the folder /data/data I can confirm that no com.google.android packages are installed.
So I'm really after some confirmation, the way Google Play Services is described here: https://developers.google.com/android/guides/overview seems that Google Play Services must be installed on the device at an OS level in order to make use of them. These services cannot be installed alongside a custom application like normal dependencies right?
That is correct Google Play Services cannot simply be installed for use along with an application.
Google Play Services is a suite of APIs installed by default on most Android devices to allow for apps to easily utilize common features as well as keep the services and Google apps up to date.
Something that might interest you is Open Gapps. It is a way for devices with custom Android ROMs to utilize the Google Play Services package.

Google Play Services incompatibility

I've been using google's fused location services on my app for location tracking. I use Android studio and it's gradle build system. Recently I have discovered a big issue with google's location services.
My gradle build file contained this dependency: compile 'com.google.android.gms:play-services:+. So when I rebuilt my project, Android studio downloaded the latest version for google play services, namely 5.2.08. HOWEVER my device (Samsung Galaxy S4) only has the 5.0.89 version. And apparently these two versions are not compatible, I get this error : Google Play services out of date. Requires 5208000 but found 5089038. I cannot update google play services on my device. It states that it is up to date (5.0.89).
Using this solution I managed to get the tracking system working, but it won't work on another device I own (a W8L device), which has another version of google play services: 5.0.84.
It seems this is not an uncommon thing to happen with google. How can I fix this for any devices out there, and make sure that google doesn't mess up my app.
Same thing is happening here, i solved by changing the play services version at gradle:
compile 'com.google.android.gms:play-services:5.0.89'
They probably released a new version but the roll out haven't arrived in our devices yet.

Categories

Resources