Closed
Bug 836678
Opened 13 years ago
Closed 13 years ago
[GPS] callback error when GPS application is included outOfProcessBlackList "window_manager.js"
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: leo.bugzilla.gecko, Assigned: kanru)
Details
for mass production test, make to test application.
We have issues,
App in Gaia calls,
"navigator.geolocation.watchPosition(function(position)".
But Return nothing(We expect to return position inpormation).
We think cause that test app is included outOfProcessBlackList "window_manager.js".
Could you recommand to way to return 'positin information', when test app app is included outOfProcessBlackList?
| Assignee | ||
Comment 1•13 years ago
|
||
Do you mean that if you put the test app into the outOfProcessBlackList it will not receive any geolocation callback?
Did you provide a error callback for it? A simplified example app or patch would be very helpful.
| Reporter | ||
Comment 2•13 years ago
|
||
Do you mean that if you put the test app into the outOfProcessBlackList it will not receive any geolocation callback? -> Yes
For Mass Production Test, unavoidably put into the outOfProcessBlackList. But, It is occur side effect, GPS function of Mass Production Test do not geolocation callback.
I'm sorry, don'y provide test app bucause security..but, share the GPS code.
This code is basic code, simply call "navigator.geolocation.watchPosition".
---------------------------------------------------------------------------
function getFixes()
{
if(document.getElementById('starstptbtn').innerHTML == "Start")
{
init();
document.getElementById('starstptbtn').innerHTML = "Stop";
document.getElementById('request').innerHTML = "";
//wpid = navigator.geolocation.watchPosition(geo_success, geo_error, {enableHighAccuracy:true, maximumAge:30000, timeout:27000});
if ("geolocation" in navigator)
{
wpid = navigator.geolocation.watchPosition(function(position) {
updateGPS(position);
//do_something(position.coords.latitude, position.coords.longitude);
},function(error) {
alert("Erroro Code :" + error.code + "[" + error.message.toString() + "]");
clearfixes();
},{enableHighAccuracy:true, maximumAge:300000, timeout:270000});
}
}
else
{
clearfixes();
}
}
function updateGPS(position)
{
fixcount++;
document.getElementById('fixcnt').innerHTML = fixcount.toString();
if(fixcount=='1')
document.getElementById('ttff').innerHTML = i.toString() + Seconds;
document.getElementById('futc').innerHTML = position.timestamp.toString();
document.getElementById('latlong').innerHTML = position.coords.latitude.toString() + "," +
position.coords.longitude.toString() + "," +
position.coords.altitude.toString() + "," +
position.coords.heading.toString() + "," +
position.coords.speed.toString() + "," +
position.coords.accuracy.toString();
}
----------------------------------------------------------------------------
Test debug log,
"02-01 04:42:09.359: E/GeckoConsole(116): [JavaScript Error: "Error: Permission denied for <app://hiddenmenu.example.com> to get property UnnamedClass.timestamp" {file: "app://hiddenmenu.example.com/Src/GPSTest/gpsAppMainMenu/GPSTracking/ConnectionTest.js" line: 70}]"
-> point to code "document.getElementById('futc').innerHTML = position.timestamp.toString();"
| Reporter | ||
Comment 4•13 years ago
|
||
Thank you for sparing your time.
Could you let me know the progress of this case?
Thanks
| Assignee | ||
Comment 5•13 years ago
|
||
I was unable to reproduce this.
What I tested:
1. Put "Geoloc" into outOfProcessBlackList
2. Check it does not show in b2g-ps
3. Click "Start" and it starts to get location information
Note that you have to add "geolocation" to the permission section of app manifest.
| Reporter | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•