android-launcher

android: choose default launcher programmatically

只谈情不闲聊 提交于 2019-11-27 00:39:59
问题 I want to pop up a dialog that lets the user choose a launcher to be launched with set as default option . I tried Intent home = new Intent(Intent.ACTION_DEFAULT); home.addCategory(Intent.CATEGORY_LAUNCHER); Intent chooser = Intent.createChooser(home, "Launcher"); context.startActivity(chooser); But the dialog popped by this does not have the option to set default. While the following code will not pop up the dialog if a default launcher is already set. Intent startMain = new Intent(Intent

How does Facebook add badge numbers on app icon in Android?

和自甴很熟 提交于 2019-11-26 15:55:50
I know there are several Qs here that ask if its possible to add badges to an android app and they all end up with a NO answer... But somehow the latest Facebook beta version for Android seems to do something which at least look like a badge even if it is not technically exactly that. In that post one of the commenters says that it is somehow related to TouchWiz. And also here they mention it as a feature of the "S3 TouchWiz Jelly Bean Addon". I still would appreciate information on how does this can be done and if there is some API for this that I can use in my own app (when running in an

Android Overriding home key

我与影子孤独终老i 提交于 2019-11-26 15:31:48
As the question suggests I know we can't override the Home key event but if you look into the emulator of android 2.2 you will see an application Car Home it has overridden most of the keys like Home, end call. Now, the point is how have they done it? I tried to peep into the source code of the app but to my surprise its not available or I am unable to find it, but I don't think later is the case. I agree with @Romain Guy You can't override the behaviour of home button. What the Car Home app does: it has defined itself as a launcher. You can also define yours as a launcher, and it will be

How does Facebook add badge numbers on app icon in Android?

假如想象 提交于 2019-11-26 06:00:14
问题 I know there are several Qs here that ask if its possible to add badges to an android app and they all end up with a NO answer... But somehow the latest Facebook beta version for Android seems to do something which at least look like a badge even if it is not technically exactly that. In that post one of the commenters says that it is somehow related to TouchWiz. And also here they mention it as a feature of the \"S3 TouchWiz Jelly Bean Addon\". I still would appreciate information on how

Android Overriding home key

柔情痞子 提交于 2019-11-26 04:27:48
问题 As the question suggests I know we can\'t override the Home key event but if you look into the emulator of android 2.2 you will see an application Car Home it has overridden most of the keys like Home, end call. Now, the point is how have they done it? I tried to peep into the source code of the app but to my surprise its not available or I am unable to find it, but I don\'t think later is the case. 回答1: I agree with @Romain Guy You can't override the behaviour of home button. What the Car