This repository was archived by the owner on Feb 5, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
android/src/main/java/com/qubit/reactnative/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,16 +327,14 @@ Returns Placement for given parameters.
327327 - Description: Experience identifier
328328
329329### Result
330- Promise with a map describing Placement object. Example :
330+ Promise with a map describing Placement object:
331331
332332 {
333- "image": "https://image.store.com/images/example.jpeg ",
334- "message": "Hello World",
335- "url": "https://www.qubit.com "
333+ "content": { ... }
336334 "impressionUrl": "https://api.qubit.com/placements/callback?data=ggW4eyJtZXRhIjp7ImlkIjo ",
337335 "clickthroughUrl": "https://api.qubit.com/placements/callback?data=mQW4eyJtZXRhIjp7Imlkx "
338336 }
339-
337+ The structure of response content depends on the type of placement that is being called.
340338
341339### Exceptions
342340- Exception is thrown, when SDK is not initialized.
Original file line number Diff line number Diff line change @@ -247,11 +247,7 @@ async () => {
247247}
248248
249249{
250- " image" : " https://image.store.com/images/example.jpeg" ,
251- " message" : " Hello World" ,
252- " url" : " https://www.qubit.com"
253- " impressionUrl" : " https://api.qubit.com/placements/callback?data=ggW4eyJtZXRhIjp7ImlkIjo" ,
254- " clickthroughUrl" : " https://api.qubit.com/placements/callback?data=mQW4eyJtZXRhIjp7Imlkx"
250+ " content" : { ... }
255251}
256252```
257253
Original file line number Diff line number Diff line change @@ -164,7 +164,8 @@ public void getPlacement(
164164 getAttributesJson (attributes ),
165165 new PlacementPreviewOptions (campaignId , experienceId ),
166166 placement -> {
167- JsonObject placementJson = placement .getContent ();
167+ JsonObject placementJson = new JsonObject ();
168+ placementJson .add ("content" , placement .getContent ());
168169 placementJson .addProperty ("impressionUrl" , placement .getImpressionUrl ());
169170 placementJson .addProperty ("clickthroughUrl" , placement .getClickthroughUrl ());
170171 placementPromise .resolve (WritableMapConverter .convertJsonToMap (placementJson ));
Original file line number Diff line number Diff line change @@ -220,11 +220,7 @@ class QubitSDK {
220220 * }
221221 *
222222 * {
223- * "image": "https://image.store.com/images/example.jpeg",
224- * "message": "Hello World",
225- * "url": "https://www.qubit.com"
226- * "impressionUrl": "https://api.qubit.com/placements/callback?data=ggW4eyJtZXRhIjp7ImlkIjo",
227- * "clickthroughUrl": "https://api.qubit.com/placements/callback?data=mQW4eyJtZXRhIjp7Imlkx"
223+ * "content": { ... }
228224 * }
229225 */
230226 public getPlacement (
@@ -242,7 +238,7 @@ class QubitSDK {
242238 experienceId
243239 )
244240 . then ( placement => ( {
245- ... placement ,
241+ content : placement . content ,
246242 impression : ( ) => { NativeModules . QubitSDK . placementImpression ( placement . impressionUrl || '' ) } ,
247243 clickthrough : ( ) => { NativeModules . QubitSDK . placementClickthrough ( placement . clickthroughUrl || '' ) }
248244 } ) )
You can’t perform that action at this time.
0 commit comments