Using Google Play Licensing In a Nativescript App - android

I'm deploying my Nativescript app to Google Play and would like to use the Play Stores licensing tools so that the app can't be distributed in a malicious way. Is it possible to use these tools with a Nativescript app currently? It seems I need to use the Play services SDK but not sure how I can approach this. Support for the play services in NS are seem lacking. I'm just looking for some guidance and a decent approach.
I found an npm package for nativescript-google-sdk but that seems purely maps focused. It also hasn't been updated in quite some time.

I think the moment you upload your APK in the Google Play Store as mentioned in Native script docs, you'll have the option to configure the Licensing there. So you shouldn't worry. This SO thread might offer additional info as well.

Related

Leaderboard android Google Play Game

I would like to add a leaderboard to my android game.
Of course the easiest is to use Google Paly Game. But I'm afraid my users won't like being obliged to install Google play Game.
Can we avoid this installation?
Is it really a bad experience for the users?
Is there another solution?
Referring to this documentation, when you add Leaderboards in an Android game, installing and setting-up Google Play Services is required.
But, AFAIK, your users only need to have Google Play Services for that game feature which is already installed by default on all Android devices. So, your users won't be obliged to install it.
See this thread and this blog for additional insights.

Is it necessary include Google Play Servicies in apk?

I am afraid with that. Is it necessary to include Google Play Services with our apk? If it were an external library the response is YES. But in this case, Android forces us to download latest Google Play Services version, so the code must be in the device...
The problem that I see is that every app with this library will use the same code that can have the device, thus saving space.
Practical case: I had an application with admob which is 800KB. Now, using Google Play Services is 2.8MB.
Could someone explain me that?
Thank you!
Firstly you don't need to include it in your apk - you can pretty much assume it's on the phone and up to date. The increase in size means that you are including it in your apk. To exclude it from the apk delete it from your libs folder.
If you get errors then you need to add it as a library to your app. You can do that by going into your project's properties then clicking on Android on the left and then in the bottom section add Google Play Services from your workspace as a library (that is on Eclipse).
Because most users have the latest version installed on their devices, you do not need to include the entire Play Services lib in your build. If they don't have it installed, or if they do not have the latest version then your code might not work correctly.
If the user has Google Play then they will get a dialog letting them know that their Google Play Services is out of date and needs updating. If they don't have Google Play then you can choose what to do, for example you can alert the user that the app will have a limited functionality. If your app can't run without Google Play Services and the user doesn't want to install/update Google Play Services then your app will not work properly. Using an outdated libs in your project might work however you would be using them at your own risk as they won't be updated.

How to publish Android API on Google Play?

I have recently developed an API which can be used in Android applications. Could someone please let me know how I can make it available on Google Play? As far as I know, we can only upload apk's on Google Play and am not sure how to make api available.
Thanks in advance.
Could someone please let me know how I can make it available on Google Play?
You can't. The Play Store is for apps, not programming libraries, and I assume that your "API" is in the form of a JAR or an Android library project.
As far as I know, we can only upload apk's on Google Play
Correct.
The category tools in Apps is your best bet. Thought I would suggest actually promoting it yourself on a dev forum such as xda-developers or such. As you may not see much tracking otherwise.

How to upload an APK from Jenkins/Hudson to Play Store?

I implemented a continuous integration pipeline using Jenkins, but as final step I want Jenkins to deploy/upload the signed APK file to Google Play Store and AndroidPit. I looked for Jenkins/Hudson plugins but only found two: one for Appaloosa and one for Zubhium.
I have a working developer account both on Google Play and on AndroidPit and can manually upload the APK that Jenkins produces. But my question is: Does anybody know a way to teach Jenkins (e.g. via a shell script?) to upload the APK to the mentioned app stores?
There is a Google Play Android Publisher plugin for Jenkins which uses the Google Play Publishing API, announced at Google I/O 2014.
Google has also released Java and Python libraries to help make use of the API.
For more info on the API, see also:
http://android-developers.blogspot.com/2014/07/grow-with-google-play-scaled-publishing.html
I can talk only for Google's Play Store. There is a way, but be warned, it isn't beautiful, you have to code your solution. I am right now writing a Bachelor Thesis to solve this problem - "Continuous Delivery for Android Applications". My solution is mine, this means I don't raise a claim to have the perfect solution, but I can say it is quite working prototype.
I found out the following:
The first Solution is none. Google offers an Play Store API, but it lacks to upload stuff. Seems that they were already thinking about to make such an API, but it only offers In-App billing control
The 2nd solution is to use Apache HttpComponents Library, which lets you implement your own Client for the Google Play Developer Console, but HttpClient lacks a JavaScript Interpreter... Several ways to implement or add one. But of course, not the easiest way.
The 3rd Solution I am working on, is to use Selenium Web Browser Automation Framework. So basically I create PageObjects from those Play Store Pages and dialogues. After that you can create some Factory to maintain "pathes" of controlling these PageObjects.
Using them you have two options as far as I can see, for instance the WebDriver Objects which uses an "invisible" browser process like FF or Chrome and another I use is ChromeDriver which uses a visible Browser process, to perform the User actions. And don't forget to have Exception Handlers, which scans the Webpage for appearing errors, while in use.
There are a lot of pitfalls, due to possible changes in the Design from Google, which lets your Software break. But there are also some ways to handle that. =) And create an XML containing all valueable information about an app, which comes in handy, when continueing to the next step.
You can create a Maven Plugin. This you can load into your Continuous Integration Server. I hope I could help you a bit.
Since Google Play released the upload API, a plugin has been made:
https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=73533143
I haven't tried it yet, but looks like it's exactly what we were looking for.
There are other plugins that claim to do the same (thanks #mdt)
https://github.com/DavidHamm/google-play-publisher 404-this page does not exist
https://github.com/orrc/google-play-android-publisher-plugin
I believe it is not included in the PlayStore API currently to reduce stress on the system and to avoid abuse.
I believe we may see this in the gradle plugin and in the IDE in the future.
While we wait for google decide to open up the API, here is a solution, that is so sill, that i just had to propose it:
If you have a GUI, use GUI automation for the last step.
Google Play Android Publisher plugin for Jenkins is a good one. However, it doesn't support uploading descriptions and screenshots (at least for now).
I found decent Gradle plugin, called Gradle Play Publisher. It supports uploading apk, updating Metadata, and uploading screenshots. And it only needs a few steps to setup.
First go to Google Play Console in a browser, open the page for your app, and look for the option to allow a new email address to upload APKs. If it's not there, it probably means you are not the administrator of that Play Store account and you need to ask the person who is the administrator to add it for you (on a per-app basis). To find out what email address to add, go to Google Developer Service Accounts and create a JSON key for any of your existing Google developer service accounts, or create a new service account with a JSON key. Note the email address associated with the service account for which you have created (or will create) the JSON key. It will most likely be something at gserviceaccount.com. This is the email address that must be given permission to upload APKs by someone who has admin access to your Play account.
After that has been done, download Madison Dickson's updated version of Marta Rodriguez's script via wget https://gist.githubusercontent.com/mix3d/665f4ab329b4482297a2f425ebba402c/raw/0949385dd6c80d0701170746b1bd5fd479303412/basic_upload_apks_service_account.py and install dependencies via pip install google-api-python-client (or sudo pip install google-api-python-client as appropriate).
Then in the automated script you can use (for example) python basic_upload_apks_service_account.py -t beta -p org.example.MyApp -s JSON_file_I_made.json -a MyApp.apk (assuming your JSON file, your APK, and basic_upload_apks_service_account.py are all in the current directory and the pip install has been done on that machine or container).
I strongly recommend uploading to beta (hence -t beta in the above) rather than directly to production. Just in case something breaks and it somehow gets as far as the APK upload. I think the final press of "rollout to production" should always be done by a human. But if you really want to do that automatically as well, you can use -t production instead.

Android, official download location for google play apk for testing?

I have some functionality for rating my app and for viewing/installing other apps I have on the marketplace that I need to test in the android avd emulator. To do this I need to have the latest google play apk installed but I am unsure of the official location to download this from so I can install it on to the emulator.
Lot's of the sources I have found are for file sharing sites and out of date apks and I would be grateful for a link to the official apk. For some reason best known to themselves I don;t seem to be ble to get it from the main google play site. this is most confusing!
Or is there another way to test market app functionality on an emulator?
what you are looking for is: "market://details?id=" + APP_PNAME
I strongly recommend using the android code snippet app rater
good luck
First, this is not a programming question. Second, there is no such thing as an 'official download location'. The Play Store application is only available on licensed devices. Even if you pulled the apk from your device, it won't run on the emulator as is, since it requires other components as well. So, test on a real device if you need access to the Market/Play store.

Categories

Resources