Expanding Android Notifications Via Android - java

I've created a series of notifications which seem to be taking up more room than can be displayed in the notification area. I expect to be able to click each notification and see it's entire contents - however for some reason the notifications do not seem to expand when clicked.
SOURCE:
https://docs.google.com/document/d/1IsXl2ymLkkoTzEqAPpM99tPtKCJgBhAlbWJW2HZ5Zro/edit?usp=sharing

The Android Documentation on Notifications covers this pretty well, specifically the section on Expanded layouts. The expanded view is done by adding a bigContentView() (API 16+):
A large-format version of contentView, giving the Notification an opportunity to show more detail. The system UI may choose to show this instead of the normal content view at its discretion.
If you are producing multiple notifications and you are concerned about the amount of room they take up, read up on the section titled Stack your notifications.

Related

How to show dialog when app is in background in android app like collect app

image
I am sharing a link from another app like youtube to my app but Now it opens my app and then saves the link. My need is to not save the link without opening the app
There are two solutions:
You don't need dialog or anything like it. Just make the activity fully transparent, process data and finish it. Optionally, you can show Toast as a feedback. It would look and feel like everything is processed in the background.
You need dialog or some kind of UI. For this, you can use floating windows that you can show over other apps. Many apps use this approach such as Pocket, etc. There is complete guide on how to do it: https://localazy.com/blog/floating-windows-on-android-1-jetpack-compose-room

How can Android apps access messenger chats?

I want to write an Android App that analyses chats. For each messenger, for each contact, I want to get a list of all messages sent and received (since installing my app). The key thing here, is that I want the list of messages to be in order. My app should support as many messengers as possible. What would be the best way to do this?
I researched and found a few ways to access messengers' messages:
Using accessibility services
(Related: How to read window content (using accessibilityService) and evoking UI using draw over other app permission in Android?)
to read the screen content of other apps that is annotated with accessibility labels
caveats:
the messenger needs to have accessibility implemented correctly
I have to filter which text blobs are relevant
Using NotificationListenerService
to get the content of notifications for received messages
caveats:
only gets content of messages for which there was a notification
except for their time, there is no order of the messages given
taking screenshots and doing optical character recognition
caveats:
probably insane
When I get the messages, I still have to order them. For this, I think, the accessibility services are my best bet as I could use the date information on screen in most messages, and also their position on the screen.
However, there is still an edge case. As I understand it, accessibility services can only see the content currently on the screen. The user might also use another device to chat while the device with the app installed is powered off. Thus, once the device with the app installed is powered on again, the app might not be able to see the old messages written while the device was powered off (until the user scrolls up again).
Are my assumptions correct? Do you know of a better way for my app to read/sort the messages?

Embed android application into other android application (Overlay + Events)

I was wondering if it's possible in android to embed an application into in another application. In this way you can have control of the embed application and you can add some other functionalities thanks to the parent application.
EDIT :
To be more accurate, I would like to have an application (parent application ) which can overlay the content of another application (embed application) without losing control of the parent application.
Thank you,
You can not specifically embed one app in another. And unless there is a specific inter-application API you have available to you, you cannot control the one app from your parent app either.
However if you just want to be able to view your parent app as some kind of overlay over another app, there are techniques that you might find useful.
It is possible to create an overlay view that can be seen when other apps are in the foreground. This is used by some chat clients, video playback, and task launchers. You can find some info on this method by looking at my answer here:
Background app to listen to Drag gestures
It is important to realise that in "the old days", a technique like this could be used to steal data from someone's phone. It was possible to receive taps & drags, and then pass them on to the other app.
This was a security hole, and has been fixed. So these days, you can choose if your overlay view should receive the taps or not i.e. if it is interactive, or just shows info.
Because of this, you will not want to cover up any of the "embedded" app with your own UI.
It is not possible any more to receive taps in your app, and pass them through to the other app.
This is not possible in general. The only thing that comes close is "embedding" an app widget in a home screen.

Notification drawer seems full - New notification's get thrown away

I'm using Push Notifications in my application and have noticed that if around 50+ notifications arrive the draw stops displaying any new notification that may arrive.
This situation should be rare within my application but its still possible and I'm trying to find out more information about it (since I can't find a mention of a limit anywhere) and the best way to deal with it (so far I'm thinking using SQLlite and storing the overdraw notifications and showing them when the user dismisses a notification).
Please do not show "50+ notifications". Please show one Notification, updated perhaps to reflect 50+ events.
This is covered:
in the design guidelines (see "Stack your notifications")
in the API guide
in the Android Wear documentation (as people with Android Wear devices will get severely pissed at you for flooding their watch or whatever with 50+ notifications)

How to show number of unread sms on mesege inbox icon

when sms is recieved a pop up is appeared on inbox icon which show number of unread sms,, how can i show that popup which indicate number of unread sms in inbox....
Is there a way to add a badge to an application icon in Android?
Unfortunately, Android does not allow changing of the application icon because it's sealed in the APK once the program is compiled. There is no way to programmatically change it to a 'drawable'.
Read this link: Is there a way to add a badge to an application icon in Android?
There is no way to implement this for all devices out there. The problem is, this is no feature of Android by itself, but of the specific launcher, and while there are some launchers that offer this possibility (each slightly differently), there is no solution that would work with all devices.
Also, it is discouraged to use this UI pattern in Android apps, as it is an iOS design pattern.

Categories