I would like create app with custom badge number in app icon, like in facebook app: App icon in home screen shows pending/unread notifications. How to set custom badge number programatically in android. I've seen similar questions in stack with answers like it "doesn't support in stock android". Seen many answers and were old. I think they were for old versions. Is it possible in newer versions of android? If possible how to add customized badge number ? If the option is still doesn't support by android ignore this question and please let me know it. I'm developing kind of confidential app, so that i couldn't use third part libs. Is there any inbuilt methods to handle badges or possible to create badge?
There is popular github that works app icon badges for most Android devices. Sure still some platform, some devices didn't support that. But those libraries almost cover all of the devices that support app icon badges.
https://github.com/leolin310148/ShortcutBadger
So to your question, No.
Because Android framework didn't define the app notification badges before.(I am not sure if Android default framework have it now. I've been search the keyword of BADGE_COUNT_UPDATE in the ASOP android7 and nothing found) So all those custom badges are made by device manufacturer framework developer.
You can check how they setup badges numbers for each manufacturer here
https://github.com/leolin310148/ShortcutBadger/tree/master/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/impl
To another question. I use keyword badge to search the ASOP source code and didn't find any noticeable part about app icon badges. And even there is one inbuilt framework method about this after certain version of android. The framework still cannot cover all the devices before the certain version. So not quite sure what do you mean by confidential app, but using libraries is the first choice to cover most android devices based on the real situation like this.
Related
This question already has answers here:
Is there any way to dynamically change an app icon like Calendar app does?
(7 answers)
Closed 4 years ago.
In Android, I need to make an App icon as like a watch. That icon shows Seconds, Minute and hour lines as per system current time. All lines are moved as per the current time. Means runnable icon like a real watch. Like as per the given image.
Unfortunately, it's not possible for third party apps, as the app you are referring to is a native Samsung app in which Samsung will have the ability to do whatever it wants regarding it, and will have the ability to control the home screen as it wants, but for third party apps and as a general case you can only provide one app icon, and as mentioned here in this fulfill answer it can happen only in a certain way and under certain conditions in only small amount of cases:
I seem to recall that somebody has a GitHub project that tries to wrap
the proprietary APIs of various home screens. IIRC, some supported
capabilities included either replacing the app icon or adding a badge
(e.g., unread message count). However:
Only a small percentage of devices will support those proprietary APIs
Undocumented and unsupported APIs, discovered through reverse-engineering apps, are subject to change and may break in
unexpected ways
Using app icon you didn't achieve what you want.for this functionality, you need to create Android widget.how to create a widget and how to add into widget list for that you need to do RnD on it.
This is my first question on StackOverflow, so please bear with me if I fail to articulate my question.
I am working on an Android app that targets Android O, and I want the launcher to NOT show the icon adapted i.e. remove the white background.
I tried to use adaptive icons and they work, but the problem is that they change the icon itself making it rouned, square, squircle and tear-shaped.
At first I thought it's out of my hands, but some other apps (facebook, whatsapp and snapchat for example) have their icons unchanged.
tl;dr: How can I force an icon to be used by the launcher on Android O?
The other apps you mention (Facebook, Whatsapp, and Snapchat) don't yet target Android O. Once they do, they'll also be forced to have an adaptive icon as well.
Just remove the targetSdkVersion property from your app level build.gradle file. It will work.
I am stuck with one of my client requirement , it seems not be feasible to me as i am not able to find anything related to this particular requirement.I am goggling but does not came up with proper clue.I though studied the below mentioned link which states that it is not supportive . Here is the link :-
How to force a widget to appear on lock screen programmatically (Android)
i just want to confirm that is it feasible ? Or this can be achieved by making custom lock screen for application.
Here is what my client requirement is :-
I need your suggestion here , please let me know .
Thanks
i just want to confirm that is it feasible ?
As I wrote in the answer to the question that you linked to, the standard Android lockscreen framework only supports app widgets from Android 4.1 through 4.4, which is a steadily shrinking portion of the Android device ecosystem.
Or this can be achieved by making custom lock screen for application.
Android does not support the creation of custom lockscreens, other than by building your own modified version of Android, poured into your own custom ROM, installed onto whatever hardware your custom ROM supports.
There are plenty of developers who claim to create custom lockscreens. Those actually require you to disable the device lockscreen, then their apps attempt to interpose themselves between the user and ordinary apps. At the best of times, this offers weaker security.
I want to develop an android application which has to run two other applications on the device with one app on upper half of the screen and the other in lower half of the screen. Any clues/suggestions to start developing this ? Thanks in advance !
it's not possible multi-pane-layout two other apps.
if u want your app with multiple activities follow this tutorials for your references:
it's called named as multi-pane-layouts and offical introduction about multi-pane-layouts below link:
http://developer.android.com/design/patterns/multi-pane-layouts.html
and it's shows how to implement multi-pane-layouts on your project below link from android official side:
http://developer.android.com/guide/practices/tablets-and-handsets.html
and you can download example project from github below link:
https://github.com/faisalgeek/MultiPaneAndroidApp
This is not possible, except via custom device firmware or ROM mods. In standard Android, only one app can be used at a time.
However:
You are welcome to support multi-window apps on some Samsung devices, as they have extended their firmware to support this concept
You are welcome to have an activity's theme set up to not fill the screen, though anything else around the activity will at most be visible and will not respond to touch events
If all of these applications are yours, combine them into one app, and then you can display elements of that app alongside other elements of that app however you wish.
If you are looking for a feature for your app which supports multi-window then Latest Android version N has a new cool feature called Multi-window support, you can let your app support multi-window which can be resized and scaled which is exactly your requirement. you can find the reference link here
I found a badge on my Android device today and I'm wondering how they did this.
Look at the "Email" icon next to "Camera" and "Talk". How are they getting the number 2 on the corner of that icon?
Android doesn't support updating the app icon natively. I'm not familiar with TouchWiz, but I'm pretty sure Samsung didn't implement this either.
However you could create an AppWidget, that looks like an icon. This would give you the ability to dynamically update the icon.