OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Join the forum, it's quick and easy

OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>
OruxMaps
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Load GPX file in OruxMaps via intent

3 posters

Go down

Load GPX file in OruxMaps via intent Empty Load GPX file in OruxMaps via intent

Post  Marcel Sat Sep 24, 2011 9:06 am

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.

Marcel

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  orux Sat Sep 24, 2011 11:08 am

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
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Marcel Sat Sep 24, 2011 11:22 am

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

Marcel

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  orux Sat Sep 24, 2011 11:38 am

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.

Load GPX file in OruxMaps via intent Device20110924132955



orux



orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Marcel Sat Sep 24, 2011 1:24 pm

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

Marcel

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  orux Sat Sep 24, 2011 2:04 pm

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
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  orux Sat Sep 24, 2011 2:06 pm

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
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Marcel Sat Sep 24, 2011 4:53 pm

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

Marcel

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  orux Sat Sep 24, 2011 5:44 pm

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 Smile have a problem. It works with all my androids, from 1.6 to 2.3.4, including emulator.

orux
orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Marcel Sat Sep 24, 2011 10:41 pm

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

Marcel

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Marcel Sun Sep 25, 2011 5:12 am

Hi Orux,

This is the complete errormessage i get when start an intent:
Load GPX file in OruxMaps via intent Erroriu

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

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  orux Sun Sep 25, 2011 11:14 am

Marcel wrote:Hi Orux,

This is the complete errormessage i get when start an intent:
Load GPX file in OruxMaps via intent Erroriu

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
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Marcel Mon Sep 26, 2011 9:26 am

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

Marcel

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-24

Back to top Go down

Load GPX file in OruxMaps via intent Empty GPX TO ORUXMAPS ROUTE CONVERSION

Post  sinbad7 Fri Jun 22, 2012 4:02 pm

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

sinbad7

Cantidad de envíos : 16
Fecha de inscripción : 2012-06-18

Back to top Go down

Load GPX file in OruxMaps via intent Empty Re: Load GPX file in OruxMaps via intent

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum