Android change home settings

Android: change default Home Application

for some specific requirement I am required to change Android Default Home application with my customized Home application ( a setting inside my app that will toggle default home = my application or previous home)

I don’t want the user to travel android settings that are very complicated.

Can any one help me out like where it registers launcher.apk for default home application or how to change that

The only thing I could find was that old question: How to change default Android’s Desktop application?

but no answers at all.

I have seen HomeSwitcher in the Market that do the trick, but no answer for the developer that might certainly be busy.

EDIT

But I got the same issue:

this is my code:

I have the android.permission.SET_PREFERRED_APPLICATIONS set in the manifest. After executing the code above, the logs claim things have been added like expected (same logs as when I tick off «Make default» from IntentResolver’s list). However, when I proceed by clicking home, the list still shows up and the logs say:

So it seems the resolver deletes the default entry. Am I doing something wrong, or is this a security measure? What are the ideas behind this?

4 Answers 4

I did an extensive research on that and starting from 2.2 there is no way to do that. The only way is using some hacking that toddler lock app does but this app put samsung phones recently in the infinite loop, so it is a risky approach.

if you look at the froyo source code here of packagemanager class, you will see this small condition in the addPreferredActivity method:

HomeSwitcher does not work properly on 2.2 since it uses this very method and developer made a comment on app page «Froyo(2.2) is not supported due to the API change«

«Result set changed» means that the set of packages matching that intent has changed from the set you specified when you created the default — — so the default is no longer valid. Your list of components (which you are currently setting to null) needs to contain all homescreen apps present on device, not just yours.

Here’s example code that I have tested (using adb shell am start http://www.google.co.uk/ ) and used to set the default browser. XXX represents a customer name that I had to black out.

Note that in order to call addPreferredActivity you must have compiled against a minimum-sdk version of 8 (2.2) and you must have specified the SET_PREFERRED_APPLICATIONS permission. That permission is protection level 2, so you need to be signed with the same certificate as PackageManager.

ETA — if you marked this response down, could you let me know why. The code I posted above is tested and working.

Источник

How to change the home screen launcher on Android

Opting for a custom launcher is one of the fastest and easiest ways to customize your Android experience.

Top Deals On Great Products

Picked by Techconnect’s Editors

Personalization is at the heart of Android. You’re not stuck with the same grid of app icons that came with your phone or tablet.

Changing up your home screen launcher is a relatively simple method to customize the appearance and performance of your phone, and there are many good choices. It allows you to change how app icons look, where you can put widgets, and the functions and features of your home screen.

Change your launcher

Head to Settings > App > Configure apps > app permissions. Truthfully it’s far faster to just launch the settings and search for “home.” Also, keep in mind the location for this setting may vary based on your device.

Pick your home app from the settings menu.

From here, you can choose the launcher that shipped with your device or another you may have downloaded. You can always change back to a previous launcher from this same location. You’ll usually find the apps and layout changes you made to the home screen from any of these launchers will be just the way you remember them.

Finding good launchers

Now it’s time to find a launcher. The Play Store aggregates some of the more popular choices into a section that you can access by going to Personalization > Cool app launchers.

Google Play has you covered with a variety of different launchers to choose from.

While the Play Store tries to use its own natural selection scheme to offer you some choices, allow us to point you to some of our favorites.

My personal favorite right now is Action Launcher 3. Developer Chris Lacy is constantly improving the launcher and has even added in details that align with Google’s Pixel Launcher. It’s well worth the in-app upgrade for the full version.

Action Launcher 3 has a stock Android look with a lot of power tucked underneath.

If you like to stick close to Google, there’s always the Google Now Launcher. However, icons look slightly large on some bigger phones and it doesn’t offer as much customization as others. Speaking of tweaks, you may also like Nova Launcher if you want to optimize your home screen to just the way you want. Additionally, Microsoft also has a good offering with its Arrow Launcher if you want one that does most of the thinking for you.

Finally, once you download a new launcher you’ll be prompted to select which one to use the first time you hit the home button. You can opt to use that launcher one time only or select it as the new default.

Derek Walter is a freelance technology writer based in Northern California. He is the author of Learning MIT App Inventor, a hands-on guide to building your own Android apps.

Источник

How to customize your Android home button shortcut

The best thing about Android is how customizable it is. Not everyone likes the default actions assigned to certain buttons or button combinations, and one of the most common complaints is with the home button on the older Samsung Galaxy devices. It is possible to make the home button do what you want, rather than what the manufacturer decided, using the following workaround.

Samsung, along with many other manufacturers, is leaving the home button by the wayside as the ever-increasing displays gobble up more and more of the smartphone’s front panel. The stylish Samsung Galaxy S8 was the first flagship from the Korean company to ditch it, and now even lower-range devices in the A-series follow suit. Nonetheless, the physical home button still has its fans, and we’ll show you how to get the most out of it.

For demonstration purposes, we’re using a Samsung Galaxy S7 on Android Nougat, although it should work on most phones that have a physical home button. By default, a double-tap of the S7 home button takes you to the camera shortcut but, for the purposes of this tutorial, we want to make it launch the Play Store instead. On older Galaxy devices, a single tap of the physical home button will bring you to your home screen, a double-tap launches S Voice, and long-press launch Google Now with a long press.

First, you’ll need a specialized app from the Google Play Store, so download and install it on your device. There are several apps that provide the same functionality, but for this example, we’re using Button Mapper: Remap your keys.

How to change the home button action

  1. When you fire up Button Mapper, it will first advise you to authorize the app in your Settings. Button Mapper will be able to see which app is currently on your screen. While this isn’t unusual for an app with these capabilities, just be warned. We recommend you look up the developer of these apps to check for legitimacy.
  2. After authorization, we’ll be able to reprogram the physical Home and Volume buttons for different actions (additional options require a paid version). In this example, we’ll customize what happens with a double-tap.
  3. Remapping a button is a four-step process. First, select the Home Button to see a menu of customization options. Select Double Tap.

Even with the free version can be a life-changer. / © NextPit

  1. Next, choose whether you want to map the double tap to an action, application or shortcut. We chose Applications in this example.
  2. Then we’re presented with a list of applications. Select Play Store and voila! Double tapping the Home Button now opens leads to Google’s market of apps and games.
  3. If you ever want to go back to how it was before, you can clear your app defaults in Settings.
  4. We actually think that the way the S7 launches the camera from a double-tap of the home button is a really useful feature, so If you have an older Galaxy device, you can use Button Mapper to make the double-press a camera shortcut rather than an S Voice shortcut.
  • Best custom ROMs for Android
  • Best root apps for Android

Happy customizing! What other cool modifications have you made to your Galaxy? Tell us about them in the comments.

Источник

Change the home directory default location in Android Studio

I figured out how to change the default save location/workspace by creating a new project and picking a different directory.
Before, it was C:\Users\Name\AndroidStudioProjects but now I changed the default save location to C:\Name\Android\AndroidStudioProjects

However, in Android Studio when I go to File > Open it opens to a default directory of C:\Users\Name\ where it used to be. The sdk is here too so maybe that’s why. This is known as the Home Directory in Android Studio, but how do I change this path?

2 Answers 2

When we want to open a existing project or anything in Android Studio, this window pops up. The four buttons for path variables on top left of the window is used to help navigating to most frequently used directories as Home Directory, Desktop Directory, Project Directory and Module Directory. The first two are inherited from system variables and the last two are retrieved from current project settings (that’s why they’re inactive when no project is opened).

What Jason need as I do either is just a project repository. I use D:\Workspace\AndroidStudio\ as my project repository storing all my project files. So it’s rather inconvenient to navigate to my projects, I have to left click at least 5 times to my repository.

Android Studio doesn’t allow users to specify a repository directory and even if it supports user-defined path variables, I can’t figure out how to use it in this window. I guess we have to add a button to quickly navigate to repo directory and that’s probably too trivial for IDE developers.

Finally, I discovered the Recent Files button which can largely help me navigating although not perfectly. I suggest you use this sub-optimal solution instead if you’re suffering from mouse-clicking pain like me.

Источник

How to set ANDROID_HOME path in ubuntu?

How to set ANDROID_HOME path in ubuntu?

Please provide the steps.

20 Answers 20

In the console just type these :

If you want to make it permanent just add those lines in the

/.bashrc in your terminal. The folder you are in has no importance

I would like to share an answer that also demonstrates approach using the Android SDK provided by the Ubuntu repository:

Install Android SDK

Export environmental variables

Assuming you have the sdk extracted at

Add the above lines to the file

/.bashrc (located at home/username/.bashrc ) to make it permanent for the current user. Run source

/.bashrc to apply the changes or restart your terminal.

Run the above lines on a terminal window to make it available for the session.

To test if you have set it up correctly,

Run the below commands on a terminal window

echo $ANDROID_HOME

which android

Run android on a terminal window, If it opens up Android SDK Manager, you are good to go.

/.profile (or .bashrc) if you don’t want to logout.. then try running ‘sdkmanager —licenses’. Then try compiling.

better way is to reuse ANDROID_HOME variable in path variable. if your ANDROID_HOME variable changes you just have to make change at one place.

Initially go to your home and press Ctrl + H it will show you hidden files now look for .bashrc file, open it with any text editor then place below lines at the end of file.

Please change /home/varun/Android/Sdk path to your SDK path. Do the same for tools and platform-tools.

After this save .bashrc file and close it.

Now you are ready to use ADB commands on terminal.

Add the following to your

/.bashrc file. Log-out and log-in. I have my sdk in $HOME/Documents/Android/sdk you have to replace it with where you keep your sdk folder

/.bashrc can substitute for logging out then logging in.

first open the .bashrc file by gedit

# Added ANDROID_HOME variable. export ANDROID_HOME=$HOME/Android/Sdk export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/platform-tools

save the file and reopen the terminal

it will show the path like /home/pathTo/Android/Sdk

Applies to Ubuntu and Linux Mint

Restart the terminal and doing: echo $ HOME or $ PATH, you can know these variables.

Download the Android SDK to the machine. (Suppose that the location is /home/zelong/Android/Sdk) (home/username/Android/Sdk)

Add these lines to the file

/.bashrc (located at home/username/.bashrc)

This will make it permanent for the current user because every time the machine boots, it will run this script and set the enviroment path.

After making this change, remember to save it.

Then run source

/.bashrc to apply the changes or restart your terminal.

Test if it works:

android command line locates under tools

adb command line locates under platform-tools

This is what work for me, Assuming you have the sdk extracted at

Add the above lines to the file

/.bashrc (located at home/username/.bashrc ) to make it permanent for the current user. Run source

/.bashrc to apply the changes or restart your terminal. (or) Run the above lines on a terminal window to make it available for the session. To test if you have set it up correctly, Run the below commands on a terminal window

You can run this too

Run android on a terminal, If it opens up Android SDK Manager, you are good to go.

Источник

Читайте также:  Андроид убрать экран гугл
Оцените статью