Monaca Onsen UI Discord Chat Github Repo

Open GPS enable setting page of mobile in onsen UI

  • Open GPS enable setting page of mobile in onsen UI

    Hello Everyone ,

    I am facing a problem,someone Please help me.

    We are building hybrid application on onsen UI in Monaca IDE and using location service. Like in iOS Native app If Location service is disabled, the onsen app should show popup that will redirect to setting->privacy page. So that user can enable location service.

    i am able to detect that GPS is enable or not but i am unable to redirect to GPS enable page.someone please help me to redirect setting page in Android and IOS both.

    code is Below

    if (navigator.geolocation)

            function( position )
                if (Location_Marker)
                Location_Marker = Add_Marker(position.coords.latitude,position.coords.longitude,"Initial Position");
            function( error ){
                    **case error.PERMISSION_DENIED:**
                            console.log( "Permission Denied: ", error );
                            ons.notification.alert({message:'Please Enable GPS'});
                    **case error.POSITION_UNAVAILABLE:**
                            console.log( "POSITION_UNAVAILABLE: ", error );
                            ons.notification.confirm({message:'GPS signals are weak'});
                console.log( "Something went wrong: ", error );

    if Permission Denied i want to open mobile setting page so that user can enable GPS.