How to open app from browser?

eduardk 46 Reputation points
2021-01-16T10:33:09.887+00:00

When a user try to register in my app a confirmation email is sent to him to confirm that he is the holder of the email address, when he clicks the link in the browser I want automatically open my app.

I tried to use this example

but receiving an error
Java.Lang.RuntimeException
Message=Unable to instantiate activity ComponentInfo{com.companyname.appname/appname.Droid.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "appname.Droid.MainActivity" on path: DexPathList[[zip file "/data/app/com.companyname.appname-rPtplP6Nx2BE6ywnQEiSJg==/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname.appname-rPtplP6Nx2BE6ywnQEiSJg==/lib/arm64, /data/app/com.companyname.appname-rPtplP6Nx2BE6ywnQEiSJg==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,716 Reputation points Microsoft External Staff
    2021-01-18T08:03:53.137+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    Unable to instantiate activity ComponentInfo{com.companyname.appname/appname.Droid.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "appname.Droid.MainActivity"

    You can try to open up your MainActivity and within the ActivityAttribute on your MainActvity class, add a fully qualified name within a Name parameter of that attribute, this will force the Xamarin.Android build process to use a Java-class name of your choosing vs. the MD5-based one and thus it will match your manifest entry.

    Example:

    [Activity(Name = "MyApp.Mobile.Droid.MainActivity", Label = "MyApp", MainLauncher = true, Icon = "@mipmap/icon")]  
    public class MainActivity : Activity  
    {  
    //...  
     }  
    

    For more details, you can check: https://learn.microsoft.com/en-us/xamarin/android/platform/android-manifest

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.