Skip to content

Android InboxMessage response different with iOS #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tyfoo1603 opened this issue Nov 12, 2021 · 4 comments
Closed

Android InboxMessage response different with iOS #77

tyfoo1603 opened this issue Nov 12, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tyfoo1603
Copy link

When I called CleverTapPlugin.getAllInboxMessages() in iOS, the response returned List of Map<String, dynamic>.
But when called this api in Android, it returned Map<String, String>.

Anyway to force Android return Map<String, dynamic> instead of Map<String, String> type? To make them consistent and ease for json conversion.

Screenshot 2021-11-12 at 11 46 16 AM

Screenshot 2021-11-12 at 10 13 39 AM

@tyfoo1603 tyfoo1603 changed the title Android InAppMessage response different with iOS Android InboxMessage response different with iOS Nov 12, 2021
@william-ct
Copy link
Contributor

Hi @tyfoo1603, We're using Map<String,String> for the msg data payload in CleverTapPlugin.getAllInboxMessages(), Right now you can add different implementation for iOS and Android in your dart file as below and handle responses accordingly.

if (Platform.isAndroid) {
  // Android-specific code
} else if (Platform.isIOS) {
  // iOS-specific code
}

We'll be picking this up in our future release where the inbox response payload will be uniform across iOS and Android.

@william-ct william-ct added the enhancement New feature or request label Dec 1, 2021
@shivamsharma2710 shivamsharma2710 added bug Something isn't working and removed enhancement New feature or request labels May 12, 2023
@aldychris
Copy link

Is this issue fixed?

@tyfoo1603
Copy link
Author

@shivamsharma2710 Can help to verify the current response from CleverTapPlugin.getAllInboxMessages()?

When we tested with android devices recently, they are now returning Map<String, dynamic> instead of Map<String, String> object. Yet there is no update on this issue regarding the changes made.

Screenshot 2023-11-15 at 11 36 11 AM

@shivamsharma2710
Copy link
Contributor

@aldychris Please use CleverTap Flutter SDK version 1.7.0 or onwards. We have streamlined the payload for various callbacks across Android and iOS platforms. Please, refer to the ChangeLog for the v1.7.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants