How to connect a device to a SDK? - android

I am currently working on a web app dashboard interface, the interface is basically a QA debugging tool, that will allow it's users to run playtest sessions. On my understanding terms, the dashboard connects/registers a game through an SDK key. the SDK key origins are generated in the web app and are used on a panel on Unity that our devs created and it successfully links a game to the web app interface.
I want to include a feature which will enable a user to connect their smartphone or tablet to their user profile in the web app...
Q. How do you connect a device,(a mobile device or a tablet) to the Web app, how do I get a user to register its device on their user profile and which informations should I provide and/or ask a user in order to do so?
notes:
1- I am not a developer, I am a UX Designer, I remembered this website which helped me in the past with some front-end questions and the devs at work are currently unavailable to answer to my endless questions. so I am doing this of my own volition.
2- On my understanding terms, I know that a device is linked via its device ID, which changes from app to app.
3 - if my question is not eligible for this site, please at least refer me to a better source. thank you in advance!
Thank you all !

It sounds like you want a tool to connect to this SDK (is this the Unity SDK?) and create fake game session data.
If that's the case, you'd use the SDK just like the actual game would. The only difference is that you don't want your QA tool getting its own id, but use the id of the game apk on the device? If this is indeed what you need to do the following methods should help:
Method 1: You're sharing various bits and pieces of data between the game and the QA tool
Set up a special permission in the actual game with the protectionLevel = signature (e.g. com.somegame.android.permission.PRIVATE_ACCESS). This documentation page on permissions should be useful
Have a BroadcastReceiver, ContentProvider, or Service in the main game that requires the above permission (Exactly which one you'd use depends on how much data you're sharing).
The QA tool declares a uses-permission element in it's manifest with the permission stated above
Sign both the QA Tool and the Game APK with the same keys
The QA tool and the actual game can now communicate with each other through the means you've provided above
The advantage this method has over the next is that even if you haven't run the game before, the QA tool can trigger the registration process in the game and get the id, without requiring you to actually ever run the game.
Method 2: All you need is the ID
Specify the same sharedUserId in both the actual game and the QA tool's manifest (see here for documentation)
Once the game acquires its id, it writes it to its SharedPreferences (preferrably a named preference file as opposed to the default)
The QA tool can now read the preference file (be sure to use the same name) and obtain the ID. The drawback here is that the game must have run before and saved its id in order for the QA tool to access it.
Method 3: If your game runs in a webview
Use a Javascript interface to obtain the info from the webview
Method 4: If your game runs on the web
Directly use the game APIs to access the id. Retrofit would be a great tool in implementing your API calls.
The wording in your question makes it rather difficult to exactly understand what your goal is. I suggest you consult with your dev to come up with a better problem description.
Best of luck.

Related

Strategy for selectively enabling features in a mobile application

Assuming an application that has no login, how can one go about allowing some of its user access to activate 'hidden' features.
An example I recently came across is the need for some users to see a different version of the data feed the app is using (official feed vs editor feed which is being modified/approved)
In android, I assume that we could just point those user to downloading a specific file and test for that file presence in the app but I dont believe this approach can be used on iOS (sandbox).
The approaches I came up with:
Hide an activator in the UI: specific touches/gestures, invisible button and the like
Make the user visit a site which sets a cookie when on a specific page and test for that cookie's value in the app to enable features.
Did someone came up with a more elegant solution?
You can try any AB testing tool like Optimizely , Apptimize, Taplytics or MixPanel
They will help you to try new features by enabling them to only a group of users. Also you can set goals to each variant so you can compare how they perform.
Create a settings bundle. Then the user can just go into the Settings app to switch your 'hidden' behaviour on and off.
In iOS you can register an association between your app and a file extension. Then if you send an iOS user an email containing an attachment with this file extension, iOS will open your app and you'll have access to the file. You could save to the sandbox from there.
Just Like In-app purchases, when user completes a purchase some of the features in application gets unlocked.
I think best approach would be to have data maintained on your server end, the users vs features and in splash screen you get the response from server which of the application's feature are enabled for this user using a service call.
Obviously you must be needing some kind of business logic to implement the flow of enabled features in the application and that is totally up to you whether you use SharedPreferences of keep the information in txt or some other files.

Send SQL table to another Android device

Sorry if my question is asinine.
I'd like to send the data in SQL table format from one Android device to a second device, so the user in the second device can store and use the received data with my App. What are the best options to do this?
You don't want to go down the path of trying to move one sqlite file on a device into the same location on another (I assume that's where you were going with the Bluetooth tag). Without root access on the destination device, you won't be able to write the file. From an end (power) user perspective, Titanium Backup is a great solution for this, but of course requires root.
If you're looking for "stop on one device, resume on another" functionality for your app, check out Google Play Services Saved Games. It has exactly the functionality you're looking for baked in, and you have to do nothing along the lines of the support infrastructure.
Of course, this is dependent on Google Play Services, so if you're looking to publish on the Amazon App Store (or anything where you're not guaranteed to have the Google stuff available), you may be better off rolling your own web based synchronization infrastructure or subscribing to a service that offers something on par with what Google makes available.

cordova detect if app was downloaded from Google Play

I'm making a Cordova 4.0 Android app that will be sold in Google Play, and I would like to prevent illegal use of it (for example preventing someone to extract the APK from the system and re-distributing it).
One theoretical way of doing this would be by checking that when the app is launched by the user, he did actually download it from Google Play (versus being it sideloaded). I'm not even sure if this is possible or if there's an alternate way of doing something like this.
One way that works in other cases is to use require some sort of login when accessing the app, but in this case I can't do that. Any advice would be appreciated!
Google offers a way to implement validation / licensing:
http://developer.android.com/google/play/licensing/index.html
Take a look if this is what you need!
One suggestion would be for those apps which are get connected to a server to fetch some data.
App verification token
Generate an encoded 64-bit long token and store on both device & server as well. This will be a unique token per app
Whenever app tries to connect to server, it sends the device token details. Server needs to verify it before fulfilling its request.
On specific events, server can generate a new token for a device.
Same way, device token can be mapped to a user or an app on the server side.
Token could carry some app related information, for instance.
first 4 or 6 digits represent app size
second block of digits could represent user specific or device or some other details
Or another block could hold app contents modification date
In case of any change, server could verify the app size, last app contents modification dates, etc.
Generally it is recommended to uglify, obfuscate and minimize app resources before submission.
You can use the package manager class to determine the source of an app (only google or amazon currently detected)
You can similarly use google analytics which gives same information.
This is pretty neat since Android stores the source of every package, allowing apps to know where they came from, to prevent piracy and sideloading.
Great if you always publish to google or amazon. Useless if you sideload your app.

Android: how to integrate with another application?

I have a paid android application which uses the google LVL code to authenticate users.
A company would like to pay me so that their application can include a free version of my application. However, I'm not sure how to accomplish this in a way that won't result in an easily pirated version of my app. Below are some implementation options I am considering, but none of them seem like particularly good ideas. Any suggestions?
I deliver them an apk which does not use the LVL code. They could then package my apk with their app, and install it using the ACTION_VIEW intent. This seems like a bad idea because I think it wouldn't be particularly hard for some rouge user to extract my unsecured apk and distribute it.
Maybe I could build a version that checks to see if their app is installed, and if it is it queries their app for some sort of unlock code. And app will only run if this unlock code succeeds. My main concern about this is that I have no idea if "querying another app" for an unlock code is accomplishable.
This is definitely accomplishable. As already said one way to query the app is by using a content provider. If you are concerned about security you can introduce additional permission that both apps must hold to access the provider. Although since it doubtfull that both apps have the same signature it won't be as effective.
Another way would be if they had a service that you could bind to and request a code or any other authentication. In this case their service can as well validate your apps validity by querying your apps userId and checking a signature via PackageManager.
Sad news is it's alomost impossible to prevent pirating your app anyway. Even with LVL... Since all this can be decompiled and eventually broken. But at least you can make attackers life harder.
For what you are looking to do I would create a jar out of your project and mark it as a library project. That way you can give your application out to your client but they wont be able to see the actual code you have written. Using this method they will be able to call any method directly which would be easier than having to interact with an apk.

How to obtain information about downloads, total installation, and active installation from my published android applications programmatically?

I have a few questions regarding android market(Google play). How can I list my published application by accessing from my google account? What I have done so far is using my application package name as a query string to search my application and display all information which I used android market api to do it. Is there another better way to display all my published or installed applications by accessing from my google accounts?
My second question is about detecting number of downloading and installations of my published application. I have found only google analytics so far(for free) which I need to embedded some codes to monitoring my application. Is it possible for me to access those information from android market publish page . I have found that publish page contains information that I need.
Edited: For second question, I would like to obtain statistical information without adding any new code to my application. Is it possible to provide only google account to grant the permission to get those information?
My application is published. If I am using google analytics to monitoring my application do I need to start my counting from zero?
Sorry for my English and my little knowledge about this.
Thanks in advance..
Edited: .. I have found an application, called "analytics" that is what exactly I want to do. But I still cannot figure it out how it works..
The only place you will find this kind of information is on your Developer page. That said, if I were wanting to do what you are, I would put up an app on App Engine that either parsed my Dev page on request, or on a schedule. I mention App Engine as personal preference here, you could obviously use anywhere you can host scripts on.
You can then do what you like with the data you have collected, and your app can request this from your site. Assuming you have no qualms with publicising these numbers, you wouldn't need to scare users by authenticating, and would just need a plain html request.
Edit:
In your language of choice, you would need to request your developer page (the one that lists apps and their install count) and would also need to authenticate as yourself to get it. It's for this reason I would use your own hosting if you can. I can't be more specific than this, as I don't know what language you're most likely to be using. It should be trivial to find out how to do an html request and step through the page in whatever language it is though. App Engine pages are written in Java or Python and deployed to the server, while other obvious options are PHP or Perl. On my own server I would most likely use Perl as it's ideal for ripping up html with regexps.

Categories

Resources