在Android Marshmallow中,用户在应用程序运行时向应用程序授予权限,而不是在他们安装应用程序时如何在离线时检查和授予运行时的Permissons?
我想用离子构建移动应用程序,首先用户是地理位置我想每2秒更新一次他的位置这是地理位置的代码
$scope.makeFit = function() {
leafletData.getMap().then(function(map) {
map.locate({setView: true, maxZoom: 16});
var marker;
function onLocationFound(e) {
marker= new L.Marker(e.latlng);
marker.addTo(map)
.bindPopup("" + e.latlng + " ");
}
map.on('locationfound', onLocationFound);
});
};
Run Code Online (Sandbox Code Playgroud)