|
4 | 4 | using Android.OS; |
5 | 5 | using Android.Runtime; |
6 | 6 | using Android.Webkit; |
7 | | -using AndroidX.Activity.Result; |
8 | | -using AndroidX.Activity.Result.Contract; |
9 | 7 | using AndroidX.AppCompat.App; |
10 | 8 | using AndroidX.Core.App; |
11 | 9 | using AndroidX.Core.Content; |
12 | 10 | using ComputerUtils.Android; |
13 | 11 | using ComputerUtils.Android.Logging; |
14 | 12 | using Google.Android.Material.Snackbar; |
15 | | -using Java.Interop; |
16 | 13 | using QuestAppVersionSwitcher.Core; |
17 | | -using System; |
18 | 14 |
|
19 | 15 | namespace QuestAppVersionSwitcher |
20 | 16 | { |
21 | | - public class ActivityCallback : Java.Lang.Object, IActivityResultCallback |
22 | | - { |
23 | | - public IntPtr Handle => throw new NotImplementedException(); |
24 | | - |
25 | | - public int JniIdentityHashCode => throw new NotImplementedException(); |
26 | | - |
27 | | - public JniObjectReference PeerReference => throw new NotImplementedException(); |
28 | | - |
29 | | - public JniPeerMembers JniPeerMembers => throw new NotImplementedException(); |
30 | | - |
31 | | - public JniManagedPeerStates JniManagedPeerState => throw new NotImplementedException(); |
32 | | - |
33 | | - public void Dispose() |
34 | | - { |
35 | | - throw new NotImplementedException(); |
36 | | - } |
37 | | - |
38 | | - public void Disposed() |
39 | | - { |
40 | | - throw new NotImplementedException(); |
41 | | - } |
42 | | - |
43 | | - public void DisposeUnlessReferenced() |
44 | | - { |
45 | | - throw new NotImplementedException(); |
46 | | - } |
47 | | - |
48 | | - public void Finalized() |
49 | | - { |
50 | | - throw new NotImplementedException(); |
51 | | - } |
52 | | - |
53 | | - public void OnActivityResult(Java.Lang.Object result) |
54 | | - { |
55 | | - throw new NotImplementedException(); |
56 | | - } |
57 | | - |
58 | | - public void SetJniIdentityHashCode(int value) |
59 | | - { |
60 | | - throw new NotImplementedException(); |
61 | | - } |
62 | | - |
63 | | - public void SetJniManagedPeerState(JniManagedPeerStates value) |
64 | | - { |
65 | | - throw new NotImplementedException(); |
66 | | - } |
67 | | - |
68 | | - public void SetPeerReference(JniObjectReference reference) |
69 | | - { |
70 | | - throw new NotImplementedException(); |
71 | | - } |
72 | | - |
73 | | - public void UnregisterFromRuntime() |
74 | | - { |
75 | | - throw new NotImplementedException(); |
76 | | - } |
77 | | - } |
78 | | - |
79 | 17 | [Activity(Theme = "@style/AppTheme", MainLauncher = true)] |
80 | 18 | public class MainActivity : AppCompatActivity |
81 | 19 | { |
82 | 20 | WebView webView; |
83 | 21 | protected override void OnCreate(Bundle savedInstanceState) |
84 | 22 | { |
85 | 23 | Android.Webkit.WebView.SetWebContentsDebuggingEnabled(true); |
86 | | - AndroidCore.launcher = RegisterForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityCallback()); |
87 | 24 | base.OnCreate(savedInstanceState); |
88 | 25 | Xamarin.Essentials.Platform.Init(this, savedInstanceState); |
89 | 26 | // Set our view from the "main" layout resource |
|
0 commit comments