앱을 종료하지 않고 위치 서비스 알림을 다시 호출하여 설정 페이지로 이동할 수 있습니까? 일부 사용자는 팝업을 받으면 '허용하거나 허용하지 않음'을 선택해야하는지 여부는 알지 못합니다. 문제의 해결책.위치 서비스 알림
1
A
답변
4
사용자에게 위치 서비스 상태를 알리려는 경우 사용자가 자신의 위치 서비스 상태를 알리고 사용자를 설정 페이지로 이동할 수 있습니다.
- (void) showLocationAlert {
if ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorized) {
//Check whether Settings page is openable (iOS 5.1 not allows Settings page to be opened via openURL:)
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]]) {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:@"You must enable location service,Turn on location service to allow \"YourApp\" to determine your location" delegate:self cancelButtonTitle:@"Settings" otherButtonTitles:@"Cancel", nil];
[alert show];
}
else {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:@"You must enable location service" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alert show];
}
}
}
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];
}
}
+0
고마워요!이게 내 해결책일지도 몰라 – user1531399
0
불행히도, 장치가 Jailbroken이 아닌 이상 그렇게 할 수 없습니다. 그러나 사용자를 설정 창에서 올바른 영역으로 라우팅하는 것은 비교적 간단합니다.
+0
고마워요. 남자 ^^ – user1531399
관련 문제
- 1. 위치 서비스 변경 알림?
- 2. 위치 서비스 iOS 알림 콜백
- 3. 모든보기 위에 위치 서비스 알림 표시
- 4. 위치 서비스 알림보기
- 5. 위치 서비스 내부 서비스
- 6. 현재 위치 알림 액세스
- 7. 위치 인식 푸시 알림 (
- 8. 알림 창 위치
- 9. GPS 위치 변경 알림
- 10. Android 위치 인식 알림
- 11. iOS의 위치 정보 알림
- 12. 위치 변경 알림 android
- 13. 위치 기반 로컬 알림
- 14. 애플 푸시 알림 서비스
- 15. J2ME SMS 알림 서비스
- 16. 퍼핏 알림 서비스 오류
- 17. BB 푸시 알림 서비스
- 18. 애플 푸시 알림 서비스
- 19. 전자 메일 알림 서비스
- 20. 애플 푸시 알림 서비스
- 21. Apple 푸시 알림 서비스
- 22. 서비스 타이머 알림
- 23. 애플 푸시 알림 서비스
- 24. 푸시 알림 서비스
- 25. 명령 프롬프트에서 Windows 8 알림 서비스 알림
- 26. 애플 푸시 알림 서비스, 함께 그룹 알림
- 27. C# windows 서비스 위치
- 28. 위치 네트워크 서비스
- 29. 위치 서비스 테스트
- 30. 위치 서비스 중지
정확히 무엇을 요구하고 있습니까? 위치 액세스를 수정하기 위해 사용자를 설정 페이지로 연결하려는 경우 더 이상 설정할 수 없습니다. 이 질문을보십시오 : http://stackoverflow.com/questions/9627451/how-to-open-preferences-settings-with-ios-5-1 – johngraham