Home > Software design >  How to share dynamic content to users in react native
How to share dynamic content to users in react native

Time:12-22

I'm building a polling app using React Native and I'm struggling to get my head around how to share dynamic content to users who haven't downloaded the app before and how new users can be redirected to participate in this poll. My background is in websites so i'm used to having a unique URL i can share.

For example, if this was a website i would do the following;

  1. Create a poll
  2. Share a URL with the poll id, i.e www.pollexample.com/id/hxgoiihfhfshb124
  3. Users go this URL and can cast their vote, either as a logged in user or guest
  4. Poll admin can then see users who voted

When building the app, the issue i'm running into is once the Poll has been created how i can then share this poll to new users. My initial thought would be to have a button, which when clicked would open up a list of contacts which I could use to trigger an invite users to download the app.

However, for invited users who haven't downloaded the app, how do them get redirected to the poll i've just created? Do they have to sign up, search for the poll or is it possible to store the poll id on their device before hand so they're automatically redirected?

The idea behind the app is it's simple for users to take a picture of a QR code and be able to participate in the poll without the need for an account.

Any help would be much appreciated.

CodePudding user response:

What you're describing is the purpose of Firebase's Dynamic Links product, which provide the recipient a deep link directly to a specific screen in your app.

For the React Native library for Dynamic Links, see here.

  • Related