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.
Related
I am trying to implement app links into my app to make sure that other malicious apps cannot register for my URL.
I read the guide on app links here https://developer.android.com/training/app-links/verify-site-associations.html and I have mostly understood it. But one thing which is not clear to me is how can I prevent malicious apps from receiving my domain links if my app is not installed.
Consider this scenario.
1. My app is not installed on the user's device
2. Some malicious app is and it knows the URL that my app handles
Wouldn't this launch the malicious app and it can intercept my URL if the user selects that app from the disambiguation dialog? Is there any way to prevent it?
I understand that android:autoVerify="true" will trigger the domain verification when the app is installed, but what if the app is not installed?
Whether the user has the app installed or not, the "illegal" app won't be able to handle your links since it has not access to your domain in order to save there the needed JSON file. Am I clear?
There is a JSON file that is required during App Link configuration, that has to be uploaded to your server (that includes your app ID), through which your web-app basically says to the Android OS 'this is my counterpart on Android devices, I authorise it to handle these URLs'. Since app IDs are unique, there is no way another app can meet those conditions.
To quote the docs:
An Android App Link is a deep link based on your website URL that has
been verified to belong to your website.
So, although an app may register an <intent-filter> it ALSO has to be verified by the website whose URL it's trying to handle. And this happens on the server, so, out of the reach of a mobile client.
See also HERE for a more detailed explanation.
Is there a way to authenticate a java desktop application with Slack using OAuth2? I am trying to follow Slack's guide.
I am getting stuck because it says you get the access token inside of the redirect uri of your application. But since the app I am making does not exist inside of the web browser, is there anyway I can do this?
Can my java application launch a localhost site that it can communicate with to use as the redirect uri? If so, how?
Desktop app as internal integration
Before we get into more details please note that there is an easy solution if you plan to use your desktop app for your own Slack workspace ONLY. In that case your app does not need to support the full Oauth work flow and you have two options:
Install your app as internal integration via the management page
of your Slack app and then copy & paste the token to your desktop app
Create a legacy token for your Slack workspace and then copy & paste to your desk (not recommended)
I also like to clarify upfront that your app only needs to run the Oauth process ONCE for installing it into a new Slack workspace. The resulting token has no expiration date and has not to be refrehed.
Desktop app for multiple Slack workspaces
If you plan to distribute your desktop app to multiple Slack workspaces you will need to support the full Oauth installation process.
Slack is using Oauth 2.0, so in principle all the standard answers from this older Oauth wiki article should work for Slack too.
However, since you can not assume that the local machines of your users are reachable from the Internet (e.g. redirecting back to a local web server will not work, since Slack will most likely not be able to reach it), you will need a web helper app that runs on a web server and is reachable from the Internet.
This web helper app is basically a small web site, which performs the complete Oauth dance for the installation process into a new Slack workspace. You app can open a browser window and redirect to the web helper app to start the login process. You then have two basic approaches how to handle the connect back to your desktop app:
Show the resulting token to the user and ask him to copy & paste it
to your desktop app (simple approach)
Store the resulting token in your web helper app and provide an API to your desktop app to fetch it automatically. (user-friendly approach)
If you are looking for a starting point for such a web helper app, take a look at this example PHP script for installing Slack apps.
Hereis my problem,
I make an Android application and i use Windows Azure.
I use Azure to make login activity with Facebook. It works well i can log in.
However i want to get the Name and last name of the guy who log in using Facebook.
I have no idea how to do it using windows azure, i check this web site http://blogs.msdn.com/b/carlosfigueira/archive/2012/10/25/getting-user-information-on-azure-mobile-services.aspx
But i don't understand it. Anyone got an idea on how to get the name and last name of the person who log in using windows azure on android ?
To get user's information from facebook, first User must authorize it. Second, you need to query this information using graphs api from facebook.
Here some tutorials that could help you:
http://blogs.msdn.com/b/carlosfigueira/archive/2012/10/25/getting-user-information-on-azure-mobile-services.aspx
http://chrisrisner.com/Authentication-with-Windows-Azure-Mobile-Services
https://developers.facebook.com/docs/android/getting-started/
Previously, in order to use Google Drive service, we are using the following simple username and password login in Desktop application with Google Documents List API
DocsService client = new DocsService(getCloudApplicationName());
client.setUserCredentials(username, password);
As in Google announcement, https://developers.google.com/google-apps/documents-list/, Version 3 of the Google Documents List API has been officially deprecated as of September 14, 2012. It will continue to work as per our deprecation policy, but we encourage you to move to the Google Drive API.
So, in our desktop Swing application, we need to rewrite the code to gain authentication to Google Drive service.
By referring to code example run at console https://developers.google.com/drive/quickstart-java#step_3_set_up_the_sample
Please open the following URL in your browser then type the authorization code:
https://accounts.google.com/o/oauth2/auth?access_type=online&client_id=888888888888.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/drive
User need to open up the browser manually.
Key in his username and password.
He will then obtain a special string from browser, where he needs to copy and paste to the console.
I think I can pretty much simply the process, by using a web view component Integrating JavaFX 2.0 WebView into a Swing Java SE 6 Application, so that the above task will be automated.
However, the webview's component previous history session will be destroyed as I close my desktop Swing application. User need to key in his password and username every-time he launch the desktop app.
From official Google Drive app for Windows, I realize it does have the capability to remember the last authentication of the user. User just need to key in his username and password once. He can then use the Google Drive service again and again, even after restarting the computer.
May I know how I can achieve the similar behavior?
You need to permanently store web view's cookies and set them again once you launch the web view again.
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