Another problem with own data

723 views
Skip to first unread message

Renato

unread,
Nov 30, 2010, 12:04:31 PM11/30/10
to mixare-development
Hi folks,

After changing the intent of the launcher app to:

Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("content://com.android.htmlfileprovider/
sdcard/bsp/orte.json"), "application/mixare-json");
startActivity(i);

I'm still getting exactly the errors shown at the last message of this
thread:
http://groups.google.com/group/mixare-development/browse_thread/thread/c41ac97b78105186?fwc=2


Basically what Hannes Boran noticed, that FileContentProvider doesn't
support the query operation:

E/DatabaseUtils( 5283): Writing exception to parcel
E/DatabaseUtils( 5283): java.lang.UnsupportedOperationException
E/DatabaseUtils( 5283): at
com.android.htmlviewer.FileContentProvider.query(FileContentProvider.java:
76)
E/DatabaseUtils( 5283): at android.content.ContentProvider
$Transport.bulkQuery(ContentProvider.java:156)
E/DatabaseUtils( 5283): at
android.content.ContentProviderNative.onTransact(ContentProviderNative.java:
134)
E/DatabaseUtils( 5283): at
android.os.Binder.execTransact(Binder.java:
288)
E/DatabaseUtils( 5283): at
dalvik.system.NativeStart.run(Native
Method)

.... and so on.

Question: Does anyone know a "workaround" to get this query operation
running? The .json-file ist correctly formatted (thanks Daniele ;-) ).

best regards,
Renato

leg

unread,
Dec 1, 2010, 6:02:52 AM12/1/10
to mixare-development
yes, is not clear for me if it's my fault or mixare currently doesn't
support local files..

Hannes Boran

unread,
Dec 2, 2010, 8:46:58 AM12/2/10
to mixare-development
hi guys,

mixare didn't really support this until now, so i made some fix for
this issue -> https://github.com/hanbo/mixare/commit/98841d594a10fa6a8631f95374c96b66d6119192

"Fix for Issue 52: unable to read files from the SD card. Use urls
like file:///sdcare/wiki.json for local data either by setting the Uwn
URL datasource, or change the XY_BASE_URL in the source code."

i hope this solves your problems

greetings,
Hannes

Daniele Gobbetti - Peer internet solutions

unread,
Dec 2, 2010, 10:24:07 AM12/2/10
to mixare-de...@googlegroups.com
Il 02/12/2010 14:46, Hannes Boran ha scritto:
> hi guys,
>
> mixare didn't really support this until now, so i made some fix for
> this issue -> https://github.com/hanbo/mixare/commit/98841d594a10fa6a8631f95374c96b66d6119192
>
> "Fix for Issue 52: unable to read files from the SD card. Use urls
> like file:///sdcare/wiki.json for local data either by setting the Uwn
> URL datasource, or change the XY_BASE_URL in the source code."
>
> i hope this solves your problems

Awesome! I uploaded a new version in the android market, on google code
and in androidpit.

I tested it beforehand and it works.

Btw I changed the information that is shown in the toast after the
download is successful. Now the data source is displayed instead of the
data format.

> greetings,
> Hannes

HTH, thanks Hannes for the fix!

Daniele

--


> On 1 Dez., 12:02, leg<lepore....@gmail.com> wrote:
>> yes, is not clear for me if it's my fault or mixare currently doesn't
>> support local files..
>


--

==============================
> Daniele Gobbetti
> Usability & Innovation Management
>
> Peer GmbH/Srl
> www.peer.biz
> Tel. +39 0471 631080
> Fax +39 0471 631724

Renato

unread,
Dec 2, 2010, 2:51:34 PM12/2/10
to mixare-development
Hello everybody,

amazing fixing Hannes! The best news of the day!
Thank you very much for looking this!



@ Daniele

In which Android version did you test it? I'm testing with Android 2.2
and I'm getting the filenotfound exception althought the file is in
the sdcard and the path is correct.

Best regards to all,
Renato

On 2 Dez., 16:24, Daniele Gobbetti - Peer internet solutions
<d.gobbe...@peer.biz> wrote:
> Il 02/12/2010 14:46, Hannes Boran ha scritto:
>
> > hi guys,
>
> > mixare didn't really support this until now, so i made some fix for
> > this issue ->  https://github.com/hanbo/mixare/commit/98841d594a10fa6a8631f95374c96b...
>
> > "Fix for Issue 52: unable to read files from the SD card. Use urls> likefile:///sdcare/wiki.jsonfor local data either by setting the Uwn
> > URL datasource, or change the XY_BASE_URL in the source code."
>
> > i hope this solves your problems
>
> Awesome! I uploaded a new version in the android market, on google code
> and in androidpit.
>
> I tested it beforehand and it works.
>
> Btw I changed the information that is shown in the toast after the
> download is successful. Now the data source is displayed instead of the
> data format.
>
> > greetings,
> > Hannes
>
> HTH, thanks Hannes for the fix!
>
> Daniele
>
> --
>
> > On 1 Dez., 12:02, leg<lepore....@gmail.com>  wrote:
> >> yes, is not clear for me if it's my fault or mixare currently doesn't
> >> support local files..
>
> --
>
>      ==============================
>      > Daniele Gobbetti
>      > Usability & Innovation Management
>      >
>      > Peer GmbH/Srl
>      >www.peer.biz
>      > Tel.+39 0471 631080begin_of_the_skype_highlighting            +39 0471 631080      end_of_the_skype_highlighting
>      > Fax +39 0471 631724

Daniele Gobbetti - Peer internet solutions

unread,
Dec 3, 2010, 9:50:08 AM12/3/10
to mixare-de...@googlegroups.com
Il 02/12/2010 20:51, Renato ha scritto:
> Hello everybody,
>
> amazing fixing Hannes! The best news of the day!
> Thank you very much for looking this!
>
>
>
> @ Daniele
>
> In which Android version did you test it? I'm testing with Android 2.2
> and I'm getting the filenotfound exception althought the file is in
> the sdcard and the path is correct.

I tested it on my g1 (cyanogenmod 6 - android 2.2) and a (Motorola)
milestone (2.1), it worked flawlessly. But I know for sure that some
phones are not mounting the sdcard under /sdcard/. Or you problem may be
related to the data, can you post your json file here or put it on
pastebin?

A good resource is also http://jsonlint.com where you can paste your
json and it will show whether is valid or not. I use it all the time
because it's so easy for me to forget commas (or closed ] :-)

Btw I plan to test the updated release against 1.6 and 2.1 on my G1.

> Best regards to all,
> Renato

Regards,
DAniele

--

>> > Usability& Innovation Management


>> >
>> > Peer GmbH/Srl
>> >www.peer.biz
>> > Tel.+39 0471 631080begin_of_the_skype_highlighting +39 0471 631080 end_of_the_skype_highlighting
>> > Fax +39 0471 631724
>


--

==============================
> Daniele Gobbetti
> Usability & Innovation Management
>
> Peer GmbH/Srl
> www.peer.biz

Anzu

unread,
Dec 4, 2010, 7:08:33 PM12/4/10
to mixare-development
Does this feature work for internal storage?

On Dec 3, 9:50 am, Daniele Gobbetti - Peer internet solutions
<d.gobbe...@peer.biz> wrote:
> Il 02/12/2010 20:51, Renato ha scritto:
>
> > Hello everybody,
>
> > amazing fixing Hannes! The best news of the day!
> > Thank you very much for looking this!
>
> > @ Daniele
>
> > In which Android version did you test it? I'm testing with Android 2.2
> > and I'm getting the filenotfound exception althought the file is in
> > the sdcard and the path is correct.
>
> I tested it on my g1 (cyanogenmod 6 - android 2.2) and a (Motorola)
> milestone (2.1), it worked flawlessly. But I know for sure that some
> phones are not mounting the sdcard under /sdcard/. Or you problem may be
> related to the data, can you post your json file here or put it on
> pastebin?
>
> A good resource is alsohttp://jsonlint.comwhere you can paste your

Renato

unread,
Dec 3, 2010, 4:40:45 AM12/3/10
to mixare-development
Good morning everyone,

nevermind, I've found the problem. It was a simple mistake in the
path.
Thanks for helping!

Regards,
Renato

On 2 Dez., 20:51, Renato <renato.fons...@hotmail.de> wrote:
> Hello everybody,
>
> amazing fixing Hannes! The best news of the day!
> Thank you very much for looking this!
>
> @ Daniele
>
> In which Android version did you test it? I'm testing with Android 2.2
> and I'm getting the filenotfound exception althought the file is in
> the sdcard and the path is correct.
>
> Best regards to all,
> Renato
>
> On 2 Dez., 16:24, Daniele Gobbetti - Peer internet solutions
>
> <d.gobbe...@peer.biz> wrote:
> > Il 02/12/2010 14:46, Hannes Boran ha scritto:
>
> > > hi guys,
>
> > > mixare didn't really support this until now, so i made some fix for
> > > this issue ->  https://github.com/hanbo/mixare/commit/98841d594a10fa6a8631f95374c96b...
>
> > > "Fix for Issue 52: unable to read files from the SD card. Use urls> likefile:///sdcare/wiki.jsonforlocal data either by setting the Uwn
> > > URL datasource, or change the XY_BASE_URL in the source code."
>
> > > i hope this solves your problems
>
> > Awesome! I uploaded a new version in the android market, on google code
> > and in androidpit.
>
> > I tested it beforehand and it works.
>
> > Btw I changed the information that is shown in the toast after the
> > download is successful. Now the data source is displayed instead of the
> > data format.
>
> > > greetings,
> > > Hannes
>
> > HTH, thanks Hannes for the fix!
>
> > Daniele
>
> > --
>
> > > On 1 Dez., 12:02, leg<lepore....@gmail.com>  wrote:
> > >> yes, is not clear for me if it's my fault or mixare currently doesn't
> > >> support local files..
>
> > --
>
> >      ==============================
> >      > Daniele Gobbetti
> >      > Usability & Innovation Management
> >      >
> >      > Peer GmbH/Srl
> >      >www.peer.biz
> >      > Tel.+39 0471 631080begin_of_the_skype_highlighting            +39 0471 631080      end_of_the_skype_highlightingbegin_of_the_skype_highlighting            +39 0471 631080      end_of_the_skype_highlighting
> >      > Fax +39 0471 631724
>
>

Hannes Boran

unread,
Dec 3, 2010, 5:59:43 AM12/3/10
to mixare-development
Please give us the exact path you used and a copy of the stacktrace,
then we may can help you. I am using Android 2.2

If you have a file called "wiki.json" in the root directory of your
sdcard you should use:

file:///sdcard/wiki.json

Notice that you have to use three slashes after file: and that your
sdcard may not be mounted/used by your pc at the same time.

Hannes

On 2 Dez., 20:51, Renato <renato.fons...@hotmail.de> wrote:

Daniele Gobbetti - Peer internet solutions

unread,
Dec 7, 2010, 11:32:21 AM12/7/10
to mixare-de...@googlegroups.com
Il 05/12/2010 01:08, Anzu ha scritto:
> Does this feature work for internal storage?

Good question. I'm not sure which is the best way to access the assets
because the internal file system support user permissions... I'd say
that some tests have to be performed. :-)

Daniele

--

Renato

unread,
Dec 6, 2010, 11:10:43 AM12/6/10
to mixare-development
Yeah, I did all the alterations you've suggested but didn't correct
the path. Typical mistakes while working till 3 a.m.

I'm now using file:///mnt/sdcard/data.json and works perfectly. I'll
try to implement some ideas now, for example diferent markers colors
and how to highlight a marker while targeting to it, so that you can
choose markers if they're too close to each other.

thanks for helping!

best,
Renato
> > > > "Fix for Issue 52: unable to read files from the SD card. Use urls> likefile:///sdcare/wiki.jsonforlocal data either by setting the Uwn
> > > > URL datasource, or change the XY_BASE_URL in the source code."
>
> > > > i hope this solves your problems
>
> > > Awesome! I uploaded a new version in the android market, on google code
> > > and in androidpit.
>
> > > I tested it beforehand and it works.
>
> > > Btw I changed the information that is shown in the toast after the
> > > download is successful. Now the data source is displayed instead of the
> > > data format.
>
> > > > greetings,
> > > > Hannes
>
> > > HTH, thanks Hannes for the fix!
>
> > > Daniele
>
> > > --
>
> > > > On 1 Dez., 12:02, leg<lepore....@gmail.com>  wrote:
> > > >> yes, is not clear for me if it's my fault or mixare currently doesn't
> > > >> support local files..
>
> > > --
>
> > >      ==============================
> > >      > Daniele Gobbetti
> > >      > Usability & Innovation Management
> > >      >
> > >      > Peer GmbH/Srl
> > >      >www.peer.biz
> > >      > Tel.+39 0471 631080begin_of_the_skype_highlighting            +39 0471 631080      end_of_the_skype_highlightingbegin_of_the_skype_highlighting            +39 0471 631080      end_of_the_skype_highlighting
> > >      > Fax +39 0471 631724
>
>

leg

unread,
Dec 10, 2010, 4:12:56 AM12/10/10
to mixare-development
On 2 Dic, 14:46, Hannes Boran <hannes.bo...@gmail.com> wrote:

> "Fix for Issue 52: unable to read files from the SD card. Use urls
> like file:///sdcare/wiki.json for local data either by setting the Uwn
> URL datasource, or change the XY_BASE_URL in the source code."

thanks for this..
there's a way to call it from a launcher?
it says "the file cannot be viewed from here..."
Reply all
Reply to author
Forward
0 new messages