-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActivity2.cs
46 lines (34 loc) · 1.06 KB
/
Activity2.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using Android;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Support.V4.App;
using System;
using System.IO;
namespace mania4key_v2
{
[Activity(Label = "lyb!mania2nd"
, MainLauncher = true
, Icon = "@drawable/icon"
, AlwaysRetainTaskState = true
, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance)]
public class Activity1 : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
{
readonly string[] perms =
{
Manifest.Permission.ReadExternalStorage,
Manifest.Permission.WriteExternalStorage
};
const int RequestLocationId = 0;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
if (Build.VERSION.SdkInt >= Build.VERSION_CODES.M)
{
ActivityCompat.RequestPermissions(this, new String[] { Manifest.Permission.WriteExternalStorage }, 0);
}
}
}
}