PDA

View Full Version : Sencha Touch on Blackberry Playbook?



Brig
24 Jan 2011, 2:35 AM
Does anyone know if there's any way to get Sencha Touch to work on the Blackberry Playbook?

I've created a web app (the carousel demo) on the Playbook emulator but it doesn't seem to load the javascript properly. You can see that something has loaded because sliding from left to right seems to do something, the mouse pointer goes a bit slower while dragging the panes but they can't be seen.

The Playbook is supposed to have a webkit browser and other HTML5 content such as the HTML5 Asteroids game works fine: http://www.kevs3d.co.uk/dev/asteroids/

Any help would be much appreciated!

mitchellsimoens
24 Jan 2011, 8:16 AM
If it has a WebKit browser, it will work. It just depends if the browser they deploy will be advanced enough but I'm sure it will do almost everything you want.

n_adam_stanley
27 Jan 2011, 5:32 AM
Hello,

Yes the incorrect rendering is a known issue that has been escalated to our development teams and is being repaired. A bug in how certain JavaScript events fire during the page lifecycle is impacting how the Sencha Touch framework behaves in the current version of the PlayBook simulator.

http://supportforums.blackberry.com/t5/Web-Development/Getting-Sencha-Touch-Working-in-PlayBook-Simulator/m-p/756667/highlight/false#M8868

I expect once a new version of the sim is published (coming weeks) that this issue will be resolved. Please keep me posted of your PlayBook application dev progress.

Sincerely,
Adam Stanley
astanley@rim.com
BlackBerry Developer Relations

Brig
28 Jan 2011, 2:05 AM
Thanks for the replies both!

Adam, great it's being looked into!

I have an AIR app submitted for aproval but would like to create a WebWorks app as well and the Sencha framework would make the app so much more interactive.

I'll keep an eye on both this and the thread on the BB forum for the fix!

Brig
9 Feb 2011, 1:52 AM
Just wanted to update this after trying the latest version of the Playbook emulator. The carousel demo is now working fine! Looks like most if not all of the Sencha stuff works in the latest version.

sbonnick
18 Feb 2011, 2:56 PM
Sencha Touch works very well now on the playbook. However there are still some elements missing.

there needs to be a command something along the lines of is.Playbook. Also Playbook needs to be recognized in is.Tablet.

Other then that Looks Amazing!

rtweed
19 Feb 2011, 4:32 AM
Agree with the other posters: my Sencha Touch demo apps seem to work very well in the latest Playbook simulator.

One question to the Blackberry guys if they are reading this: will it be possible (or is it possible) to save a web app to the home screen as an icon as per the iPhone/iPad, and then run the app full-screen so it appears to be the same as a Native app?

Rob

rtweed
19 Feb 2011, 6:55 AM
This might seem like a stupid question, but does anyone know how you're supposed to safely/cleanly shut down the Playbook simulator VM in VMWare? I can just suspend it I suppose. Or is it OK to just tell VMWare to shut the VM down - or can that leave the VM in a mess?

Rob

sbonnick
20 Feb 2011, 12:42 PM
if anyone is is interested here is a fix for the isPlaybook and isTablet commands:



Ext.is.Playbook = navigator.userAgent.match(/Playbook/i) != null;
Ext.is.Blackberry = Ext.is.Blackberry || Ext.is.Playbook;
Ext.is.Tablet = Ext.is.iPad || Ext.is.Playbook;
Ext.is.Phone = !Ext.is.Desktop && !Ext.is.Tablet;
Ext.is.iOS = Ext.is.iPhone || Ext.is.iPad || Ext.is.iPod;
Ext.is.Standalone = !!window.navigator.standalone;


Just put this is your HTML or at the top of a JS script and it should work well. just make sure the sencha-touch.js file is been called before these commands.

n_adam_stanley
24 Mar 2011, 5:44 AM
Agree with the other posters: my Sencha Touch demo apps seem to work very well in the latest Playbook simulator.

One question to the Blackberry guys if they are reading this: will it be possible (or is it possible) to save a web app to the home screen as an icon as per the iPhone/iPad, and then run the app full-screen so it appears to be the same as a Native app?

Rob

Hi Rob,

Yes you can use the BlackBerry WebWorks SDK (http://us.blackberry.com/developers/tablet/webworks.jsp) to create a standalone (Web) application, that can be launched from the home screen. These types of applications are essentially a chromeless browser for your Web content, however we provide developers with a collection of JavaScript objects (http://www.blackberry.com/developers/docs/webworks/api/playbook/) that can be used to integrate your content with the underlying Tablet OS. Think of it like HTML5.1 ;)

Cheers,
Adam

n_adam_stanley
24 Mar 2011, 5:47 AM
Rob,

The best practice is to use the "Reset" menu item from VMWare player.

[Menu] Virtual Machine --> Power --> Reset

One benefit of doing this is to quickly sync the Tablet OS clock with that of your host PC. As you may have discovered already, the Tablet OS SDK deployment utility requires that these clocks are kept in sync. Normally when you close VMWare Player it suspends the VM rather than shutting it down which persists the old time when you resume the session at a later point. We recommend developers use the Power menu item to shut down the Tablet OS VM rather than suspending it.

Cheers!
Adam

Cheers,
Adam

hitman01
20 Apr 2011, 7:21 AM
sbonnick, do you have any solution for determining other tablets such as galaxy tab and xoom?

mitchellsimoens
20 Apr 2011, 7:25 AM
This gets hard to maintain to use Ext.is.*. Finding out whether or not something is a tablet based on if it is iPad or Playbook or Xoom or.... is not a great way

hitman01
20 Apr 2011, 8:12 AM
mitchellsimoens, I agree, we need a universal solution perhaps based on screen size?

Anyone have any solutions?

mitchellsimoens
20 Apr 2011, 8:14 AM
Even that can be tricky.

Biggest phone here in the USA is 4.5 inches and smallest tablet is 5 inches. What if they make a phone that is 5 inches?

I'd call it the Texas Phone! :))

hitman01
20 Apr 2011, 10:16 AM
What do you think of something like this to determine if its tablet. The number could be adjusted depending on the needs.

if(!Ext.is.Tablet &&
(window.innerWidth > window.innerHeight && window.innerWidth > 600) ||
(window.innerHeight > window.innerWidth && window.innerHeight > 600)){
Ext.is.Tablet = true;
Ext.is.Phone = false;
}

interfasys
20 Apr 2011, 12:59 PM
Did anybody try and fix the CSS to make it work on the Playbook? There are issues with masking.

hitman01
21 Apr 2011, 8:12 AM
Didnt notice any problems with masking.

interfasys
21 Apr 2011, 8:18 AM
Are you talking about using the real device or the simulator?
On the simulator, you just need to load the kitchensink example and go to the forms example. There will be black squares around some of the rounded forms.

hitman01
21 Apr 2011, 8:40 AM
I'm on the device. But yeah I see what you mean.

jaypompano
25 Apr 2011, 9:21 AM
We just picked up a brand new PlayBook and I pinpointed a possible bug on a call to Ext.util.JSON.decode(JSON) where this does not happen with XOOM or iPad (same code).

Is this a known issue?

mitchellsimoens
25 Apr 2011, 9:22 AM
We just picked up a brand new PlayBook and I pinpointed a possible bug on a call to Ext.util.JSON.decode(JSON) where this does not happen with XOOM or iPad (same code).

Is this a known issue?

Could be but if it works on many other devices but not one, kind of lean toward it's the one device.

interfasys
2 Jun 2011, 7:59 PM
There was a mistake on the first page. This should not be added in an app for the Playbook because it will enable phone controls that do not work on the Playbook:

Ext.is.Blackberry = Ext.is.Blackberry || Ext.is.Playbook;