android-launcher

Is it possible to change launcher icon in android runtime with user selection? [duplicate]

╄→гoц情女王★ 提交于 2019-12-07 12:27:03
问题 This question already has answers here : How to change an application icon programmatically in Android? (9 answers) Closed 3 years ago . I want to use multiple launcher icon . what i want that user can change launcher icon with his selection is it possible to change launcher icon run time? 回答1: Strictly speaking you can not change launcher icon at run time. However there are few workarounds available for this: 1. Activity alias: Create multiple activity-alias tags in Manifest for your MAIN

Get correct Laucher icon size on Android

有些话、适合烂在心里 提交于 2019-12-06 15:24:05
I am working on an app which is able to add shortcuts icons to the homescreen. What is the correct icon size for Android tablets? (Or better said, how to get it at runtime?) It seems to differ from what is written on this page. I have switch on DisplayMetrics.densityDpi and change the icon size accordingly. But it does not work for all devices..Gnex seems to be ok, but my Galaxy Tab while beeing DisplayMetrics.DENSITY_MEDIUM device displays only 48x48px icon (as it is in guidelines), but usual launcher icons are 72x72 pixels and not 48x48 - it differs from guidelines? Is it possible that it is

Is it possible to get the shortcut layout of Launcher and use it in our own widget?

荒凉一梦 提交于 2019-12-06 14:34:45
I've noticed that the appearience of Dropbox shortcut-like widget to specified folder is consistent with shortcut layout no matter which launcher we use: So I want to make such a widget that behaves and looks like shortcut and is consistent with user's launcher. Is it possible to get the shortcut layout of Launcher and use it in our own widget? Aside from AppWidgets , Android also has a concept of Launcher Shortcuts that are often grouped under the "Widget" label. That Dropbox folder is a Launcher Shortcut. Shortcuts are simple, all data (icon, label, intent) is static, determined at creation

Getting list of installed app's, easy. But how to launch one of them?

痴心易碎 提交于 2019-12-06 09:04:24
My first application will just be a kind of launcher that I would like to improve. This launcher will launch a custom Home that the user has installed. That's like the application "Home Switcher, but I would like to do that myself. So my first goal is to get all "Home" applications list: that's really easy and the code is there: Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); pm=getBaseContext().getPackageManager(); mainIntent.addCategory(Intent.CATEGORY_HOME); List<ResolveInfo> list = pm.queryIntentActivities(mainIntent,0); Now I would like to do that in a listview. My first problem

Notification Count Badge in Android App Icon

做~自己de王妃 提交于 2019-12-06 05:39:40
问题 I am developing and android application, where I am sending notifications to the user using Firebase Cloud Messaging Service. In order to make user more aware of notifications, I want to show the count of the notifications on the launcher icon of the app. Is there any way how can I do it? I don't want to create a widget. I have tried the library ShortcutBadger Link for the Library But the issue with this library is that it is not working when the app is in background or killed? I have used

programmatically add the widget to home screen in android

落爺英雄遲暮 提交于 2019-12-06 04:56:58
问题 I have developed android widget app and its working fine. Now my client asks that, when the user installed this app, it automatically needs to place on homescreen top position. How to do this? please help me. 回答1: As of Android O, In your app, you can create a request for the system to pin a widget onto a supported launcher. Create the widget in your app's manifest file Call the requestPinAddWidget() method See the bottom part of this page: https://developer.android.com/preview/features

How to make app as a default system launcher?

爱⌒轻易说出口 提交于 2019-12-05 23:17:19
I have developed the launcher application, for the first time when I installed it on device android system pop up chooser dialogue with two options i.e. Always & Just once. I selected "Always" now my app becomes default launcher but issue is when I update the app, the system pop up the same chooser dialogue again, I don't want to show that pop up. How to make the app as a default system launcher? To achieve this, Do I need to create system level app? I have used following permission to make the app a launcher <intent-filter> <action android:name="android.intent.action.MAIN" /> <category

adb shell dumpsys activity activities shows two instances of single task in separate stack

醉酒当歌 提交于 2019-12-05 16:39:54
I have a main activity having intent with CATEGORY_HOME to behave like a launcher. It also has CATEGORY_LAUNCHER so that user can access from App Drawer. Here is the main activity: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override protected void onResume() { super.onResume(); } @Override protected void onDestroy() { super.onDestroy(); } } I have another activity containing a button to call the MainActivity with HOME intent. It is another

Android - Launching Activity on top of other Apps

女生的网名这么多〃 提交于 2019-12-05 05:43:06
问题 Background: I am trying to build a Launcher app that will restrict users to a set of permitted applications only and will not allow them to access device settings & anything other then the permitted apps. Why: This is a project for a private company to distribute devices to their employees with restricted usage. Issue: I am able to detect launch of other apps, but i am not able to overlay my activity on top of them. Below is the code, i am trying after receiving broadcast of not allowed app.

Android pin activity on boot

一个人想着一个人 提交于 2019-12-04 19:03:25
问题 I've got an app that registers itself as the default launcher and pins itself automatically when started. This all works fine when installing the app. It pins itself and only the back button is visible. The problem is that when the device first boots up, it does not pin properly. I see a series of toasts "Screen pinned" and "Screen unpinned" multiple times. The "Home" and "Recent Tasks" buttons are still visible as well. -- Running "adb shell dumpsys activity activities" - the last lines