Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

userInfo object only gives url other data are not there. #93

Open
jdgalani opened this issue Jan 7, 2020 · 4 comments
Open

userInfo object only gives url other data are not there. #93

jdgalani opened this issue Jan 7, 2020 · 4 comments

Comments

@jdgalani
Copy link

jdgalani commented Jan 7, 2020

OS : MacOs
Platform : android
Device: Samsung Galaxy S9

I am setting Dynamic shorcuts with this code,

QuickActions.setShortcutItems([
  {
    type: "Orders", // Required
    title: "See your orders", // Optional, if empty, `type` will be used instead
    subtitle: "See orders you've made",
    icon: "Compose", // Icons instructions below
    userInfo: {
       url: "app://orders" ,// Provide any custom data like deep linking URL,
       screenType:"Data",
       screenData:"Data"
    }
  }
]);

but when I am getting data in popInitialAction it is having only url. while screenType and screenData are not there.

QuickActions.popInitialAction()
.then((data)=>{
   console.log(JSON.stringify(data))
})
.catch(console.error);

is there anything I can do for this?
this is perfectly working for ios, issue is only on android.

@ymc-thzi
Copy link

Detected the same issue.

@jordanbyron
Copy link
Owner

Looks like that is correct. Check out this file from the source:

https://github.com/jordanbyron/react-native-quick-actions/blob/master/android/src/main/java/com/reactNativeQuickActions/UserInfo.java#L15

I didn't implement the android support and am not an android developer so it's not clear to me if this was an oversight or a limitation. I'm happy to review and accept PRs that add the functionality described above.

Sorry for the confusion. I'll throw something in the README to clear this up for now until support for that is added.

@ymc-thzi
Copy link

My current workaround is now to work only with the url param and add the parmas to that... like a common url with query params.
In my popInitialAction/listener I have to parse it then.

@jordanbyron
Copy link
Owner

Related to #90

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants