App Center force update for Android not working - android

i am trying to implement the force update feature using app center, i have followed their documentation found here and it doesnt seem to work at all
here's the code inside the App Class
AppCenter.start(
getApplication(), {APP SECRET HERE}, Crashes::class.java,
Distribute::class.java, Analytics::class.java
)
and i have tried uploading a build like this then downloading first, and after that i uploaded a newer version with higher version code / version name and set the checkbox for "Mandatory Update", i don't get any prompt at all to update when i start the app then.

Found the problem with the appcenter force update, AppCenter Distribute will not work on release mode if debuggable in gradle is set to true.
so make sure to leave it on false at the build type you will be testing on
debuggable false
adding this line before starting AppCenter showed me the logs that clued me to this.
AppCenter.setLogLevel(Log.VERBOSE)

Related

cannot send crash report after setting up react native crashlytics for android

I feel like I have tried every possible combination of ways to report a crash on the firebase crashlytics console for the android side of my react-native application.
I have followed the rnfirebase setup instructions and triple checked that everything is where it should be: https://rnfirebase.io/crashlytics/android-setup
I have read in several forums that the app needs to be run in 'release' mode for the crash to be reported and then the app must be closed and opened once again for the report to be sent, I have done this multiple times:
firstly i've tried:
./gradlew installRelease
secondly I tried a method recommended in a github issue forum:
./gradlew assembleRelease
adb install ./app/build/outputs/apk/release/app-release.apk
both methods ran on my emulator and I was able to use the crashlytics().crash() method to cause a crash, alas nothing appears in the console.
I have also added this into a firebase.json file in the root of my project like the docs explain:
{
"react-native": {
"crashlytics_debug_enabled": true
}
}
any help is greatly appreciated as I really don't know where the issue lies.
PS. I have registered my app with the FB console and enabled crashlytics
in firebase.json
{
"react-native": {
"crashlytics_disable_auto_disabler": true,
"crashlytics_debug_enabled": true
}
}
make sure that crashanalytics sdk is installed/initialised
follow: https://rnfirebase.io/crashlytics/android-setup

Crashlytics add new applicationIdSuffix

I’m working on CI for android app and for those purpose I’ve created test app.
I’ve added Crashlytics support and a little bit later productFlavors to the app.
My initial package name was ‘com.kagarlickij.myapplication’ ,
Flavours add applicationIdSuffix to the package name (http://prntscr.com/hm0u3s) and result is e.g. ‘com.kagarlickij.myapplication.staging’
If I build app with package name ‘com.kagarlickij.myapplication’ it uploads to Crashlytics fine,
But if I build app with package name ‘com.kagarlickij.myapplication.staging’ new app doesn't appear in Crashlytics.
In both cases console output doesn't have any errors - http://prntscr.com/hm0svq
build.gradle (and the whole app) - https://github.com/kagarlickij/MyApplication/blob/dev/0.3.0/app/build.gradle
Why it goes like this and how it can be fixed?
The answer turned out to be very simple, but not very obvious - you have to run app built with new flavor in emulator at least once and will become available on Crashlytics - http://prntscr.com/hm25sa

Remove console logs from ionic app (release)

How do I get rid of console logs from an ionic 2 release application?
I am developing an ionic 2 app. When I build the release apk and run on a device, I can still attach to the process from chrome://inspect, and view console logs. I have tried removing the cordova-plugin-console, but that makes no difference.
Edit: I found a package that can remove console logs: https://www.npmjs.com/package/remove-console-logs
Just not sure how I can use it to automatically remove them when I build release. Please help.
Thanks.
You can use uglifyjs.config.js for drop all console logs when is a production build.
1 . Copy uglifyjs.config.js from node_modules into your project folder
2 . In the new config file set the flag drop_console to true if production
var isProduction = process.env.IONIC_ENV === 'prod';
...
compress: {
drop_console: isProduction
}
3 . Set your custom configuration in the package.json
"config": { "ionic_uglifyjs": "uglifyjs.config.js" },
And that's all !
If you can still connect with the debugger then it is not a release build - sounds like you may be unintentionally installing the debug build OR connecting to some other app.
EDIT; Above is not necessarily true - there are instances where you can debug the js/html/css content via chrome in a release build ; specifically if the webview debuggability flag is set in code / not set by the build system etc. - this flag is seperate from the application debug flags so if not properly set you will be able to debug a "release" build / not be able to debug a "debug" build - see remote debugging webviews.
END OF EDIT.
( note you have to sign a release build before it will install )
Is it possible the release install failed and you're still looking at a previous debug build ?
Assuming you have a release build and can't connect to see logs via chrome inspect then ;
console.log calls will still be in the release build unless you comment them out - and possibly visible in other ways eg. android tools sdk\tools\monitor - The only way to be sure they aren't visible is to comment them out. You could use something like ;
console.log = function(){} ;
at the end of your device ready function after any plugins have done anything they're likely to do - though there's still no 100% guarantee with this as a badly behaving 3rd party plugin or library might reassign it later and then your calls will still happen - to be absolutely sure you will need to comment them out.
Have you tried remove console logs ?
cordova plugin rm cordova-plugin-console
Then
cordova build --release android

Android “Not_Market_Managed” error

I have published my app in alpha mode. But i am getting this response while licensing my application. I have set the test accounts as well.I have set the License Test Response as "Licensed". But still getting the Not_Market_Managed error.Please help
Make sure you have incremented your version code in your app build.gradle file. If you are trying to publish a new version of your app and the version code is the same, you cannot publish.
I had a similar story. In my case, I added a new flavor and applicationIdSuffix so the package name changed. I thought that the problem was that the application was not uploaded into the play market but when uploading it got an error :
"Upload failed
Your APK needs to have the package name _my_old_packagename_ ". Then I commented out the applicationIdSuffix and the problem was solved. The application did not even need to be uploaded since the application ran under the published account.

Why my signed apk crashes?

I've signed an app with a sign which I've created. I've installed this apk in my phone and this is ok, but when I've tried to open the app crashes (doesn't show any activity), and it doesn't give me the posibility to watch the log (this dialog doesn't have the report button)
The problem is the sign which I've signed the app. I've tested with other sign and the app opens perfectly. I can't post any information about the creation of the sign, but only I can say I've used:
Letters and _ character in alias
Letters, numbers and - character in password
50 in years
and Letters in name
others field are blank.
The main problem is that the app is published in the google play, so How I can publish a new signed apk without to unpublish this app and create a new app?
Cleaning the project solved the problem in my case.
For anyone getting this in a react-native environment, remember to bundle your js before generating the signed APK.
Easy to forget if you're using something like Android Studios GUI 🙃
Delete "gen" folder from the Project then Cleaning the project
In my case, I had to change the minifyEnabled to false in build.gradle
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
You can see this publish APK and its details like version code and version name and etc. in you developer account on google play
There is one button "Upload new APK"
Click on "Upload new APK" Button
Upload new sign APK with bug fixed
deactive current APK
Active new apk
Note : Don't change package name for new APK
Another possible cause (as was the case for me) is using the wrong JDK/JRE version when building your signed APK.
If you're using Eclipse, check Window -> Preferences -> Java -> Installed JREs and see which one is checked as the default. Android is not yet compatible with Java 8.
I had the same problem today and for me it turned out the reason was:
I used void blaMethod() in my Java code which I tried to call by onClick methods of XML Buttons. I had to learn that these methods need to be public void ... - I usually do that, but this time I got a little sloppy.
The strange thing is: my unsigned APK worked perfectly fine on all my devices, but the signed one just crashed when using those methods (could not find method (view) in a parent or ancestor context). Don't get why that is...
May this help someone!
Greets
You can simply create a new keystore if you are in testing
Or simply in my case retype the password

Categories

Resources