Understanding how work with flexible in-app updates - android

I'm trying to implement in-app updates in my application but I'm facing a doubt about how to work with flexible updates. I will show the flexible update to the user in the splash screen when the user open the application, what I need to do before this? Can the user navigate on the application or I need to force the user to keeps on the splash screen until the update are done?
My doubt about this it's because of the snackbar that I want to show to her when the update are done, notifying the user to restart the app, but if I initiate the in-app update listener in the splash and let the user continue the navigation, how can I show the snackbar?

I'm trying to implement in-app updates in my application but I'm facing a doubt about how to work with flexible updates. I will show the flexible update to the user in the splash screen when the user open the application, what I need to do before this?
Your question is unclear. Your user opens the app, you present the option to update in the background. OK. So ... what else needs to happen "before this"?
Can the user navigate on the application or I need to force the user to keeps on the splash screen until the update are done?
Allowing the user to navigate the application is exactly the purpose of doing a flexible update.
My doubt about this it's because of the snackbar that I want to show to her when the update are done, notifying the user to restart the app, but if I initiate the in-app update listener in the splash and let the user continue the navigation, how can I show the snackbar?
Have you read the documentation that explains exactly how to do this?

Related

Should android up action save state of current activity?

The use of the Home / back button is well documented within the android docs here and here, however it does not state if the expected usage will "save changes" to the state of the current activity.
My specific situation is a user is presented with a data entry form (list of equations) that can be manipulated (and possibly have the data messed up by applying crazy maths) so i want the user to be able to leave "without saving changes".
It is unclear if this is the expected action of the home button, or if it is expected to allow users to return to the activity as they left it.
Clarification would be grand.
My expectation is that the user is prompted when pressing Up, informing the user that her information will be lost. When she confirms, loose the information, when she cancels stay on the Activity.
Edit: Better to only show the prompt when there was any editing done. Otherwise it might be just annoying to the user.
The HOME/BACK buttons are means provided to the user to navigate in an App. The BACK button normally acts as a means to navigate user to the parent of the current screen (Activity) or to the last screen in the chronological order.
HOME button is a quick way to suspend whatever the user is currently doing and come back to it later. So when the user next comes back to the app again, he can start from where he left. Android framework by default will retain the APP or UI state (mostly), so you have to hardly do anything if you want to stick to the default behaviour. But it really depends on the nature of the App. There are apps, which will trim down to the app main screen next time when the user launches (But these are very few).
Also note, that it is really upto the system how long it is going to retain the app's state in the background. Sometimes it gives to memory pressure and user has to start from scratch next time when he launches the app.
hope I answered your question

How do I control the SmartLocks blue banner?

When the user starts the app, I'm able to retrieve a previously stored credential. When this happens, the blue SmartLock banner shows up. On the app I work on, this is covering a FAB making it unusable until the blue banner goes away. Is there a way to control the length of time the banner is shown? Additionally, is there a way to let the FAB move up like it would with a snackbar showing?
Lastly, if the user exits the app as the banner is showing, it will continue to show on the phone home screen, blocking any use of the bottom app bar. Is there a way to prevent this?
The auto sign-in banner is shown by Play Services and drawn over the app. The intent is to notify the user that their saved credentials have been retrieved and avoid app inadvertently not displaying or displaying the notification at an incongruous time or place.
Right now, there is not much flexibility about it, the banner won't be in the app view hierarchy and might cover other elements, such as floating action buttons, for a few seconds. In practice, we haven't found this to be much of an issue ... many apps have put the auto sign-in at start and it shows over a splash screen and only once per device install since most apps don't need to sign users out.
But fair concerns that if credentials might be retrieved frequently or user may interact or switch apps immediately after signing in. Do comment with any feedback/requests, examples of problematic scenarios, or suggestions of alternative UX or implementation we'll see if we can accommodate them.

android ui - how to implement a series of dialogs

I have the following flow in my application and dont know how to implement this in an android way.
The user can check in the app if there is a update available, if so he can choose if he wants to download it, and once it is downloaded an update of the database takes place.
In the android documentation I only find basic description of either a progress dialog, or alert dialog but not how to have something more complex. For the sake of the example what i would like is the following.
The user clicks the check for update button
A progress dialog with checking for update pops up (which can be canceled)
If there is no update available the user gets informed and can click ok.
If there is an update available the user can choose to download it or cancel.
If he chooses to download he sees a progress bar. (with a cancel button)
Once the download is finished he sees a database updating alert dialog.
Finally he gets an all is done info and can click ok
Just an example yet what is the android way of implementing a series of dialogs like this. Wizard, series of different dialogs, one always changing one ...
Suggestion how to implement this in a recommended way would be highly appreciated
thanks
martin
Each dialog can launch the next subsequent dialog and automatically dismiss itself. Look at the DialogListeners attached to each button in example code

tracking user interaction Android

I am new in Android and is developing an app which runs in background as service to collect user activity. till now my app is able to get information about Time_Start, Time_End and Name of other app used by user.
I want to improve my app to be able to count how many interactions(like user tap, touch,...) user make while using other app.
any help?
Thanks!
AFAIK one can't catch touch events/key presses if they are outside your Activity's context or Application's context. I think it goes against the design principle in general ( every app. is sandboxed in its own DVM).
Also, Android has provided mechanism of Intents to track some specific actions and not evry interaction the user has with the mobile . So, I don't think it seems possible .

Android: Determine the previously displayed external Activity

In my application, I used a library that displays ads in my app. When a user clicks on the ad, it launches the Browser app, and the onClick events are handled by the library itself.
I also have a placed code in onPause() and onStart() methods that detects whether any of my Activities are sent to background (user pressed Home) or switching between any of my Activities.
So if the app is either freshly opened (no instance is running) or re-opened from background, it will display a dialog box. If the user is only switching from any of my Activites, then the dialog box shouldn't be displayed.
Now the problem is that when the user clicks on an Ad, the Browser app gets loaded and would mean that my App has been sent to background, and so when the user closes the Browser, it will still display the dialog box when it shouldn't.
Is it even possible for my App to determine the previously displayed external Activity (ie. Browser) and not display the dialog box?
Or are there better approaches that I can follow in implementing such setup?
Thanks in advance.
I don't think that there is a way for your Activity to know, which was the previous activity. A simple work-around is to save the time the dialog was displayed and not displayed it again, before some time passes. You can decide on the exact time period based on your application's requirements.
This may be in fact better in some situations. If the user switches from the Browser to your application and it has been some time he has used your application, it will be appropriate to show the dialog again.
you can use onResume() method to specify the behaviour when your activity get back from the background.

Categories

Resources