Sunday, March 6, 2011

Android Update

I spent a lot of time over this weekend working on android. i feel i learnt a lot and still feel i don't have a clue about lots of things.

Things i have a good understanding.
1. json parsing
2. using baseadapters
3. using async task
4. activity life cycle
5. database helper

things i need to learn
1. background service threads and handlers
2. database sync adapters
3. using external jar files
4. debugging/traceview
5. singleton
6. optimization
7. testing/unit testing , ui testing

Tuesday, February 22, 2011

send image from sdcard as email attachment

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

emailIntent.setType("jpeg/image");

emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {"abc@gmail.com"});

emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Test Subject");

emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "go on read the emails");

emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/"+_path));

startActivity(Intent.createChooser(emailIntent, "Send mail..."));


where _path is the link to the image file

eclipse tip - add to Task

I am falling in love with eclipse. One cool feature i really like to use is Tasks.

Lets say you are implementing a new function and you want to add something to Tasks so you can do it later on or have it as a reminder to complete it later.

All you have to do is just add a comment starting with TODO and it will show up in your tasks
//TODO do something ...

Android zero to hero in 30 days

i meant to start this zero to hero on 1st of feb but got a little lazy.

Here are the things i want to do

1. document all the error i get and how i fixed these errors
2. links to good resources
3. hopefully learn how to test my android apps
4. Complete at-least one android app by the end of this.

Saturday, February 12, 2011

rounded button in android

Create a button_round_grey.xml in the drawable folder













2. In your layout file add the following



i even love the color of the button till i figure out a better way to do this i will be using this for all my buttons

File not found: C:\Program Files (x86)\Android\android-sdk-windows\temp\usb_driver_r04-windows.zip (Access is denied)

I had this problem when i was trying to install and update my android sdk.

I ran the sdk with administrator privilege and it worked for me.

Thursday, February 3, 2011

Help!!! Unknown Error - java.lang.NullPointerException :: Android Packaging Problem

simple solution

Project > Clean

on Eclipse

had this error and was stuck with it for almost an hour.

Blog Archive