Appcelerator Blog

The Leading Resource for All Things Mobile

Festivus Celebration Day Five – Festivus Miracles

0 Flares 0 Flares ×
Today is day five of our Festivus Celebration here at Appcelerator, Festivus Miracles, and we’re calling it a wrap. Our Day 4 winner of the Appcelerator swag pack is @adamhegedus. We’ve had quite a few questions in the Q/A section in regards to supporting the Samsung Galaxy Tab and today’s miracle is that we’re going to show you how to do that. Here are the step we’re going to walk you through:
  1. Introduction
  2. Installing the Galaxy Tab Addon
  3. Installing the Titanium changes required
  4. Getting a skeleton app running in emulator
  5. Getting a skeleton app running on the device
  6. Conclusion
But first a warning.
  • This has been tested against Mac OS X ONLY
  • This is NOT supported Officially by Appcelerator at this time
  • The KitchenSink application WILL NOT run on the Samsung Galaxy Tab
  • Use at your OWN risk

Introduction

The Samsung Galaxy Tab is an Android 2.2 (Froyo) device, and by following the tips and guidelines below your Titanium applications should run correctly on the Samsung Galaxy Tab’s 7” screen in both the emulator and on device.

Samsung Galaxy Tab add-on

The first step in this process is getting the Samsung Galaxy Tab add-on installed. Before getting started with the Samsung Galaxy Tab add-on installation, you may need to install the android development environment. If it’s not installed on your computer, you can find more information on this location: http://developer.android.com/sdk/installing.html
  1. Run AVD Manager from the command line.
  2. Select Available Packages in the left panel of AVD Manager.
  3. Click “Add ADD-on Site” and enter the URL below. http://innovator.samsungmobile.com/android/repository/srepository.xml
  4. Check Samsung GALAXY Tab Add-on packages and click install button.
  5. Check Samsung GALAXY Tab Add-on license & Click install button.
  6. After downloading and installation of GALAXY Tab Add-on, you should restart ADB (Android Debug Bridge).

Installing & Configuring Titanium

At this point all we’ve done is setup and configured the Galaxy Tab add-on to work with the android development environment. Now to make it work with Appcelerator’s Titanium Platform.
  1. Download the lastest Continuous Integration build for your platform. Note: Please select the “master” branch and be aware that these builds can break other features/APIs. http://builds.appcelerator.com.s3.amazonaws.com/index.html
  2. Unzip and install the Continuous Integration build into /Library/Application Support/Titanium/mobilesdk/
  3. Download a modified version of builder.py. * Please read the footnote
  4. Install the modified version of builder.py into /Library/Application Support/Titanium/mobilesdk/1.6.0/android/
  5. Restart Titanium Developer.

Getting a skeleton app running in emulator

  • Once Titanium Developer has been restarted go ahead and create a new mobile project and ensure that the Titanium SDK version is set to be 1.6.0.
  • Now that the default project has been created let’s just run the application and see what we get. Please make sure after selecting Test & Package –> Run Emulator –> Android that you select the GALAXY Tab Addon 2.2 option from the SDK pulldown and the GALAXY Tab option from the Screen pulldown as shown:
  • Press Launch. If all goes well you should soon see the Galaxy Emulator launch and a skeleton app running.

Getting a skeleton app running on device

Hopefully by now you’ve got a skeleton app running in the Galaxy Tab emulator. So what’s next? Let’s now try and get it running on an actual device. Here’s what worked for us.
  1. Connect the device to your computer using the USB cable
  2. On the device turn on USB debugging
  3. One the device check Allow third-party sources
  4. From the command line make sure that your device can be seen. You do this by running the command: adb devices. If your device is found you should see something similar to this: If it’s not located you’ll see something similar to this:
  5. If your device isn’t initially found you might have to run the following commands in order: adb kill-server adb start-server adb devices a few times until the android development environment locates your device.
  6. Once the device is located to deploy to device you just Test & Package –> Run on Device –> Android as you normally would.

Conclusion

At this point, we’ve should have accomplished the following things:
  1. Install the Galaxy Tab Addon
  2. Install the Titanium changes required
  3. Get a skeleton app running in emulator
  4. Get a skeleton app running on the device
And that’s all there is to it. Soon we’ll be making changes to our platform to better support this device as well as other android tablets but hopefully this will provide you with a headstart. Don’t forget that we’re adding a new feature to the Appcelerator Developer Center in the new year, a Titanium Application Catalog that will function as an application discovery engine. It will provide the best way to find and promote Titanium applications through a unique combination of application search, ratings & reviews. In preparation of that we’re now accepting application submissions. To get your Titanium Powered Application into the catalog please click the link below. You will need to be logged into your Developer Account to submit applications. Application Catalog Submission Form * Footnote: The reason a modified version of builder.py is required is due to scaling issues with the Galaxy Tab emulator. If you run using this modified version of builder.py and the emulator is still too large or isn’t large enough you can open up that builder.py file in your favorite text editor and modify the scaling properties located on or about line 351. Currently we’re setting it to be 0.50 but feel free to set it to whatever works best for your screen. To read more about Developing applications for the Samsung Galaxy Tab head over to http://innovator.samsungmobile.com/galaxyTab.do

One last thing

Also to note is that today is the last day of our Festivus Celebration and as such it’s the last day to win one of our swag packs. Remember to win one of the Appcelerator swag packs you’ll need to follow @appcelerator on twitter and retweet that day’s message of the day on twitter. There will be one winner a day picked at random. Today’s message and hashtag is this: Go from zero to app fast with Titanium Developer #atfd5 #appcelerator Remember to check back to see if you’re a winner and thanks again for participating in our Festivus activities.
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×

Sign up for updates!

Become a mobile leader. Take the first step to scale mobile innovation throughout your enterprise.
Get in touch
computer and tablet showing Appcelerator software
Start free, grow from there.
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×