maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [SFOS] [Announce] Pebble Watch Connector daemon (https://talk.maemo.org/showthread.php?t=93399)

smoku 2014-06-30 17:59

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Quote:

Originally Posted by Alexxxl (Post 1431445)
What do You mean about user-session level daemons?

Code:

$ systemctl --user list-units

HtheB 2014-06-30 23:37

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Schturman made a script to run Pebbled on your homescreen.
https://openrepos.net/sites/default/...con-icon_0.png

https://openrepos.net/content/htheb/pebble-toggle

smurfy 2014-07-02 11:49

Re: [Announce] Pebble Watch Connector daemon 0.2
 
@smoku

Nice start and it looks more integrated than SkippingStones. I'm currently using SkippingStones and already contributed a Watchface weather support.

Is your app opensource as-well? Main thing i don't like with SkippingStones is that there is no deamon.

I think a big part is supporting custom WatchApp/Face handlers on the phone side. Not sure if it is possible to support the JS api on the phone side or if there is need to reimplement the handlers ourselfs.

smoku 2014-07-02 16:02

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Quote:

Originally Posted by smurfy (Post 1431613)
Is your app opensource as-well? Main thing i don't like with SkippingStones is that there is no deamon.

Yeah. This is exactly why I developped own solution.
You will find the source on my GitHub: https://github.com/smokku/pebble

Quote:

Originally Posted by smurfy (Post 1431613)
I think a big part is supporting custom WatchApp/Face handlers on the phone side.

I will eventually stea..^W copy that part from SkippingStones ;)

Quote:

Originally Posted by smurfy (Post 1431613)
Not sure if it is possible to support the JS api on the phone side or if there is need to reimplement the handlers ourselfs.

JS api?

smurfy 2014-07-02 18:35

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Cool, i will take a look at your source and probably do some pull requests too :)

disclaimer: i'm new to pebble and never used pebble with android or iphone, except using a friends android to update my firmware and install some apps

As far as i understand the pebble sdk, until pebble sdk 2 you needed a companion app on your phone to communicate with the outside world and the pebble.

With sdk2 they added a JS api Which runs inside the offical pebble phone app and allows you to write your "companion" apps in js, with simple settings and outside world communication

Maybe at some point we could emulate this JS engine to support some of the watchapps/faces nativ

smoku 2014-07-02 19:20

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Quote:

Originally Posted by smurfy (Post 1431654)
disclaimer: i'm new to pebble and never used pebble with android or iphone, except using a friends android to update my firmware and install some apps

I bought my Jolla Phone a month ago and I've been using Pebble with android phone for half a year now.
I just installed Pebble app on my netbook running android-x86, to have a look how the original works, as I do not own an Android phone any more. (Yay!)


Quote:

Originally Posted by smurfy (Post 1431654)
With sdk2 they added a JS api Which runs inside the offical pebble phone app and allows you to write your "companion" apps in js, with simple settings and outside world communication

I didn't develop for Pebble before, so thanks for all the pointers.

Quote:

Maybe at some point we could emulate this JS engine to support some of the watchapps/faces nativ
Seems like a plan.
I have a lot of experience with Qt WebKit bridge and Qt Script engine looks similar. :)

smurfy 2014-07-02 19:39

Re: [Announce] Pebble Watch Connector daemon 0.2
 
I did a quick look at the "modern" watchface i'm using and which uses the JS api it's look quite easy.

Basically its an JS engine which supports common javascript including "XMLHttpRequest", window.navigator.geolocation.getCurrentPosition and a new Object called "Pebble"

The Pebble object supports different methods, like sendAppMessage or openURL, there are also some events fired to be listened.

openURL method for example opens the given url in a browser (QWebkit?) and the external website then can GET a special protocol url in the browser window with json data which then in return can be accessed in the JS coded via an eventlistener on the "webviewclosed" event.

smoku 2014-07-02 21:47

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Quote:

Originally Posted by smurfy (Post 1431659)
openURL method for example opens the given url in a browser (QWebkit?) and the external website then can GET a special protocol url in the browser window with json data which then in return can be accessed in the JS coded via an eventlistener on the "webviewclosed" event.

I'm OK with embedding JavascriptCore in a daemon.
I'm not OK with embedding full-blown browser in a daemon. ;)

Alexxxl 2014-07-03 09:09

Re: [Announce] Pebble Watch Connector daemon 0.2
 
do you have any video how it works ?

towhatend 2014-07-03 20:42

Re: [Announce] Pebble Watch Connector daemon 0.2
 
Tried it, but it shows wrong name when I tested to call from another phone.


All times are GMT. The time now is 04:56.

vBulletin® Version 3.8.8