Browser MIME issue

4 views
Skip to first unread message

tarotray

unread,
Aug 24, 2009, 3:08:17 AM8/24/09
to Gamaray, tarotray
"Gamaray can also be started from the Android web browser. When a URL
is encountered that points to a document of MIME type "application/
gamaray-gddf", the browser launches the Gamaray application which then
loads the dimension described in the file."

Not for me it doesn't. Why would that be and what would be the
solution?

Status: I have made a page called mydimension.html. On it I have a
link to mydimension.gddf. mydimension.gddf is a copy of your sample
source code with the <lat> & <lon> values changed to my current
location. I uploaded both files to the root of my web server. I
installed Gamaray on my Android HTC Magic phone. I opened the Android
browser and went to mydimension.html on my website. I click the link.
Nothing appears to happen, at all.

Clayton Lilly

unread,
Aug 24, 2009, 10:04:13 AM8/24/09
to Gamaray
Did you associate the ".gddf" extension to the "application/gamaray-
gddf" MIME type in your web server? If not, let me know what type of
web server you have and I might be able to help.

If you already did the above, then I'm not quite sure. If your web
server is available on the internet, send me the URL to your html and
gddf files and I could see if the http response looks correct.

tarotray

unread,
Sep 2, 2009, 7:10:19 PM9/2/09
to Gamaray


On Aug 24, 4:04 pm, Clayton Lilly <gamaray.i...@gmail.com> wrote:
> Did you associate the ".gddf" extension to the "application/gamaray-
> gddf" MIME type in your web server? If not, let me know what type of
> web server you have and I might be able to help.
>
> If you already did the above, then I'm not quite sure. If your web
> server is available on the internet, send me the URL to your html and
> gddf files and I could see if the http response looks correct.

OK. It's a little above my head but what I did was create a .htaccess
in the root of my web-server. The contents are:
AddType application/gamaray-gddf gddf

I got these instructions from this forum or somewhere like it. The web-
server is apache running Free BSD. Pretty standard quality stuff.

BTW I am also interested in how can this same thing be done, on a
Windows Server?

tarotray

unread,
Sep 3, 2009, 8:34:17 AM9/3/09
to Gamaray


Clayton: The HTTP response headers look like this:

HTTP/1.1 200 OK
Date: Thu, 03 Sep 2009 11:52:11 GMTå,ž
Server: Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7då,ž
Last-Modified: Wed, 02 Sep 2009 20:15:43 GMTå,ž
Etag: "349666-1181-4a9ed26f"å,ž
Accept-Ranges: byteså,ž
Content-Length: 4481å,ž
Keep-Alive: timeout=15, max=99å,ž
Connection: Keep-Aliveå,ž
Content-Type: application/gamaray-gddfå,ž

Is this all normal and as it should be? What are the garbage
characters at the end of the lines: å,ž ?

Clayton Lilly

unread,
Sep 3, 2009, 9:25:31 AM9/3/09
to Gamaray
The HTTP response looks OK to me, the weird characters are probably
just newline characters. Does it work now? If not, I'll be making a
small change to the app today so that Gamaray will be launched when a
url with a scheme of type "gamaray://" is encountered. For example
"gamaray://www.yourserver.com/MyDimension.gddf". This way people won't
have to mess around with server configurations.

tarotray

unread,
Sep 3, 2009, 2:06:27 PM9/3/09
to Gamaray
No. It doesn't work. :-(

I was already wondering why you didn't do what you now suggest. It
would make life just that little bit easier for the developer. That
would be a truly great move. :-)

Another suggestion is that you may add an 'Open from URL' button in
the menu. You would get a dialogue where you could simply enter the
URL of the gddf file. What do you think?

tarotray

unread,
Sep 3, 2009, 2:06:41 PM9/3/09
to Gamaray
No. It doesn't work. :-(

I was already wondering why you didn't do what you now suggest. It
would make life just that little bit easier for the developer. That
would be a truly great move. :-)

Another suggestion is that you may add an 'Open from URL' button in
the menu. You would get a dialogue where you could simply enter the
URL of the gddf file. What do you think?

tarotray

unread,
Sep 3, 2009, 2:34:11 PM9/3/09
to Gamaray
No. It doesn't work. :-(

I was already wondering why you didn't do what you now suggest. It
would make life just that little bit easier for the developer. That
would be a truly great move. :-)

Another suggestion is that you may add an 'Open from URL' button in
the menu. You would get a dialogue where you could simply enter the
URL of the gddf file. What do you think?

Clayton Lilly

unread,
Sep 3, 2009, 2:35:39 PM9/3/09
to Gamaray
The new version (1.0.10) is out there. Just change the link in your
html page to something like "gamaray://www.yourserver.com/
MyDimension.gddf" and it should start up the Gamaray client. Let me
know if you have any other issues, and thanks for sticking with it.

I don't do a very good job of explaining it on the website, but
Gamaray is supposed to be more of a browser plug-in. The web browser
already has features to manage URLs (navigating to them, bookmarking
them) so I didn't want to repeat that in Gamaray.

tarotray

unread,
Sep 3, 2009, 5:48:48 PM9/3/09
to Gamaray
Thank you so much for trying, but unfortunately, I still have the same
problem.

I upgraded the application to 1.0.10.

I changed the link in the html page to href="gamaray://
www.MyServerName.net/MyServerNameDimension.gddf". I navigated to the
page in Android's browser. MyServerNameDimension.gddf does exist in
the web root of the server.

I clicked the link and nothing at all happened.

I even tried href="gamaray://MyServersNameDimension.gddf". Since the
html file also is in the web root, it should also work - but
doesn't! :-(

This behaviour is totally duplicable. Any suggestions? I'd love to
start developing.

tarotray

unread,
Sep 4, 2009, 12:43:46 PM9/4/09
to Gamaray
Thanks to some trial and error experimentation and good support from
Clayton, I now have it working on my HTC Magic and I'm developing my
first dimension, right now. Got to go deeper into the SDK now, to find
out what the limitations are so I can badger Clayton into removing
them :-)

Veerle

unread,
Sep 22, 2009, 9:40:48 AM9/22/09
to Gamaray
I have the same problem on my HTC Magic ... can you tell me how you
did get it working?

Thanks,

Veerle

tarotray

unread,
Sep 22, 2009, 2:25:53 PM9/22/09
to Gamaray


On Sep 22, 3:40 pm, Veerle <veerlevandersl...@gmail.com> wrote:
> I have the same problem on my HTC Magic ... can you tell me how you
> did get it working?


Ah. Good question. It was the first technical problem of many that
I
encountered and solved, along the long path to building my .Net
Dimension
Server class library, which now works, pretty well. Therefore, it's
hard
to remember how I solved it.

<thinks>

Yes! Now I remember. :-)

Clayton made a small change to the application (make sure you have
the latest version), a couple of weeks ago, so no changes to the
server
are required, any more. All you have to do is set the
ContentType response header to "application/gamaray-gddf".

Here is my VB.Net code that does it:

-begin code-----------

Const CONTENTTYPE As String = "application/gamaray-gddf"
Const DISHEADER As String = "Attachment; Filename="
Const DISHEADER_NAME As String = "Content-Disposition"

With res

.ClearHeaders()
.RedirectLocation = GDDF_FileName

' set the http content type
.ContentType = CONTENTTYPE

' initialize the http content-disposition header to
indicate a file attachment with the given filename
.AppendHeader(DISHEADER_NAME, DISHEADER & Chr(34) &
GDDF_FileName & ".gddf" & Chr(34))

'clear the content and write out the dimension to it
.ClearContent()
.Write(XMLDimension)

End With

-----end code ----------

...where res is the current HTTP response and XMLDimension is a
string containing the entire contents of the Dimension XML file.

You'll have to translate that into your own coding language if
you aren't working with VB, but it should be pretty easy to work out.

When you do have any similar code in another language, please let
everyone else, here, know, so wheels don't have to be re-invented. :-)

Veerle

unread,
Sep 23, 2009, 8:22:00 AM9/23/09
to Gamaray
Hi,

My problem is rather simple ....I don't use server code.

I just put a gddf file on my server and I want gamaray to start up on
my android mobile when I select it in the browser.

That doesn't work ... I get the xml code in my browser instead.

Here are my files:

http://www.vebaconsulting.com/gamaray.html
http://www.vebaconsulting.com/gamaray.gddf

Kind Regards,

Veerle

Veerle

unread,
Sep 23, 2009, 8:38:54 AM9/23/09
to Gamaray
Sorry ... worked fine with the latest version!

When I have my php server code working I'll post it here.

Kind Regards,

Veerle

On 23 sep, 14:22, Veerle <veerlevandersl...@gmail.com> wrote:
> Hi,
>
> My problem is rather simple ....I don't use server code.
>
> I just put a gddf file on my server and I want gamaray to start up on
> my android mobile when I select it in the browser.
>
> That doesn't work ... I get the xml code in my browser instead.
>
> Here are my files:
>
> http://www.vebaconsulting.com/gamaray.htmlhttp://www.vebaconsulting.com/gamaray.gddf

tarotray

unread,
Sep 23, 2009, 9:55:10 AM9/23/09
to Gamaray
Yeh, earlier versions needed some special server configuration,
before
it would work.

I'm very interested in php coded ways of working with Gamaray.

BTW If you work with .Net, at all, you may want to wait a short
while
for my DimensionServer software, which is a powerful .Net library
for
generating customized dimensions, easily. It is now complete and
in
alpha testing phase. I'm just about to send the SDK documentation
to
Clayton, to see what he thinks.

On Sep 23, 2:38 pm, Veerle <veerlevandersl...@gmail.com> wrote:
> Sorry ... worked fine with the latest version!
>
> When I have my php server code working I'll post it here.
>
> Kind Regards,
>
> Veerle
>
> On 23 sep, 14:22, Veerle <veerlevandersl...@gmail.com> wrote:
>
> > Hi,
>
> > My problem is rather simple ....I don't use server code.
>
> > I just put a gddf file on my server and I want gamaray to start up on
> > my android mobile when I select it in the browser.
>
> > That doesn't work ... I get the xml code in my browser instead.
>
> > Here are my files:
>
> >http://www.vebaconsulting.com/gamaray.htmlhttp://www.vebaconsulting.c...
Reply all
Reply to author
Forward
0 new messages