0

I have an app where users can send other users multiple choice questions. I want to know if the following is reasonable and what steps should i follow:

User A has downloaded the installable app and created a question for B. App will produce a sharable link.

B will open the link, answer the question without downloading the app.

In a scenario like this, can i use android instant apps? If not whats the best way i can do this?

I have read and tried tutorials on instant apps but couldnt find a match

jdoe
  • 59
  • 10

1 Answers1

0

Yes you can!

Instant Apps can be accessed many different ways, but primarily known through either the Try Now from your Play Store's listing and from opening associated URLs (from browser, other apps, etc.).

You want to do the former, URLs, so you'll need to setup your Instant App to handle those URLs. Handling Android App Links will guide you on how to do that, with a specific section, Create App Links for Instant Apps for Instant Apps.

Enabling this can actually let both your installable and instant app handle those URLs that your app shares.

What you can expect to happen is:

  1. User B taps on the link shared by A
  2. Your instant app opens and loads the correct activity/contents based on the intent-filter that's setup to handle the link
  3. User B can then answer the question inside your instant app
  4. Handle the results from within your instant app

You can find some samples to help you get started and become familiar with it. Though, recently, Instant Apps has been moving towards App Bundle integration (also see this) (with Android Studio 3.2, more prominently with 3.3), so this android-dynamic-features sample and its project structure/setup might be a bit more relevant (if you'll notice the instant modules).

Note: the App Bundle part is actually optional, it's the move to Dynamic Delivery and its the newer plugin: com.android.dynamic-feature vs com.android.feature.

TWL
  • 6,228
  • 29
  • 65
  • Thanks a lot for the comprehensive answer. I can produce links for activities but i was wondering if i can produce a url link for the question that A has created customly for B? Not just a link that will take B to question activity but to that specific question? – jdoe Dec 22 '18 at 21:35
  • You're gonna have to elaborate on what you mean by "question activity" vs "specific question". Your specific question has to be stored and loaded from somewhere, right? So your URL must contain the parameters/keys to let your app's activity know where to load it from. – TWL Dec 24 '18 at 20:04