- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ejemplo (APP que pide una password y la envía a través de un formulario por método post)
Y en este PHP quiero detectar las coordenadas geográficas con la API de google, no funciona si lo pruebo instalando la APP en un móvil.
Pero si pruebo mi PHP en un navegador de un ordenador funciona perfectamente.
Existe algún encapsulado de la APP que me esté impidiendo que mi PHP funcione bien?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why are you trying to use php to detect the geolocation? You need to use the geolocation plugin that is available in the XDK, once you get the latlng back, you can send those somewhere of your choosing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that would be better but development can not be done entirely in XDK given the dynamics cacterísticas it.
Therefore only the main page goes inside the APP and the rest is on a server with PHP.
Hence the question, whether this affects encapsulating the app to external PHP does not have the capacities to 100%
Si, eso seria mejor pero el desarrollo no se puede hacer integramente en XDK dadas las cacterísticas dinámicas del mismo.
Por eso solamente la pagina principal va dentro de la APP y el resto está en un servidor con PHP.
De ahi la pregunta formulada, si afecta esto por el encapsulamiento de la app a que los PHP externos no tengan las capacidades al 100%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Not working" - not working how exactly? From what you have described, you may be asking one of several items. These seem like the most likely cases:
- Mobile app cannot successfully call server-side code
- ...and the server never received a request from the client
- ...but the server seems to get the request from the client.
- Mobile app connects to server side code, geolocation code executes but an incorrect location is returned.
- Mobile app connects to server side code, geolocation code fails on the server side.
Could you let the thread know which of these, or something else, you mean by "not working"?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The application reduces the flow passing data to a PHP page on the server which verifies the data and calls a page of options, the latter encodes geo location.
INDEX.HTML (app) method send post to http: //xxx/verify.php (server)
verify.php processes the data and load menu.php
In menu.php this code storing geo location coordinates.
If I access by browser menu.php detects and stores the coordinates correctly, but if it is accessed from the menu.php application does not detect the coordinates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know where is the problema...
In my menu.php have JavaScript.
In this say Windows.location.href = xxxxxxx
In browser work fine, but from App not work (not call href)
This is the problema, why???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code is...
<script src="geo.js" type="text/javascript"></script>
<script>
function detectar(){
if(geo_position_js.init())
{
geo_position_js.getCurrentPosition(mostra_ubicacion,function(){enableHighAccuracy:true});
} else {
document.write('Error en la posición');
}
}
function mostra_ubicacion(p){
var coords = ""+p.coords.latitude + "," + p.coords.longitude+"";
location.href = "localizar.php?lat="+p.coords.latitude.toFixed(5)+"&lng="+p.coords.longitude.toFixed(5);
}
</script>
Call detectar() function from HTML
<script>
detectar();
</script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think use cookies JavaScript and read with php.
In browser work fine, but from App Intel xdk not work...
Why Windows.location.href or cookies in JavaScript not work in Intel xdk ????
This is the problem for robust Project...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's correct.
Is my post, same question send to support.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page