Android : Unread message update in icon - android

I'm developing an android application with communication integrated. My application have to show number of unread messages via app icon, it's will be look like that skype, facebook or etc. I can not found any solutions to perform it, please help me.

You can use this library
It works well for most of the devices.
PS. Nexus devices (or, more specific, the google launcher) does not support this!

You have to pass token with a message if a message is read or not.
Suppose we have a token 0 for read messages and 1 for unread messages.
If message read then make token 0 else it is 1.
To count the total number of unread messages, count the total number of unread messages (where token=1) from the list.
You can use this repo or use any repo from this link

Related

Firebase data message to specific android app versions

i have an android app and i want to send a firebase data message to inform the users of a new app version available in the play store. I am sending a data message in order to reach devices in which the app is in background.
I want send the message to specific versions, or if it's possible to all versions except the last version.
What is the best way to do it? Can I specify a version number in a fcm data message?
Below is the data message i am sending.
Thanks in advance.
{
"to": "/topics/all",
"data": {
"title": "new version",
"body": "a new version is available in play store"
}
}
I don't have answer for your question but I can suggest another way to achieve your case.
Take a look at Firebase Remote Config.
You can define variable for your client to get anytime it start.
So for your case, we have 3 variable:
destinationVersion for your specific version
title
message
In the app, just put the logic like if app's version equal to destinationVersion , create a notification with title and message to tell user update the app
. Hope it helpful to you.
You can force users to update with Google now: https://developer.android.com/guide/playcore/in-app-updates#immediate

Android - Java mail - Gmail 'Mark as unread' & Inbox 'Snooze'

My homemade Android email client app, using Java mail, works fine with google mail service.
One use case for which I would like some piece of advice does concern the 'unread messages':
Whenever I 'Mark as unread' an email in mail.google.com, my mobile app update the email as 'unread' accordingly. Good.
Now I am using inbox.google.com and the 'Mark as unread' option is not present anymore.
As explained on the How Inbox works with Gmail page from Google, some actions are identical and other are similar.
About 'Mark As Unread' feature, it is not present anymore in 'Inbox'.
Instead, a 'snooze' option is replacing it:
In GMail (mail.google.com): 'Mark as Unread'
In Inbox (inbox.google.com): 'Snooze' (NOT identical to 'Mark as unread', but has 'similar' behavior)
Question:
How can I figure out, in my android java code, that a message is 'snoozed'?
I googled for it and checked GMail's extensions but could not find an answer.
Note:
I also checked Imap messages userFlags and systemFlags: nothing there :/
Thanks.
It looks like a lot of Inbox's features are implemented as a special kind of label: one that you can search for, but not one that appears as an actual Label or any sort of metadata in the Gmail API (or IMAP).
Try this (if you're an Inbox-by-Gmail user): open the Gmail web client, and enter label:snoozed in the search box. It should find all your snoozed messages. Also works for label:pinned, label:done, label:trips and label:purchases (Inbox smart bundles), label:lowpriority, etc. (Also try creating a new label with any of those names: they're all "reserved for system use.")
Even though they don't appear in the Gmail labels.list API, you can use these special Inbox label searches with the q (query) parameter in threads.list and messages.list.
So to figure out if a message is snoozed from your code, see if its message id appears in messages.list called with q=label:snoozed.
I don't see any way to add or remove these special Inbox labels on a message through the API, unless/until Google exposes them like other labels. (FWIW, the special Gmail Categories do appear in the API, e.g., "Updates" is a system label with id CATEGORY_UPDATES. So maybe there's hope things like "snoozed" make it into the API, too, as those Inbox features find their way into Gmail.)

Codename One - Show number of unread messages in the app icon

Please look at the Signal icon in this screenshot:
My question is how to obtain the same result in a Codename One app. Suppose that my app has a variable like "int unreadMdg", how can I show the number of unread message in the app icon?
We currently only support this on iOS as it wasn't available on any Android device when we launched the feature and is still arguably flaky on Android.
For iOS support you can set the badge value via push notification (see the developer guide) or by using the API:
if(Display.getInstance().isBadgingSupported()) {
Display.getInstance().setBadgeNumber(unreadCount);
}
This is for IOS
Use this to make it displays a specific number
// Objective-C
[UIApplication sharedApplication].applicationIconBadgeNumber = number;
// Swift
UIApplication.shared.applicationIconBadgeNumber = number

Android mobile number verification

Hi guys I need help from you all in Android mobile number verification process. I have a android phone I just need to verify the otp but in this case they using the auto verification method is it possible to verify my otp through fwd the msg or by using prank message app Pls anyone help me to solve my problem and thx in advance...
Assuming that you are asking for "how to implement OTP verification". There are number of ways to tackle this. Please look at the below link for two ways of achieving this using Google authenticator or using a SMS gateway.
Android one time password (OTP)
here is the tutorial to read the incoming messages using Broadcast receiver if you are going to use the second method.
"Reading incoming messages using broadcast receiver."
I believe you are trying to implement a way you can implement your own TTS (Text-To-Speech) Verification system that prompts the user to enter in the code.
If so, you can use Nexmo's Text To Speech Prompt.
All you have to do is make an HTTP call (For example: https://api.nexmo.com/tts-prompt/json)
From here you can use the parameters you want such as,
text - Body of the text message to be read to the end user
machine_detection - How to react when an answering machine is detected
lg - To determine what language the text is read in
bye_text - Body of the text message played after digits are entered successfully
failed_text - Body of the text message played after 3 failed attempts
There are many other parameters you can work with and customize your TTS prompt to capture/confirm data.
Full disclosure, I work at Nexmo
You can see more information how to implement this here

How to send an Android Push Message using Intels App-Framework?

I'm looking for a solution to send a Push Message from PHP in Intels App-Framework, but I can't find any good solution. I have found this:
https://gist.github.com/prime31/5675017
But how can I get the DEVICE_REGISTRATION_ID? It's very difficult to find some code or solution.
Ive found the Solution. I have forgott to type the IP 0.0.0.0/0 into the Google API Console. And i added the Google API Key and Projectnumber by the Push Category on Build Window.
Then i copy paste the code from http://docs.appmobi.com/index.php/push-messages/ into index_user_scripts.js (only number 2 and 3). Number 1 goes to index.html on the header section. Now it works fine, i can send messages from the Services Tab.

Categories

Resources