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
Related
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?
I currently have an Android Wear action that is very destructive. How could I add a confirmation dialog to that action before executing it.
For example, I have an action "Finish Workout" on the wear...once a user finishes their workout, they can't resume it. I want to ask them 'Are you sure you want to finish your workout?'
how could i do this?
You can use DelayedConfirmationView that is designed to address this, see this tutorial. It will give your users a chance to stop/cancel the operation if they decide to.
I want to achieve something in my application, but I'm not really sure which is the best option to do that. In my app I am downloading data via web server. I want to create something like global Progress Bar which must show the user how much data he is downloading from the whole application..no matter on which activity he is. I think it's the right time to say that I am using TabHost and TabGroupActivity in my application. So for now this is how I think it should look like :
For a second option I was thinking if it will be a better option to implement a notification with progress bar which is updating the downloaded data size..something similar to Google Play store notifications while downloading application :
Any suggestions what I should look for and which is the best way to do that in Android Application?
Thanks for any kind of information!
You can achieve this using Service, There may be various others approaches available to do this but here is the one I know...
Start downloading of data in a background service
Broadcast the information whenever data changes
Receive Broadcast data in your Tab Activity
Add footer or header to your tab widget and show progress bar
Keep updating the data in progress bar til your download finished
Also you can update notification from Service whenever data updates.
If you want to use the "Progress Bar In Activity" option, you are, in some way, forcing the user to open your app to check the progress while I think is much better a permanent notification taken in account by your download service.After all this is the main meaning of the Android notification Bar. In this way the user, in every moment, can easily check the progress by dropping down the menu.
My first decision was to create a custom view, which had title, some custom action buttons and textviews which I added to every screen. After that I changed to ActionBarSherlock and made some custom design for it too so it can look like the same in every version and that worked for me.
I am developing an Android application, and I want to show some tips (few slides) for user when applicationis started first time.
I can make an activity and start it in OnCreate method of main activity, or make dialog window.
I want to ask: how to make it in the right way? Can experienced developers advise something, maybe with example?
You have to first make sure that these tips are launched only on first launch of app. I have seen this done by displaying a Dialog, and saving a value to shared preferences (or in sqlite for that matter). On next app launch this value is checked, if it is set, then you don't display the Dialogs.
This seems to be the simplest way. Note that when the app is uninstalled and installed by again the Dialogs will be displayed again.
Sometime we want to give the user ability to see this Dialogs once again. You can do this by setting/resetting the value in shared preferences from the apps settings screen. The user can change the value here and see the Dialogs again on app start.
Just make a Dialog Type Activity and show it automatically at the first time startup of your application.
and also add a help in you menu so that user can see it whenever he/she need help.
i am trying to create a dialog box to appear in the middle of the screen when my main program is not in focus and running in background. The purpose of the dialog box is to force the user to take an immediate action. I am already using the notification manager to notify the user but i would still like a old school popup dialog box.
Thanks :D
Popping up a dialog from an application running in the background is thought of as bad practice because it may confuse the user, and may annoy the user because you are disrupting the current task s/he is engaged in.
It is advised by the Android developers to use the Android notification system for tasks like these. A guide to create notifications is here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
Dialogs are created with the Intent of the current activity. Since your app will not be in focus at the time, you cannot create a dialog.