Android and NetBeans

Hey guys I’m writing this post after few weeks. This time I thought of writing a post about Android. I bought a HTC Hero, the first HTC android phone with the Sense UI . Since the day I bought the phone I wanted to write an app for the phone, but with work didn’t get much time to do that. Finally I found some time to kill, so as a result of that I’m writing this post.

First I wrote my Hello World app using Eclipse. Though it’s a powerful IDE I don’t like the idea of using Eclipse. Therefore I looked for a plugin to NetBeans to develop my first Android app. Among the first few search results I found this article How to setup Netbeans for Android development and it worked the magic. Even though the above mentioned post was written for NetBeans 6.5 it works for NetBeans 6.8 too.

Note: you have to install Android SDK to start. Follow this link to install the SDK Installing the SDK

Ok then lets start developing our first android app; to start work first you have to install NetBeans and have to install the Android plugin by following the above link.
Open NetBeans File -> New Project and you’ll get the screen below select Android as the category and Android Application as the Project and then click next.

New Project

And the next part is the Name and Location window its as same as a usual NetBeans project therefore I’m not gonna explain that to you!

Name and Location

OK now lets take a look at the first code this is really simple, the below image is the class which you have to edit.

Java class

you have to add these lines of code which is demonstrated on the following image

TextView tv = new TextView(this);
tv.setText(“Hello Android”);
Button bt = new Button(this);
bt.setText(“GO”);
setContentView(bt);

Finished code

and then you have to hit the run button and it will start the Android emulator

Running App

Try more and enjoy
bye for now
:D

Note: This link has more and further details on android development

~~ Rusiru Boteju ~~

Webmaster tools and WordPress

Hey guys back again! This is a really quick and short post. I’m gonna tell you how to add webmaster tools to your wordpress blog. As far as I know, this might have been a big headache for most of you who have sub-domains like me so this is a really simple way to add your wordpress blog to webmaster tools provided by most popular search engines, that is google, bing and yahoo.
This what you have to do, first go to your blogs dashboard then on the left sidebar scroll down to Tools and from there click on the Tools links and scroll down the page. And from there look for “Webmaster Tools Verification”. Ok now open a new tab on your browser or simply click on these links while pressing the Ctrl button :D

Google : https://www.google.com/webmasters/tools/
Bing : http://www.bing.com/webmaster
Yahoo : https://siteexplorer.search.yahoo.com/

Then you have to log in to those sites and from there add the url of your blog to the relevant fields and when you have to verify use the meta tags and copy paste those in the correct textboxes in your tools page of your blog :D then save the changes and verify your blog in those relevant sites (i.e. google, yahoo. bing)
and thats it :D you are good to go :D
if you want more information click here

~~ Rusiru Boteju ~~

Follow

Get every new post delivered to your Inbox.