05-23-11 12:04 AM
40 12
tools
  1. 312's Avatar
    After this weeks fiasco with a certain website denying us PlayBook owners access to their service, I decided to take matters into my own hands and develop a new browser. So my team and I came up with, what I call, the BWOWser for BlackBerry PlayBook.

    I'm sure it'll just be a matter of time before this is not needed, but at least it gives PlayBook owners a glimpse of what ELSE is possible. If it does actually go to release, it will probably either be a 1 time fee or free and ad supported. (But clean looking ads that will not intrude on your browsing.)

    The video is the 1st run of the app on real hardware, so it's a little rough around the edges- but hey, it works!

    04-24-11 04:14 PM
  2. TheMarco's Avatar
    So this is basically a wrapped browser canvas that identifies itself as a desktop browser, right?
    04-24-11 05:35 PM
  3. TheMarco's Avatar
    Hmm yes... if you instantiate one of these, put in a fake user agent and have it load Hulu.com you basically have a basic Hulu app.

    qnx.media.QNXStageWebView

    Going to try this tonight.
    04-24-11 05:40 PM
  4. 312's Avatar
    Yep, pretty easy to do.
    04-24-11 05:40 PM
  5. TheMarco's Avatar
    So, now that we've established that this is really easy do you still plan to charge money for it?
    04-24-11 06:18 PM
  6. 312's Avatar
    "Really easy to do" is moot. The World is made up of roughly 75% water, but most of us spend $1 for a bottle every now and then anyway.

    Posted from my CrackBerry at wapforums.crackberry.com
    Setanta likes this.
    04-24-11 06:23 PM
  7. Chipchop's Avatar
    I smell a suit.
    04-24-11 06:30 PM
  8. TheMarco's Avatar
    Unfortunately my Flash Builder Burrito has expired and I'm waiting for CS5.5 to come out before I get it so... with this bit of ActionScript I think it should work. If anyone wants to try it, go ahead.

    Code:
    package
    {
    	import flash.display.Sprite;
    	import flash.events.Event;
    	import flash.events.TimerEvent;
    	import flash.geom.Rectangle;
    	import flash.utils.Timer;
    	import qnx.events.WebViewEvent;
    	import qnx.media.QNXStageWebView;
    	import qnx.ui.events.
    		import qnx.ui.progress.PercentageBar;
    	[SWF(height="600", width="1024", frameRate="30", backgroundColor="#000000")]
    	public class MyStageWeb extends Sprite
    	{
    		private var mySwv:QNXStageWebView;
    		private var myProgress:PercentageBar;
    		private var timer:Timer;
    		public function MyStageWeb()
    		{
    			initializeUI();
    		}
    		public function initializeUI():void
    		{
    			timer = new Timer(500);
    			timer.addEventListener(TimerEvent.TIMER,handleTimerTick);
    			timer.start();
    			mySwv = new QNXStageWebView("myBrowser");
    			mySwv.userAgent = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 ( .NET CLR 3.5.30729; .NET CLR 4.0.20506)';
    			mySwv.stage = this.stage;
    			mySwv.viewPort = new Rectangle(0,0,1024,600);
    			mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, onLoad);
    			mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FAILED, onFail);
    			mySwv.loadURL("http://www.hulu.com/");
    			mySwv.zoomToFitWidthOnLoad = true;
    			mySwv.blockPopups = true;
    			mySwv.zOrder = -1;
    			myProgress = new PercentageBar();
    			myProgress.x = (400-myProgress.width) /2;
    			myProgress.y = (500-myProgress.height) /2;
    			myProgress.width = 200; 
    			this.addChild(myProgress);
    		}
    		private function handleTimerTick(e:Event):void 
    		{
    			myProgress.progress = mySwv.loadProgress/100;
    		}
    		private function onLoad(e:WebViewEvent):void
    		{
    			myProgress.progress = 1;
    			mySwv.zOrder = 0;
    			myProgress.destroy();
    		}
    		private function onFail(e:WebViewEvent):void
    		{
    			trace("Hulu failed to load");
    		}
    	}
    }
    Finally, no suits. There's absolutely nothing illegal about faking a UA.
    04-24-11 07:03 PM
  9. achapuis's Avatar
    So when do us 'less' program savvy folks get to download this??? screw Hulu and their b.s. shutdown! What if i promise to only use it on my playbook when i'm right next to my desktop???
    04-24-11 10:26 PM
  10. 312's Avatar
    As soon as RIM approves the submission. Unfortunately right now, there isn't a way to install OTA like on the phones.
    achapuis likes this.
    04-24-11 10:28 PM
  11. TheMarco's Avatar
    I just created an 'app' that launches Hulu in fullscreen. Unfortunately I have no clue how to enable 'production mode' in FB 4 so I can't get it signed and deploy to my playbook but otherwise it works fine.

    Note: RIM is never going to approve this. Not until they have a deal with Hulu.

    Here's my final working source, short and sweet:

    Code:
    package
    {
    	import flash.display.Sprite;
    	import flash.events.Event;
    	import flash.geom.Rectangle;
    	import qnx.events.WebViewEvent;
    	import qnx.media.QNXStageWebView;
    	import qnx.ui.events.*;
    	[SWF(height="600", width="1024", frameRate="30", backgroundColor="#000000")]
    	public class HuluFaker extends Sprite
    	{
    		private var mySwv:QNXStageWebView;
    		public function HuluFaker()
    		{
    			initializeUI();
    		}
    		public function initializeUI():void
    		{
    			mySwv = new QNXStageWebView("myBrowser");
    			mySwv.userAgent = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 ( .NET CLR 3.5.30729; .NET CLR 4.0.20506)';
    			mySwv.stage = this.stage;
    			mySwv.viewPort = new Rectangle(0,0,1024,600);
    			mySwv.loadURL("http://www.hulu.com/");
    			mySwv.zoomToFitWidthOnLoad = true;
    			mySwv.blockPopups = true;
    			mySwv.zOrder = -1;
    		}
    	}
    }
    Also need to set

    Code:
      <permission>access_internet</permission>
      <access uri ="hulu.com"></access>
    Too bad I can't create a production mode bar file.
    04-25-11 12:17 AM
  12. Smiley88's Avatar
    why don't you ask some developer in the Adobe/AIR forum to compile the app for you?
    04-25-11 12:43 AM
  13. 312's Avatar
    why don't you ask some developer in the Adobe/AIR forum to compile the app for you?
    Yeah, I'm not quite sure why he's posting the code here either lol

    I've already submitted mine to App World. Will keep you guys updated on the availability.
    04-25-11 12:44 AM
  14. TheMarco's Avatar
    Just to show that there's really nothing to this.

    I'm curious whether RIM is going to approve this though!
    04-25-11 12:59 AM
  15. Bla1ze's Avatar
    Note: RIM is never going to approve this. Not until they have a deal with Hulu.
    Don't make the load url Hulu, make it Google and implement an address bar field. Least then you have a flying leap chance at it, lol
    04-25-11 05:04 AM
  16. 312's Avatar
    Don't make the load url Hulu, make it Google and implement an address bar field. Least then you have a flying leap chance at it, lol
    That's exactly what I did. As you can see from the vid, it has absolutely nothing to do with a particular site.

    Posted from my CrackBerry at wapforums.crackberry.com
    04-25-11 05:07 AM
  17. TheMarco's Avatar
    Hmmm yes if the description is worded like that maybe they'll let it go through. Something along the lines of it being a development thing and it being necessary at certain moments to be identified as a desktop browser. After all it is indeed true that some sites will present the PlayBook with a mobile version while that's obviously not desired.

    I do hope it does get through because there's no easy way right now to share the Hulu love with others besides having an app make it into AppWorld.

    That said, it takes forever to get approved by RIM (even updates to my existing app take insane amounts of time) so maybe by the time it gets there (if it does) they'll already have made an arrangement with Hulu.
    04-25-11 11:10 AM
  18. jonty12's Avatar
    heck, I'll use if for grocery shopping more than for hulu (I tried to shop a couple nights ago and was told I had an unsupported browser). Also, FIOS on demand tells me I have to have Flash 10.2 installed. I do have Flash 10.2 installed. Plus, as Marco stated, I don't want the mobile version of sites.
    04-25-11 03:21 PM
  19. D.Vader's Avatar
    So where does one stick this code? :P

    I just created an 'app' that launches Hulu in fullscreen. Unfortunately I have no clue how to enable 'production mode' in FB 4 so I can't get it signed and deploy to my playbook but otherwise it works fine.

    Note: RIM is never going to approve this. Not until they have a deal with Hulu.

    Here's my final working source, short and sweet:

    Code:
    package
    {
    	import flash.display.Sprite;
    	import flash.events.Event;
    	import flash.geom.Rectangle;
    	import qnx.events.WebViewEvent;
    	import qnx.media.QNXStageWebView;
    	import qnx.ui.events.*;
    	[SWF(height="600", width="1024", frameRate="30", backgroundColor="#000000")]
    	public class HuluFaker extends Sprite
    	{
    		private var mySwv:QNXStageWebView;
    		public function HuluFaker()
    		{
    			initializeUI();
    		}
    		public function initializeUI():void
    		{
    			mySwv = new QNXStageWebView("myBrowser");
    			mySwv.userAgent = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 ( .NET CLR 3.5.30729; .NET CLR 4.0.20506)';
    			mySwv.stage = this.stage;
    			mySwv.viewPort = new Rectangle(0,0,1024,600);
    			mySwv.loadURL("http://www.hulu.com/");
    			mySwv.zoomToFitWidthOnLoad = true;
    			mySwv.blockPopups = true;
    			mySwv.zOrder = -1;
    		}
    	}
    }
    Also need to set

    Code:
      <permission>access_internet</permission>
      <access uri ="hulu.com"></access>
    Too bad I can't create a production mode bar file.
    04-26-11 12:08 AM
  20. TheMarco's Avatar
    You pretty much just follow the my first AIR app tutorial from RIM and use this code. One thing though: you need developer signing keys to be able to sign the app and get it onto your device. So you need to register as a developer, order keys, etc.
    04-26-11 01:00 AM
  21. pkcable's Avatar
    I bet this app would make Xfinity.tv work too! I'd pay a dollar for it!
    04-26-11 09:59 AM
  22. wazzugrad's Avatar
    xfinity works for me. I get prompted that my browser may not be supported. But you can click at the bottom to continue anyway. Was looking through it last night to see what i can watch on my flight tomorrow.
    04-26-11 10:18 AM
  23. pkcable's Avatar
    xfinity works for me. I get prompted that my browser may not be supported. But you can click at the bottom to continue anyway. Was looking through it last night to see what i can watch on my flight tomorrow.
    Ok, yea SOME stuff works, but none of the TV features work, none of the watch on your device stuff works. THAT is what I THINK, 312's app will fix, or at least I'm hoping.
    04-26-11 10:35 AM
  24. TheMarco's Avatar
    I'm gonna try this today!
    04-26-11 10:39 AM
  25. pkcable's Avatar
    FTWrath's website works good too.
    04-26-11 10:43 AM
40 12
LINK TO POST COPIED TO CLIPBOARD