android-launcher

how to make the Launcher-Pick-Up popup window showing?

廉价感情. 提交于 2019-12-04 18:07:39
I have an Launcher app installed. And user has choose another launcher as default, that means when pressing HOME the default launcher will come to front. I wanna supply user with an convenience of reseting default launcher. Such as a button clicking in my launcher's UI will make Launcher-Pick-Up popup window showing. Go Launcher can do that(in Go's setting view). it seems Go Launcher does something like "PackageManager.clearPackagePreferredActivities("com.android.launcher")" to clear the prefered launcher activity! how to achive that ? launcher can only clear its own prefered settings for

How to get the list of all installed shortcuts found in the homescreen Launcher in android

馋奶兔 提交于 2019-12-04 10:23:15
问题 I wanted to get the list of all installed shortcuts in the homescreen launcher programmatically. I have found lots of snippets online but none of them provides the right output for this snippet: Intent shortcutsIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT); ArrayList<Intent> intentList = new ArrayList<Intent>(); Intent intent=null; String launchers=""; final PackageManager packageManager=getPackageManager(); for(final ResolveInfo resolveInfo:packageManager.queryIntentActivities

Create Circular Launcher Icon

房东的猫 提交于 2019-12-04 03:42:01
问题 I am trying to create circular launcher icons in Android Studio 2.2 but they keep coming out square. Has anyone else encountered this? Am I doing something wrong? 回答1: After clicking Next you should get circular launcher icon. Previews might be misleading as they have background as the icon. After all, if you won't get what you expect, try: https://romannurik.github.io/AndroidAssetStudio/ Hope it will help 回答2: Go to under "File > New > Asset Studio", then look for Foreground, Background,

Android - Launching Activity on top of other Apps

笑着哭i 提交于 2019-12-03 21:20:48
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. private class BadAppReceiver extends BroadcastReceiver { @Override public void onReceive(Context arg0,

Remove Activity as Default Launcher

帅比萌擦擦* 提交于 2019-12-03 18:48:14
问题 I set my activity as a default launcher to intercept home button clicks like so: <activity android:name=".ExampleActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> When my activity, ExampleActivity is launched, if i click the

Android Wear Launcher

天大地大妈咪最大 提交于 2019-12-03 14:33:06
I am wondering how the Android Wear launchers like Swipify and Wear Mini Launcher intercept touch events on the android wear home screen . I have tried adding the onTouch and onClick listeners to the Watch View Stub in my app so far, but I can not figure out how to get touches that occur outside of my app. Nicolas POMEPUY In fact, the views are directly added in the WindowManager in a Service . You can take a look at this thread to understand how it works: Creating a system overlay window (always on top) Be careful, there is an issue in the Moto 360 system at this time as explained here: https

Android pin activity on boot

偶尔善良 提交于 2019-12-03 13:16:14
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 indicate that it is not pinned: mLockTaskModeState=NONE mLockTaskPackages (userId:packages)= 0:[com.example

How to get available “app shortcuts” of a specific app?

≡放荡痞女 提交于 2019-12-03 09:29:01
问题 Background Starting from API 25 of Android, apps can offer extra shortcuts in the launcher, by long clicking on them: The problem Thing is, all I've found is how your app can offer those shortcuts to the launcher, but I can't find out how the launcher gets the list of them. Since it's a rather new API, and most users and developers don't even use it, I can't find much information about it, especially because I want to search of the "other side" of the API usage. What I've tried I tried

How to get the list of all installed shortcuts found in the homescreen Launcher in android

岁酱吖の 提交于 2019-12-03 05:44:19
I wanted to get the list of all installed shortcuts in the homescreen launcher programmatically. I have found lots of snippets online but none of them provides the right output for this snippet: Intent shortcutsIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT); ArrayList<Intent> intentList = new ArrayList<Intent>(); Intent intent=null; String launchers=""; final PackageManager packageManager=getPackageManager(); for(final ResolveInfo resolveInfo:packageManager.queryIntentActivities(shortcutsIntent, 0)) { launchers=launchers+"\n"+resolveInfo.activityInfo.packageName; intent=packageManager

Properly skip login activity if already logged in

你说的曾经没有我的故事 提交于 2019-12-03 03:13:38
问题 My launcher icon currently starts the login activity. I've stored the logged in status in SharedPreferences. Is there any way to properly skip the login activity and go straight to the main activity without any UI glitches. All existing solutions involving finish() in onCreate() cause the login activity title to be briefly visible or some other brief blank screen UI glitch. 回答1: Have a launcher acitivy with no UI that decides to open the MainActivity or the LoginActivity. You can declare no