Wednesday, June 27, 2012

Upgrade Eclipse IDE and Android SDK

Today, a new version of Eclipse IDE and Android released. Eclipse released Eclipse Juno 4.2. It has a special package for mobile developer. Google released Android 4.1 SDK, codename Jelly Bean. I'm going update my MacBook Pro with these new software.
  1. Downloaded Eclipse Juno 4.2 for Mobile Developers, 142 MB.
  2. Extracted it to Downloads folder.
  3. Removed existing Eclipse (Indigo) folder from Application.
  4. Moved new Eclipse folder from Downloads to Application
  5. Started Eclipse and re-install Android Development Tools (ADT)
  6. On Eclipse Juno 4.2 IDE, select Windows -> Android SDK Manager to update Android SDK Tools to rev. 20 and downloaded Android 4.1 Jelly Bean
  7. Create new AVD for Android 4.1 from AVD Manager
  8. Re-tested old projects to make sure they ran as expected.

Wednesday, June 13, 2012

Is Verizon Share Every Thing Plan Good?

Yesterday, Verizon wireless revealed a new plan to allow customers share a pool of data for up to 10 devices. Is the new plan better for a customer with five smartphones?


Verizon: CurrentVerizon: NewAT&TT-Mobile Value
Monthly$279.95$250.00$229.96$124.98
2 Years$6,718.80$6,000.00$5,519.04$2,999.52
Activation Fee$175.00$175.00$180.00$175.00
Cell Phones$999.95$999.95$999.95$1,999.95
Est. Sales Tax$232.50$232.50$213.12$154.61
Total Cost$8,126.25$7,407.45$6,912.11$5,324.13
Compare with T-Mobile$2,802.11$2,083.31$1,587.980

Notes:
Full retail price for Samsung Galaxy S III 4G 16GB at Verizon Wireless is $599.99, at AT&T Wireless is $549.99
Buy Google Galaxy Nexus $399 to use with T-Mobile Value Plan. Amazon Wireless sells Samsung Galaxy S III 4G Android Phone 16GB (GSM for AT&T and T-Mobile) for $649.99

Conclusion:The new Share Every Thing plan is cost less than the current plan for five smart phones. However, there is 1GB data to share between five devices. Both Verizon plans still more expensive than AT&T and T-Mobile.

Sunday, June 3, 2012

How to fix run-time error: Could not find class 'winterwell.jtwitter.Twitter'

If you follow the Marakana Android Bootcamp Series 2012 Video Tutorials, you may get this run-time error when practice the sample application Yamba-1.

06-03 10:48:43.695: E/dalvikvm(274): Could not find class 'winterwell.jtwitter.Twitter', referenced from method com.marakana.yamba1.StatusActivity.onCreate
06-03 10:48:43.695: W/dalvikvm(274): VFY: unable to resolve new-instance 42 (Lwinterwell/jtwitter/Twitter;) in Lcom/marakana/yamba1/StatusActivity;
06-03 10:48:43.695: D/dalvikvm(274): VFY: replacing opcode 0x22 at 0x0045
06-03 10:48:43.695: D/dalvikvm(274): VFY: dead code 0x0047-0057 in Lcom/marakana/yamba1/StatusActivity;.onCreate (Landroid/os/Bundle;)V
06-03 10:48:43.955: D/dalvikvm(274): GC_EXTERNAL_ALLOC freed 794 objects / 58272 bytes in 127ms
06-03 10:48:44.184: D/AndroidRuntime(274): Shutting down VM
06-03 10:48:44.184: W/dalvikvm(274): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-03 10:48:44.194: E/AndroidRuntime(274): FATAL EXCEPTION: main
06-03 10:48:44.194: E/AndroidRuntime(274): java.lang.NoClassDefFoundError: winterwell.jtwitter.Twitter
06-03 10:48:44.194: E/AndroidRuntime(274):     at com.marakana.yamba1.StatusActivity.onCreate(StatusActivity.java:43)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.os.Looper.loop(Looper.java:123)
06-03 10:48:44.194: E/AndroidRuntime(274):     at android.app.ActivityThread.main(ActivityThread.java:4627)
06-03 10:48:44.194: E/AndroidRuntime(274):     at java.lang.reflect.Method.invokeNative(Native Method)
06-03 10:48:44.194: E/AndroidRuntime(274):     at java.lang.reflect.Method.invoke(Method.java:521)
06-03 10:48:44.194: E/AndroidRuntime(274):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-03 10:48:44.194: E/AndroidRuntime(274):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-03 10:48:44.194: E/AndroidRuntime(274):     at dalvik.system.NativeStart.main(Native Method)

Looked back into the Yamba-1 folder, jtwitter-yamba.jar was there.

Solution:
Make a new folder called libs under Yamba-1 and move this external libary inside sub-folder libs

Credit:
Sven Rau  http://marakana.com/forums/android/learning_android_book/689.html#p1790

Sunday, May 27, 2012

Android Programming Tutorial Videos

I would like to share some great videos about Android development.

Androidology by Android Developers
http://www.youtube.com/playlist?list=PLD7C64411AF40DEA5&feature=plcp

Marakana: Android Bootcamp Series 2012 Video Tutorials
http://marakana.com/s/android_bootcamp_series_2012_video_tutorial,1017/index.html

Android Bootcamp Training by Marakana TechTV
http://www.youtube.com/playlist?list=PLE953C0B85B50AB62&feature=plcp

Episodes of xtensivearts: Android Video Tutorials & Training
http://blip.tv/xtensivearts

TheNewBoston - Android Application Development by ChangingTheUnknown
http://www.youtube.com/playlist?list=PL34F010EEF9D45FB8

200 Videos Android Application Development
http://thenewboston.org/list.php?cat=6

mybringback Series: Android Basics
http://www.mybringback.com/series/android-basics/

mybringback Series: Android Basics
http://www.mybringback.com/series/android-finishing-touches/

Sunday, May 20, 2012

How to Fix Error "The processing instruction target matching ... "

When I imported the example Android application FragmentsBasics into Eclipse IDE, I got this error message: "The processing instruction target matching "[xX][mM][lL]" is not allowed."
Solution:
Open the AndroidManifest.xml and other XML files to move this line
<?xml version="1.0" encoding="utf-8"?>
to the top. The first line of XML file cannot be the comment line.

Monday, May 7, 2012

Is Windows Phone third place?

Few days ago, I read "Windows Phone:  Surprisingly Easy to Develop For" written by on April 02, 2012 on Dr. Dobb's
From a consumer's viewpoint, Windows Phone is firmly the third OS by market share at present, following Android and iOS. Some analysts reckon that Windows Phone may be second only to Android by 2015 in a world with only four major mobile platforms left: Android, Windows Phone, iOS, and BlackBerry.
It's not true.

According to comScore report on May 1st, 2012
More than 106 million people in the U.S. owned smartphones during the three months ending in March, up 9 percent versus December. Google Android ranked as the top smartphone platform with 51 percent market share (up 3.7 percentage points). Apple’s share of the smartphone market increased 1.1 percentage points to 30.7 percent. RIM ranked third with 12.3 percent share, followed by Microsoft (3.9 percent) and Symbian (1.4 percent).
Nielsen reported on May 7, 2012
  1. Android OS 48.5%
  2. iOS 32.0%
  3. RIM Blackberry 11.6%
  4. Windows Mobile 4.1%
  5. Windows Phone 1.7%
  6. Other 2.1%
But Microsoft tried to get into the third place in next couple years according to Steve Ballmer, Microsoft CEO:
"I think with a little bit more effort, a little bit more energy, the level of enthusiasm from the customer base is high enough we've just got to kick this thing to the next level. And I think we're in absolute good shape in order to be a very strong third ecosystem in the smart phone world.
(Source:  http://www.theregister.co.uk/2011/09/15/windows_phone_disappoints/)

Saturday, May 5, 2012

Quickly Lock Your Screen using Keyboard

To quickly lock your computer using keyboard shortcut:
  1. On Ubuntu: Press <Ctrl><Alt>L at the same time 
  2. On Apple OS/X: Press <Shift><Ctrl><Eject> keys at the same time 
  3. On Microsoft Windows: Press <Windows> and L keys at the same time 

How to Install Keka on macOS

Download latest version from https://www.keka.io/en/ Copy the MD5 hash value from Keka website to compare later (MD5: 8729f9d08d10293fa1ee65...