Archive

Archive for the ‘Google Android’ Category

Handle onClick event using XML

December 14, 2010 Leave a comment

This is simple example how to handle onClickButtonEvent().  Situation at the beginning is following.  You have defined  some_activity.xml stored inside project res/layout folder .  This code snipped is defined inside XML file:

<LinearLayout ….
<Button android:id=”@+id/home_btn_even”    style=”@style/EventButton”   android:onClick=”onClickButtonEvent”    android:text=”@string/btn_event”       android:drawableTop=”@drawable/home_btn_event”/>
…</LinearLayout>

Let’s aim at  android:onClick=”onClickButtonEvent”  … The button is displayed inside the main Activity where is defined the method

public class MainActivity extends Activity implements AsyncQueryListener, Receiver
……
/** Handle “on ClickEvent” action. */
public void onClickButtonEvent(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Object.CONTENT_URI));
}
…..

it’s better and more effective than following code snipped

btnSimple.setOnClickListener(
new OnClickListener(){
public void onClick(View v) {
Log.i(tag,”onClick Simple”);
……

Advertisements
Categories: Google Android

AGames: Toss it – great relax in public transport

August 15, 2010 Leave a comment

This game doesn’t need to have your brain “connected” to the rest of the body 🙂 It’s cool. Your mission is  only toss the crumpled paper to  the basket. Great idea and cool relax … your other task is to deal with the side wind.  This game is ready on the Android Market … and it has my recommendation to test: Great Android Game

Categories: Google Android

Mobile Technologies and medical/clinical usage #Android

June 30, 2010 Leave a comment

In parallel with my PhD thesis  I’v  started work on other Android project which is directly connected with my thesis (so cool).  I really like my PhD  topic because I have been interesting in neurology since my childhood.  Brain is big mystery to me ( I guess also for others 🙂  and so excited. Maybe it’s on similar line as Android 😀 and other mobile technologies I have used till know.  Medical branch needs a lot of improvements to do analysis and checkups much faster then now (more mathematics, statistics, algorithms and right implementation). It gonna be definitely more comfortable for any patients .

Next days I’ll by improving my framework and analyzing subjects affected by Schwannoma.  I’ll see how big improvement they have done after surgery and rehabilitation by using my framework. It would be definitely excited.

I’m apologize to anyone who doesn’t agree with my state but keep in mind that faster and more reliable framework helps to make such checkup faster.  Affected subject gonna have time for relaxing and don’t be so stressed around…

Categories: brief news, Google Android

Android chart (Graph) projects

Interesting projects to deal with charts on Android powered devices. If you have another one feel free to point it out…

aiCharts

RChart 2.1

Categories: Google Android

Ubuntu 9.10 and Android: how to install *.apk directly to your mobile

May 30, 2010 1 comment

Today morning I had strong feeling to blog around the Android, again :). Well I haven’t  found  a lot of information about how to develop directly on Ubuntu 9.10. Here are couple of steps how to deploy your  *.apk directly to your Android devices.

Official information from Google

If you’re developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.

  1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.For Gusty/Hardy, edit the file to read:  ( I’ve used this ONE)
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"For Dapper, edit the file to read:
    SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
  2. Now execute:
    chmod a+r /etc/udev/rules.d/51-android.rules

Issue has risen up when you try command #adb devices to confirm you correctness. You received such stressed message which you have to face .

#adb devices
List of devices attached
????????????    no permissions

Solution is pretty simple you need to restart the server with ROOT permissions -> follow these commands.

#adb kill-server
#sudo  <destination> adb start-server
#adb devices

You should received valid identification of the mobile by using command #adb devices again, such us
List of devices attached
HT9C4P808877   device

Now, you can run up Phone USB debugging mode and extend you manifest file in following manner
AndroidManifest.xml file, add android:debuggable="true" to the <application> element

Your Eclipse IDE is ready for option Debug As -> … Devices Chooser <your devices> -> OK
I hope it helps, Enjoy!

Android 2.2 – hierarchyviewer tool and PSD file export (GIMP, Photoshop)

Possibility to export PSD (Adobe Photoshop / GIMP ) file from HierarchyViewer is really welcome feature.  HierarchyViewer is the useful tool provided by Android SDK to tune up and check your Android app View Group design.  Additionally it offers to you load time estimation when graphics is propagated from ViewRoot by calling drawn() method.  Nice signal to think about our layout change when number is too high because the point is to develop effective applications.

The point why it is so useful could be in case of background testing or colors. Well, true is inside any Graphical editor (GIMP in my case) you have much more freedom to test it.  You offer such freedom separated in unique layers by downloading PSD file. Layers are corresponding to  information you have defined and stored inside your XML or code ( identification of Buttons, ListViews, etc.)

When you are uploading new developed app into the Market, you also need 2 files in requested size.  Well, this is other smart advantage of button Capture PSD inside HierarchyViewer.

Enjoy! Thanks to Romain Guy post

PS: Just simply run up your app in Android 2.2 when you want to export to the PSD file your application from previous Android SDK versions.

Categories: Google Android

mirageMindMemo v2.x – important update

Important fix has been done.  User of mirageMindMemo v2.x has more comfortable way how to deal with categories (Add/Remove).  Default category NONE can not be removed. Also Landscape mode has been fixed.

Use submenu button to add new category. New Line will be displayed, you can type category name and then press D-PAD button to confirm.  New category is ready then.

Enjoy !

Categories: brief news, Google Android