Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17197] Android: Geolocation is not turning on in Webview

GitHub Issuen/a
TypeBug
PriorityHigh
StatusIn Review
ResolutionUnresolved
Affected Version/sRelease 3.2.2, Release 3.2.3, Release 3.3.0
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, hudder
ReporterRamesh RAMAMURTHY
AssigneeUnknown
Created2014-06-15T05:56:42.000+0000
Updated2018-02-28T20:03:52.000+0000

Description

Problem Description

The geolocation bug which used to exist in version 3.0.0 (TIMOB-4982) has been reintroduced in version 3.2.0 The last working good version is 3.1.3. .

Test Case

1. Create a new mobile project (classic) 2. Paste this to app.js 3.
//var URL="http://maps.google.com/maps?saddr=39.745740, -104.985757&daddr=39.740368, -104.981938";
var URL = "http://maps.google.com";
var tWebView = Ti.UI.createWebView({
	url:URL,
	top:0, 
	left:0,
});

var WWWwindow = Titanium.UI.createWindow({
	backgroundColor:'#E0E0E0',
	navBarHidden:true}
);
WWWwindow.add(tWebView);
WWWwindow.open();
4. The map never ask for permission for the GPS access, not even if the user presses the location icon google will briefly flash "Location could not be identified"

Extra information

Use case: When we open a html5 page that as a geolocation titanium does not give access to GPS on the device.

Attachments

FileDateSize
tiapp.xml2014-10-10T03:53:47.000+00002356

Comments

  1. Ingo Muschenetz 2014-06-24

    We will investigate this in an upcoming sprint.
  2. Ramesh RAMAMURTHY 2014-07-26

    Is it possible to get an eta on this issue? this is a show stopper for us and there are fixes in 3.2 and 3.3 that we need to use. thanks Ramesh
  3. Ramesh RAMAMURTHY 2014-08-15

    Can we please get a status on when we can expect the fix for this? We got to go live and we are stuck due to this issue. I hope you can accommodate this in the upcoming release.
  4. jithinpv 2014-08-27

    Issue reproduces Titanium SDK version 3.4.0 master, 3.3.0.GA, 3.2.3.GA, 3.2.2.G.A Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4
  5. Ramesh RAMAMURTHY 2014-09-18

    May I have an update on this issue. We are really very desperate for a fix for this issue. It was rather sad to note that a decision was taken to move it out of sprint 19 and be put in backlog. Can we please have a fix for this or atleast an ETA? I wish I knew how to help you to get this addressed.
  6. Thiru 2014-09-21

    Can you please give an ETA on this issue? I am waiting for a fix on this as well.
  7. Thiru 2014-10-03

    Hi Ingo, When can I have a fix for this issue? Please respond. Thanks!
  8. Chee Kiat Ng 2014-10-08

  9. Ramesh RAMAMURTHY 2014-10-08

    I tried it and it does not work. I actually already had it in my TAPPIxml .I tried with 3.4 GA. My settings were exactly same as what was described to Chee
  10. Chee Kiat Ng 2014-10-09

    This is the environment I got this working: Galaxy S5 (actual device) android 4.4.2 Titanium SDK 3.4.0GA CLI 3.4.0 May I know yours [~rramesh1] I'll investigate further
  11. Ramesh RAMAMURTHY 2014-10-10

    Nexus 4, 5 and 7(2012) android 4.4.4 ti 3.4 GA Can you please send me the TAPPI.XML you are using.
  12. Chee Kiat Ng 2014-10-10

    [~rramesh1] added attachment. I tried to get this to work on simulator (the default titanium_1_WVGA800) Initially I can't get it to work but, by following these steps: 1. Either use geo fix through telnet localhost or ddms in android sdk tools, to mock up a location for the emulator 2. Open google maps app on the emulator. There will be some agreement page but you can just close it, as long as a pin appears on the status bar. The pin will disappear after closing the google maps app but it's ok. 3. go back to the sample app built on titanium, and the map will move to your mock up location and show a blue dot. I'm guessing that the mockup location only gets registered on the emulator when google maps is instantiated. However when i tried the sample app on the physical device, I didn't have to do the above steps to get it to work. To summarize, I only modified tiapp.xml and got the geolocation working on both emulator and device.
  13. Ramesh RAMAMURTHY 2014-10-10

    I tried exactly what you did with the tiapp.xml that you have attached to the ticket. and GeoLocation does not turn on. google maps states "your location could not be determined"
  14. Ramesh RAMAMURTHY 2014-10-10

    If you are using Google maps it does not show the message right away, you will have to click on the icon for it to find your location. Then you will see the message. if you didn't click on the icon it might lead you to think that it is working.
  15. Chee Kiat Ng 2014-10-13

    I screen recorded the steps to get this working, you can obtain the link from below. https://drive.google.com/file/d/0B5kns9m6-03wajB6LXdoYS0xbFk/view?usp=sharing The steps shown were: 1. From studio, launch sample app, in my case, TIMOB17197. 2. You will see that as expected "your location cannot be determined" 3. Run ddms (in androidsdk->tools folder), select the simulator instance, choose emulator control, and send any longitude latitude 4. Run google maps (I'm guessing by doing so the device 'captures' the sent longitude latitude) 5. Close it and go back to TIMOB17197, it'll work. **Note** When I run this app on a physical device,I DID NOT have to follow the above steps and it just works. I hope this video helps, at least to make sure everyone's on the same page then we can investigate further. Pardon the speed of the video.
  16. Ramesh RAMAMURTHY 2014-10-25

    do you think there could be a diffrence between MAC and Windows for this bug. I can reproduce this bug when I run out of Windows. I will checkout Mac When I get a chance
  17. Chee Kiat Ng 2014-11-05

    There maybe a difference. I just had the opportunity to try this on a windows platform. It works fine on the physical android device, but fails on simulator.

JSON Source