aptos-labs / petra-wallet

Public issue tracker for Petra Wallet on Aptos
https://petra.app
95 stars 61 forks source link

Deep Linking to Mobile App #36

Open SupperChao opened 3 months ago

SupperChao commented 3 months ago

image !!! Write according to the document prompts, change the example link address, open the URL in the dapp, can not enter

bv-aptos commented 3 months ago

Can you provide more info. We need specific repro steps to understand a little better. Specifically, we are confused with 'can not enter'.

findmytrueself commented 3 months ago

It's the same issue for me.

I'm going to go to the app using the deep linking method shown in the document on the web page, and I'm going to make a user connection with the link address entered in the browser of the Petra app.

I don't know if it's a bug, but it doesn't go to the link address, only the main page appears. And when I manually enter the page address into Petra Wallet browser, I checked that the page comes out normally and even the connection part.

Sheharyarkhan1098 commented 2 months ago

I have this link to be opened in petra mobile app https://petra.app/explore?link=https://abc.xyz/abc

but it always opens https://petra.app/explore?link=https://abc.xyz only and ignore /abc part

findmytrueself commented 2 months ago

Which browser did you use that deep link?

When I test it on Safari or Chrome browser, the DeepLink doesn't work immediately, all I do is open the Petra app in that app store or play store.

However, I checked available deeplinking through the message received from Slack.

@Sheharyarkhan1098

Sheharyarkhan1098 commented 2 months ago

I have used it from chrome in android.

Cryptain-Harlock commented 2 months ago

How to connect with Petra mobile app via telegram?

bot.command("connect_wallet", (ctx) => {
  const connectData = base64Encode({
    request: "connect",
    dAppName: "MyDapp",
    description: "Connect to MyDapp to interact with Aptos assets.",
  });

  const walletDeepLink = `petra://api/v1/connect?data=${connectData}`;

  ctx.reply("Click below to connect your Petra Wallet:", {
    reply_markup: {
      inline_keyboard: [
        [{ text: "Connect Petra Wallet", url: walletDeepLink }],
      ],
    },
  });
});