We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 999ca8d commit 24d41f0Copy full SHA for 24d41f0
OneSignalSDK/onesignal/src/main/java/com/onesignal/OSInAppMessagePage.kt
@@ -0,0 +1,29 @@
1
+package com.onesignal
2
+
3
4
+import org.json.JSONException
5
+import org.json.JSONObject
6
7
+const val PAGE_ID = "page_id"
8
+const val PAGE_INDEX = "page_index"
9
10
+class OSInAppMessagePage constructor(jsonObject: JSONObject) {
11
+ var pageId: String? = null
12
+ var pageIndex: String? = null
13
14
+ init {
15
+ pageId = jsonObject.optString(PAGE_ID, null)
16
+ pageIndex = jsonObject.optString(PAGE_INDEX, null)
17
+ }
18
19
+ fun toJSONObject(): JSONObject? {
20
+ val mainObj = JSONObject()
21
+ try {
22
+ mainObj.put(PAGE_ID, pageId)
23
+ mainObj.put(PAGE_INDEX, pageIndex)
24
+ } catch (e: JSONException) {
25
+ e.printStackTrace()
26
27
+ return mainObj
28
29
+}
0 commit comments