android-launcher

Android Launcher - Home Button

丶灬走出姿态 提交于 2021-02-11 09:42:37
问题 I'm developing a Home Screen Launcher App for Android. Now, if the user is already on the homescreen, i want a custom action when the user presses the the homebutton. I know some other launchers, that can override the homebutton, for example Go Launcher Ex. My code is: @Override public boolean dispatchKeyEvent(KeyEvent event) { int action = event.getAction(); int keyCode = event.getKeyCode(); switch (action) { case KeyEvent.ACTION_DOWN: switch (keyCode) { case KeyEvent.KEYCODE_HOME: break; }

Android Launcher - Home Button

南楼画角 提交于 2021-02-11 09:42:14
问题 I'm developing a Home Screen Launcher App for Android. Now, if the user is already on the homescreen, i want a custom action when the user presses the the homebutton. I know some other launchers, that can override the homebutton, for example Go Launcher Ex. My code is: @Override public boolean dispatchKeyEvent(KeyEvent event) { int action = event.getAction(); int keyCode = event.getKeyCode(); switch (action) { case KeyEvent.ACTION_DOWN: switch (keyCode) { case KeyEvent.KEYCODE_HOME: break; }

Show full application name on Home screen

为君一笑 提交于 2021-02-07 19:14:38
问题 My app name contains 12 characters. But application launcher icon appears with truncated text. As i observed this issue is not produced in all device. I am using device with OS 4.0.3. App launcher icon should show full app name regardless of app name length. Is there any property available in Android Manifest to set app name without eclipsing? or Is it default behavior of device that apply on all launcher icons? Thanks in advance. 回答1: Imagine a name like

Show full application name on Home screen

风流意气都作罢 提交于 2021-02-07 19:12:10
问题 My app name contains 12 characters. But application launcher icon appears with truncated text. As i observed this issue is not produced in all device. I am using device with OS 4.0.3. App launcher icon should show full app name regardless of app name length. Is there any property available in Android Manifest to set app name without eclipsing? or Is it default behavior of device that apply on all launcher icons? Thanks in advance. 回答1: Imagine a name like

Getting applications with 2 or more activities

点点圈 提交于 2021-02-07 04:17:56
问题 I'm writing an Launcher app for android. I can get the list of all applications and launch able activities with ArrayList<PInfo> res = new ArrayList<PInfo>(); List<PackageInfo> packs = ctx.getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES); final PackageItemInfo.DisplayNameComparator comparator = new PackageItemInfo.DisplayNameComparator(ctx.getPackageManager()); Collections.sort(packs, new Comparator<PackageInfo>() { @Override public int compare(PackageInfo lhs,

Getting applications with 2 or more activities

本秂侑毒 提交于 2021-02-07 04:16:25
问题 I'm writing an Launcher app for android. I can get the list of all applications and launch able activities with ArrayList<PInfo> res = new ArrayList<PInfo>(); List<PackageInfo> packs = ctx.getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES); final PackageItemInfo.DisplayNameComparator comparator = new PackageItemInfo.DisplayNameComparator(ctx.getPackageManager()); Collections.sort(packs, new Comparator<PackageInfo>() { @Override public int compare(PackageInfo lhs,

Hide installed app in android

Deadly 提交于 2020-02-03 00:37:26
问题 i want to hide the installed app by another app in android application, lets say user has installed 3rd party app called Skype, Watsapp, facebook etc... is there a way we can hide and show them upon click of a button from another app?. i tried below code. No luck, nothing happened to my launcher PackageManager packageManager = context.getPackageManager(); ComponentName componentName = new ComponentName(context, LauncherActivity.class); packageManager.setComponentEnabledSetting(componentName,

How to create a shortcut of an app on a SPECIFIC launcher app?

喜你入骨 提交于 2020-01-25 10:54:28
问题 Background I already know how to put a shortcut to an app globally: Intent shortcutIntent=new Intent(); shortcutIntent.setComponent(new ComponentName(packageName,fullPathToActivity)); final Intent putShortCutIntent=new Intent(); putShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT,shortcutIntent); //... <=preparing putShortcutIntent with some customizations (title, icon,...) putShortcutIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT"); context.sendBroadcast(putShortcutIntent

How are the default AOSP launcher shortcuts installed in a ROM build?

自闭症网瘾萝莉.ら 提交于 2020-01-05 05:31:45
问题 I'm building my own version of AOSP (using code from the Code Aurora repos for a custom device) and trying to determine how shortcuts to certain apps are being added automatically to the launcher's db (Launcher3 on Marshmallow to be more specific). I want to change these around and remove/reposition some of them. (In this particular instance the apps in question are those from the GMS suite.) I understand that apps can try to get their shortcuts onto the launcher's workspace by sending a

How are the default AOSP launcher shortcuts installed in a ROM build?

痞子三分冷 提交于 2020-01-05 05:31:31
问题 I'm building my own version of AOSP (using code from the Code Aurora repos for a custom device) and trying to determine how shortcuts to certain apps are being added automatically to the launcher's db (Launcher3 on Marshmallow to be more specific). I want to change these around and remove/reposition some of them. (In this particular instance the apps in question are those from the GMS suite.) I understand that apps can try to get their shortcuts onto the launcher's workspace by sending a