stadtnavi / stadtnavi_app

The model project for networked mobility in Herrenberg
https://stadtnavi.de/
GNU General Public License v3.0
6 stars 2 forks source link

RegioRad Bike-Sharing Deeplink does not open RegioRad App #319

Open hbruch opened 1 year ago

hbruch commented 1 year ago

Describe the bug RegioRad Bike-Sharing Deeplink does not open RegioRad App

To Reproduce

Prerequisites Have the regiorad app installed Andorid: "https://play.google.com/store/apps/details?id=de.regiorad.stuttgart" iOS: "https://apps.apple.com/app/apple-store/id1348295749"

Steps to reproduce the behavior:

  1. Enable Sharing Layer
  2. Click on a bike sharing station in the map
  3. Click on the booking link
  4. The regiorad webpages opens, but not the regiorad App

Expected behavior The regiorad app should open with the number of a bike prefilled.

Screenshots

image

Smartphone (please complete the following information):

Denis306 commented 1 year ago

Hi @hbruch, we found the problem and would suggest to do Solution 1. Let me know what you think.


SOLUTION 1: @hbruch changes the URL in the GraphQL calls and @GustavoTCh just needs to use that for the prompt.

We did a little investigation and it seems that the graphql call in the web is an old one that uses a hyphen: Old Link: https://www.regiorad-stuttgart.de/qrcode/bike?number=21835 image

The working links that we found based on the RegioRad Stuttgart App Registration are the following: New Links: https://www.regioradstuttgart.de/google/bike?number=21325 or https://www.regioradstuttgart.de/qrcode/bike?number=21325

Could you change that in the backend so that the graphql calls are based on the correct links? That way @GustavoTCh just needs to always use that link from the call for the app prompt.


SOLUTION 2: @GustavoTCh hard codes the URL and does some RegEx to fetch the bike ID.

We are already using a GraphQL call that provides an ID of a bike as you can see on the screenshot. image

The link used in the graphql call is an old one which is why we should use the one we talked about: "https://www.regioradstuttgart.de/google/bike?number="

The graphql call always provides one bike id of an available bike (as you can see in the screenshot). So we can use that id to add it to the link so when the Regiorad Stuttgart application opens, there is an ID already available. The id in the graphql call will always change so you will have to always check for the id first befor prompting out of the app.

This means, that the final URL that you need to use should look like this with the id from the screenshot: "https://www.regioradstuttgart.de/google/bike?number=21835"