ট্রিগার পুশ বিজ্ঞপ্তি
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অংশীদার ট্রিগার বিজ্ঞপ্তি
বার্তা যোগ করুন এবং অবহিত করুন
পটভূমি
একজন ব্যবহারকারী একটি পাস যোগ করার পরে আপনি তাদের পাস সম্পর্কিত একটি বার্তা পাঠাতে এবং তারা এটি সম্পর্কে অবহিত করা নিশ্চিত করতে চাইতে পারেন। TEXT_AND_NOTIFY
এর সমান একটি message_type
সহ অ্যাড মেসেজ API অনুরোধটি ব্যবহার করে নিম্নলিখিতটি ঘটে:
- একটি " বার্তা " আইটেম "পাসের পিছনে" (ওরফে বিবরণ টেমপ্লেট ) যোগ করা হয় এবং পাস সংরক্ষিত ব্যবহারকারীদের কাছে একটি পুশ বিজ্ঞপ্তি পাঠানো হয়।
- ব্যবহারকারী একবার বিজ্ঞপ্তিতে ট্যাপ করলে এটি পাসের সামনে Google Wallet খুলবে (ওরফে কার্ড ভিউ) এবং ব্যবহারকারী একটি "মেসেজ দেখুন" বোতাম সহ স্ক্রিনের শীর্ষে একটি কলআউট দেখতে পাবেন।
- কলআউটে ক্লিক করা ব্যবহারকারীদের পাসের পিছনে নিয়ে যাবে, যেখানে নতুন অপঠিত বার্তাগুলি হাইলাইট করা হবে।
ব্যবহারকারীদের বিজ্ঞপ্তি সহ বার্তা পাঠানোর সময় কিছু বিবেচনা
- বার্তাগুলির সাথে সম্পর্কিত পুশ বিজ্ঞপ্তিগুলি পেতে ব্যবহারকারীদের অবশ্যই তাদের পাসগুলির জন্য বিজ্ঞপ্তিগুলি সক্ষম করতে হবে৷
- বার্তাগুলিতে আপনার ওয়েবসাইট বা অ্যাপের URI থাকতে পারে। হাইপারলিঙ্ক অবশ্যই পাস সম্পর্কিত একটি ওয়েবসাইট বা অ্যাপ হতে হবে। পাসের সাথে সম্পর্কিত নয় এমন লিঙ্কগুলিতে ব্যবহারকারীদের পাঠানোর জন্য এটি গ্রহণযোগ্য ব্যবহারের নীতির লঙ্ঘন।
- আপনি সর্বোচ্চ 3টি বার্তা পাঠাতে পারেন যা 24 ঘন্টা সময়ের মধ্যে একটি পুশ বিজ্ঞপ্তি ট্রিগার করে। Google আপনার পুশ নোটিফিকেশন ডেলিভারি কোটা থ্রোটল করতে পারে যদি মনে হয় আপনি আপনার ব্যবহারকারীদের স্প্যাম করছেন।
- ব্যবহারকারীরা তাদের লক স্ক্রিনে যে পুশ বিজ্ঞপ্তি দেখেন তা Google Wallet দ্বারা নিয়ন্ত্রিত হয়৷
- আপনি নিয়মিত ক্লাস বা অবজেক্ট এন্ডপয়েন্ট ব্যবহার করে বার্তা ডেটা সম্পাদনা বা অপসারণ করতে আপডেট বা প্যাচ পদ্ধতি ব্যবহার করতে পারেন।
ইন্টিগ্রেশন পদক্ষেপ
আপনি যখন AddMessage API ব্যবহার করে যুক্ত করা একটি নতুন ইস্যুকারী বার্তা সম্পর্কে ব্যবহারকারীদেরকে অবহিত করতে চান, তখন আপনাকে AddMessageRequest আপডেট করতে হবে যাতে আপনার নতুন পাঠ্য ধারণ করা বার্তাটিতে TEXT এর পরিবর্তে MessageType TEXT_AND_NOTIFY থাকে।
উদাহরণ JSON বার্তা যোগ করার অনুরোধ এবং একটি পাস ক্লাসে বিজ্ঞপ্তি
…
"id": ISSUER_ID.CLASS_ID",
"message":
{
"header":"My Class message header",
"body": "My Class message body with a <a href="https://wallet.google">Hyperlink<\a>",
"id": "message_id",
"message_type": "TEXT_AND_NOTIFY"
},
…
একটি পাস অবজেক্টে বার্তা যোগ করার এবং বিজ্ঞপ্তি দেওয়ার জন্য JSON অনুরোধের উদাহরণ
…
"id": OBJECT_ID",
"classId": "ISSUER_ID.CLASS_ID",
"message":
{
"header":"My Object message header",
"body": "My Object message body with a <a href="http://play.google.com/store/apps/details?id=com.google.android.apps.maps">Hyperlink<\a>",
"id": "message_id",
"message_type": "TEXT_AND_NOTIFY"
},
…
বার্তা যোগ করার এবং পাস ক্লাসের জন্য বিজ্ঞপ্তি দেওয়ার উদাহরণ প্রতিক্রিয়া
// The updated resource
…
{
"kind": "walletobjects#walletObjectMessage",
"header": "My Object message header",
"body": "My Object message body with a <a href="http://play.google.com/store/apps/details?id=com.google.android.apps.maps">Hyperlink<\a>",
"id": "message_id",
"messageType": "textAndNotify"
},
…
ব্যতিক্রম হ্যান্ডলিং
3 বারের বেশি সূচিত করার কোনো প্রচেষ্টা একটি QuotaExceededException প্রতিক্রিয়া প্রদান করবে। পাসের আরও যেকোন আপডেট " TEXT_AND_NOTIFY " এর পরিবর্তে " TEXT " ব্যবহার করে সেট করা যেতে পারে যেমন ইন্টিগ্রেশন ধাপে আলোচনা করা হয়েছে৷
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003cstrong\u003e\u003ccode\u003eTEXT_AND_NOTIFY\u003c/code\u003e\u003c/strong\u003e message type adds a message to the pass's details and triggers a push notification, directing users to the message in Google Wallet.\u003c/p\u003e\n"],["\u003cp\u003eUsers must have notifications enabled for their passes to receive these push notifications.\u003c/p\u003e\n"],["\u003cp\u003eA maximum of 3 notification-triggering messages can be sent within a 24-hour period to avoid spamming users.\u003c/p\u003e\n"],["\u003cp\u003eYou can update or remove message data using standard update/patch methods and change the \u003ccode\u003emessage_type\u003c/code\u003e to \u003ccode\u003eTEXT\u003c/code\u003e for further updates without notifications.\u003c/p\u003e\n"],["\u003cp\u003eExceeding the notification limit results in a \u003ccode\u003eQuotaExceededException\u003c/code\u003e, after which \u003ccode\u003eTEXT\u003c/code\u003e should be used instead of \u003ccode\u003eTEXT_AND_NOTIFY\u003c/code\u003e for subsequent messages.\u003c/p\u003e\n"]]],["The `Add Message API` with `message_type` as `TEXT_AND_NOTIFY` sends a push notification to users when a new message is added to their pass. Tapping the notification opens the pass in Google Wallet, displaying a \"View Message\" callout. Clicking this directs users to the pass's \"back\" where new messages are highlighted. A maximum of three push notifications are allowed within 24 hours, with excessive usage resulting in a `QuotaExceededException`. Messages can include hyperlinks relevant to the pass.\n"],null,["# Trigger Push Notifications\n\nPartner Triggered Notifications\n-------------------------------\n\n### Add Message and Notify\n\n#### Background\n\nAfter a user adds a pass you may want to send them a message related to the\npass and ensure they are notified about it. Using the [Add Message API](/wallet/tickets/transit-passes/qr-code/rest/v1/transitclass/addmessage)\nrequest with a `message_type` equal to\n**`TEXT_AND_NOTIFY`** the following occurs:\n\n1. A \"[Message](https://developers.google.com/wallet/reference/rest/v1/Message)\" item is added to the \"back of pass\" (aka [Details\n Template](/wallet/tickets/transit-passes/qr-code/resources/template#details-template)) and a push notification is sent to users with the pass saved.\n2. Once the user taps the notification it opens Google Wallet to the front of the pass (a.k.a. Card view) and the user will see a callout at the top of the screen with a \"View Message\" button.\n3. Clicking the callout will take users to the back of the pass, where new unread messages are highlighted.\n\n#### Some considerations when sending messages with notifications to users\n\n- Users must have notifications enabled for their passes to receive the push notifications related to messages.\n- Messages may contain URIs to your website or app. Hyperlinks must be a website or app related to the pass. It is a violation of the [Acceptable Use Policy](https://payments.developers.google.com/terms/aup) to send users to links not related to the pass.\n- You may send a maximum of 3 messages that trigger a push notification in a 24 hour period. Google may throttle your push notification delivery quota if it deems you are spamming your users.\n- The push notification users see on their lock screen is controlled by Google Wallet.\n- You can use the [UPDATE](/wallet/tickets/transit-passes/qr-code/rest/v1/transitclass/update) or [PATCH](/wallet/tickets/transit-passes/qr-code/rest/v1/transitclass/patch) methods to edit or remove message data using the regular class or object endpoint.\n\n#### Integration Steps\n\nWhen you want to notify users about a new issuer message added using the\nAddMessage API, you will need to update the [AddMessageRequest](https://developers.google.com/wallet/reference/rest/v1/AddMessageRequest)\nso that the [Message](https://developers.google.com/wallet/reference/rest/v1/Message)\nwhich contains your new text has the [MessageType](https://developers.google.com/wallet/reference/rest/v1/Message#MessageType)\n**TEXT_AND_NOTIFY** instead of **TEXT**.\n\n#### Example JSON Request to add message and notify in a Passes Class\n\n```carbon\n ...\n \"id\": ISSUER_ID.CLASS_ID\",\n \"message\":\n {\n \"header\":\"My Class message header\",\n \"body\": \"My Class message body with a \u003ca href=\"https://wallet.google\"\u003eHyperlink\u003c\\a\u003e\",\n \"id\": \"message_id\",\n \"message_type\": \"TEXT_AND_NOTIFY\"\n },\n ...\n```\n\n#### Example JSON Request to add message and notify in a Passes Object\n\n```carbon\n ...\n \"id\": OBJECT_ID\",\n \"classId\": \"ISSUER_ID.CLASS_ID\",\n \"message\":\n {\n \"header\":\"My Object message header\",\n \"body\": \"My Object message body with a \u003ca href=\"http://play.google.com/store/apps/details?id=com.google.android.apps.maps\"\u003eHyperlink\u003c\\a\u003e\",\n \"id\": \"message_id\",\n \"message_type\": \"TEXT_AND_NOTIFY\"\n },\n ...\n```\n\n#### Example [Response](/wallet/tickets/transit-passes/qr-code/rest/v1/transitclass/addmessage#response-body) to add message and notify for a Pass Class\n\n```scilab\n // The updated resource\n …\n {\n \"kind\": \"walletobjects#walletObjectMessage\",\n \"header\": \"My Object message header\",\n \"body\": \"My Object message body with a \u003ca href=\"http://play.google.com/store/apps/details?id=com.google.android.apps.maps\"\u003eHyperlink\u003c\\a\u003e\",\n \"id\": \"message_id\",\n \"messageType\": \"textAndNotify\"\n },\n …\n```\n\n#### Exception handling\n\nAny attempts to notify more than 3 times will yield a\n**QuotaExceededException** response. Any further updates to the\npass can be set using \"**TEXT** \" instead of\n\"**TEXT_AND_NOTIFY** \" as discussed in the [Integration\nSteps](#add-message-and-notify-integration-steps)."]]