android - ng-cordova geolocation plugin doesn't show gps icon in notification bar -
i using ng-cordova geolocation plugin functionality work fine except problem display gps symbol in notification bar.
any solution display gps symbol in notification bar when user enable gps button mobile device?
assuming ng-cordova geolocation plugin, switch on gps location. gps signal should automatically appear in notification bar. standard android os. in case have different launcher installed,it may not show it, thats launcher issue, may not update in real time.
if ng-cordova geolocation plugin, doesn't switch gps on need invoke following android code.
alertdialog.builder dialog = new alertdialog.builder(context); dialog.settitle(context.getstring(r.string.map_dialog_title)); dialog.setmessage(context.getstring(r.string.map_dialog_msg)); dialog.setpositivebutton(context.getstring(r.string.menu_settings), new onclicklistener() { @override public void onclick(dialoginterface dialog, int which) { intent intent = new intent(settings.action_location_source_settings); context.startactivity(intent); } }); dialog.setnegativebutton(context.getstring(r.string.cancel), new onclicklistener() { @override public void onclick(dialoginterface dialog, int which) { dialog.dismiss(); } }); dialog.show();
Comments
Post a Comment