Friday, May 28, 2010

java.lang.IllegalArgumentException: column '_id' does not exist

When I write a ContentProvider that querying the Sqlite. I using the simple code as bellow. I get this weird the column doesn't not exist error.  what make me confusing that the DBHelper has been worked well for a time.

@Override
    public Cursor query(Uri url, String[] projection, String selection,
            String[] selectionArgs, String sort) {
        //Load all results
        return dbHelpder.getReadableDatabase().query(DBHelper.TABLE_EQ
                , selectionArgs, null, null, null, null, sort);
    }

Also I defined the _ID column.

Code Of DBHelper

@Override
    public void onCreate(SQLiteDatabase paramSQLiteDatabase) {
        String sql="CREATE TABLE tableEQ (_ID INTEGER PRIMARY KEY," +
        " LAT TEXT, " +
        "LON TEXT, " +
        "MAG TEXT, " +
        "Date TEXT, " +
        "Place TEXT," +
        "Depth Text," +
        " ImageMap TEXT, ImageMap2 TEXT)" ;

        paramSQLiteDatabase.execSQL(sql);
    }


How to fix it?
1. Make sure the you have a Column of _id, the column name here is case sensitive. the internal logic use “_id” as a key query to the dictionary.
2. Since the DBCreation Logic once be invoked Once. So either Remove the DB file manually which is located in /data/data/yourappnamespace/databases
or just rename the table name in your sql to reflect the changes. otherwise, you keep polling the Prevous defined DB even you changed your code.

Tuesday, May 25, 2010

Windows Phone 7 Hardware

    There are 50-60 Android Devices on the market now. also same number of Blackberry Devices(all added up since the beginning). Apple locked up the system and platform, so 5 devices only. (Iphone /3g/3gs Ipad/ITouch)How about Microsoft phone 7?

    Compatibility across devices with different screen size/resolution comes to be handy for developers. balckberry SDK is a great example, most of the method need take care the backward capability. it looks like Microsoft defined a standard that the device will all be 800*480 or 480*320 in the first version of phone OS 7.

    also they define several standard regarding the hardware capability. here is a Quick overview of the device hardware. Pretty all the popular hardware features like SIP, GPS, LocationService, Audio/Video API. Accelerator.

    Keyboard

    Textbox Integrates with SIP

    SIP supports input scoping

    Text,Url, Time,TelephoneNUmber, EmailNameorAddress

    clip_image001

    TOUCH

    OOB Controls support for Touch
       Scroll viewer has built-in support for pan and flick

    UIElements
    Scale/Translate
      Raw Touch, Compatible With Sl3

    clip_image002

    TOUCH IN XNA

    • TouchPanel
    • TouchLocation
    • ID for Corellelcoate.

    clip_image003

    • Different with Silverlight Application

    Accelerometer

    clip_image004

     

    clip_image005

     

    IT Runs on background Thread which is different with the UI thread. call Dispatcher.BeginInvoke TO Refresh UI Thread

    Audio Input

    Call the getdata method from the bufferready event

    10 ms latency

    Media

    MeadiaElement

    Only one Mediaelement , No VideoBrush.

    Media support

    H/W decode

    MediaSreamSource (adjust quality based on bandwidth)

    PlayReadyDRM

    XNA Sound Effect Api

    Supports polyphonic, Looping wave data

    Check Flight Status

    Vibration.

    clip_image006

     

    VabrateController.Default.Start( TimeSpan.FromSeconds(5));

    .Stop //Stop it before the timespan

    Location

    Satellite

    Accuracy+, Power,Speed,Indoors (-)

    Cell Towers

    Power,Speed (+) Accuracy,Wildness(-)

    WIFI

    clip_image007

     

    clip_image008

     

    public GeoCoordinateWatcher(GeoPositionAccuracy desiredAccuracy)
    {
    this.accuracy = desiredAccuracy;
    this.Init();
    }

    clip_image009

Reference:
  Windows Phone 7 : http://www.windowsphone.com
  Mix 10 Phone 7 Videos and PPTs: http://live.visitmix.com/Videos
  Blackberry SDK: http://na.blackberry.com/eng/developers/

Monday, May 24, 2010

Android Application Icons – Phone Application, Calling,hang-up…

 

ic_incall_end
$ic_incall_end_thumb.png

ic_incall_ongoing
$ic_incall_ongoing_thumb.png
ic_incall_onhold
$ic_incall_onhold_thumb.png
ic_incall_ongoing_bluetooth
$ic_incall_ongoing_bluetooth_thumb.png
btn_in_call_switch_off_disable.9
$btn_in_call_switch_off_disable.9_thumb.png
btn_in_call_switch_off_disable_focused.9
$btn_in_call_switch_off_disable_focused.9_thumb.png
btn_in_call_switch_off_normal.9
$btn_in_call_switch_off_normal.9_thumb.png
btn_in_call_switch_off_pressed.9
$btn_in_call_switch_off_pressed.9_thumb.png
btn_in_call_switch_off_selected.9
$btn_in_call_switch_off_selected.9_thumb.png
btn_in_call_switch_on_disable.9
$btn_in_call_switch_on_disable.9_thumb.png
btn_in_call_switch_on_disable_focused.9
$btn_in_call_switch_on_disable_focused.9_thumb.png
btn_in_call_switch_on_normal.9
$btn_in_call_switch_on_normal.9_thumb.png
btn_in_call_switch_on_pressed.9
$btn_in_call_switch_on_pressed.9_thumb.png
btn_in_call_switch_on_selected.9
$btn_in_call_switch_on_selected.9_thumb.png
green_selected.9
$green_selected.9_thumb.png
red_selected.9
$red_selected.9_thumb.png
ic_button_conference_end
$ic_button_conference_end_thumb.png
ic_button_conference_private
$ic_button_conference_private_thumb.png
ic_button_contacts
$ic_button_contacts_thumb.png
ic_dialog_call
$ic_dialog_call_thumb.png
ic_incoming_call_bluetooth
$ic_incoming_call_bluetooth_thumb.png
ic_launcher_phone
$ic_launcher_phone_thumb.png
ic_menu_answer_call
$ic_menu_answer_call_thumb.png
ic_menu_dial_pad
$ic_menu_dial_pad_thumb.png
ic_menu_end_call
$ic_menu_end_call_thumb.png
ic_menu_merge_calls
$ic_menu_merge_calls_thumb.png
ic_menu_silence_ringer
$ic_menu_silence_ringer_thumb.png
ic_menu_swap_calls
$ic_menu_swap_calls_thumb.png
btn_in_call_round_disable
$btn_in_call_round_disable_thumb.png
btn_in_call_round_disable_focused
$btn_in_call_round_disable_focused_thumb.png
btn_in_call_round_normal
$btn_in_call_round_normal_thumb.png
btn_in_call_round_pressed
$btn_in_call_round_pressed_thumb.png
btn_in_call_round_selected
$btn_in_call_round_selected_thumb.png
ic_in_call_touch_round_add_call
$ic_in_call_touch_round_add_call_thumb.png
ic_in_call_touch_round_hold
$ic_in_call_touch_round_hold_thumb.png
ic_in_call_touch_round_manage_conference
$ic_in_call_touch_round_manage_conference_thumb.png
ic_in_call_touch_round_merge_call
$ic_in_call_touch_round_merge_call_thumb.png
ic_in_call_touch_round_swap
$ic_in_call_touch_round_swap_thumb.png
ic_in_call_touch_round_unhold
$ic_in_call_touch_round_unhold_thumb.png
ic_in_call_touch_round_unhold_alt
$ic_in_call_touch_round_unhold_alt_thumb.png
ic_jog_dial_answer
$ic_jog_dial_answer_thumb.png
ic_jog_dial_answer_and_end
$ic_jog_dial_answer_and_end_thumb.png
ic_jog_dial_answer_and_hold
$ic_jog_dial_answer_and_hold_thumb.png
ic_jog_dial_decline
$ic_jog_dial_decline_thumb.png
ic_jog_dial_silence_ringer
$ic_jog_dial_silence_ringer_thumb.png
ic_jog_dial_sound_off
$ic_jog_dial_sound_off_thumb.png
ic_jog_dial_sound_on
$ic_jog_dial_sound_on_thumb.png
ic_jog_dial_unlock
$ic_jog_dial_unlock_thumb.png
ic_jog_dial_voice_search
$ic_jog_dial_voice_search_thumb.png
incall_photo_border_med.9
$incall_photo_border_med.9_thumb.png
ic_in_call_touch_add_call
$ic_in_call_touch_add_call_thumb.png
ic_in_call_touch_answer
$ic_in_call_touch_answer_thumb.png
ic_in_call_touch_dialpad
$ic_in_call_touch_dialpad_thumb.png
ic_in_call_touch_dialpad_close
$ic_in_call_touch_dialpad_close_thumb.png
ic_in_call_touch_end
$ic_in_call_touch_end_thumb.png
ic_in_call_touch_hold
$ic_in_call_touch_hold_thumb.png
ic_in_call_touch_merge_call
$ic_in_call_touch_merge_call_thumb.png
ic_in_call_touch_swap
$ic_in_call_touch_swap_thumb.png
ic_in_call_touch_unhold
$ic_in_call_touch_unhold_thumb.png
ic_in_call_touch_dialpad_close
$ic_in_call_touch_dialpad_close_thumb[1].png
dial_num_star_blk
$dial_num_star_blk_thumb.png
dial_num_star_wht
$dial_num_star_wht_thumb.png
ic_dial_action_call
$ic_dial_action_call_thumb.png
ic_dial_action_delete
$ic_dial_action_delete_thumb.png
ic_dial_action_voice_mail
$ic_dial_action_voice_mail_thumb.png
ic_dial_number_blk
$ic_dial_number_blk_thumb.png
ic_dial_number_wht
$ic_dial_number_wht_thumb.png
ic_menu_contact
$ic_menu_contact_thumb.png
ic_tab_selected_contacts
$ic_tab_selected_contacts_thumb.png
ic_tab_selected_dialer
$ic_tab_selected_dialer_thumb.png
ic_tab_selected_recent
$ic_tab_selected_recent_thumb.png
ic_tab_selected_stared
$ic_tab_selected_stared_thumb.png
ic_tab_unselected_contacts
$ic_tab_unselected_contacts_thumb.png
ic_tab_unselected_dialer
$ic_tab_unselected_dialer_thumb.png
ic_tab_unselected_recent
$ic_tab_unselected_recent_thumb.png
ic_tab_unselected_stared
$ic_tab_unselected_stared_thumb.png
 
Locations of visitors to this page