Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
fix small issue (that's why you push code shrey)
Browse files Browse the repository at this point in the history
  • Loading branch information
dowhep committed Apr 5, 2019
1 parent d1fdf2b commit c1dc0e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions Droid/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="NRGScouting" android:theme="@style/MyTheme" android:icon="@drawable/icon"></application>
</manifest>
10 changes: 6 additions & 4 deletions NRGScoutingApp/Pages/Data Handling/ExportDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using Xamarin.Forms;
using System.Text;
using System.Net;
using Plugin.Permissions.Abstractions;
using Plugin.Permissions;

namespace NRGScoutingApp {
public partial class ExportDialog {
Expand Down Expand Up @@ -148,10 +150,10 @@ await Share.RequestAsync (new ShareTextRequest {
});
break;
default:
//var response = await CrossPermissions.Current.RequestPermissionsAsync (Permission.Storage);
//String fileDir = Path.Combine (Android.OS.Environment.GetExternalStoragePublicDirectory (Android.OS.Environment.DirectoryDownloads).ToString (), excelFileBase + ".csv");
//File.WriteAllText (fileDir, "");
//File.WriteAllText (fileDir, csvString);
var response = await CrossPermissions.Current.RequestPermissionsAsync(Permission.Storage);
String fileDir = Path.Combine(Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDownloads).ToString(), excelFileBase + ".csv");
File.WriteAllText(fileDir, "");
File.WriteAllText(fileDir, csvString);
break;

}
Expand Down

0 comments on commit c1dc0e5

Please sign in to comment.