Using Android license verification serverside - java

I've been thinking about implementing of Google Play licence check on my Java server. Is that even possible? I haven't been able to find anything on this matter. I know Android LVL is written in Java, but I'm not sure if it can run outside of dalvik machine. Is there a posibillty of checking Google account name or some kind of device ID against Google Play to check whether an app has been bought in a Java server application?

The answer above is simply verifying response data (returned by google LVL on android device) on app server.
I think the question is asking if it's possible to call some google web API to do Google Play license check on its app server. But it seems like google doesn't open the web API interface to its licensing server, all LVL calls need to be done using its google play service framework on android device.

Yes it's possible, the java sources are out there and could be downloaded (and afaik, the jar is not dexed until you compile your application) - see some kind of manual over there at developers.android.com to read about how to get the sources
I've heard about a PHP project trying to attempt it, but using java should be no problem at all - you do the same things on the server, the manuals state for the client - and let the client sends the encrypted response from the market directly to the server via SSL (e.g. byte[] post)
You should get a UID from ResponseData.userId
Read some more in this blog post and more info and links in another SO answer

Related

How to access directly internet on WearOS app

I am looking for My data on wear OS app to send to my external apache server with php and mysql.
Ultimately I need watch sensor data in MySQL database, So i created a POST request page using php. How do I send POST request?
Note: I am not using mobile phone between WearOS app and My server. WearOS is connected to internet via WiFI
Please if you know any solution help me
FYI: I tried basic things given at https://developer.android.com/training/wearables
Using Smart Watch with API level 23
Regards
Unfortunately your watch system version is too old. I strongly recommend you to buy a new watch or try update to Wear OS 2.x (API25) if your device is still under maintain.
If you insist on using current device the only way to access the Internet is via mobile phone. You can not send HTTP requests directly.
But the old version system should not be able to connect the WiFi. Please confirm your version at first. If your API level equal or larger than 25, you can access the Internet as same as phone using OkHttp or others you like.

Is EMM what I'm looking for?

We have a Java based web application and an android app for our enterprise needs. We would like to remotely push the android app from the web application and we don't know how to achieve this. After searching in Google, I found Android EMM but did not understand what that is exactly as there were no other blogs or tutorials other than the Google site which was difficult for me to understand.
It is similar to MDM solution but do MDM servers have an app preinstalled in the devices so that the installed app manages the installation of other apps?
Can anybody tell how to remotely push the android app from my web application?
To remotely push an app to an Android device you need to manage this device, you cannot just push an app on anyone's device. To manage a device you need to set up this device as managed, which will require a factory reset.
If you want to pursue this approach you can try the Android Management API.
You can just upload .apk file to your server and provide a link to the user. This is a very simple solution but requires user to agree "install apk from third party sources". In this case, a user needs to agree with installing apk.
If you want to install apk without user agreement you need to activate Device Owner on Android (Fred mentioned in the comment this approach).

Using Steam Web API from an Android app

I am trying to add some information from Steam into my Android app.
I see that Steam has Steamworks, but that is only built for Windows, OSX and Linux.
Furthermore, I saw that they also have a Web API that could also be accessed from a mobile application. But all the methods in the API require a 64 bit SteamID, which they say can be retrieved using OpenID. I downloaded the Google Oauth Client Library for JAVA but I reading through the documentation, I don't understand how I can get a SteamID for a user using this library.
Has anyone used this lib or another open source lib to get a SteamID?
UPDATE
To get direct SteamID64.
Login to Steam using a web broswer.
Once logged click on your profile and add ?xml=1 to browser url address
http://steamcommunity.com/id/yourusername/?xml=1 or
http://steamcommunity.com/profiles/yourprofilenumber/?xml=1 (if you have not set a public username yet)
I think this is number in profile link or steamID64 example: http://steamcommunity.com/profiles/76561198113616635
Steamid will be: 76561198113616635
To check it online you can go to https://steamid.io/lookup
In Android app, I think after authorize, steam will give you that number and key.

Android authorization with Google for my own server

So I'll start from the beginning. I want to create an Android application and a server (written in java). The server will be written in Java. What I want to do is to be able to log in to my server from the Android application, using the Google account. After the device is logged in, there will be some information sharing with HTTP Requests. I want to use REST.
How should I proceed for achieving my goal? I guess I should use the Google API and Google App Engine. What should I do to implement the log in and the part in the server. It's first time for me writing a server and an application with log in, so any advises will be appreciated. The application is for educational purposes. Thanks in advance!
I would really suggest you give Google App Engine a try, specially combining it with Cloud endpoints which are designed to connect your server to clients like an Android App. Using endpoints you'll get cloud infrastructure + REST services + native libraries ( for Android, JS and iOS) and everything related to authentication is already sorted out (via OAuth).
App Engine can also be developed using Java and it's already integrated with popular IDEs like Eclipse (through the Google Plugin) and Android Studio (as backend modules) so you prbably have everything you need to star working on your App Engine server.
Use Google Play services (you don't need App Engine).
Here is the complete process with code samples: Authorizing with Google for REST APIs
Another option you can look at: Google+ Sign-in for Android
On the server side, once you have the auth token, you access the Google REST API with the username and token, and Google will tell you if the access is authorized.
I understand what you're trying to do. Your user already has a username and credentials on Google, why not just get the username and let Google do all the authentication?
However, you might want to re-think this approach.
The problem is that you will ask your user to sign in to Google and Google will ask the user (through logic in the Android API code) if your application can have access to their information in Google. Your users may balk at granting that kind of access to your application, and that will hamper your efforts to get people to use your app.
Now, if your app actually uses the Google REST APIs, then this would make more sense, because the auth token your app requests will provide access to a Google API.
But if all you're doing is authenticating, your users might be hesitant to authorize your app for some Google operation they don't think you need.
To get a feel for the OAuth 2.0 message flow, you can use this: OAuth 2.0 Playground

Android PowerPoint remote

I want to write an Android remote to PowerPoint. It means we can control the slides by using phone.
Where can I start from? Give me some hints please. I've just read the Android basics.
I think RemoteDroid will work pretty well for this purpose and it's a fairly complicated job to replicate.
http://remotedroid.net/
what I did was:
I use a .NET #C Client on the Windows Side and
A Java Servlet and XMLRPC Web App running on a Tomcat ("in the middle").
And of course a Android Client as the controler
My C# Client creates a persistent HTTP Connection to a Servlet. And the Android App is sending short HTTP GET Requests to the TomCat, stuff like goto3 or next (the request has also a kind of a Presentation ID as parameter). The Comands from the Android Device are dispatched to the previously opened Persistent HTTP Connection from the .NET Client.
In The .NET Client I use a local installed PowerPoint as an ActiveX/OLE Control. You can do pretty much everything programatically in over c# that is possible to do "by hand". Open a .ppt(x), start the SlideShow, control the Slideshow and of course it is also possible to edit the slides content. You can find a lot of examples by googling for Microsoft.Office.Interop.PowerPoint
I pair the .NET Client with the Android Phone by using a Generated QR Code. That QR Code I show in a generated PowerPoint Slide. All Work around the QR Code (C# and Android) is done by using code from the ZXing (Zebra Crossing) Project.
You can try it out, Instructions and Downloads are here. The App is called FonPrompt and can be found in Google Play.

Categories