Class Notification
বিজ্ঞপ্তি একটি UI উপাদানের সাথে ইন্টারঅ্যাক্ট করার প্রতিক্রিয়া হিসাবে ব্যবহারকারীকে দেখানো একটি বিজ্ঞপ্তি৷
var action = CardService.newAction().setFunctionName("notificationCallback");
CardService.newTextButton().setText('Save').setOnClickAction(action);
// ...
function notificationCallback() {
return CardService.newActionResponseBuilder()
.setNotification(CardService.newNotification()
.setText("Some info to display to user"))
.build();
}
বিস্তারিত ডকুমেন্টেশন
setText(text)
বিজ্ঞপ্তিতে দেখানোর জন্য পাঠ্য সেট করে। প্রয়োজন।
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
text | String | বিজ্ঞপ্তি পাঠ্য। |
প্রত্যাবর্তন
Notification
— এই বস্তুটি, চেইন করার জন্য।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-01-14 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-01-14 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["Notifications inform users about the results of their interactions, such as clicking a button."],["Developers can use `setText()` to customize the notification's message."],["The notification is triggered by a function, which is set as an action on a UI element."],["`notificationCallback()` showcases how to build and display a notification to the user."]]],["The core content details how to create and display a notification to a user interacting with a UI element. A new `Action` is created, and a `TextButton` is linked to it using `setOnClickAction`. The `notificationCallback` function, triggered by the button, builds an `ActionResponse` with a `Notification`. `setText()` method is used to set the notification message text. It takes a string and returns the `Notification` object, permitting method chaining.\n"]]