[Q] createChoser() Doesn't show set as default option. - Android Q&A, Help & Troubleshooting

I have created a launcher, and now I want to give the user the opportunity to leave it, and I already made it so that when the user presses a button, the launcher selection options pop up.
My problem is, I need that option, to set the default launcher.
This is what I have:
Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
i.addCategory(Intent.CATEGORY_DEFAULT);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(Intent.createChooser(i, "Set My HomeScreen as default"));

Any updates to this question? I need this as well.

Related

[Hack] Remember defaut app for ... minutes only

I have thought about new hack :
Select a default application for a given time only, then revert to open application selection (something like expire default application selection)
How to :
Replace "Use by default for this action." checkbox and text by a drop down list in the application section window (named : "complete action with"). The list could contain items like :
No default (no default app is set)
Remember for 10 minutes (set selected app as default for 10 minutes only, then revert to no default)
Remember for 30 minutes
Remember for 1 hour
Always use by default for this action (current behaviour available)
Sample use case :
Click a link in Gmail
Browser selection appears
Select "Remember for 30 minutes"
Tap "Opera Mini" (because you don't have 3G coverage where you are for instance)
Opera mini opens
Go back to Gmail, tap another link
Opera mini opens straight away (as the default app, no app selection window)
After 30 minutes, when the browser is triggered, the "Application selection" window appears again and you can chose stock browser for a while if you have better network coverage...
What do you think about that ? Has anyone seen that before?
If no, if a friendly developper could implement that, it would be awesome!
It would help a lot when juggling with different apps in different contexts lasting a given time.
up
Anyone interested in that hack ?
I have rephrased my idea realizing that it was not clear enough in my original post. Could some of you guys give me a feedback on that?
I think it could be really helpful especially with the different browsers avalaible and the various features they each offer.
Let me know, even if you think it's useless...
The closest thing I have ever found is Smart Browser Chooser.
It isn't exactly what you've suggested, but it lets you assign different browsers based on network connection.
I'm not a developer, but from what I can tell, in order to make something that works like you have suggested, the entire default action chooser would have to be replaced.
Or, as an alternative, a new "default action" program could be created, similar to Smart Browser Chooser, that would be the actual default you would choose for whatever context you want. When this program is ran, it would list the options in the way you have indicated. However, as far as I can see, this new program would have to be written specifically for each android context.
Thanks for your answer!
This could do the trick, I'll try your app and see how it turns out. Though I suspect it's not as flexible as what I expected.
I would still fancy an overlying app on top of default app selection to achieve temporary default (excellent idea!). If anyone ever step by something like that, let me know

Looking For Specific App

I'm looking for either option A or option B.
A) An application that requires a passcode to open, and view apps(that were otherwise hidden before, using Nova Launcher). It acts like the private picture gallery, but instead its an app directory.
B) A way to set a password to folders in Nova Launcher.
I know there's Guest Mode now, but it goes to factory stock. I don't want people to even know I have these specific apps, not even a visual of the icons for the apps.

Touchwiz Launcher Settings

What happened to the settings option? Can you no longer change the transitions?
I'd love to know the answer to this as well. The lack of cyclical wrap-around screens (even after I disabled the Briefing page) may have me shopping for a new launcher soon.
Also, while the T-Mobile version may have the A-Z button in the app drawer, that button alphabetizes the apps when you press it, but new apps still go on the end, so you have to keep hitting it whenever you add new apps. No setting that I can find to "keep apps sorted alphabetically"...
(And the app drawer no longer cycles front to back or back to front...)

hello newbie here

Hello guys,
I recently got a note 4 from my brother. I switch from a apple 4s to note 4. I really like the different customization that android allows. I download the themer app. I really like how themer allow me to set different themes. One thing I don't understand is when I first set it to another theme, whenever I click on the message icon it gives me the option to choose between the different messaging apps. however, after I click on one of them it set as default messaging app. Now whenever I click on the messaging icon it just pop up that default messaing app, it no longer gav eme the option to choose between different messenger. I have to manually go look at the other messaging app.
The choice is disappearing because you're setting a default for it to choose every time you press the button.
Settings > Apps > Messaging app you chose as default > Clear Defaults
Then when choosing each app from the messaging button only press 'Just Once' this way it should ask you which app every time!
Hope it helps.
Araytha said:
The choice is disappearing because you're setting a default for it to choose every time you press the button.
Settings > Apps > Messaging app you chose as default > Clear Defaults
Then when choosing each app from the messaging button only press 'Just Once' this way it should ask you which app every time!
Hope it helps.
Click to expand...
Click to collapse
Hey Araytha, I didn't choose it as my default. It just pop up the different options the first time and I just click on one. From then on it just set that one as default. It doesn't give me the option for "Just once." Where do I go to do that.

How To Guide Oppo find n Default launcher change - no root or adb required

Hi guys,
I used to use Microsoft launcher as my default launcher in all phones but oppo find n does not let you do that unfortunately.
I didn't want to try adb methods (of uninstalling default launcher) that may lead to boot loop stucking if something went wrong.
So I thought to share with you finally a simple trick I came up with by using Tasker to automatically launch your favorite launcher based on UI change of default color os launcher of oppo.
First you need to install Tasker and give it all permissions required
GitHub - joaomgcd/Tasker-Permissions: Utility to easily grant Tasker permissions
Utility to easily grant Tasker permissions. Contribute to joaomgcd/Tasker-Permissions development by creating an account on GitHub.
github.com
Then you add a task and profile as follows:
Tasks > add > name it > add an action > search for if > add if condition: %WIN ~ Page 1 of 2** (**please note depends on how many pages you have on default launcher home screen, you should name the window label above (page 1 of 2 or page 1 of 3... Etc)) > from the add button > add another condition > %WIN ~ Page 2 of 2 (so the profile works on all pages of home screen) > add another action > search for wait > wait > 3 ms (milliseconds) > ok > add another action > app > launch app > Microsoft launcher (your launcher) > ok
Add profile > event > app changed > all apps (from bottom in Tasker) > system launcher
Choose the task you created with above actions in the profile
Done
Result:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Just a quick question: did you test this on Android 13 or Android 11? Because I'm using Android 13, and sometimes it works, sometimes it doesn't.
nimumo said:
Just a quick question: did you test this on Android 13 or Android 11? Because I'm using Android 13, and sometimes it works, sometimes it doesn't.
Click to expand...
Click to collapse
I am using Android 13...
Have been using this method for couple of days with no issues ))
In that case, I'm doing something wrong, for sure, because, sometimes, the Microsoft Launcher doesn't appear. As an example, if I press the Task Switcher button, and then press the Home button, I still get the default Oppo Launcher. Also, sometimes, when I press the Task Switch button, it opens and closes immediately. Just to clarify, I don't use gestures for the Back, Home and Task Switcher; I'm using the onscreen buttons.
The only difference is that I already used ADB to change the default system launcher to Microsoft Launcher. Could this be the problem?
nimumo said:
In that case, I'm doing something wrong, for sure, because, sometimes, the Microsoft Launcher doesn't appear. As an example, if I press the Task Switcher button, and then press the Home button, I still get the default Oppo Launcher. Also, sometimes, when I press the Task Switch button, it opens and closes immediately. Just to clarify, I don't use gestures for the Back, Home and Task Switcher; I'm using the onscreen buttons.
The only difference is that I already used ADB to change the default system launcher to Microsoft Launcher. Could this be the problem?
Click to expand...
Click to collapse
Yes it could be.
I am using Tasker to automatically launch Microsoft launcher based on oppo default color os launcher itself, so if you uninstalled the default launcher Tasker won't recognize the UI change of default launcher and hence of course won't give you correct actions...
You may reinstall the default launcher and try Tasker method and please let me know if it works fine afterwards..
Just to clarify, I managed to get your solution up and running. Note that I didn't uninstall the default launcher; I only forced Microsoft Launcher to be the default launcher, using ADB commands.
The problem was something that we always forget: battery optimization. I had to change all the settings related to battery management (Battery menu and also App menu) and had to allow to run in background (Tasker App). Now I can have your script running 99% of the time.
The problem I noticed is if I press the Task Switcher button, for a short period I can see the running apps but then, it shows my home screen. If I press the Task Switch 3 times in a row, the Task Switch stays on but, as soon I press the Home button, it doesn't revert to Microsoft Launcher. To solve that, I need to disable and enable Tasker again.
Your solution, for me, it's not 100% fault proof, but it's much better that having to press the Microsoft Launcher button that I had to put on the Home screen, so, I thank you for sharing this other method for having a different launcher
If only we could put a "decent" ROM...
nimumo said:
Just to clarify, I managed to get your solution up and running. Note that I didn't uninstall the default launcher; I only forced Microsoft Launcher to be the default launcher, using ADB commands.
The problem was something that we always forget: battery optimization. I had to change all the settings related to battery management (Battery menu and also App menu) and had to allow to run in background (Tasker App). Now I can have your script running 99% of the time.
The problem I noticed is if I press the Task Switcher button, for a short period I can see the running apps but then, it shows my home screen. If I press the Task Switch 3 times in a row, the Task Switch stays on but, as soon I press the Home button, it doesn't revert to Microsoft Launcher. To solve that, I need to disable and enable Tasker again.
Your solution, for me, it's not 100% fault proof, but it's much better that having to press the Microsoft Launcher button that I had to put on the Home screen, so, I thank you for sharing this other method for having a different launcher
If only we could put a "decent" ROM...
Click to expand...
Click to collapse
Yeah you are right. Tasker method have some bugs and sometimes it forces to home screen of Microsoft launcher in somewhere in settings.
Then like you said turn off the profile and turn on again later...
Thank you for your reply and yeah "If only we could put a "decent" ROM... "... Can't agree more
nimumo said:
Just to clarify, I managed to get your solution up and running. Note that I didn't uninstall the default launcher; I only forced Microsoft Launcher to be the default launcher, using ADB commands.
The problem was something that we always forget: battery optimization. I had to change all the settings related to battery management (Battery menu and also App menu) and had to allow to run in background (Tasker App). Now I can have your script running 99% of the time.
The problem I noticed is if I press the Task Switcher button, for a short period I can see the running apps but then, it shows my home screen. If I press the Task Switch 3 times in a row, the Task Switch stays on but, as soon I press the Home button, it doesn't revert to Microsoft Launcher. To solve that, I need to disable and enable Tasker again.
Your solution, for me, it's not 100% fault proof, but it's much better that having to press the Microsoft Launcher button that I had to put on the Home screen, so, I thank you for sharing this other method for having a different launcher
If only we could put a "decent" ROM...
Click to expand...
Click to collapse
Good news I was able to fix that bug by adding a condition of the profile only works on home screen.
So it doesn't not work on recent tasks or settings that related to oppo system launcher app (lock screen wallpaper settings for example).
I will edit the original post adding the "if" condition...
Tasker will read the window label which is unique for each window in same app, so the actions will only be executed on home screen.
Please note the window label of oppo system launcher changes based on number of pages you have on system launcher home screen.
It's called "page 1 of x"
Where x is the number of pages you have in the launcher it self.
I was trying to reproduce your steps, but I'm getting stuck on the "if" condition. Whatever I do, I cannot put the "green" line (the one next to the conditions), it's always "red". I already tried to use Tasker Permission Manager to sort my Tasker's permissions (all green now) but looks like Tasker cannot "read" the WINDOW LABEL from the phone. I say this because if I try to press the PLAY button on the bottom of the task, it doesn't do anything. If I remove the "if" condition, it works as previously.
What am I missing?
nimumo said:
I was trying to reproduce your steps, but I'm getting stuck on the "if" condition. Whatever I do, I cannot put the "green" line (the one next to the conditions), it's always "red". I already tried to use Tasker Permission Manager to sort my Tasker's permissions (all green now) but looks like Tasker cannot "read" the WINDOW LABEL from the phone. I say this because if I try to press the PLAY button on the bottom of the task, it doesn't do anything. If I remove the "if" condition, it works as previously.
What am I missing?
Click to expand...
Click to collapse
The green line means the if condition is true and this only happens when you go to home screen which gives the label name page1 of...
It won't go green unless Tasker reads home screen label.
I took the screen shot after pressing play then going to home screen then going back to Tasker using gestures. It was not on purpose
Regardless the line going to green or stays red, if it works then it works. Even though you may not be able to make the line goes to green...
After a lot of testing, I finally found the reason why this method was not working for me:
Tasker App Check Method - Accessibility
I found that I had this option set to "App Usage Stats" (because I never changed it) and it must be set to "Accessibility"
After changing to this option (Tasker) and after activating Tasker in Accessibility menu (phone), it started to work.
But I found that this method doesn't work all the time. As example, if you click on the "Task Switcher" button, choose an opened app and them go back (via the "Back" button), the Microsoft Launcher doesn't open.
But, instead of complaining, I want to thank you for this method because it's works, and it's easy to set up.
nimumo said:
After a lot of testing, I finally found the reason why this method was not working for me:
Tasker App Check Method - Accessibility
I found that I had this option set to "App Usage Stats" (because I never changed it) and it must be set to "Accessibility"
After changing to this option (Tasker) and after activating Tasker in Accessibility menu (phone), it started to work.
But I found that this method doesn't work all the time. As example, if you click on the "Task Switcher" button, choose an opened app and them go back (via the "Back" button), the Microsoft Launcher doesn't open.
But, instead of complaining, I want to thank you for this method because it's works, and it's easy to set up.
Click to expand...
Click to collapse
Thank you my friend for sharing your experience
I really appreciate any ono who shares his feedback
Wish you all the best
nimumo said:
I only forced Microsoft Launcher to be the default launcher, using ADB commands.
Click to expand...
Click to collapse
Could you share the exact command? When i tried it awhile back, i wasnt sure which microsoft package to use.
Hadron001 said:
Could you share the exact command? When i tried it awhile back, i wasnt sure which microsoft package to use.
Click to expand...
Click to collapse
The code
cmd package set-home-activity "com.microsoft.launcher/com.microsoft.launcher.Launcher"
And the task under adb wifi
But my advise is not to use it as when you go home screen and want to open recent tasks it messes up and you won't see any open recent applications, just lines..
(try it you will know what I mean)
Also it goes to oppo launcher sometimes and you have to go to home screen several times to get back to Microsoft launcher
Other thing Microsoft launcher icons stops working sometimes with me when I used that method
So I went back to my method of this original thread
Much stable and just a mask of oppo launcher on the top so everything goes fine (just like pressing Microsoft launcher icon to start it normally every time you go to home screen
Thanks a lot for the advice. I did try:
Code:
adb shell
pm disable com.android.launcher
pm enable com.microsoft.launcher
Which worked, except the 'swipe from bottom' gesture completely stops working. Can't swipe to exit foreground app, nor can you swipe and hold to see all recent apps.
I'm going to look around to see why that's the case, but maybe I'll just have to use your method eventually.
Hadron001 said:
Thanks a lot for the advice. I did try:
Code:
adb shell
pm disable com.android.launcher
pm enable com.microsoft.launcher
Which worked, except the 'swipe from bottom' gesture completely stops working. Can't swipe to exit foreground app, nor can you swipe and hold to see all recent apps.
I'm going to look around to see why that's the case, but maybe I'll just have to use your method eventually.
Click to expand...
Click to collapse
Thank you for sharing your experience.
I guess recent tasks and home buttons are forced to be used by oppo launcher some how since even by not disabling the oppo launcher completely still some odd behavior happens by recent tasks and home button swiping.
Wish you the best of luck.
hesham1216 said:
Hi guys,
I used to use Microsoft launcher as my default launcher in all phones but oppo find n does not let you do that unfortunately.
I didn't want to try adb methods (of uninstalling default launcher) that may lead to boot loop stucking if something went wrong.
So I thought to share with you finally a simple trick I came up with by using Tasker to automatically launch your favorite launcher based on UI change of default color os launcher of oppo.
First you need to install Tasker and give it all permissions required
GitHub - joaomgcd/Tasker-Permissions: Utility to easily grant Tasker permissions
Utility to easily grant Tasker permissions. Contribute to joaomgcd/Tasker-Permissions development by creating an account on GitHub.
github.com
Then you add a task and profile as follows:
Tasks > add > name it > add an action > search for if > add if condition: %WIN ~ Page 1 of 2** (**please note depends on how many pages you have on default launcher home screen, you should name the window label above (page 1 of 2 or page 1 of 3... Etc)) > from the add button > add another condition > %WIN ~ Page 2 of 2 (so the profile works on all pages of home screen) > add another action > search for wait > wait > 3 ms (milliseconds) > ok > add another action > app > launch app > Microsoft launcher (your launcher) > ok
Add profile > event > app changed > all apps (from bottom in Tasker) > system launcher
Choose the task you created with above actions in the profile
Done
Result:
View attachment 5780089
Click to expand...
Click to collapse
Hello
I try uses in my Oppo Find X6 Pro 0 china
I dont now why not can make correctly , please helped
Maybe have correct import in files for tasker ?
I use Nova launcher, but if disable system launcher ( in adb ) not working recent tasks - button last app
Hadron001 said:
Thanks a lot for the advice. I did try:
Code:
adb shell
pm disable com.android.launcher
pm enable com.microsoft.launcher
Which worked, except the 'swipe from bottom' gesture completely stops working. Can't swipe to exit foreground app, nor can you swipe and hold to see all recent apps.
I'm going to look around to see why that's the case, but maybe I'll just have to use your method eventually.
Click to expand...
Click to collapse
Hi, thanks for your efforts. Have you by any chance been able to achieve further progress on setting up the Microsoft Launcher as the default launcher?
Thanks a lot !
Best regards, Lars
hesham1216 said:
Hi guys,
I used to use Microsoft launcher as my default launcher in all phones but oppo find n does not let you do that unfortunately.
I didn't want to try adb methods (of uninstalling default launcher) that may lead to boot loop stucking if something went wrong.
So I thought to share with you finally a simple trick I came up with by using Tasker to automatically launch your favorite launcher based on UI change of default color os launcher of oppo.
First you need to install Tasker and give it all permissions required
GitHub - joaomgcd/Tasker-Permissions: Utility to easily grant Tasker permissions
Utility to easily grant Tasker permissions. Contribute to joaomgcd/Tasker-Permissions development by creating an account on GitHub.
github.com
Then you add a task and profile as follows:
Tasks > add > name it > add an action > search for if > add if condition: %WIN ~ Page 1 of 2** (**please note depends on how many pages you have on default launcher home screen, you should name the window label above (page 1 of 2 or page 1 of 3... Etc)) > from the add button > add another condition > %WIN ~ Page 2 of 2 (so the profile works on all pages of home screen) > add another action > search for wait > wait > 3 ms (milliseconds) > ok > add another action > app > launch app > Microsoft launcher (your launcher) > ok
Add profile > event > app changed > all apps (from bottom in Tasker) > system launcher
Choose the task you created with above actions in the profile
Done
Result:
View attachment 5780089
Click to expand...
Click to collapse
I have done everything in Tasker but when i use gestures to swipe up from the bottom it always goes back to the system launcher ?

Categories

Resources