Created
September 28, 2017 20:24
-
-
Save e23z/d8045879412774de6af014f1bb21ae44 to your computer and use it in GitHub Desktop.
[App Custom Scheme] How to create a custom scheme for mobile apps. #xamarin #mobile #android #app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Android.App; | |
| using Android.Content; | |
| using Android.OS; | |
| namespace CleanMyTwitter.Android { | |
| [Activity(Label = "SchemeActivity", NoHistory = true)] | |
| [IntentFilter(new[] { Intent.ActionView }, Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable }, DataSchemes = new[] { "http", "https" }, DataHost = "myurl.com", AutoVerify = true)] | |
| public class SchemeActivity : Activity { | |
| protected override void OnCreate(Bundle savedInstanceState) { | |
| base.OnCreate(savedInstanceState); | |
| } | |
| protected override void OnResume() { | |
| base.OnResume(); | |
| Finish(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment