what is different in Android 5.0 (LOLLIPOP) notification? - android

I have bunch of apps that use notifications work for Android 4.4 and lower. Are these notifications going to work in android 5.0? If not, how to set notifications in Android 5.0?

You do not have to change anything, only functionality is added.
Android Lollipop - Notifications:
Notifications in Android 5.0 are more visible, accessible, and
configurable.
Varying notification details may appear on the lock screen if desired
by the user. Users may elect to allow none, some, or all notification
content to be shown on a secure lock screen.
Key notification alerts such as incoming calls appear in a heads-up
notification—a small floating window that allows the user to respond
or dismiss without leaving the current app.
You can now add new metadata to notifications to collect associated
contacts (for ranking), category, and priority.
A new media notification template provides consistent media controls
for notifications with up to 6 action buttons, including custom
controls such as "thumbs up"—no more need for RemoteViews!

In android 5.0 (Lollipop) only functionality has increased.So Lollipop will support all lower API apps without fail.
Read more about Lollipop here - Android Lollipop

Related

how can I add lock screen interacting widgets in android pie

I want to access my apps functions directly from the lock screen but I can't, it is only showing the app icon without the ability to click it unless screen unlocked,i am using my mobile with android 9 as emulator .
is there any way to solve it,thanks
as I found from Android developer website,it is not possible after version 5 as below
"The widget Category attribute declares whether your App Widget can be displayed on the home screen (home_screen), the lock screen (key guard), or both. Only Android versions lower than 5.0 support lock-screen widgets. For Android 5.0 and higher, only home_screen is valid."

How to set counter value in the application laucher icon in Oreo?

In my Android app I need to show the counter on launcher app icon.
Before Android Oreo I used ShortcutBager library. But this one doesn't work anymore in the newer Android versions.
As far as I understand, native Android Oreo bagdes are showing only when app receives notifications. Is there any way to set the counter value manually?

pinning shortcut widget for lower api

Is there any way to use this feature on android devices with api lower than Nougat
ShortcutInfo is only available since API 25, and unless they release a support library for that, then I'm afraid it is not possible.
If your app targets Android 7.1 (API level 25) or higher, you can define shortcuts to specific actions in your app. These shortcuts can be displayed in a supported launcher.
Keywords on the page are a supported launcher, so the one on the Google Pixel might work, for example, but don't expect an LG or Samsung device to also allow the same feature
The current action for long clicking an icon exists, though. It allows you delete or move apps on your home pages, but, again, that's up to the launcher to implement and support that action.
This feature is supported in launcher. Long press on app icon is implemented in API 25 or higher, If the user doesn't allow the shortcut to be pinned to the launcher, your app won't receive a callback.

Set volume with Chromecast when Android app is in the background

I'm developing an app for Android that streams content to a Chromecast device.
I did not find the documentation about the way to change the volume of the remote media player when the app is in the background.
Look at the method setUpRemoteControl() in VideoCastManager class, in CCL; it is mostly done there.
It was enough to call:
mediaRouter.addRemoteControlClient(mRemoteControlClient);
where:
mMediaRouter = MediaRouter.getInstance(context);
Per the CastCompanionLibrary detailed documentation:
CCL can provide default lock screen controllers based on the RemoteControlClient. If desired,
this feature needs to be enabled at the initialization time of the VideoCastManager. When this
feature is enabled, a Play/Pause button will be shown on Android devices running Jelly Bean or
above. On KitKat devices, the layout of the lock screen controllers is different and uses a
full-screen album art while on Jelly Bean it is a small version of the album art.
In addition, when this feature is enabled, CCL provides the ability for users to control the Cast
device’s system’s volume even if the application is in the background. On KitKat devices, it provides that capability even if the screen is off
For the CastVideos-android sample, they do that in CastApplication immediately after intialization of VideoCastManager:
mCastMgr.enableFeatures(
VideoCastManager.FEATURE_NOTIFICATION |
VideoCastManager.FEATURE_LOCKSCREEN |
VideoCastManager.FEATURE_DEBUGGING);

Notification Icon on HoneyComb is Too Dim

I have an Android app that uses the NotificationManager to inform the user of certain events. When I call .notify(), the icon I specify is shown in the status bar. It works fine on various Android 2.2 and 2.3 phones. But on a Galaxy Tab 10.1 running Android 3.1 the notification icon on the status bar is so dim it can barely be seen. I've seen one other app that has a similar problem, but all the other apps I'm using that do notifications look OK. I've followed the Guidelines at http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html, including creating Android 2.3+ style icons and putting them in the drawable-hdpi-v9, drawable-mdpi-v9, etc. folders. The icons all look OK when I look at them on my development machine; they are the right colors and are not dim. What could I be doing wrong that is causing my notification icon to be shown so dim on the Honeycomb status bar?
As of today there is updated documentation available at the android developers web site:
http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html

Categories

Resources