0
$scope.openMaps = function() {
if (aboutData.Address) {
$scope.location = cordova.InAppBrowser.open('http://maps.google.com/?q=' + aboutData.Address + ' ' + aboutData.City + ', ' + aboutData.State, '_system', 'location = yes');
}
else {
$scope.location;
var alertPopup = $ionicPopup.alert({
title: 'Error:',
template: 'A location was not found!'
});
}
}
위의 기능은 버튼을 클릭 할 때 호출됩니다. 앱이 기기에있는 경우 Google지도 앱에서 URL을 엽니 다 (Android 인 경우). 그렇지 않으면 앱 브라우저 플러그인에서 코드 바를 사용하여 기기 웹 브라우저에서 앱을 엽니 다.코도 바 InAppBrowser 충돌 응용 프로그램
올바른 위치의지도 앱을 여는 Android에서 오류가 발생하며 앱으로 돌아 가려 할 때 오류가 발생합니다. 이것은 오류입니다 :
net::ERR_FILE_NOT_FOUND(file:///android_asset/www/*longfilepath*)
어떤 도움을 주실 수 있나요?
바로 여기, 왜이 위치를 사용하고 있습니까? file : /// android_asset/www/* longfilepath *). 안드로이드는 그 파일을 필요로하지 않습니다 : //// 접두사, 그렇게 할 수 있다면, 사용중인 값에서 substring (8)을 제거하십시오. 나는 그것이 잘 계산하면 8이라고 믿습니다. android_asset/www/* longfilepath *로 시작해야합니다. – Marko