ElDorado
Aspiring developer
Profile
Posts: 41
Reg: Mar 25, 2013
Dallas
410
10/16/13 12:51 PM (10 years ago)

Geolocation, Webview vs Chromeclient

Guys, I have an android app that calls a customURL link. This link uses the geolocation feature to pull up the location. This geolocation call doesn't work on Android (works on iOS) and the user nevers get prompted to share the location. From reading through some of the forum topics - - navigator.geolocation doesn't work in the webviewClient that BT_Screen_CustomURL uses. - David mentioned about changing webviewclient to ChromeClient from BT 1.5 onwards but I don't see this change has happened in the code. Any ideas how to do this so that the geolocation prompts the use to allow for location sharing?
 
ElDorado
Aspiring developer
Profile
Posts: 41
Reg: Mar 25, 2013
Dallas
410
like
10/16/13 07:47 PM (10 years ago)
I made this work by following the postings on this website. http://turbomanage.wordpress.com/2012/04/23/how-to-enable-geolocation-in-a-webview-android/ I made the changes to the BT_Screen_CustomURL and now Android URLs work with geolocation. Let me know if you would like the BT_Screen_CustomURL.java.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/18/13 04:47 PM (10 years ago)
Nice sleuthing!
 
jerryhopper
Lost but trying
Profile
Posts: 2
Reg: Nov 01, 2013
maassluis
520
like
11/02/13 03:26 AM (10 years ago)
@ ElDorado im interested in that BT_Screen_CustomURL.java.
 
ElDorado
Aspiring developer
Profile
Posts: 41
Reg: Mar 25, 2013
Dallas
410
like
11/03/13 06:42 AM (10 years ago)
Here is the link from where you can download the fix for BT_screen_customURL.java https://drive.google.com/file/d/0BzRLVx04bQ-NWlNPd3RFY0lsTW8/edit?usp=sharing
 
wva
Code is Art
Profile
Posts: 10
Reg: Feb 11, 2013
drunen
500
like
03/20/14 11:21 AM (10 years ago)
hey eldorado i have the same probs so i used your code i replaced the packagename but i get a whole list of problems in red. is this version for the new build? and if not do you have a fix for the current one ?
 
ElDorado
Aspiring developer
Profile
Posts: 41
Reg: Mar 25, 2013
Dallas
410
like
03/20/14 02:28 PM (10 years ago)
I think my version might be for the older BT. You might have to do a merge of the code. Use a code diff tool to merge the my file with the new version from BT instead of just dropping it in. The version I have is for the
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.