Archive for category Linux

Android Emulator Problems

I’ve been having loads of problems getting the Android Emulator that comes with the SDK to load anything. After successfully running it when i made the Hello World App I could never get it running again. Googled the problem and tried everything i read to no avail. However last night I got it running again after I’d had to do a reboot, not something that happens often with a Linux machine.

With the emulator running I managed to get through some of the chapters in Pro Android by Apress , I now have a better understanding of the android architecture and the development environment and I’m now starting to get my head around Resources, content providers and Intents and how they tie together.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

,

No Comments

Setting up an android development enviroment on FC10

A newbie guide to android development

One of the reasons  I wanted an Android based smart phone was that I was feeling the need to try something different from the daily php based work . It was time to learn something new , something a little exiting and on the forward edge.

Any time access to the web from mobile platform’s is without doubt the culmination of the dream. This is the killer app aspect of the Internet and people are waking up to this reality. Smart phones , net book’s and in the near future pad style devices will change the way we interact with the cloud. By its open nature I believe android will play a big part in this.

First task then was to get the environment set-up.

To do this we need two pieces of software installed eclipse the popular cross platform IDE and  the Android SDK. You will also need to ensure you have Java installed and set-up on your machine.

I tried to set this up using the version of eclipse available to FC10 via Yum but encountered real issues late in the process so I downloaded the classic version from the eclipse website http://www.eclipse.org/downloads/, which just needs extracting and then runs with out any futher installation .

Download the Android SDK from Google and install it

This is easy enough just unpack the download into a directory. Like eclipse the software runs in place

Set up your path

While not an essential step adding the location of the CLI android tools to your path will probably make life a little easier.

To do this edit your ~/.bashrc file and add a line to the bottom:

export PATH=${PATH}:/home/matt/android/android-sdk-linux_86/tools

Install the Android Development Tools (ADT) for Eclipse

Firstly launch Eclipse.

Follow the excellent instructions at http://developer.android.com/sdk/eclipse-adt.html to install the development tools.

Install packages for eclipse

Next you need to install a bunch of packages . In Eclipse, click “Window->Android SDK and AVD Manager.” In the resulting window, on the left-hand side will be an “Available Packages” option. Click that, then click the checkbox beside the “repository.xml” package to select all available packages and then click “Install Selected“. Once this has completed your ready to begin developing your first android application

Create you first application

The traditional starting point for learning any new language is the humble ‘Hello world’ and is android is no different. Follow the tutorial at
http://developer.android.com/guide/tutorials/hello-world.html for a nice introduction to the android architecture.

Set up a connection to your hardware

The hello world tutorial introduces you to the emulator included with the SDK. But if you have an Android powered handset you’ll find it a lot less pain to set up a debug/test connection to your hardware.

To do this first, set your phone for USB debugging.
In your Android phone, go to Settings -> Applications -> Development menu, and make sure “USB debugging” is checked (activated).

Connect the phone to your computer via USB cable.
In a terminal type the lsusb command to list all USB devices.

Identify the VendorID and ProductID of your device

Bus 001 Device 065: ID 22b8:2d66 Motorola PCS

VendorID in my case is 22b8 the ProductID is 2d66

As root type

vi  /etc/udev/rules.d/51-android.rules
to create a new file and paste the following rule into the file

UBSYSTEMS=="usb", ATTRS{idVendor}=="22b8", ATTRS{idProduct}=="2d66", MODE="0666"

Re-connect your phone.
Your phone should be detected if you unplug and reconnect it to the computer.

Restart the ADB server

adb kill-server
adb devices

You should see your device listed.
You can now access your phone from the Eclipse IDE and run/debug applications on it.

Useful links

http://www.mattcutts.com/blog/install-android-on-ubuntu/

http://developer.android.com/guide/tutorials/hello-world.html

http://www.futuredesktop.org/developing_android_apps_on_ubuntu.html

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

1 Comment

Hello android

I made my first android app

hello android

OK its just a glorified hello world but we all got to start some where ;)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

No Comments

How to install Google Chrome in Fedora 10 or Fedora 11 | rajaseelan.com

A nice simple tutorial on installing the Google chrome browser on your Fedora 10 system.

Essential tool as I want to start looking into HTML 5 and what it brings to the table as we start into the next decade.

How to install Google Chrome in Fedora 10 or Fedora 11 | rajaseelan.com.

[extra]
After install i had to run the following to get chrome playing nicely with se_linux

chcon -t textrel_shlib_t '/usr/lib/chromium-browser/libmedia.so'
chcon -t textrel_shlib_t '/usr/lib/chromium-browser/libnacl.so'
chcon -t textrel_shlib_t '/usr/lib/chromium-browser/libsandbox.so'
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

,

No Comments