fork download
  1. /*
  2.   Whats Working :
  3.  
  4.   -- This one is a Searchable activity called by a search dilog box.
  5.   -- This activity is being called just fine an also displays
  6.   List of String options[] array
  7.  
  8.   Whats not Working :
  9.  
  10.   -- the code within comment make whole app crash.
  11.   -- I have no idea of reason . my guess is that inbox of AVD is by default empty ..
  12.  
  13.   -- Leave ur suggestions as Input. thanx.. :)
  14.  
  15. */
  16.  
  17. public class SearchableActivity extends ListActivity
  18. {
  19. String options[]={"got nothing here "};
  20.  
  21. @Override
  22. protected void onCreate(Bundle savedInstanceState) {
  23. // TODO Auto-generated method stub
  24.  
  25. super.onCreate(savedInstanceState);
  26. /*
  27.   Uri uriSMSURI = Uri.parse("content://sms/inbox");
  28.   Cursor cur = getContentResolver().query(uriSMSURI,new String[]
  29.   { "_id", "thread_id", "address", "person", "date", "body" }, null, null,null);
  30.  
  31.   int i=0;
  32.   if(cur.getCount()>0)
  33.   {
  34.   while(cur.moveToNext()) {
  35.   String smsBody = cur.getString(5);
  36.   options[i++]=smsBody;
  37.   }
  38.   }
  39.   else
  40.   {
  41.   options[0]="got nothing here ";
  42.   }
  43.   cur.close();
  44.   */
  45. setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, options));
  46. //handleIntent(getIntent());
  47.  
  48. }
  49.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:48: error: reached end of file while parsing
	   } 
	    ^
1 error
stdout
Standard output is empty