Hi All,
I'm trying to handle the process of OAuth 1.0 authorisation using the external web browser. I'm opening the browser with QDesktopServices::openUrl() and providing a callback URL with a custom scheme. The custom scheme is listed in my .desktop file along the lines of MimeType=x-maemo-urischeme/app-callback-scheme;, and the Exec portion is [I]Exec=/usr/bin/invoker --type=d -s /opt/arca/bin/arca %U[/] so it passes the URL into the app.
So all this sort of works, but not in the way I want. Firstly, if I run this from Qt Creator on my N950, the app starts up, switches to the web browser, the authorisation occurs, the web browser calls the callback URL with the custom scheme and my app in invoked (with the URL in argv[1]) -- but a new instance. I don't know for sure, but I'm guessing that this is something to do with Qt Creator running it as "developer" and the web browser running it as "user".
Anyhow, if I launch the app on the phone, we go through the above process again, but now it correctly uses the single, already running instance -- but of course I'm not receiving the URL because main() isn't being called.
So, a few questions. Why am I getting multiple instances when running from Qt Creator? More importantly, how can I get it to use a single instance? And...
How can I get the URL parameter when the single instance is already running?
Best regards,
David

Reply With Quote


