After some days of work I've been able to call native code via Javascript inside the Windows Mobile 6.1 emulator. I don't know if other PhoneGap developers have reached this point but I couldn't find any code. The project attached demonstrates the idea (gets some device info clicking a link). It's in C# managed code.
I'm not a .Net guy so this has been a little nightmare. I'd gladly accept help with some APIs implementation!
I'm not sure if the attachment went through so I'm resending the mail. I've stripped the offending executables from the file along with the bin & obj folders. I guess building the project generates them again otherwise just tell me. Regards
On Wed, May 13, 2009 at 5:49 PM, Jose Noheda <jose.noh...@gmail.com> wrote: > Hi,
> After some days of work I've been able to call native code via Javascript > inside the Windows Mobile 6.1 emulator. I don't know if other PhoneGap > developers have reached this point but I couldn't find any code. The project > attached demonstrates the idea (gets some device info clicking a link). It's > in C# managed code.
> I'm not a .Net guy so this has been a little nightmare. I'd gladly accept > help with some APIs implementation!
I'm having trouble getting past the warning screen on the emulator which
keeps telling me "Some content cannot be displayed due to Smartphone
Security Settings".
As far as development here, we haven't really bothered to go down this
road. I took a look at running Fennec on Windows Mobile, and I looked at Qt
a bit, mostly because we would prefer to have a modern browser as opposed to
Mobile IE 6.
That being said, tweaking for CSS and JS differences is slightly different
than writing each app in its own completely different language. It'd be
great if there was a .Net WebView that was based on WebKit that we could
use, and if there was a way to get around the security warnings to allow the
user to go straight into the app. I think those are my two huge wishlists
when looking at Windows Mobile.
But yeah, it's a good proof of concept. I'm worried about the Javascript
cruft that would appear having to develop for two different browsers,
though.
On Wed, May 13, 2009 at 8:57 AM, Jose Noheda <jose.noh...@gmail.com> wrote:
> I'm not sure if the attachment went through so I'm resending the mail. I've
> stripped the offending executables from the file along with the bin & obj
> folders. I guess building the project generates them again otherwise just
> tell me.
> Regards
> On Wed, May 13, 2009 at 5:49 PM, Jose Noheda <jose.noh...@gmail.com>wrote:
>> Hi,
>> After some days of work I've been able to call native code via Javascript
>> inside the Windows Mobile 6.1 emulator. I don't know if other PhoneGap
>> developers have reached this point but I couldn't find any code. The project
>> attached demonstrates the idea (gets some device info clicking a link). It's
>> in C# managed code.
>> I'm not a .Net guy so this has been a little nightmare. I'd gladly accept
>> help with some APIs implementation!
On Wed, May 13, 2009 at 7:23 PM, Joe Bowser <bows...@gmail.com> wrote:
> Hey
> I'm having trouble getting past the warning screen on the emulator which
> keeps telling me "Some content cannot be displayed due to Smartphone
> Security Settings".
What warning screen are you referring to? I'm not getting any. I'm using WM6
Standard SDK and 6.1 emulator images.
> As far as development here, we haven't really bothered to go down this
> road. I took a look at running Fennec on Windows Mobile, and I looked at Qt
> a bit, mostly because we would prefer to have a modern browser as opposed to
> Mobile IE 6.
IE Mobile has been a pain but I thought it was the natural choice
> That being said, tweaking for CSS and JS differences is slightly different
> than writing each app in its own completely different language. It'd be
> great if there was a .Net WebView that was based on WebKit that we could
> use, and if there was a way to get around the security warnings to allow the
> user to go straight into the app. I think those are my two huge wishlists
> when looking at Windows Mobile.
Yes, it will be difficult to achieve that the same app runs in BlackBerry
and Windows Mobile but IMO the user will find way easier some tweaks here
and there than learning Java or C#. I can't comment on the Webkit issue but
I'm sure we can manage to remove the warnings in your environment if I'm not
getting them here.
> But yeah, it's a good proof of concept. I'm worried about the Javascript
> cruft that would appear having to develop for two different browsers,
> though.
Well, the BlackBerry code I sent last week suffers from this problem as well
(it required the use of cookies). I'm not sure it's avoidable
And the real question is? Are you interested if I continue down this road
and implement some of the APIs or do you have your own architecture and
roadmap?
> On Wed, May 13, 2009 at 8:57 AM, Jose Noheda <jose.noh...@gmail.com>wrote:
>> I'm not sure if the attachment went through so I'm resending the mail.
>> I've stripped the offending executables from the file along with the bin &
>> obj folders. I guess building the project generates them again otherwise
>> just tell me.
>> Regards
>> On Wed, May 13, 2009 at 5:49 PM, Jose Noheda <jose.noh...@gmail.com>wrote:
>>> Hi,
>>> After some days of work I've been able to call native code via Javascript
>>> inside the Windows Mobile 6.1 emulator. I don't know if other PhoneGap
>>> developers have reached this point but I couldn't find any code. The project
>>> attached demonstrates the idea (gets some device info clicking a link). It's
>>> in C# managed code.
>>> I'm not a .Net guy so this has been a little nightmare. I'd gladly accept
>>> help with some APIs implementation!
>>> Regards
>>> PS.- Sorry about the rar format...gmail issues
On Thu, May 14, 2009 at 12:42 AM, Jose Noheda <jose.noh...@gmail.com> wrote: > On Wed, May 13, 2009 at 7:23 PM, Joe Bowser <bows...@gmail.com> wrote:
>> Hey
>> I'm having trouble getting past the warning screen on the emulator which >> keeps telling me "Some content cannot be displayed due to Smartphone >> Security Settings".
> What warning screen are you referring to? I'm not getting any. I'm using > WM6 Standard SDK and 6.1 emulator images.
It's on the standard image where you get this error.
>> As far as development here, we haven't really bothered to go down this >> road. I took a look at running Fennec on Windows Mobile, and I looked at Qt >> a bit, mostly because we would prefer to have a modern browser as opposed to >> Mobile IE 6.
> IE Mobile has been a pain but I thought it was the natural choice
I suppose it is in this case. Of course, being web developers, we've been burned by IE numerous times in the past. It does mean that we will have no Canvas support. However, I don't know how many PhoneGap apps are using Canvas, so that might not be an issue.
>> That being said, tweaking for CSS and JS differences is slightly different >> than writing each app in its own completely different language. It'd be >> great if there was a .Net WebView that was based on WebKit that we could >> use, and if there was a way to get around the security warnings to allow the >> user to go straight into the app. I think those are my two huge wishlists >> when looking at Windows Mobile.
> Yes, it will be difficult to achieve that the same app runs in BlackBerry > and Windows Mobile but IMO the user will find way easier some tweaks here > and there than learning Java or C#. I can't comment on the Webkit issue but > I'm sure we can manage to remove the warnings in your environment if I'm not > getting them here.
>> But yeah, it's a good proof of concept. I'm worried about the Javascript >> cruft that would appear having to develop for two different browsers, >> though.
> Well, the BlackBerry code I sent last week suffers from this problem as > well (it required the use of cookies). I'm not sure it's avoidable
> And the real question is? Are you interested if I continue down this road > and implement some of the APIs or do you have your own architecture and > roadmap?
Yes, we are interested in this code. We currently don't have any code for Windows Mobile at the moment. If you could fork off the stable repository in github, and store your branch in a WinMo directory on the tree, so we can pull from it, that would be greatly appreciated.
And yes, unfortunately the Blackberry port also has the cross-browser problem. It's something that we need to keep in mind when expanding it to other platforms.
Great work Jose,
I had the same warnings on the emulator, but deploying it on my device
worked fine.
> And the real question is? Are you interested if I continue down this road
> and implement some of the APIs or do you have your own architecture and
> roadmap?
Like Joe said, fork off stable (http://github.com/sintaxi/phonegap)
and do the rest of what he says.
Let me know when you have done so, and I can coordinate my
contributions with you to the WinMo code.
Currently we don't have any usable code yet, just my experimental
stuff getting WebKit into WinMo, and creating an activex control to
bridge between Javascript and native code. However, once Windows
Mobile 6.5 is released it will be interesting how their Widgets API
will fit in with PhoneGap. For now integrating with IE is the fastest
way currently for PhoneGap support, especially since the Windows
Mobile MarketPlace is launching this summer.
A few suggestions: I would suggest to keep to the "gap://action/
[arguments]" URL scheme for WinMo like the iPhone code unlike what you
have in the PoC,
and also I would change Command.accept(string instruction) to not need
to test for instructions with a leading slash (ie remove the slash).
On Thu, May 14, 2009 at 11:09 AM, Shazron <shaz...@nitobi.com> wrote:
> Great work Jose,
> I had the same warnings on the emulator, but deploying it on my device
> worked fine.
> > And the real question is? Are you interested if I continue down this road
> > and implement some of the APIs or do you have your own architecture and
> > roadmap?
> Like Joe said, fork off stable (http://github.com/sintaxi/phonegap)
> and do the rest of what he says.
> Let me know when you have done so, and I can coordinate my
> contributions with you to the WinMo code.
> Currently we don't have any usable code yet, just my experimental
> stuff getting WebKit into WinMo, and creating an activex control to
> bridge between Javascript and native code. However, once Windows
> Mobile 6.5 is released it will be interesting how their Widgets API
> will fit in with PhoneGap. For now integrating with IE is the fastest
> way currently for PhoneGap support, especially since the Windows
> Mobile MarketPlace is launching this summer.
> A few suggestions: I would suggest to keep to the "gap://action/
> [arguments]" URL scheme for WinMo like the iPhone code unlike what you
> have in the PoC,
> and also I would change Command.accept(string instruction) to not need
> to test for instructions with a leading slash (ie remove the slash).
On Thu, May 14, 2009 at 8:09 PM, Shazron <shaz...@nitobi.com> wrote:
> Great work Jose,
> I had the same warnings on the emulator, but deploying it on my device
> worked fine.
Thanks for the confirmation!
> > And the real question is? Are you interested if I continue down this road
> > and implement some of the APIs or do you have your own architecture and
> > roadmap?
> Like Joe said, fork off stable (http://github.com/sintaxi/phonegap)
> and do the rest of what he says.
> Let me know when you have done so, and I can coordinate my
> contributions with you to the WinMo code.
I'm new to github. I've forked the project already but maybe it'll take me
some time...
> Currently we don't have any usable code yet, just my experimental
> stuff getting WebKit into WinMo, and creating an activex control to
> bridge between Javascript and native code. However, once Windows
> Mobile 6.5 is released it will be interesting how their Widgets API
> will fit in with PhoneGap. For now integrating with IE is the fastest
> way currently for PhoneGap support, especially since the Windows
> Mobile MarketPlace is launching this summer.
> A few suggestions: I would suggest to keep to the "gap://action/
> [arguments]" URL scheme for WinMo like the iPhone code unlike what you
> have in the PoC,
> and also I would change Command.accept(string instruction) to not need
> to test for instructions with a leading slash (ie remove the slash).
Those were my first tries. Unfortunately the Uri class won't accept gap://
as a valid protocol. The slash is a consequence of it. I'll see if I can
work around the issue