My project is open source and implements features from Google Play Services such as location. I'm having trouble in that when I upload my project to GitHub for instance, when the project is downloaded onto another user's machine to be worked on, all the references to Google Play Services become 'cannot be resolved' errors. Even uploading and redownloading the source on my own machine which has the Google Play Services SDK results in errors. Apparently the source code needs to be manually linked to the Google Play Services SDK each time it is imported to a different machine.
Is there a way to include the Google Play Services code in the source without requiring each user that downloads it to manually set up the Google Play Services SDK?
https://github.com/owncloud/android/blob/master/SETUP.md
This is a setup guide of another app. in it you can see setup_env scripts. You can have a solution like this and write a setup guide like this one for users who want to build.
Related
I have this app released on play store that I want to make available on my website. I tried downloading the signed apk via the Google play console and use that, but some users in China have issues installing it.
They get a message like this while installing: "Your device does not support Google Play Services and cannot install "
I have a few Google sdk bits referenced in my project (signin, safetyNet, ads) which I would assume I need to delete before building for this apk version, since target devices don't have gms..
What about signing? Can I simply build without the said code and distribute it? (Generate release apk in android studio) Or do I need to upload to play console and download the one signed from google?
Please let me know if you have any clues on this, been banging my head around for a few days already.
Cheers :)
This might help you taking your decision:
If you have Play App Signing enabled, the APK generated through your studio and the APK generated through Play Console will have different signatures.
Otherwise, both approaches will have the same signatures.
So, it depends whether you care about your APK on website having the same signature as Play Store. If you don't care about having same signature, you can go ahead with creating APK from Android Studio itself and publish to your website.
If your app utilizes Google Play Services, as is informed by the error message, then it WILL not run on the device unless Google Play Services and everything that it depends on is installed on the device. The only work around is to convert your app features that uses Google Play Services to its alternative that's supported in China.
I've dealt with similar issue on Huawei smartphones, my approach was to 'develop another app' using Huawei SDK, check out https://developer.huawei.com/consumer/en/ for its complete reference
I just added OneSignal to my Cordova project. This appears to use Google Play services i.e. (I get a message "No valid Google Play services APK found"). I was wondering the best approach for adding it.
I have Google Play services v8.4.89 installed on my phone.
I have Google Play services installed via the SDK manager:
This creates a google_play_services folder (without a lot in it):
UPDATE
As per this Google has broken down Google Play Services into multiple libraries (.aar) located at:
android-sdk\extras\google\m2repository\com\google\android\gms
build.gradle dependencies:
I'm a little unsure of what to do next. I thought I could have potentially used this.
I might add I am using IntelliJ and have tried to import the JAR manually as per this.
Thanks,
The OneSignal error "No valid Google Play services APK found" means that the "Google Play services" app is missing from the device or is most likely just out of date. It should check the version under Settings>Apps. It should update automatically in the background after you open the Google Play store on the device and sign in. See the following link for more details.
https://documentation.onesignal.com/docs/all-users-are-shown-as-not-subscribed
You need to add it to your project library..
File >> Import, select Android > Existing Android Code into Workspace, browse to the library project (your android sdk env) to import it. extras/google/google_play_services/
After this.. you need to open the properties for your project..
Right click on your project and click properties select android and under the library section add the google lib.
I want to push android apk to google play using google play service in automated way.
As of now I am building my android app using Ant and windows batch scripts and able to get the .apk file without any manual intervention.
Now I want to upload the generated .apk file to google play using google play services with help of ant and windows batch scripts in automated way.
When I google i come to know that by using gradle I can do it, but I am unable to build my project using gradle. So, I don't want to go this way.
I am able to push .apk to google play manually using my google play developer console.
Now I what to automate this process, How can i achieve this.
There's quite a bit of handling required with the Google Play Services API, for which the Windows batch commands are likely insufficient.
Since you don't want to change your project to Gradle, have you given a bit of thought to using Jenkins? It can be a light weight "provisioning" server on your system, that achieves what you want by using the Jenkins Google Play Android Publisher Plugin (see the complete step by step instructions). The good part is you don't have to change your Ant project. You can in future even automate more of your dev-test-deploy cycle by leveraging more of Jenkins capabilities.
You might want to look into Fastlane (and Supply in particular): https://github.com/fastlane/fastlane/tree/master/supply#readme
Basically, it's a command-line tool to upload binaries, screenshots and changelogs to Google Play.
I am building a google maps app on android using android studio
When I released the first version of my app, no one was able to view the google maps as google play services must be installed on the devices by users ( I cant ask people to download that in each device) so I want to embed it into my app.
I have been searching for 4 days and no luck so far
I got that google-play-services.jar library can be added to the app and by that no need for the user to install play services
I am not sure if I should use google-play-services.jar or com.google.android.gms:play-services in my android studio app.
I read in other answers that I can use google-play-services.jar into my app so I can get Google Play Services ready without the need for user to install it.
in another said that com.google.android.gms:play-services is a must in the app!
Anyway has experience in this?
Please advice.
Thanks
google-play-services.jar will only interract with installed play services on the smartphone. You can't emmbed the play service application in your apk, there's nos sense.
For peoples who want to use your application, they need to download it by the play store or maybe they already have google music or google maps on their phone, so they have play services installed.
So just add google play services in your gradle file
compile 'com.google.android.gms:play-services:(version)'
I have downloaded a demo project of GSM services.
For using it, I need to install a file name Google could messaging but, it is missing from my SDK.
How can I add this file to my SDK?
New To Android
If you use GCMS (Google Cloud Messaging Services), you need to build a library project which uses Play Services and import it into your work-space.
Generally:
Install the Android SDK from this link.
Download and configure the Google Play services SDK, which includes the Google Maps Android API. You can see the setting up on this link.
Don't forget to add the required Google Play services settings in your application's manifest.
When you add the Play Services library to your project, be sure to add it with resources, as described in Setup Google Play Services SDK. The key point is that you must reference the library. Simply adding .jar file to your project won't work. You must follow the directions for referencing a library, or your app won't be able to access the library's resources, and it won't run properly.
You can get the full instructions from Setting Up Google Play Services.