How does Homeswitcher set default - Android Q&A, Help & Troubleshooting

How does Homeswitcher set default launcher.
ymst.android.homeswitcher is the package name.
They have a way of setting a launcher to be the default.
The intent resolver comes up if you have more than one home launcher installed.
You can select a launcher from the list and also check the box that says
use by default for this action.
I am looking for a way to programmatically set this check box setting.
Home switcher has a set default button.
How do they get this to work in source code ?

Imposible in Froyo, but in eclair i suppose they just set to default. Go to applications in settings, find your launcher and it will have a default setting. If another launcher has the default enabled it just deletes the option and set the default on your chosen one.
XDA App

Thanks but my question was how can you do it programmatically.
I know it is not possible in froyo. But what about donut and eclair.
Homeswitcher has some code to do this when you press Set Default.
My question is what is the code to set a launcher as the default.
There used to be methods to do this in older versions of Android.
First there was
getPackageManager().addPackageToPreferred(getPackageName());
But the docs say
This method is deprecated. This function no longer does anything
Then there was getPackageManager().addPreferredActivity(
and the docs says
This method is deprecated.
This is a protected API that should not have been available to third party applications.
It is a real puzzle, but I know at least one programmer has figured this out.

jleiser said:
Then there was getPackageManager().addPreferredActivity(
and the docs says
This method is deprecated.
This is a protected API that should not have been available to third party applications.
It is a real puzzle, but I know at least one programmer has figured this out.
Click to expand...
Click to collapse
The froyo/gingerbread docs say that because it no longer works after froyo. But it does still work on eclair.

Is homeswitcher open source? Maybe you can simply take a look at it, also perhaps you can make it work for rooted phones in froyo and GB too. Almost forgot, take a look at cyanogen source code I'm sure you will find what you need there.
Xda app

jleiser said:
How does Homeswitcher set default launcher.
ymst.android.homeswitcher is the package name.
They have a way of setting a launcher to be the default.
The intent resolver comes up if you have more than one home launcher installed.
You can select a launcher from the list and also check the box that says
use by default for this action.
I am looking for a way to programmatically set this check box setting.
Home switcher has a set default button.
How do they get this to work in source code ?
Click to expand...
Click to collapse
This is not possible-by code !
It would be a security problem a kind of takes control away by the user !
this is the case you want to make an app/ launcher if you want to make a custom rom this is something else

Related

cyanogenmod with vt launcher

Does anyone know how to use the vtlauncher with cyanogenmod? I have the vtlauncher, and when I run the apk it loads fine and looks great on cm 7.03 but I can't set it as the default. Any ideas?
clear your home launcher default
application, manage, all, and clear defaults.
then press home and you should get the pop up to select it as default. otherwise idk whats wrong.
Thanks, couldn't see it in the main manage apps, but it was under all.... duh
For future reference, this type of thing belongs in the Q+A forum.
Also I had to move the app to system apps with root explorer and then fix permissions from recovery.
Just setting as default wouldn't load my Widgets on restart.

[Q] looking for home switch app

Looking for that app that let me switch from adw launcher to the stock home .thank for any help. The icon for the app was the nook "n"
You mean HomeCatcher?
I use Home Manager as well- (from Market). Lets me switch back and forth between installed launchers and set any as default.
The more common Home Switcher didn't work for me- it just crashes when attempting to set a new default.
+1 for Home Manager . Works great.
I have a shortcut on the home screen of each launcher for it and it allows me to choose any launcher I desire, and still have my favorite as a default for Button Savior.
My N is still linked to the default B&N home screen, so I can show people just how limited it is.(And I use it for my books and Mags too
Yeah, I just use HomeCatcher. It does what it needs to, plus it was included in Indirect's root, haha.
tugthomas said:
Looking for that app that let me switch from adw launcher to the stock home .thank for any help. The icon for the app was the nook "n"
Click to expand...
Click to collapse
This probably what you are looking for - NookHome.apk.
Thanks rete that was the apk i was looking for and everyone else for your quick replies
I use HomeCatcher. I got it from the market but there is a post somewhere along here that has the sideloading link.
Guess I am the only one that goes into the app manager and opens whatever launcher I have set as default and clear the default setting. Oh well, the only time I use anything different is when I am changing my wallpaper and need to use the nook default.
Know-Fear said:
Guess I am the only one that goes into the app manager and opens whatever launcher I have set as default and clear the default setting. Oh well, the only time I use anything different is when I am changing my wallpaper and need to use the nook default.
Click to expand...
Click to collapse
That works of course, but other tools do the same thing with fewer clicks.
Switching to default just to change a live wallpaper (only reason I ever use it), I simply put a shortcut to 'Home' on my desktop.

Emui 3 Default Browser Setting?

Anyone know how to change the default browser to Chrome in Emui 3.0? [SOLVED - see below]
While the "Manage Apps" setting has a button at the bottom for "Default App Settings" and you can change the ones for things like the launcher, camera and email, there is nothing there letting you change the browser.
OK, looking further, with Go Launcher Ex, one can also try to change default apps, but I have discovered 2 things:
(1) The usual method in "Manage Apps" to clear App Defaults does not work - defaults are not shown there
(2) There seems to be something called AndriodHwResolver (yes, misspelt like that) which is somehow controling the default app process.
Thanks, Huawei, for breaking something else with this unnecessary piece of software which stops users being in control of their own phones.
Why did you change to EMUI 3.0 if you don't like it?
ralphrmartin said:
Anyone know how to change the default browser to Chrome in Emui 3.0?
While the "Manage Apps" setting has a button at the bottom for "Default App Settings" and you can change the ones for things like the launcher, camera and email, there is nothing there letting you change the browser.
Click to expand...
Click to collapse
I had to remove the browser altogether. Plus the stock browser seems linked to Baidu.com somehow..
If your rooted you can just delete \system\app\browser.apk and reboot, if your not i'm not sure you can do anything?
"Why did you change to EMUI 3.0 if you don't like it?" I do like it. I just don't like its flaws. And Huawei didn't exactly advertise:
"Warning, this system update will remove apps, break your ability to log into Google, and to run Google Maps / Google+, choose your own browser, etc etc etc."
When I have upgraded other phones (including other brands of Chinese phones, I might add) none of this stupid stuff happened.
OK, You gave me the hint I needed. I disabled "Browser" in Manage Apps. Then when I tried to open a URL, it gave me a choice of Chrome or Baidu. Choosing Chrome worked. I hope it doesn't break anything else...

[Q] CM12 change launcher

I'm currently on the latest nightly for cm12 (18th Feb) and I can't seem to find a setting to change the default launcher and I'm just stuck with trebuchet. On my nexus 5 there is a home setting under personalisation. Am I missing something or has this functionality not been implemented on the nexus 9 yet?
qwerty2626 said:
I'm currently on the latest nightly for cm12 (18th Feb) and I can't seem to find a setting to change the default launcher and I'm just stuck with trebuchet. On my nexus 5 there is a home setting under personalisation. Am I missing something or has this functionality not been implemented on the nexus 9 yet?
Click to expand...
Click to collapse
Hi, qwerty2626...
It shouldn't be too difficult to change the default launcher.... All you have to do is clear the default setting.
Go to SETTINGS>>APPS>>
** scroll horizontally to the ALL TAB
** scroll down to locate the TREBUCHET launcher
** tap on it to ENTER
** tap on the CLEAR DEFAULTS button
Press the HOME button, and you should be presented with a list of all your installed launchers.
Select the one you want to make the new default.
See attached screenshots, for an example of clearing Nova Launcher as the default launcher.
---
Or alternatively, install Default App Manager Lite, from Google PlayStore...
https://play.google.com/store/apps/details?id=com.appiator.defaultappmanager
This app lists all of your app default settings, and provides an easy way of changing them.
Hope this helps.
Rgrds,
Ged.
GedBlake said:
Hi, qwerty2626...
It shouldn't be too difficult to change the default launcher.... All you have to do is clear the default setting.
Go to SETTINGS>>APPS>>
** scroll horizontally to the ALL TAB
** scroll down to locate the TREBUCHET launcher
** tap on it to ENTER
** tap on the CLEAR DEFAULTS button
Press the HOME button, and you should be presented with a list of all your installed launchers.
Select the one you want to make the new default.
See attached screenshots, for an example of clearing Nova Launcher as the default launcher.
---
Or alternatively, install Default App Manager Lite, from Google PlayStore...
https://play.google.com/store/apps/details?id=com.appiator.defaultappmanager
This app lists all of your app default settings, and provides an easy way of changing them.
Hope this helps.
Rgrds,
Ged.
Click to expand...
Click to collapse
Since when is Trebuncha(sp?) back? I litterly just left cm12 on the nexus 6 to try another rom and the only launcher that was installed on there before I put on nova as just the native launcher that motorola use. Its just called launcher.
the_rooter said:
Since when is Trebuncha(sp?) back? I litterly just left cm12 on the nexus 6 to try another rom and the only launcher that was installed on there before I put on nova as just the native launcher that motorola use. Its just called launcher.
Click to expand...
Click to collapse
Hi, the_rooter...
I have no idea if Trebuchet is back or not... I'm not running CM12... I was just giving some general guidance to the OP on how the default launcher can be changed. And since the OP mentioned Trebuchet, I just assumed it was still part of CM.
Rgrds,
Ged.
GedBlake said:
Hi, the_rooter...
I have no idea if Trebuchet is back or not... I'm not running CM12... I was just giving some general guidance to the OP on how the default launcher can be changed. And since the OP mentioned Trebuchet, I just assumed it was still part of CM.
Rgrds,
Ged.
Click to expand...
Click to collapse
I dont think it is. Thats one of the main reasons I only test cm12 to see if they bring it back. Trebuchet has so many great features and now they use the launcher apk and its empty. Like we stated nothing that a custom launcher can do but still. Its sad to see that Trebuchet is not around.
Edit: Below is the article to state that it was in fact removed from cm12.
http://www.androidbeat.com/2015/02/cyanogenmod-12-cm12-features/
GedBlake said:
Hi, qwerty2626...
It shouldn't be too difficult to change the default launcher.... All you have to do is clear the default setting.
Go to SETTINGS>>APPS>>
** scroll horizontally to the ALL TAB
** scroll down to locate the TREBUCHET launcher
** tap on it to ENTER
** tap on the CLEAR DEFAULTS button
Press the HOME button, and you should be presented with a list of all your installed launchers.
Select the one you want to make the new default.
See attached screenshots, for an example of clearing Nova Launcher as the default launcher.
---
Or alternatively, install Default App Manager Lite, from Google PlayStore...
This app lists all of your app default settings, and provides an easy way of changing them.
Hope this helps.
Rgrds,
Ged.
Click to expand...
Click to collapse
I've tried to do this and when I go into the app details there are no defaults on the launcher or at least None that can be cleared, even the app you posted can't do it either. I guess cyanogenmod did this on purpose for whatever reason so I guess I'll just have to wait and see if they implement a way to change it. As for trebuchet taking another look I don't think it is, just assumed it was after using cyanogenmod for so long!

Question A few questions about MiPad 5pro and MiUI

Hi there - I have recently purchased the MiPad5pro and have a few questions about the tablet and MiUi in general as this is my first Xiaomi device. I'm running the latest available version for MiUi for the pad5pro in China.
1. Has anyone been able to get Novalauncher to work? I get an error saying only those launchers verified by Xiaomi are allowed. Is that a miui issue or a miui for pad issue? Any other launchers recommended? I use Oneplus for my phone and have it set up with novalauncher that allows me to have the google shelf when swiping to the left from the home screen. I'd love to have that feature on my mipad.
2. is there a way to natively translate text on the screen? For eg: ColorOs has a built in screen translater that allows you to translate any part of the screen or the entire screen. Anything similar available for miui natively?or any apps that you'd recommend that aren't loaded with ads?
3. without root, is there a way to remove miAI and make Google assistant the default assistant app and get it to work in all the apps?for example, the miui clock app has a mic option for assistant but it triggers miai even though I have set Google assistant as my default ai app. Also, every time the tab is restarted, it defaults to miai as the default ai app instead of the previously set Google assistant.
Happy to answer any questions anyone might have if they are looking at buying this tablet.
Yes I am on the same CN stock ROM (do we have any other choice atm?). I am hating MIUI every minute of the day...
1. You can choose Nova as your default launcher. But you have to do so from Nova, not MIUI settings.
2. Sorry I don't know... I gather you're talking about an app that reads a text off a picture? You tried the stock Gallary app (the purple one)? If you didn't find the function in the app, then maybe it's not possible without a 3rd party app?
3. My pad is rooted, but I've tried what you asked... It looks like your choice of the detault assistant app (I tried google) stays after reboot. I set the detault through 'default app' on settings.
I hope we will be out of this misery soon. MIUI (Chinese version) is a torture.
UmiCat said:
Yes I am on the same CN stock ROM (do we have any other choice atm?). I am hating MIUI every minute of the day...
1. You can choose Nova as your default launcher. But you have to do so from Nova, not MIUI settings.
2. Sorry I don't know... I gather you're talking about an app that reads a text off a picture? You tried the stock Gallary app (the purple one)? If you didn't find the function in the app, then maybe it's not possible without a 3rd party app?
3. My pad is rooted, but I've tried what you asked... It looks like your choice of the detault assistant app (I tried google) stays after reboot. I set the detault through 'default app' on settings.
I hope we will be out of this misery soon. MIUI (Chinese version) is a torture.
Click to expand...
Click to collapse
Thanks. I don't hate the MiUi, it serves my purposes, just hoping to get a few of these issues fixed.
Was able to get Nova sorted like you mentioned, but Nova didn't work too well as it doesn't fully move to landscape mode.
#2 is the one I need most, so hopefully if someone else has an app they can recommend. It is not just about a picture, but about text in any app. Hoping for a 3rd party app that can be used that doesn't have a bunch of ads every time you use it.
I removed MiAi using this method along with some other Chinese language apps
It seems safe and you can re install or re enable the apps of you have any problems.
achalgurnani said:
Hi there - I have recently purchased the MiPad5pro and have a few questions about the tablet and MiUi in general as this is my first Xiaomi device. I'm running the latest available version for MiUi for the pad5pro in China.
1. Has anyone been able to get Novalauncher to work? I get an error saying only those launchers verified by Xiaomi are allowed. Is that a miui issue or a miui for pad issue? Any other launchers recommended? I use Oneplus for my phone and have it set up with novalauncher that allows me to have the google shelf when swiping to the left from the home screen. I'd love to have that feature on my mipad.
2. is there a way to natively translate text on the screen? For eg: ColorOs has a built in screen translater that allows you to translate any part of the screen or the entire screen. Anything similar available for miui natively?or any apps that you'd recommend that aren't loaded with ads?
3. without root, is there a way to remove miAI and make Google assistant the default assistant app and get it to work in all the apps?for example, the miui clock app has a mic option for assistant but it triggers miai even though I have set Google assistant as my default ai app. Also, every time the tab is restarted, it defaults to miai as the default ai app instead of the previously set Google assistant.
Happy to answer any questions anyone might have if they are looking at buying this tablet.
Click to expand...
Click to collapse
I have the solution to 3.
Without root, it's just a matter of getting the permissions correct.
Xiaomi has a privacy setting in the Google permissions that grants the permissions without confirming with google. That's why you can't get the default assistant to stick.
This will fix it. Give google always allow on device info inside the Google app, not assistant app.
Enjoy.

Categories

Resources