Deep linking to a specific page / context in a mobile app

Hi,

I need to build deep-links that can land a user to a specific page and context inside a Backendless mobile app (built using the Flutter mobile app shell)
Here is what already works and what I am looking to do :

  • I have configured both AndroidManifest.xml and iOS Xcode configuration files so that deep-linking works with the base URL (such as https://myapp.mydomain.com). This launches the app on the defined main page.
  • I am looking to open the app into a specific place, i.e. page and parameter included, such as UrlEncode(/index.html?page=mypage&data={“param”:“value”}).
  • Question is : how can I do so ? If I try combining both, such as https://myapp.mydomain.com?page=mypage&data=%7B"param"%3A"value"%7D, it does not work : the app launches at the default page.
  • I have not found any documentation on the proper syntax to do so, and would like to understand how I could achieve this.

(This is a follow-up to this ticket which is maybe a little old : Deep Linking Quastion - #4 by mark-piller)

Thanks for your support.

Hello @Nicolas_REMY

I’ve created an internal ticket BKNDLSS-30276 to investigate your question.

Regards

1 Like

Hi @viktor.liablin ,

Where do we stand on this subject ? I had first asked the question back in June and I will really need this feature soon : when providing notifications to a user, they expect to land in the right place in the app, not on the home page.

Thanks for the feedback

Hello, @Nicolas_REMY.

Yes you can achieve it now(So far only for iOS :frowning_face:). Steps to implement:

  • When your app is launched you need to register device for push notification(after user login in your case, I mean).
  • After that you must to add listener for on tap push action.
    This block called from this line. Additionally, implementation of this block. You can change name of event if you need or something else.
  • Then in implementation of this event(UI Builder side), you need to add blocks Go To Page that redirect you to page that you need.

This is implementation of event that redirect user to another page when he taps on push notification.

Important: Into push notification you need to put headers with parameters that specify page that you need to open when user taps on push.

If you have any questions - you are welcome :slightly_smiling_face:.
Best Regards, Nikita.

OK thanks for the quick feedback.

I think the explanation makes sense. So I will try to implement and come back here if I need help.

There is still the matter of Android. Any information on the timeframe there ? (I have about twice as many Android users as iOS users…)

I will check with the team about when we should expect a fix in Android-SDK.

1 Like

We don’t have a firm date yet for when this issue will be fixed. But this issue has a high priority, and will be fixed as soon as the developer is done with the current tasks.

Best Regards, Nikita.

1 Like

OK, so I have spent some time on this one and I haven’t managed to get it to work.

Step 1 is OK, my device appears as registered in the DeviceRegistration table.

It’s not really clear to me what I have to do in step 2 : my code has exactly the lines you point to in both web_view_container.dart and bridge_ui_builder_functions.dart. Should I be changing anything ? Sorry, it’s not really clear.

Then in step 3, based on what you’ve shown, here is what I implemented.

I have then launched the app, clicked on the button that launches this logic. And I have tried deep links with the following URL parameters :

  • ?page=test
  • ?data%3D%7B%22page%22%3A%22test%22%7D

I don’t really know what exact format is expected but none have seemed to work. I have not been taken to the test page when clicking on the deep link.

I accept your proposal to help a bit more :slight_smile:
Thanks !

Hello, @Nicolas_REMY.

Let’s try to figure out what was missing.
To start, what did output in console with print data?

Nothing at all… But I figured because it was on the mobile app I couldn’t get access to the console logs, right ?

So I tried modifying it this way :

Here is what I get in my logs :

So the registration for notifications is OK.

But now I’m trying to click on a link that does not come from a notification (not there yet !)

The links I click on point towards either of these :

(of course my.app.com is replaced with my own domain)

The app opens up OK. But it doesn’t change page when launched.

Any clue ?

You need default print, not Log Message. You can see outputs in IDE(Android Studio) where you ran your app.

Like this:

flutter: {message: ____onTapPushAction, messageLevel: 1}
flutter: {message: {"data":{"chatId":"CFAD2968-2765-4BA8-98EE-3E06EF851611","page":"messages","activeTab":null}}, messageLevel: 1}

I didn’t have anything either. I am using VS Code and there was nothing in the log there. That’s why I shifted to log.

I will try again but just to check the procedure again :

  • modify my Codeless logic
  • publish the app
  • download it
  • place it into my native mobile app shell
  • launch flutter run on an iPhone (not available on Android yet, right ?)
  • click on the button to launch the logic

This is all I get in the IDE console :

The Snapshotting lines happen when I switch over to my browser, then click on the deep link. Each time it returns to the running app, but no change of page.

Here is the logic used, with the default print lines.

I don’t get any _____onTapPushAction line, so it seems the native event listener is never launched :face_with_diagonal_mouth:

1 Like

Did you try to launch app on iOS?

I launched the app via flutter run as described above.
Should I try to build it entirely and install it on the phone ?
If I install it on the phone, will I be getting log info into the IDE ?

You already got logs:

But you haven’t got the log from event handler. It looks like the event is not being fired.

That’s also what I think.

When you run app, it rollouts on your iPhone or Android?

On iPhone, because you told me the event firing is not working on Android yet.

1 Like