Android 2.1

More advanced topics discussed.

Moderators: Susan Smith, admin, Gabriel

Post Reply
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Android 2.1

Post by John »

I'd like to develop some BR! programs to run on Android tablets. Does anyone have any experience running BR on a droid?

-John
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

I've spent the last month learning this. I'm starting to get decent at it. Its tricky.

My BR programs that run on the droid are written in ext, JS, Sencha Touch, JSON, AJAX, HTML, CSS, PHP, the Web Scripting Bridge, and BR. That's a lot of stuff I've had to learn in the last couple weeks but its pretty powerful stuff, once you get the hang of it. And its extremely useful.

Gabriel
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Post by John »

So how do you get BR! to run on a droid? Do you have to use the market place to install?
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

You use the bridge and a web server to and write BR programs that return your data as JSON.

Then you write your Droid programs in Sencha Touch, which is a framework based on Ext and written in Javascript, and designed to accept JSON from the back end. Using Sencha Touch its very easy to write programs that work perfectly on Droid, iPhone, iPad, and Blackberry. Additionally you have access to things like the GPS built into the phone.

You write your Sencha Touch programs, configure them to use the bridge to get the data, configure the bridge to point to your BR programs, and write BR programs that return the data to your Sencha Touch programs.

If you want to compile them to native apps which you can install from marketplace, that option is available. But its advanced Sencha Touch stuff and i'm still learning the simpler stuff. Ultimately, i'll be able to compile them to native apps and install them via marketplace.

But as you can tell, there's a lot of stuff to learn. I've only been at it for a few weeks now.

The end result looks beautiful. The programs inherit the look and feel of native applications, on whichever device you're running them on. On iPhones they look like iPhone apps, and on Droids they look like Droid apps. They respond properly to multi-touch and swipe commands. They can query the phones GPS and they can include google maps in them. They can even call people on the phone.

I wrote one for my SageLive customer list - all of you. I can see it from my phone, change details, add new clients, and hit a button to display a map showing where you are. It has a fully secure login screen and it works beautifully. Next, I'm going to fulfill a promise I made to a client years ago, and allow him to truly work from anywhere in the world.

If you want to learn this stuff, my recommendation is to start reading up on Sencha Touch. Follow their tutorials. Download it and get it running. You'll need to install Wamp. When you get the hang of basic Javascript and Sencha Touch and how it works, try to modify the examples to do your own thing. When you're a little comfortable with that, tie them to BR using the bridge. I followed up to the example where you build an actual application with a list, and an editable detail screen. Then I tied their example to my real BR data files.

Its a lot to learn. Don't expect it to go quickly. You'll have many new languages to master before you're able to do simple phone programs. But you also have a lot of friends who will help you along the way. I have been spending a few hours a day with Chris or John Kievlan, while they help me learn this stuff.

You may have to take some time off. I saved up some cash and took a month off work to learn this stuff. Its a sacrifice, but nothing worth doing is easy. During that time i've been doing a minimal amount of work to keep things going but almost all of my time each day is spent studying cellphone programming. If you can spend, say, 8 hrs a day studying, you can probably master this stuff in 2 or 3 weeks or so, depending on how fast you learn. If you're forced to do it part time, better give yourself a couple months.

Best of luck! Its very rewarding, and powerful. These are finally the programs that can make a difference in our clients lives, these are the programs that enable them to spend more time with their loved ones, that enable them to take trips around the world without worrying about not being in the office.


Droids are based on Javascript, and they don't run BR directly. And even if you spent the year it would take to write a version of BR that did run on a droid, you wouldn't want to. It would look terrible, and it would run terribly. Javascript is the only way. And Sencha Touch makes it easy. You have to support swipe events and gps locations and orientation and multi-touch. Its a phone, not a PC.
DBlankenship
Posts: 3
Joined: Mon Jun 08, 2009 7:10 pm

Mobile Phone platform support

Post by DBlankenship »

While Sencha Touch supports multi-platform development for mobile applications, I would point out that there are several developers of similar products:

1) www.phonegap.com
2) www.appcelerator.com
3) www.appmobi.com
4) www.rhomobile.com
5) www.mosync.com
6) www.sencha.com (Recommended by Gabriel)
7) www.anscamobile.com

Several of these are open source (paid support), some are demo or trial versions. All of them utilize the basic concepts of HTML5, ASPX, JSON, PHP, javascript, etc. to produce the application. Some tend to be more of a game platform while others address business applications. The point is that there a number of tools that work across multiple platforms/OS levels.

Development of a mobile application is certainly moving to meet the needs of our clients with current technology. The emphasis should be on the connectivity and this is achieved through HTML at some level. Whether you embrace mobile development or not, all of us should be looking to enhance our skills with regard to HTML and CSS.

David
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

There are several packages out there. Sencha Touch is the one that was recommended to me and so far I've found it to be intuitive and easy.

I just wanted to point out that some of the technologies you're listing, for example PhoneGap, work alongside Sencha Touch.

Some of the apps I plan on writing in the near future will require both PhoneGap (to provide access to native phone functionality such as the camera, compass, and vibration feedback) and Sencha Touch (to create the user interface), along with, of course, the BR data backend (as they're all programs which will extend the functionality of existing BR software to the phone platform).
Post Reply