I am developing an app, which is soft dependent on what a user does in another app. E.g. my app may allocate a reward to to a user who shares our image on Instagram.
What can be the best way for my app to verify that the user has done this action. Let's say no API is available for me to verify existence of such a post on Instagram.
a) Does android allow one app to programmatically interact with another. To what extent this depends on what the other app allows, vs certain general features of the platform which are always true irrespective of other app's intention of preventing such interaction?
b) Secondly, if I go the brute force way (provided user permits), can I simulate user actions and launch the other app and interact with it on behalf of the user, much like using the Win32 API and simulating a mouse click or keyboard input?
c) Basically, I just want a screen shot of the user showing me the post has been shared. My simplest goal is to verify that the screenshot is indeed from the other app, and not a static image or a fake app looking like the original?
Any guidance or general advice would be greatly appreciated.
Thanks
Asif
Related
For my current project I need to develop both an android and an iOS app. I never used iOS in private so I am not really sure about the best practices and how a user would expect my app to behave.
In android I provide the user with a custom view which offers different options (server IP, port, language settings, GUI settings, ...) which can be directly accessed by clicking the settings icon in the upper right border of my app. How would one do this in iOS?
What I've read by now is that there is the possibility to provide an settings bundle which will lead to an entry for my app in the system's settings app. But this means the user would have to leave my app to change his settings, right? I looked into a few standard iOS apps (Calendar, contacts, camera, ...) and it seems all apps use the settings bundle but there is no possibility to access this directly out of my app.
Would it be bad iOS practice if I offer a new view that can be accessed by the navigation bar and where the user can change those settings? How should I store them to be persistent over many app restarts? In Android I use the SharedPreferences object which is quite convenient.
Depending on what you are trying to store, you could store them in UserDefaults, or if it's something you need to store securely you could use Apple's KeyChain. Both of these will persist across launches and can be updated, appended to, or removed if needs be.
You can add a settings bundle as you've said and then in your app, you can hook a button up to present that settings screen to the user - so they wouldn't have to background your app, scroll to settings, find your app, etc., it'll be presented to them straight from your app.
Many apps also do their settings in the app, so it's really up to you - there is no hard and fast rule.
I am working with several organizations. They have formed a coalition and have agreed to share apps they have created. The group is trying to implement a set of Android applications that will be used by first responders on shared devices during a high visibility event. The applications are all 3rd party, by various vendors, and since the group does not have time to implement an SSO solution, they are using an app called Keeper to allow the users to store their credentials in a database. This is not an ideal solution, but it’s a time crunch. The biggest issue that they are looking at right now is that, although they can set Keeper to log out of the Keeper app itself after a set amount of time, the applications that the user was logged into will all remain logged in unless the user manually logs out. This means that at shift change, unless the first user manually logs out of all of their apps, the second user will have access to all of their applications.
One of the ideas that they had was to create an external Android script that would allow the user to logout of all applications with a single click. But it seems like this would require access to session ID’s and other information from all of the 3rd party applications. If that were possible, it seems like it would be a scarily large security flaw.
Can anyone shine some light on this for me?
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.
Is this possible?
Think of the following scenario.
User A logs into device and fires up your app, doesn't like certain features, so turns them off.
Profile is switched to User B. They fire up the app and love all the features that user A didn't like, so they switch them all on.
Is there a way that the profile can be switched back to User A and all the features that user wanted are still switched off? (And on when user B uses the device)........?
The reason I ask is because I'm using local flags to determine if a user has unlocked (Google Play Games) achievements, so if the user reaches the goal, the flag is set like so:
if (!score100_AchievementUnlocked)
if (score>=100){
unlockAchievement(Score100);
score100_AchievementUnlocked=true; //Don't check this any more
}
I'm then saving score100_AchievementUnlocked in sharedPreferences so that we don't keep sending API requests to Google Play Games when we no longer need to.
However, if another user then comes along and plays the game, as things stand, they will never be able to unlock the achievement because the app will never check it (as score100_AchievementUnlocked will be true).
So I'm wondering if I can detect who is the active user on a device and have them use their own sharedPreferences.
You may want to make profile system into your application.
Just concatenate username and every preference to use them as the key for Sharedpreference system.
Then, let the user choose theirs favorite profile to retrieve theirs configuration for the application according to the chosen profile.
Please let me know if you get the idea, hope it help or if you need more information.
Sincerly yours.
We are trying to test our alpha app with Android users. The users will use the app and when they are done using the app we want to ask the user to take a brief survey to tell us about their app experience.
We want to ask the user if they would like to take a survey when they are exiting the Android app. What is the best way to do this? We read that there is no reliable way to tell on Android if the user is exiting the app.
If anyone else has done a similar exercise and have insight on what worked, that will be greatly appreciated.
Note that we will not have this survey on our production app on Android market. We just need a way to ask the users to take a survey from the app when they are done using the app and ready to give feedback.
I suggest you let the survey pop up when the user clicks "exit" in your app or the press the back key. User do leave responses and constructive criticism on your apps Google Play page.
Overwrite the back key functionality in the launcher or appropriate activity and provide user with 2 options,
1. Submit feedback
2. Later (Exit the app now)
Don't trigger any kind of popup when they hit Back or Home (or even worse, onPause/onStop/onDestroy) - that is extremely bad form. In Android, your app should never be thought of as "exited," since the user may be coming right back to it after performing some other task (answering a call, checking email, etc.).
The right thing to do here is simply have a UI element (like a button) from which the user can trigger the survey.
If you absolutely must display an unsolicited prompt, do the user a favor and note that you've prompted them and they've elected to take the survey (for instance, through SharedPreferences). This way you can at least only show the prompt if they haven't taken the survey in the past.