나는 코도 바 응용 프로그램 (cordova -v 7.0.1, cordova-android 6.1.0)을 빌드했습니다.Android 7에서 Cordova WebView의 localStorage에 액세스 할 수 없습니까?
여기에는 자동 시작 기능이 포함되어 있습니다. 즉, 앱에서 블루투스 장치가 연결되면 앱이 시작됩니다.
이 이루어졌다 방법 : 로컬 스토리지 (file__0.localstorage)에
- 저장 bluetooths 주소 .// JS 측에 bluetooth.device.action.ACL_CONNECTED
- 브로드 캐스트 리시버. 우리의 로컬 저장 시작에 연결된 장치 일치하는 장치가 기본 측
이는 2016 년 말에 컴파일 그리고 심지어 새와 함께, 지금은 때까지 일했다, 현명한 소프트웨어를 app.// 경우 로컬 스토리지 (file__0.localstorage)를 검색, 장치.
앱 업데이트를하기로 결정했는데 이제는 작동이 멈췄습니다. 일부 디버깅 후 나는 file__0.localstorage를 읽을 수 없다는 것을 알았다. 이것은 내가 지금까지 가지고있는 것입니다 :
File dataDir = new File(context.getFilesDir().getParent());
File appWebViewFilesDir = new File(dataDir, "app_webview/Local Storage/file__0.localstorage");
Log.d(TAG, "Absolute path is " + appWebViewFilesDir.getAbsolutePath());
//Result (rooted phone): path is given.
//Result (UNrooted phone): path is given.
Log.d(TAG, "Fine name is " + appWebViewFilesDir.getName());
//Result (rooted phone): name is given.
//Result (UNrooted phone): name is given.
Log.d(TAG, "Is file Readable " + appWebViewFilesDir.canRead());
//Result (rooted phone): true.
//Result (UNrooted phone): false.
Log.d(TAG, "Tring to set file to readable? " +appWebViewFilesDir.setReadable(true));
//Result (rooted phone): true.
//Result (UNrooted phone): false.
Log.d(TAG, "Tring to set file to readable for all users? " + appWebViewFilesDir.setReadable(true, true));
//Result (rooted phone): true.
//Result (UNrooted phone): false.
Log.d(TAG, "Is file Readable " + appWebViewFilesDir.canRead());
//Result (rooted phone): true.
//Result (UNrooted phone): false.
Log.d(TAG, "Does this file exist " + appWebViewFilesDir.exists());
//Result (rooted phone): true.
//Result (UNrooted phone): false.
어떤 아이디어가 있습니까?
어떤 아이디어를 어떻게 장치를 루트하지 않고도 file__0.localstorage localStorage에 액세스 할 수 있습니까?
새로운 데이터 스토리지 시스템을 구현하지 않고도이를 해결할 수 있습니까?
P. 이 경우 데이터 지속성이 중요하지 않습니다.