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

Hi,

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 Search.java 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" };

@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);

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

setContentView(R.layout.search_data);

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"
android:label="Search">

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

<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
----------
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:) :) :)

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

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests