my app stops working on pos device - android

I am using an android POS mini device on which I have installed my android app which uses google play services. I also have installed play services version 11.7.44 and play store version 8.4.40 by myself. Because it doesn't provide this 2 apps by default.
In my project I use:
compile 'com.google.android.gms:play-services-base:10.2.0'
And also services.
Sometimes my app stops working and doesn't even throw any error. Every time I have to reset my pos device to get over this error. I tried by clearing cache and other stuff as well. Is there any option to get rid off from such things?
In my minipos device its return null the session after some transation so how can i sloved it.

Google won't allow Google Play services on Google Play on a device which is not Android Compatible and passed the compatibility test suite (CTS). (source).
Self-installing Play services and Play might not be the cause, it might be a symptom of a device which is not truly Android compatible. Can you provide more details of your device in the question?
Any Android device which stops an app you would expect to provide errors in the log. This is also a sign the device is not fully android compatible.
I'd suggest testing your app in the emulator (which does allow Google Play services) and configure the emulator to be as close as possible to your device. That at least will give a stack trace if your app crashes, and allow you to debug.
There is an app on Google Play called SafetyNet Helper Sample. This will connect to a Google service called SafetyNet and tell you if the manufacter has passed CTS tests for the device. If they manufacturer hasn't then they aren't allowed to describe the device as "Android Compatible" (source), even if it is based on the Android source code which is open source.

Related

Android Play-store behavior on app download

I was just curious to know few basic behavior of the google play-store.
Tried to find the answers of below questions:
1) If my phone network is switched from cellular to WI-FI while i am downloading an app from the play-
store. How google manages the connection as it resumes the download from where it stopped, because as
far as i know the IP address will change and TCP connection restarts the session.
2) What are the detailed steps involved right from requesting for an app from play-store till it is
installed in our device. I mean what are the factors of the device google crosschecks, for instance,
if the minimum version of the app is 7.0 and i have a device of 6.0, will the .apk gets downloaded and
then the version is verified or it is verified before the download starts.
Couldn't able to find a document on these. Please share if you have one.
Regarding 2)
The Play Store won't offer you an app for download if your phone doesn't meet it's requirements. This means you won't be able to download the app via the play store if:
Your phone doesn't meet the required minimum android version
Your phone doesn't support one of the features that are marked with uses-feature required="true" in the manifest (see reference)
e.g. NFC, camera
The vendor explicitly excluded your phone from the list of supported devices
e.g. some Samsung apps are only available for Samsung smartphones, like Gear 360 app. Some games are only available for Nvidia Shield like Half Life 2
The vendor doesn't release the app in your region

My Signed APK not install in Samsung, miA1 and Oppo F1

ERROR MESSAGE:
You not have a proprer app for viewing this content.
This Is not an Apk Problem, Nor a Signing Problem, Some Devices, Especially Samsung ones have an App Management Tool built-in. And Most Users don't even know about such thing. These App Management Features are just Messing with Google Play Store to Kepp the Device Alive and Prevent Any Crash.
But there is a setting in Samsung devices which gives the user option to deactivate this "Management" tool.
Also, If you have Published your Application on Google Play, Go your Google Play Console, There is an Option which tells you on Which devices your App can be installed and Used. It gives you a very high precision estimate of Device Reachability.
Your APK is Fine, Don't Worry.

Google Play: Your device is incompatible with this version -> "No Carrier"

I can't find anything online for this.
A user mentioned that he couldn't download my App because Google Play wouldn't let him. So I bought the device the user has (Galaxy Tab 3) because I couldn't figure it out remotely.
I can't find the App in the Play Store on the device. If I log in with the same Google account, it tells me that my device is incompatible with this App. All the information I have is "No Carrier".
Could it be possible that if my App needs an Internet connection I can't download the App if the device doesn't have a Sim-Card or something?
Update:
I have another flavor of this app in the store. The only difference (manifest-wise) is that this app needs camera permissions. But even if I make those optional (setting 'required' to false), it doesn't help. Also the specific model 'GT-P5210' is not listed in neither of my Apps in the supported devices list (even though I can find the other app in the store with the device). Also I made sure that there are screenshots for every possible tablet size.
Also I can of course install the App from Android Studio.
in the google play console, under store listing
add some screenshots for "TABLET".
without that, google play will think that your app is not meant for Tablets (which Galaxy Tab 3 is classified under).
The error indicates that there is a requirement listed in the app's manifest for phone networking. You need a phone to use it.

Android - this app won't run without google play services which are missing from your phone [duplicate]

I want to use Google Play Services API in my application, but when I open the emulator to test my application it sends me a message that says "Google Play Services must be downloaded". I know that occurs because I coded this test in my MainActivity in the method onResume().
I want to know how I can install Google Play Services in my emulator, because soon I will need to test my maps.
Check out Setting Up Google Play Services which says:
To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK.
If you haven't installed the Google Play services SDK yet, go get it now by following the guide to Adding SDK Packages.
To test your app when using the Google Play services SDK, you must use either:
A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
For api 21+ you can use system image with Google Play as I describe below.
For api 19+ (Android 4.4 Kitkat) you can use system image x86 with Google Api (I was able to use it).
For api 17+ (Android 4.2.2) you can TRY to use system image ARM with Google Api (It didn't work for me).
I was able to install Google Play and Google Services as separate apks to pure system image api 16 and 17, but they don't really work after that (services crush and play not opens). So seems like it is not possible to make them work on pure AVD image because they should be installed with root access. The same for updating Google Services on AVD system image with Google API preinstalled - can't update because of incompatible certificates, can't uninstall even using adb because don't have access.
How to setup AVD system image with Google Play
Now even better solution exist: using AVD image with build-in Google Play Services. It will enable you to use Google Services including Google Play. Also you will be able update it without re-creating AVD image.
Open AVD manager and choose create new device. You should use device definition with play store icon.
Then choose system image for it. You should choose one with Google Play and NOT with Google API.
Then launch new device.
You can update Play Services as shown on screenshot, or manually in app itself, just like a real device.
Update 2022; but even with above, you cannot use the Emulator to test Google Play Billing:
You must install your application on a real device to test Google Play Billing,
Or, ask Google for "closed testing" permission.
see How to test In-app Billing on an emulator?
This is how you make Android Google Maps API v2 work on your emulator.
Create a new emulator
for device choose "5.1'' WVGA (480 x 800: mdpi)"
for target choose "Android 4.1.2 - API level 16"
for "CPU/ABI" choose "ARM"
leave rest to defaults
these are the settings that are working for me. I don't know for different ones.
Start the emulator
install com.android.vending-1.apk and com.google.android.gms-1.apk via ADB install command
The longer answer is on my blog post about this issue https://medium.com/nemanja-kovacevic/how-to-make-android-google-maps-v2-work-in-android-emulator-e384f5423723
I came across another solution to use the Google play services on an emulator. The guys at http://www.genymotion.com/ provide very fast emulators on which you can install Google play services. They just need you to sign up to begin downloading and you need Virtual box installed. At the moment they cater for Android 16 and 17 but more are on the way.
In the current version (Android Studio 0.5.2) there is now a device type for "Google APIs x86 (Google Inc.) - API Level 19".
The key is to select the target of your emulator to, for example: Google APIs (ver 18).
If you select, for example, just Jellybean 18 (without API) you will not be able to test apps that require Google services such as map.
Keep in mind that you must first download the Google API of your favorite version with the Android SDK Manager.
This is a good practice and it is far better than juggling with most workarounds.
I tried to develop google MAP API V2 application recently and tried to run it through emulator but I everytime it showed me error "Google Play Servcies is not installed in this phone".
From my perpective even I think google MAP API V2 doesn't work on emulator.
Solution
Then I tried to run the same example on my Sony Experia you and again it showed me same error.
Then I installed google play services on my mobile and amazingly it started working..:)))
I got it working by
Installing the Google Play Services through the Android SDK Manager
Using a Galaxy Nexus Device (4.65", 720 x 1280: xhdpi)
Targeting the Android 4.2.2 Google API Level 17
Go to https://university.xamarin.com/resources/working-with-android-emulators .
Scroll down to the "Installing Google Play Services" section. Step by step walk through there.
Directly plagarized from xamarin here so I don't get dinged for linking and not including solution. Posting this as I found the hit in stack before I found the solution that worked across the board on the xamarin page.
Start the Xamarin Android Player and run one of the supplied images, the following assumes you have started the KitKat Nexus 4 image.
Download the proper Google Play Services .zip file from www.teamandroid.com/gapps/ . Make sure to download the image appropriate for your version of Android.
Drag the .zip file onto the running emulator and drop it to install the component, here we show it on Mac OS X, but the same mechanism is used in Windows. You will get a prompt to install the package onto the emulator which indicates the image will be restarted
Once it restarts, you will get a notification that installation is completed, and the image will now have Google Maps, Google+ and support for the Google Play store. Note that some things do not work correctly and you may get a few errors from some of the services, but you can safely dismiss these and continue the instructions.
Next, you will need to associate a Google account so that you can update the services using the Google Play store. It should prompt you for this, but if it does not, you can go into the Google Settings and add a new account.
Once you've added the account, you can then update the Google apps by opening the Google Play store application and going into settings from the side bar menu.
Select Settings and then scroll down to the Build Version number information and double-tap on it until it tells you it is either up-to-date, or that it will download and install a new version.
Power off the device (press and hold the power button in the toolbar on the right) and restart it. Once it restarts, it should indicate that it needs to update the Google Play services, tapping the notification will open the Google Play Store and install the latest version
Now you can run applications that depend on Google Maps in the Xamarin Android Player.
To the latest setup and information if you have installed the Android Studio (i.e. 1.5) and trying to target SDK 4.0 then you may not be able to locate and setup the and AVD Emulator with SDK-vX.XX (with Google API's).
See following steps in order to download the required library and start with that.
AVD Emulator setup -setting up Emulator for SDK4.0 with GoogleAPI so Map application can work- In Android Studio
But unfortunately above method did not work well on my side. And was not able to created Emulator with API Level 17 (SDK 4.2). So I followed this post that worked on my side well. The reason seems that the Android Studio Emulator creation window has limited options/features.
Google Play Services in emulator, implementing Google Plus login button etc
I know this is an old question, but I got here because I had a similar problem as everyone above. I solved it by just reading a little closer!
I hadn't noticed there were 2 possible system Images I could choose from, one that contained Google APIs and one that didn't (on my laptop the menu was too small for me to read the (with Google APIs) text appended.
It's a stupid thing to miss, but someone else might have a small screen like I did, and miss this :D
If your emulator x86 this method works your me.
Download and install http://opengapps.org/app/opengapps-app-v16.apk. And select nano pack
More info http://opengapps.org/app/

GoogleMaps GPSV.2 only to be tested in real devices?

I was testing the implementation of Google Maps from Google Play Service V2 and following carefully this suggestion and from developer.android.com. Setting virtual device Android 3.1 (API level 12) and running it, the maps weren't shown, instead this message is shown on the screen "this app won't run without Google Play services, which are missing from this tablet" and LogCat says 04-26 21:47:39.449: W/GooglePlayServicesUtil(395): Google Play Store is missing" in orange text. After that, reading somewhere at internet, apparently it must be tested in a real device, is that true?. Let me do another question, can I run that application in my Tablet w/Android 2.2.1 anyway?, if not, what modifications must I do in the project?. I'm using Eclipse indigo in Ubuntu. Thanks in advance.
After that, reading somewhere at internet, apparently it must be tested in a real device, is that true?
No emulator ships with support for the Play Store. You will find various people advocating software piracy as a workaround.
can I run that application in my Tablet w/Android 2.2.1 anyway?
If that tablet has OpenGL 2.0 and the Play Services Framework, yes.

Categories

Resources