We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

Webservice request from android app seems to be overridden with user agent string 'phandroidappl'

asked 2015-02-15 11:01:40 +0200

lakutalo gravatar image

updated 2015-02-15 21:11:34 +0200

I am using an android app that utilises web service requests (Philips Hue). However, when announcing itself on the server it uses the user agent string 'phandroidappl' which seems not to have its origin in the app but in the android layer of my Jolla. This is my conclusion since it is the original app by the publisher (proved) and exactly the same app used on an android-only device works well.

The publisher refuses to handle this string (yet) asking me whether I could change it on my phone. I tried grep to find the file containing the string but had no success.

Does anybody here know about where or in which file this string could be located, where it might emerge from or how to handle this on my Jolla?

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-02-16 07:27:31 +0200

tortoisedoc gravatar image

Perhaps its somewhere in the alien dalvik?

edit flag offensive delete publish link more

Comments

Last time I made a grep there, the phone crashed so I had to take my battery out. Still I also think it must be located somewhere around there. I will refine my search.

lakutalo ( 2015-02-16 10:23:05 +0200 )edit
-1

answered 2015-02-15 11:50:04 +0200

Nieldk gravatar image

Definitely not correct statement

https://github.com/sailfishos/sailfish-browser/blob/master/src/sailfishbrowser.cpp

This source code shows you the user agent string sent by default Jolla browser

edit flag offensive delete publish link more

Comments

Thanks, but which statement is not correct? Your link to the source proves that the browser posts another user agent string than the one I mentioned. I doubt the browser is involved at all since the ws request is most likely sent from the android app.

My question was where the mentioned string could emerge from, as it appeares obviously only on Jolla.

lakutalo ( 2015-02-15 13:43:26 +0200 )edit

From the source. The Sailfishbrowser uses this agent string

Mozilla/5.0 (Maemo; Linux; U; Jolla; Sailfish; Mobile; rv:31.0) Gecko/31.0 Firefox/31.0 SailfishBrowser/1.0

Nothing phandroid there.

Nieldk ( 2015-02-16 10:46:20 +0200 )edit

I don't use the sailfish browser.

lakutalo ( 2015-02-16 20:02:49 +0200 )edit
1

Hi, I have the same problem here. Am also using the Philips Hue app. I think it's not the user agent we are talking about. It seems so be a custom protocol. The workflow looks like this:

  1. Open the Hue app
  2. Klick "Login to my hue"
  3. Browser opens with a Loginmask on meethue.com
  4. Login with hue account (still in Browser)
  5. Site asks if the app can access account information (still in browser)
  6. Click "Yes"
  7. Browser redirects to an URL like: "phandroidappl://sdk/login/sha256hash"

I tried to ask Google what phandroidappl might be, but no one knows.

I guess the hue app registers this protocol somewhere in android to get the hash from the URL?

diego ( 2015-03-17 22:09:54 +0200 )edit
1

OK! Thanks @diego for the analysis. :-) This means the URL request intends to launch the application registered by "phandroidappl" which is apparently supposed to be the hue app. The only problem is that afaik no apps can be registered in SFOS at the moment, or can they? If anybody knows how to register an android app on SFOS so that it can be called from a URL this problem is solved (imho).

lakutalo ( 2015-03-18 20:46:30 +0200 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2015-02-15 11:01:40 +0200

Seen: 649 times

Last updated: Feb 16 '15