Map Search NumberFormat Exception in android platform 2.2
<p>Friend's
     I implemented map with search option in my application,when i run the application in HTC,SonyEricson it's working well,but when i make the search in Motorola Droid 2.2,i'm getting numberformat exception,
here my code for search option</p>

<pre><code>findViewById(R.id.map_search).setOnClickListener(
     new OnClickListener() {
      public void onClick(View v) {
       try{
       onSearchRequested();
       }
       catch(Exception e)
       {
        Log.v("Error",""+e);

       }
      }
     });
</code></pre>

<p>Here i fetching the data from database to search list data to user.
Here my code for database side </p>

<pre><code>@Override
 public Cursor query(Uri uri, String[] projection, String selection,
   String[] selectionArgs, String orderBy) {

if (uriMatcher.match(uri) == BRUMAPS_ID) {
   long id = Long.parseLong(uri.getPathSegments().get(1));
   selection = appendRowId(selection, id);
  }
if (uriMatcher.match(uri) == BRUMAPS) {
   db = news.getReadableDatabase();
   cursor = db.query(TABLE_NAME2, projection, selection,
     selectionArgs, null, null, orderBy);

  }

}
</code></pre>

<p>below the exception i'm getting in Moto-Droid 2.2 even in Droid 2.1 is working good</p>

<pre><code>10-22 14:14:20.832: DEBUG/ThrottleService(60): onPollAlarm - roaming =false, read =0, written =0, new total =0
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319): error changing cursor and caching columns
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319): java.lang.NumberFormatException: 
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at java.lang.Long.parseLong(Long.java:347)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at java.lang.Long.parseLong(Long.java:320)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.database.MatrixCursor.getLong(MatrixCursor.java:255)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.database.CursorWrapper.getLong(CursorWrapper.java:127)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.CursorAdapter.getItemId(CursorAdapter.java:156)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.AutoCompleteTextView.buildDropDown(AutoCompleteTextView.java:1248)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1137)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.AutoCompleteTextView.updateDropDownForFilter(AutoCompleteTextView.java:1019)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.AutoCompleteTextView.onFilterComplete(AutoCompleteTextView.java:1002)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.app.SearchDialog.onDataSetChanged(SearchDialog.java:612)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.app.SuggestionsAdapter.notifyDataSetChanged(SuggestionsAdapter.java:193)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.CursorAdapter.changeCursor(CursorAdapter.java:260)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.app.SuggestionsAdapter.changeCursor(SuggestionsAdapter.java:238)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.CursorFilter.publishResults(CursorFilter.java:67)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:282)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.os.Looper.loop(Looper.java:123)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at android.app.ActivityThread.main(ActivityThread.java:4627)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at java.lang.reflect.Method.invokeNative(Native Method)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at java.lang.reflect.Method.invoke(Method.java:521)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-22 14:14:21.442: ERROR/SuggestionsAdapter(319):     at dalvik.system.NativeStart.main(Native Method)
10-22 14:14:21.493: DEBUG/AndroidRuntime(319): Shutting down VM
10-22 14:14:21.493: WARN/dalvikvm(319): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
10-22 14:14:21.522: ERROR/AndroidRuntime(319): FATAL EXCEPTION: main
10-22 14:14:21.522: ERROR/AndroidRuntime(319): java.lang.NumberFormatException: 
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at java.lang.Long.parseLong(Long.java:347)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at java.lang.Long.parseLong(Long.java:320)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.database.MatrixCursor.getLong(MatrixCursor.java:255)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.database.CursorWrapper.getLong(CursorWrapper.java:127)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.widget.CursorAdapter.getItemId(CursorAdapter.java:156)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.widget.AutoCompleteTextView.buildDropDown(AutoCompleteTextView.java:1248)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1137)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.widget.AutoCompleteTextView.updateDropDownForFilter(AutoCompleteTextView.java:1019)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.widget.AutoCompleteTextView.onFilterComplete(AutoCompleteTextView.java:1002)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:285)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.os.Looper.loop(Looper.java:123)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at android.app.ActivityThread.main(ActivityThread.java:4627)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at java.lang.reflect.Method.invokeNative(Native Method)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at java.lang.reflect.Method.invoke(Method.java:521)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-22 14:14:21.522: ERROR/AndroidRuntime(319):     at dalvik.system.NativeStart.main(Native Method)
10-22 14:14:21.563: WARN/ActivityManager(60):   Force finishing activity com.example.brown/.Bru_Maps
10-22 14:14:22.172: WARN/ActivityManager(60): Activity pause timeout for HistoryRecord{44eed238 com.example.brown/.Bru_Maps}
10-22 14:14:23.671: WARN/InputConnectionWrapper.ICC(108): Timed out waiting on IInputContextCallback
10-22 14:14:25.813: WARN/InputConnectionWrapper.ICC(108): Timed out waiting on IInputContextCallback
10-22 14:14:26.451: DEBUG/dalvikvm(108): GC_EXTERNAL_ALLOC freed 2450 objects / 141280 bytes in 320ms
</code></pre>

<p>what reason for getting this problem in Droid2.2 alone,but it works ion other devices.how can i fix this problem.</p>

<p>Thanks in advance</p>
