I migrated from Eclipse to Android Studio when version 1.0 came out.
This automatically changed the google play services integration (which i use for admob and analytics) to an entry in the app gradle build file.
All my apps that use the play services now periodically crash. Apps that don't use it are working like before.
The crashing apps start up once normally. But when you close them (via recenty opened apps) and then reopen them at a later point, the screen turns black and the app will not respond.
Any idea what causes this?
Related
new freelancer dev here.
I've been developing an Android App with Android Studio as apart of some freelance work I've been doing. I do all my testing and debugging on a virtual emulator of an android device while my client reviews the app on his tablet after the testing is done. With this latest version, everything worked perfectly on my emulator, but the app won't even start on my client's tablet. He tried testing the app on a different tablet and while the app runs, it doesn't function properly (Such as buttons not running different methods, crashing after specific inputs, etc.). We are both very confused at what is going on and don't know how to begin tackling this problem. Previous versions of the app work, but they do not have all the required functionality. Nothing major a lot was added or changed from the last version and this most current version. The app has worked on a variety of different emulator settings as well.
I am using the Android Studio built in emulator tools for testing and using Android Studio as my IDE. My app is written in full java while using XML for the layouts of the different pages of the app.
I'm not looking for any immediate fixes/solutions, but more of a general direction to go, because I don't even know how to start fixing this issue.
Also, I'd like to reiterate, previous versions of the app have worked perfectly fine, and all versions of the app work fine on my emulator. The most recent version only fails to start/run properly when run on my client's tablet(s).
I've tried matching my emulator to my client's tablet as closely as possible to try to recreate any potential issues, but I haven't been able to get any of the errors or bugs to appear during debugging. Since we're pretty far apart, I haven't been able to have access to either of the two tablets that he has tried running the app on. My client formatted the original tablet that he was using to test the app but is still having the same issue of the app not starting.
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
#English isn't my first language.
So many questions..
Can I launch my project without emulator on android studio? Something like in libgdx?
Or how I can change emulator? (need low requirements)
You can set up your phone in order to display the app you are developing withoup needing the android emulator itself. You must enlable developer options and maybe install some drivers. Check this links:
https://developer.android.com/studio/debug/dev-options?hl=en-419
https://developer.android.com/studio/run/device
When everytihing is done you should be able to run the app in your phone
I have a very strange problem with my Android App and the Google Play Services.
With the debug Version of my App everthing works fine. And also when I started the release App over Android Studio on my real device it worked. But when I installed the App from Google PlayStore the Game Services stopped working after about 10 min. And I was not able to sign in again.
Then I uninstall the App from my device and tested it from Andoid Studio again. The first time it didn't work, but after reinstall it via Android Studio the Play Services worked again. Then I tried the App from PlayStore again, and first it worked again, but after a view minutes I had the same problems then before to sign in.
Any ideas?
I know it's an old post, but probably there are other developers facing that issue. You probably didn't set the fingerprint of your signing certificate of the app in the play store in your API console:
https://developer.android.com/games/pgs/console/setup
Remember, you need to register both, the key of your productive app and your development version. Don't confuse with the key you use for uploading. The released version of your app is not signed with that one, but rather with the certificate displayed in your play console under configure -> app-integrity -> app signing tab
I am trying to create Phonegap app that runs in a "kiosk mode" that won't allow the user to either leave or close the app, have acces to the notification bar or use anything else than the app we created.
The idea is that we incorporate a tablet (samsung galaxy tab 4 10.1) in an endcap which will then be placed in certain stores. Whether or tot the physical buttons on the tablet will accessible to the user has not be defined yet.
I do have experience with Phonegap but i have no idea on how to accomplish this.
So far i have tried several guides and resources, i.e. this one: http://www.andreas-schrade.de/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/ or solutions as SureLock but without succes.
The tablet we want to use: samsung galaxy tab 4 10.1 (SM-T533)
Android version: 4.4.4
Phonegap version: 5.1.1
Cordova Kiosk Mode - Cordova plugin to create Cordova application with
"kiosk mode". App with this plugin can be set as Android launcher. If
app starts as launcher, it blocks hardware buttons and statusbar, so
the user cannot close the app until the app request it.
https://github.com/honza889/cordova-plugin-kiosk
Kiosk mode is highly platform specific. I'd recommend building a native app instead of using phonegap.
If you absolutely want to use phonegap you'd have to implement these hacks inside a plugin (which is in fact native code, so you don't gain anything).