File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function onNavigatedTo(args) {
3535 page . content = label ;
3636 args . object . off ( Page . navigatedToEvent , onNavigatedTo ) ;
3737
38- if ( parseInt ( platform . device . sdkVersion ) >= 23 ) {
38+ if ( platform . isAndroid && parseInt ( platform . device . sdkVersion ) >= 23 ) {
3939 let handler = ( args : application . AndroidActivityRequestPermissionsEventData ) => {
4040 application . android . off ( application . AndroidApplication . activityRequestPermissionsEvent , handler ) ;
4141 if ( args . requestCode === 1234 && args . grantResults . length > 0 && args . grantResults [ 0 ] === android . content . pm . PackageManager . PERMISSION_GRANTED ) {
Original file line number Diff line number Diff line change @@ -176,8 +176,13 @@ function printRunTestStats() {
176176 testFileContent . push ( "</testsuite>" ) ;
177177 testFileContent . push ( "</testsuites>" ) ;
178178
179- let testFilePath = fs . path . join ( android . os . Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) , "Documents" , "test-results.xml" ) ;
180- console . log ( "testFilePath =====>>>>>>> " + testFilePath ) ;
179+ let testFilePath : string ;
180+ let testResultsFileName = "test-results.xml" ;
181+ if ( platform . isIOS ) {
182+ testFilePath = fs . path . join ( fs . knownFolders . documents ( ) . path , testResultsFileName ) ;
183+ } else {
184+ testFilePath = fs . path . join ( android . os . Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) , "Documents" , testResultsFileName ) ;
185+ }
181186
182187 let testFile = fs . File . fromPath ( testFilePath ) ;
183188 testFile . writeTextSync ( testFileContent . join ( "" ) ) ;
You can’t perform that action at this time.
0 commit comments