I've developed an Android App that uses Chrome Custom Tabs and my app is used for Check in Check out scenario where a new user has to Login and Logout in every 2 hours.
Therefore every time they login, Chrome presents a Prompt to accept Terms of Use - "Welcome to Chrome".
Also it presents a prompt for "Turn on Sync?"
Is there a way to prevent showing this?
It's bad privacy practices to auto-consent your users to Terms that they could not even read, even if the flow seems better, don't do that.
Related
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
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.
I'm using Google Sign-in in my iOS app. I followed the Google tutorial (https://developers.google.com/identity/sign-in/ios/sign-in#add_the_sign-in_button) which uses a GIDSignInButton that the user has to click. When he clicks it he is redirected to Safari which looks like this:
The problem with this is that I have multiple Google accounts and would like to be able to pick which one I want to use. Now it just takes one of them automatically and all I have to do is press "deny" or "allow". Also, I don't like the fact that the app gets redirected to Chrome. Ideally what I would want is something like the Google Hangouts app does on iOS:
It shows you all the accounts that you have used to sign in to any Google app previously and lets you decide which ones the use with the app without leaving the app. On Android I got something similar working for my app:
How can I achieve this kind of behaviour (don't leave app + account chooser) in my iOS app?
The reason they are able to do that in Google Hangouts is because it's made by Google. Companies don't always make every feature available to developers and this is a prime example of it. The reason you were able to do this in android was because Google decided to allow developers more access to different features. After all, android is developed by Google. Now as for not leaving the app you could always use an embedded web view. This will keep the user in the app and instead pop up a web view modally. It's not the best in the world, but is better than having the user sent somewhere else. Have you tried this code:
// Implement these methods only if the GIDSignInUIDelegate is not a subclass of
// UIViewController.
// Stop the UIActivityIndicatorView animation that was started when the user
// pressed the Sign In button
func signInWillDispatch(signIn: GIDSignIn!, error: NSError!) {
myActivityIndicator.stopAnimating()
}
// Present a view that prompts the user to sign in with Google
func signIn(signIn: GIDSignIn!,
presentViewController viewController: UIViewController!) {
self.presentViewController(viewController, animated: true, completion: nil)
}
// Dismiss the "Sign in with Google" view
func signIn(signIn: GIDSignIn!,
dismissViewController viewController: UIViewController!) {
self.dismissViewControllerAnimated(true, completion: nil)
}
I found this on the link that you posted. I haven't run or tested the code but it appears to present a view controller instead of sending you to safari. This may be more along the lines of what you want.
To answer #Sam's question:
"How to login Google by existing installed Google apps rather than opening URL in Safari?"
You could probably accomplish this with android but not with iOS. This another example of something that is restricted because of the platform selected.
Remember whatever option you end up choosing you will still be required to adhere to OAuth 2.0. I would suggest if at all possible using what Google has built out for iOS developers to use. When it comes to selecting a different account than the default one, if you chose to follow the guide and do what Google created for iOS developers, then you can simply tap on the profile image and switch accounts.
TL;DR
https://www.youtube.com/watch?time_continue=227&v=-26DGO_E1ds
Firstly, I'm aware of how to save a web URL to a smart device as a user as is explained in these answers (usually by saving the tab from the browser). These take multiple steps and vary depending on device, thus requiring research which most vanilla users of smart devices do not do.
Create a Android launch icon for Website
Add to homescreen on mobile phone
My question is from the perspective of the app owner. The end goal is to let create a link on the web app allowing users "Create Homescreen icon" from 1 click. I suspect this is not possible as it would create a huge security risk to the devices allowing random unsafe URL'S to potentially try and create unlimited shortcuts but I'd like to ask nonetheless.
Answers such as these make a URL support app creation, however it leaves the task of creating the shortcut to the user instead of the URL.
"Add to homescreen" button in Android does not show website as a Web App
I hope my question is clear enough, if it is not I'm more than willing to elaborate.
Chrome on Android two new features 1) Web App Manifest that describes what should be launched from the home screen and how it should look on the homescreen, and 2) Chrome now has an beforeinstallprompt event that will trigger for Web apps that we think are app-like and can be installed to the homescreen.
There are a number of criteria for the onbeforeinstallprompt event to fire.
The event only fires if:
The site has a manifest, is on https and has a service worker. (this can be quite a stretch).
The user has engaged with the site multiple times (right now, twice within at least 5 minutes).
The user has not already added your site to the home-screen.
If all you want to do is detect if you should display a banner to prompt the user to add your web-app to the homescreen then Chrome already has a solution for you.
We also have a full range of samples on our samples site.
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.