Load GPX file in OruxMaps via intent
3 posters
Load GPX file in OruxMaps via intent
Hello,
I'm developing an APP which can generate GPX files.
According to the OruxMaps documentation i can load such a GPX file in OruxMaps via Intent.
Unfortunately i didn't succeed to load a GPX file in OruxMaps via Intent.
If i use: startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.fromFile(f)));
I get the message: No Activity found to handle Intent ...
Via Astro File manager i linked the GPX extention to MIME type "application/gpx", "application/x-navimap" and i tried some other variants.
If i use: startActivity(new Intent("com.oruxmaps.VIEW_MAP_ONLINE").setData(Uri.fromFile(f)));
OruxMaps is started, but the GPX file isn't loaded.
I hope You van help me how to load a GPX file in OruxMaps using an Intent.
I'm developing an APP which can generate GPX files.
According to the OruxMaps documentation i can load such a GPX file in OruxMaps via Intent.
Unfortunately i didn't succeed to load a GPX file in OruxMaps via Intent.
If i use: startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.fromFile(f)));
I get the message: No Activity found to handle Intent ...
Via Astro File manager i linked the GPX extention to MIME type "application/gpx", "application/x-navimap" and i tried some other variants.
If i use: startActivity(new Intent("com.oruxmaps.VIEW_MAP_ONLINE").setData(Uri.fromFile(f)));
OruxMaps is started, but the GPX file isn't loaded.
I hope You van help me how to load a GPX file in OruxMaps using an Intent.
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
Re: Load GPX file in OruxMaps via intent
Marcel wrote:Hello,
I'm developing an APP which can generate GPX files.
According to the OruxMaps documentation i can load such a GPX file in OruxMaps via Intent.
Unfortunately i didn't succeed to load a GPX file in OruxMaps via Intent.
If i use: startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.fromFile(f)));
I get the message: No Activity found to handle Intent ...
Via Astro File manager i linked the GPX extention to MIME type "application/gpx", "application/x-navimap" and i tried some other variants.
If i use: startActivity(new Intent("com.oruxmaps.VIEW_MAP_ONLINE").setData(Uri.fromFile(f)));
OruxMaps is started, but the GPX file isn't loaded.
I hope You van help me how to load a GPX file in OruxMaps using an Intent.
Hi, Marcel;
this should work:
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(new
File("/mnt/sdcard/test.gpx")),"text/xml");
startActivity(i);
there are more options, take a look to the OruxMaps manual (at the end). -->http://www.oruxmaps.com
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Re: Load GPX file in OruxMaps via intent
Hello Orux,
Thank You for Your quick response.
I seem not to succeed to link GPX files to OruxMaps.
I tried Your solution but keep getting the message: No Activity found to handle Intent ...
Is a solution possible directing the Intent directly to OruxMaps via "com.oruxmaps.VIEW_GPX" or something like that?
Thanks and kind regards,
Marcel
Thank You for Your quick response.
I seem not to succeed to link GPX files to OruxMaps.
I tried Your solution but keep getting the message: No Activity found to handle Intent ...
Is a solution possible directing the Intent directly to OruxMaps via "com.oruxmaps.VIEW_GPX" or something like that?
Thanks and kind regards,
Marcel
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
Re: Load GPX file in OruxMaps via intent
Marcel wrote:Hello Orux,
Thank You for Your quick response.
I seem not to succeed to link GPX files to OruxMaps.
I tried Your solution but keep getting the message: No Activity found to handle Intent ...
Is a solution possible directing the Intent directly to OruxMaps via "com.oruxmaps.VIEW_GPX" or something like that?
Thanks and kind regards,
Marcel
Hi, Marcel,
which android version do you use?
Intent i=new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(new File("/mnt/sdcard/test.gpx")),"text/xml");
startActivity(i);
finish();
is working fine with some applications, tested with 2.1 and 2.3.4, check that you use "text/xml" type.
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Re: Load GPX file in OruxMaps via intent
Hello Orux,
Thank You for helping me.
I use Android 2.2.1 (ZTE Blade).
How can i reach the screen You included, i can't find it up till now (nor in OruxMaps as in Astro File Manager.
Thank You and kind regards,
Marcel
Thank You for helping me.
I use Android 2.2.1 (ZTE Blade).
How can i reach the screen You included, i can't find it up till now (nor in OruxMaps as in Astro File Manager.
Thank You and kind regards,
Marcel
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
Re: Load GPX file in OruxMaps via intent
Marcel wrote:Hello Orux,
Thank You for helping me.
I use Android 2.2.1 (ZTE Blade).
How can i reach the screen You included, i can't find it up till now (nor in OruxMaps as in Astro File Manager.
Thank You and kind regards,
Marcel
Hi, Marcel;
This is the screen that android should display if there are more than one application waiting for the intent.
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Re: Load GPX file in OruxMaps via intent
Marcel wrote:Hello Orux,
Thank You for helping me.
I use Android 2.2.1 (ZTE Blade).
How can i reach the screen You included, i can't find it up till now (nor in OruxMaps as in Astro File Manager.
Thank You and kind regards,
Marcel
With astro you have to set the mime type, I think.
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Re: Load GPX file in OruxMaps via intent
Hi Orux,
Still no success, I'm pretty sure i tried this combination Intent/mimetype already, but to be sure i tried it again.
I still keep the error-message: No Activity found to handle Intent...
It seems my phone hasn't a link between OruxMaps and gpx (text/xml) and i have no idea how to create such a link.
You defined an intent-filter in the OruxMaps AndroidManifest.xml for "text/xml"?
Thanks and kind regards,
Marcel
Still no success, I'm pretty sure i tried this combination Intent/mimetype already, but to be sure i tried it again.
I still keep the error-message: No Activity found to handle Intent...
It seems my phone hasn't a link between OruxMaps and gpx (text/xml) and i have no idea how to create such a link.
You defined an intent-filter in the OruxMaps AndroidManifest.xml for "text/xml"?
Thanks and kind regards,
Marcel
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
Re: Load GPX file in OruxMaps via intent
Marcel wrote:Hi Orux,
Still no success, I'm pretty sure i tried this combination Intent/mimetype already, but to be sure i tried it again.
I still keep the error-message: No Activity found to handle Intent...
It seems my phone hasn't a link between OruxMaps and gpx (text/xml) and i have no idea how to create such a link.
You defined an intent-filter in the OruxMaps AndroidManifest.xml for "text/xml"?
Thanks and kind regards,
Marcel
Strange,
yes, OruxMaps uses a filter:
<data android:mimeType="text/xml" android:scheme="file"
android:host="*" android:pathPattern=".*\\.gpx" />
Try with this dummy application: http://www.oruxmaps.com/ss.zip
If it does not open OruxMaps, we or your device have a problem. It works with all my androids, from 1.6 to 2.3.4, including emulator.
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Re: Load GPX file in OruxMaps via intent
Hi Orux,
I'm apperently doing something wrong, Your example works OK.
I'm using Appcelerator Titanium to develop my APP.
In theory it should make no difference, now i know it does...
Thank You for helping me, i will search further to find a solution.
Kind regards,
Marcel
I'm apperently doing something wrong, Your example works OK.
I'm using Appcelerator Titanium to develop my APP.
In theory it should make no difference, now i know it does...
Thank You for helping me, i will search further to find a solution.
Kind regards,
Marcel
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
Re: Load GPX file in OruxMaps via intent
Hi Orux,
This is the complete errormessage i get when start an intent:
Of course i will search myself to find a solution, but maybe You have an idea what i'm doing wrong.
Thanks and kind regards,
Marcel
This is the complete errormessage i get when start an intent:
Of course i will search myself to find a solution, but maybe You have an idea what i'm doing wrong.
Thanks and kind regards,
Marcel
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
Re: Load GPX file in OruxMaps via intent
Marcel wrote:Hi Orux,
This is the complete errormessage i get when start an intent:
Of course i will search myself to find a solution, but maybe You have an idea what i'm doing wrong.
Thanks and kind regards,
Marcel
Hi, Marcel;
I do not know; some ideas:
1.-Where is the gpx file? If inside your apk (assets) you should copy the file to the android file system.
2.-May be Appcelerator wraps the Intents?
3.-Use my dummy application as a proxy Activity. You can put it inside your application, then call it with an internal Intent.
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Re: Load GPX file in OruxMaps via intent
Hi Orux,
Thamks again for Your great help!
Unfortunately I have now little time to continue with the APP.
It seems Appcelerator Titanium has a problem as soon You set data and type of an Intent.
As You stated i can always use Your example as a Proxy.
If i find a solution, i will post a reply withh the solution.
Kind regards,
Marcel
Thamks again for Your great help!
Unfortunately I have now little time to continue with the APP.
It seems Appcelerator Titanium has a problem as soon You set data and type of an Intent.
As You stated i can always use Your example as a Proxy.
If i find a solution, i will post a reply withh the solution.
Kind regards,
Marcel
Marcel- Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24
GPX TO ORUXMAPS ROUTE CONVERSION
Surely there´s got to be an easier way to make a standard .gpx file readable by OruxMaps for the layman?
You have such a good conversion interface in OruxDesktop,why not prepare a similar facility for .gpx files?
I have placed a standard .gpx file in the Tracklog directory but OruxMaps does not see it,only a couple of .dbs
files created by OruxMaps earlier.
Tore
You have such a good conversion interface in OruxDesktop,why not prepare a similar facility for .gpx files?
I have placed a standard .gpx file in the Tracklog directory but OruxMaps does not see it,only a couple of .dbs
files created by OruxMaps earlier.
Tore
sinbad7- Cantidad de envíos : 16
Fecha de inscripción : 2012-06-18
Similar topics
» Loading .KMZ files in Oruxmaps
» help: possible intent
» ORUXMAPS FILE NAMING PROBLEM
» Oruxmaps/Android didnt show pictures (related to POI's) on KML Route / Track created by googleMaps imported as KML File
» Convert a file Oruxmap.db in a free and open file
» help: possible intent
» ORUXMAPS FILE NAMING PROBLEM
» Oruxmaps/Android didnt show pictures (related to POI's) on KML Route / Track created by googleMaps imported as KML File
» Convert a file Oruxmap.db in a free and open file
Permissions in this forum:
You cannot reply to topics in this forum