How to implemnt text by search operation for static database

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

How to implemnt text by search operation for static database

Postby james_007 » Mon Jan 18, 2010 9:28 pm


As I am a new Bee to this development in android. I am trying to implement text-by-search option inside my application which is SAXParser based .I have 3 raw database file which resides inside Assets folder and I want to access that file for search operation function . I am implementing the search manager as file as Shown:

<----- import function are left intentionally--->

public class Search extends ListActivity{

private static final int SEARCH_DEFAULT_KEYS = 3;
private final String MY_DEBUG_TAG = "WeatherForcaster";
String searchKeywords;
Handlers handler ;

ParsedExampleDataSet dataSet;

String[] fileNameArr = { "IDB_DB_New.xml", "IDB_DB_New1.xml",
"IDB_DB_New2.xml" };

protected void onCreate(Bundle icicle) {

Log.e("taggle", "7");


final Intent queryIntent = getIntent();
final String queryAction = queryIntent.getAction();
if (Intent.ACTION_SEARCH.equals(queryAction))

searchKeywords = queryIntent.getStringExtra(SearchManager.QUERY);

Also I included the XML/searchable.xml file as well as Activity inside androidManifestFile.xml:
<!-- Search Activity - searchable -->
<activity android:name="Search"

<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.LAUNCHER" />

<meta-data android:name=""
android:resource="@xml/searchable" />
After this I am implementing my ArrayAdapter which is actually not working. System get crashed.

Please provide me some help for how to implement this operation to access my file successfully.....
Waiting for ur reply....

Thanks in Advance:) :) :)

Once Poster
Once Poster
Posts: 1
Joined: Tue Nov 24, 2009 11:38 am
Location: India


Return to Networking & Database Problems

Who is online

Users browsing this forum: Google Feedfetcher and 6 guests