How can i enable GPS when splash screen loading?

I need to know how could do the permission when splash screen loading itself asking the permission of enabling GPS in ionic app…I tried but initially device location permission is enabling and then started the GPS. How can i do that?