get mail text from grouped / stacked gmail notification; bundle.extras is null - gmail

I'm searching for a way to get access to the full text of a gmail notification.
I'm getting the complete mail text, when there arrives just one mail with the following coding, on both of my testing devices.
var extraBundle: Bundle? = sbn?.notification?.extras ?: null
var mailtext = extraBundle?.getCharSequence(Notification.EXTRA_BIG_TEXT).toString()
On my Samsung phone (Android 13) the gmail app does show me each mail seperatly, so when multiple mails arrives at the same time, a new single notification arrives just one after another, as I would like it to.
There the notifications are shown as the following:
But on my Pixel 7 (Android 13) it is grouping those notifications directly.
var extraBundle: Bundle? = sbn?.notification?.extras ?: null
var mailtext = extraBundle?.getCharSequence(Notification.EXTRA_BIG_TEXT).toString()
So here I'm not able to access the mailtext (it is null) when multiple mails arrive after they got grouped/stacked in one bigger notification, because they somehow arrive all at the same moment.
Also this line returns null, which usually gets the header text of the notification:
extraBundle?.getCharSequence(Notification.EXTRA_TEXT).toString()
Then I'm only able to get the header text ("Re: Beleg für Ihre Zahlung...") of the notification with this line:
sbn.notification.extras.getCharSequenceArray(Notification.EXTRA_TEXT_LINES)
But then I'm not able to get access to the whole mailtext..
As far as I have checked, all settings and notification settings on both devices are the same.
On both devices I'm using the same version of the gmail app:
2022.12.25.498226572

Related

How to add clickable code in text message(SMS)?

I am sending a One time passworde or verification code from my node js application. I am actually sending this text
const message = `Nekmart.Do not share PIN and security code with others.
Nekmart never asks for those. Your Nekmart security code is ${otp} .
Validity 5 minutes.`
But When I received this text as SMS. I found the OTP code is not clickable. Like the following image-
But I see many SMS with this type of verification code with clickable functionality. Like somthigng-
Here We can see this is clickable. When someone click to that area, they can see some options.
My question is When I send the message text Then Why that otp code is not clickable. How can I do that?
SMS messages are only text, you cannot mark them up in any way to make the SMS application render them differently. It is entirely down to the SMS application on the device for how it decides to render the message and whether it makes an OTP code clickable.
There is nothing that you can do here.
It's true that SMS messages are just straight text and cannot be formatted, but systems interpret the codes on their own. For example, when you write "Your invite code is: 01010101", iOS will make it clickable.

MS Bot Framework: Begin Dialog When User Taps on Hero Card

I'm having a Hero Card, which opens an URL when a users taps on it:
const message = new builder.Message(session);
message.attachmentLayout(builder.AttachmentLayout.carousel);
message.addAttachment(
new builder.HeroCard(session)
.title('Title')
.tap(builder.CardAction.openUrl(session, 'https://www.google.com'))
.images([builder.CardImage.create(session, url)]));
How can I change the tap() action so that instead of opening an URL a certain dialog is started? (Like I would do with session.beginDialog('DialogID');)?
Change the openUrl to either imBack (if you want the user to see the message sent to the bot) or postBack (to hide the message sent to the bot).
So something like
.tap(builder.CardAction.imBack(session, 'I have been tapped'))

ios- Firebase event select_content does not show data based on parameters

Upon logging into the console, selecting my app, then I select the iOS version and I'm presented with the dashboard. All of that looks good. Then I select the Events tab, and I see a list of all events that my app has logged. Again, this is all good. However, I want to be able to drill down and see reports based on the parameters that were passed with those events. in my iOS code I have the following:
NSString[] keys = { ParameterNamesConstants.ContentType, ParameterNamesConstants.ItemId };
NSObject[] values = { new NSString("content"),new NSString("id") };
var parameters = NSDictionary<NSString, NSObject>.FromObjectsAndKeys(keys, values, keys.Length);
Analytics.LogEvent(EventNamesConstants.SelectContent, parameters);
I want to see parameters data from this event, but I cannot figure out how to do that
Currently, you can't drill down into each event parameter. The predefined event parameters will help with displaying data report.

How to get event ID from Google Calendar page with JavaScript?

I am creating a Google Chrome extension for Google calendar. I want to get the ID of an event when user visits the event edit page.
How can I get the event ID from the plugin's javascript code so that I can fire Calendar api v3.0 with that ID.
Adding extra info:
Google Calendar API calendar id and event id
The comment by #krishna actualy shows how to get the event ID and it works. But how to get the event ID in https://www.google.com/calendar/ URL not in the URL(https://www.google.com/calendar/render?gsessionid=OK&eventdeb=1) as told by Krishna.
It's in the data-eid attribute that you partially covered in black in the screenshot. It is encoded along with other things as base64 (or base64url).
The following code should decode, extract, and print the event ID (assuming jQuery was loaded):
var encoded = $("div.ep[data-eid]").attr("data-eid");
if (encoded !== undefined) {
var decoded = atob(encoded);
console.log("Current event ID: " + decoded.split(" ")[0]);
}
prints something like:
Current event ID: 75v3thapnpd234ocglgk625frc

xpages: compute Confirm Action confirmation text does not work in XPiNC

I'm using Notes/Domino 8.5.3. I've added a button control to an xpage. The button uses a Confirm Action to display a client-side prompt to the user before continuing with the next action defined for the button. When I use static text for the Confirmation Text for the Confirm Action, the confirmation prompt is displayed. However, when I change the Confirmation Text to be computed, and retrieve the text from a profile document, the confirmation prompt it not displayed at all in XPiNC. The confirmation prompt with the computed confirmation text is displayed just fine in a browser. Is there a work-around for this issue with XPiNC?
Following is the code I'm using in the Confirm Action to get the text for the prompt:
var server = database.getServer();
var dbProfile:NotesDocument = database.getProfileDocument("DBProfile", "");
var msg = dbProfile.getItemValueString("ContactsInitUpdatePrompt");
return msg;
To further my comments, this is a work around I use the below code for an app that uses the bootstrap extension library on the web but uses basic functionality with xpinc.
If the values for xPinc are different you could make the confirm action different in the browser and in the client.
if (#ClientType()== "Notes")
{
<action>;
}
else{
<action>;
}
I think that profile documents are a bad idea in xPages though. Having to restart HTTP to get a new value ruins the point I think. Almost better to hard code values at that point. I think you can set application scope to handle the work of profile documents. But then application scope in xpinc is just on the current machine as the server is the client.

Resources