Searching for better app widget "workflow" - android

this may not be your typical question.. but I figured I would give it a shot. I have tried Google searches for this type of question, though apparently I'm using the wrong queries.
So my question is basically how to make my widget "flow" better. Right now this is the flow:
App opens with 'jump' screen, with some directions on how to use it, an information button, and a button that directs you to a configure page (user chooses which pictures they want to view). User is also prompted heavily to configure those pictures before adding an instance of the widget to their screen; or else it won't work.
Once configured, exit the app and visit the homescreen. Add the widget, and the user is presented with a time configuration (how often they want an update to occur). User chooses, hits save, and the widget is added to the screen.
If the user successfully configured in step 1, the widget is added. If, however, they did not do the initial configuration, the widget pops up a toast explaining again that they have to configure.
The user then has to delete the blank widget, re-open the app, configure the images, re-add it, set the time, then good to go.
If successfully added, user can open the time configuration through the widget, or return to the image select by opening it from the app drawer.
Based on that information, does anybody know how I can make this process more simple? Ideas I had were to not allow the widget to be added unless the first configuration takes place.. this is something I could not find any information on :( and/or try to group those two configurations (time/images) into one.
Guess I'm looking for whatever input/suggestions/ideas you folks have. Thanks so much if anybody has any insight onto this! Or if I was just dumb and wasn't able to find certain links that have discussed this already, please point me towards them.

If your app depends on all the configuration, then it should be mandatory. Of course you can make some assumptions in order to simplify the setup, later the user can change those options on some sort of configuration screen.

Actually this is very easy. Based on your question, your widget has a configuration activity declared in the xml file (i.e. android:configure="com.test.widget.act_configure". If the act_configure activity returns RESULT_CANCELED (via setResult(RESULT_CANCELED)) then the widget host cancels its placement.
So you have to check for the required conditions in the widget's configuration activity onCreate method and return OK or CANCELED if they are met or not.
Hope this helps...

Related

How to launch android app in advanced or user mode; app reads variable on launch

Sorry this will be a general question as I don't even know where to start.
What I want:
I have an app on androind (bonus if solution works on iOS) where the same app can present different views depending on if you are an end user or a technician. What I need is some SIMPLE method where the app at launch can read a variable. I have read a lot about shortcuts, Quick action, Environment variables, etc. etc. but I can't find anything that doesn't require as much programming as the app itself!
I can think of two approaches…
long press on Icon which gives the option to start in "advanced mode" by passing an argument to the app
some setting that can be read by the app at launch akin to an Environment variable in other OS
Can someone please send my in the right direction. Maybe there is a standard way of doing this I'm just not aware of?
Many thanks!
You could present the user with a dialog on first start. He can indicate his "role" either by choosing one, or by entering a password or enabling code.
Or, you can default the app behaviour to "user", and offer a menu option to "enable technician mode", which could then request a password or other code to enable this option.
Or, you can default the app behaviour to "user" and if the user performs a specific magic gesture (ie: swipe right, swipe left, swipe right) then the "technician" mode is enabled.
What I wanted to do is apparently not possible, so instead I worked around it by always starting the app in user mode and having a hidden button for techs. Of course a user could find it by mistake but if security becomes an issue I will have to add a tech login. For now this solution is acceptable.
It did require some rework to get the sequence right but it turned out to be the lesser evil.

What to do when missing requirements to use app

In my android app there are certain requirements required in order to use the app (Internet access, GPS, etc.). Now I haven't really found anything dealing with this so I don't know if its a mute point or not. A user can leave your app at any time and turn things off/on on the phone. If I am checking to ensure that data access is available as well GPS in the app oncreate and onresume and just tell the user they need to switch it on, would that probably be enough? I'm thinking not. I'm thinking of redirecting the user to a new layout telling them what is missing and what needs to be done in order to use the app. This layout would also include a button for them to continue once settings are turned on. Is this a good idea or bad? I don't know if there is a better way of handling this or not so all input is appreciated. What do you do?
You might find some of your answers in Find Success on Google Play. If a user performs an action without satisfying all of the requirements, you could present a dialog explaining to the user what the requirements are and why they are necessary. You might also provide a link to redirect the user to the proper settings.
EDIT: The best practices in this situation are probably similar to Requesting Permissions at Run Time. Permissions Best Practices suggests something similar to what you are proposing, which is to show some sort of message or tutorial explaining to the user what is required and why, and then redirecting the user to the appropriate settings.
EDIT: One more example: That Android Documentation shows you how to use the Settings API to check which settings are enabled, and present the Location Settings dialog for the user to update their settings with a single tap. See Prompt the User to Change Location Settings

Discard | Done pattern how to correctly implement in conjunction with the Back button?

I have been an Android user for more than 3 years already and I am used to enter into a screen (Activity), change some settings and press back. The changes are saved automatically.
Now I am devoping an app and I wanted to use the Discard | Done buttons in the ActionBar. This Activity is a settings Activity so the user changes some stuff and then presses Done. However now I am confused because what should I do if the users presses Back? Should I also save the setting or should I discard them?
To my mind, keep the "discard" button only, and save the setting when the back button is pressed.
For me, the system-back button should offer the same functionality as the DISCARD button. The DONE button shouldn't be disregarded - it's still common (in apps for mobile or desktop-based) to confirm an action, or actively save/send information in a form.
Removing the DONE button as Sporniket suggests means there are two negative interactions (both equating to a cancel) and no confirmation to the user of a save action - for me, I'd be wondering what to do to save the information I'd inputted/changed.
Using system-back as the default save action is counter-intuitive; the system-back button navigates backwards through the activity stack - it's associated with an "exit" by common users, not save.
If you do decide to continue with your implementation (DISCARD only), then ensure you have some visual feedback which allows the user to know that the information has been saved and to help train them (reassure them) that in your app, system-back will save your changes. This could be achieved by using a Crouton when the user presses back, which displays a message telling the user that the data has been saved.
-- Edit:
I should add that my above recommendations are appropriate where the DISCARD/DONE pattern is appropriate. You mentioned in your question that you're used to changing settings, and pressing back, having it save your changes automatically, and I would suppose that these are areas which are predominantly toggles, rather than content that's being edited.
Roman Nurik's post here offers more guidelines, and even mentions a way in which system-back saves information by default. In this instance, he describes having the DONE replace the up affordance, and to hide the DISCARD button in the overflow menu, citing the use-case where the user is unlikely to want to discard information. (IMHO, I disagree with him - I think that if there's a visible DONE or Save action, then system-back should discard, for the reasons stated above. That said, at least it's some guidance for the pattern with usage guidelines from one of the proponents of the pattern.)
Overall, I think it's something that could be better answered if you gave more context about the information the user will be editing in this screen.

right way to add starting tips in Android app

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.

Any listener for system preferences in Android

I want to capture event when an user try to go into the preferences screen, so I can ask password for it. The reason why I try this, I am developing app for the disabled. I don't want them to touch system settings directly, just the permitted helper.
Is there any event listener or receiver for this?
Thanks in advance.
I don't think there is anything in the public APIs that will allow you to do this. Device Admin is probably the closest thing, but I don't think it does this exactly.
If you wish to implement this (and be certain that it will be effective) you'd have to modify the OS slightly on your devices.
One possibility that might work and is within the APIs is to create a replacement home screen that does not show the usual items in the menu. If you were to go this route you could "lock" the into your activity and simply provide them no way to go to the settings except with a password or something. This would be a lot of work though, and would require the user to set your application as their default home screen. And even with this on the newer devices you may run into the trouble because there is a settings button inside the notification pull down, which I don't think there is a way to block, even with a replacement homescreen.

Categories

Resources