Being an amateur user, I just stick to basic operations on tasker like creating a zooper widget and toggling settings, running ussd. But I was thinking about interacting with output of the ussd code, I don't know if it is possible but I hope someone can clarify me on this..
I run the code ##4636## very often to force WCDMA through the test menu, it takes two clicks after dialing the code, 1. Tapping "Phone information" which is the first option.
2. Scrolling down a bit and opening a list named "set preferred network type" where I can select WCDMA ONLY.
Now can this whole thing be automated.
Note: The normal system settings where simply selecting carrier mode or toggling it through tasker doesn't work as I think my phone automatically switches the network to EDGE as soon as I enter my room and I must do this toggle manually through test menu(##4636##) even if the usual system settings say it's in 3g.
Thanks in advance..
To open the hidden menu, use following intent:
action: android.intent.action.MAIN
package: com.android.settings
class: com.android.settings.TestingSettings
and for clicking items I would highly recommend using AutoInput, as it gives you far more control than built-in tasker functions. It also has a very user-friendly "Easy Setup", that basically walks you through what (and) where needs to be clicked, based on either coordinates, id, label or position :)
So in case of selecting "phone information" using AutoInput:
add new tasker action
select plug-in
select AutoInput
select AutoInput Action
select Easy Setup to be guided through, or in Manual Setup enter following
Action: click
field type: list
field position: 1
and similarly for next items :)
Related
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.
I am looking in Google Assistant for Voice Action. So I started with android.intent.action.SET_ALARM action. When I run the application for the first time and went to Google Assistant- "Okay Google. Set alarm for 10 o clock". For that voice input Google have prompted two apps as follows,
Clock Application
Set Alarm Sample (My Application with set alarm action)
So, I selected my application and I got time and minute as well in getIntent().
My problem here is, When I say "Okay Google. Set Alarm for 10 o clock" for the next time. It is not showing those two apps like first time. It is directly launching last selected default app.
How to reset this preference?
You can go into the settings for your app. There should be a section for App Defaults. You can clear defaults and you'll get that prompt again.
Finally, I found out the answer on my own.
Long click the Action in Google assistance conversation page say for example "Set alarm for 10 o clock". Just long click this sentence. You could see following options,
Edit query
Delete Group
Just click "Edit query", it will redirect to next page. There google assistance will displays list of application receives "Set Alarm" Action. From there you can change the application you want to receive Set Alarm action.
I found another way. After asking Google assistant to set the alarm, I saw options at the bottom of the screen to set an alarm, reminder, etc. I pressed the option to set alarm. Then it prompted me with what time to set and showed the clock icon. I clicked on the icon of the clock it prompted me with selecting which clock to use.
Just say "Set Alarm" without telling the time. It will ask you the time. In that screen, it will show you the app it will be using to set the alarm. Click on that and change it.
Hope this is what you are looking for.
I wrongly chose Firefox for query "show me shopping list", which opens up shopping list.google in a browser. The following solution worked for me:
Query again the action you'd like to change
Scroll up for historical queries to see a tile where the action is mentioned.
Historical queries should be visible differently than the most recent one and the action is "detached" in the conversation balloon.
Simply tap the action section of the balloon. It will prompt to choose default application and a checkbox to remember the choice should be accessible.
Reset of the OS default setting does not have any impact. There are no default apps settings for different actions in the Google app settings, nor Assistant preferences.
Hope this helps you.
Can I click on NFC on/off button using robotium? I know NFC cannot be turned on/off programmatically unless the device is rooted. But if I raise a popup for the user to do so and then click on the on/off button.
Just wanted to know is it possible?
If I understand you correctly, you want to take the user to the NFC section of the Device Settings (via a Toast or something similar). If this is correct, then using Robotium you will be able to trigger and action the Toast, but once you are in the device settings, Robotium cannot make the actual selection.
Android Instrumentation actions are confined to a single package (the one under test).
Take a look at UIAutomater, this may help.
No, it's not possible do it programmatically withour rootet device. You only can show nfc/wireless setting to user.
Android: Changing NFC settings (on/off) programmatically
For the sake of testing a feature that I don't want to release yet to the general public, I would like to implement a "secret" menu or menu item.
By "secret" I don't mean truly secret but more of a hidden or invisible menu, accessible to the developer (me) only, by entering a code or some other mechanism.
It's not the end of the world if an end-user finds about it and attempts to use it ("They made it idiot proof, but I found a workaround."). I just don't want to fail the unsuspecting innocent lay end-user, by providing a feature that isn't fully tested yet.
Any suggestions on how to go about this? (Android 2.2 and up only)
compare e.g. the Android Id of the device and if it matches your dev phone unlock the menu
let your app check if another app (some empty dummy) is installed and unlock the menu based on that info.
you can add an Activity to your code / manifest that is not triggered by any code. You can still start it via adb shell am start -n com.your.package/.SecretThing (that activity could simply set a shared preference that unlocks the menu)
you could trigger a menu if you listen to some secret broadcast you send with adb shell am broadcast -a your.secret.broacast.ACTION_SECRET
if you have a device that has a keyboard implement a key listener that only triggers the menu if you enter some secret word (still forward key events to the system)
if your app has access to location then hide the menu if your are e.g. not at home.
add some always visible menu item that triggers a password protected screen (not a good idea but it works)
One approach I've used a couple of times is to pop up a PIN entry form when the user triple-taps a particular part of the screen. You enter the PIN, you get through to the developer screen.
Do you want to have the menu on your development phones only or do you want to get to the menu on any phone?
Here's 3 options I can think of.
1) You could have a file with some arbitrary string key code in it, and the existence of the file and key turns the feature on.
2) You could log screen presses, on your buttons and a combination of this launches the pass code screen.
3) If you have an options menu, with a more section you could burry the pass screen there. Or if you have an about screen, long pressing a logo could launch the pass screen.
I need a secrete menu too, Well I'm going to implement it on login screen , enter device time in EditText field and press cancel.
Hie all,
I created one homeScreen Application and it working fine for me . one thing what i am seeing is every time i click on the HOME button it list me the native home application and the third party application which i installed in it . the below figure explains the context
this is somewhat an extra work to user to select the home screen every time he presses the home screen. so what i was thinking is that to give the option for user in the settings->display seetings-> so that he can choose the application which he want .
as i ve access to complete android file system and i can create my own image and test in the development boards . The problem here is i am unable to add item to the existing settings code . or u can suggest me the other solution. i tried with the Display settings class in mydroid.
You can not change system settings (i.e. alter the menu) via code on normal (non-rooted) Android devices.
User can set the default action by ticking "Use by default for this action." on selector screen. From then on user will not be asked to select the action, instead the default action will be invoked.