I am working on a relatively simple app using PhoneGap that is designed to be a field guide. Basically there will be buttons for different sections of the field guide. Tapping on one of these buttons will transition the user to another page with the content.
However, I would like to implement search functionality if possible. For example, the user could input a query and the app will return which "pages" that query appears on. I'm not really sure what the best way to go about implementing this would be, so any suggestions would be greatly appreciated.
The only type of search function I've used thus far with PhoneGap is using a filter search to search on a set of list elements.
If you have lots of .html files with your conten, a good option is to use Zoom search engine.
You have to execute a program and it will scan your .html files and index keywords.
You will have to style yourself the "search results" page, because the default isn't mobile friendly
Related
I need to give a search box in my android app. As the user starts typing in the search text, I need to show him relevant suggestions. (As we see in the google-search widget on the home screen. If we see from the logs, com.android.quicksearchbox/.SearchActivity is started with android.search.action.GLOBAL_SEARCH intent and it searches in following: corpora:[web, apps, com.android.contacts/.activities.PeopleActivity]).
Only thing is I need the suggestions to be displayed from the web & my application DB.
Any idea how to implement this ? Do I need to implement my own SuggestionsProvider or can I directly use the native implementation? If so, how?
I think i figure it out myself.
Went through Searchable Dictionary code & QuickSearchBox code in android source.
Need two start 2 activities in a background thread. One will search for the search-term in my DB & other will search the same in Google. All the results will be seen in the suggestion list.
Google Suggest API provides suggestions as the user enters the text.
So im building an Android application and want to include a search feature to let users use it instead of having to look through the apps many activities and pages. Cant seem to find any info on the best way to do this anywhere else. Thanks in advance
Ok so im building an app that will serve as a game guide for a popular PS3 game. Within the app will be many subjects and topics and i would like to give users the ooption to just use a search bar on the main screen of the app to search throughout the entire application and then provide them with a list of results that are clickable and take them directly to the chosen activity or place in the application. (Say it was an app for making whiskey, i would want them to be able to search on the main page for Jack Daniels instead of hitting buttons that navigate from Mainpage>American Whiskey's>Bourbon>Jack Daniels. )
I am working on an application that uses WebView to display multiple documents that are hosted online. Preferably, I'd like to have it set so that no scrolling is required. Instead, a "Next" button could be used to bring up a "new page" that would be a continuation of the text.
For example, one of the documents this application would read can be found at
http://www.missionstclare.com/english/May/whole/morning/24m.html
Is there a way to easily break the document up so that it only shows what would fit in the viewport?
Note: This is for an android app using eclipse.
There is no easy, out-of-the-box way to do it.
If you are running the server, then you can check for the user agent and serve a smaller page to the device.
If you are not, you will need to use an URLConnection, retrieve the text, parse it, and display chunks of it in the WebView.
I am new to android and have been teaching myself how to create apps through the android developers website. My app itself is like a recipe book. It lets me add my favourite recipes to a database so therefore where ever I am I am able to see what ingredients and the method for creating my favourite dishes. The list is getting rather long now so I was wondering if there was a way to search through a list like you do for contacts in your phone book. This would make things a lot easier for me.
Thanks in advance
You can actually integrate the Android search box (the one that pops up when you hit the "search" hardware key) into your application, so it searches your data. There's a page on Using the Android Search Dialog in the Android Developer Guide.
Also for user convenience and habbits to use search button you can override onSearchRequested method and do anything you want, show additional layout etc...
I have a ListView, as well as a refreshListFromDB(String searchKeywords) method which updates the adapter.
I'd like to implement search, where pressing the search key on my device will pop up the standard search box (and on-screen keyboard if required), and pass the result (onKeyDown) to refreshListFromDB() - or is this considered bad UI design?
Search is a complex beast, so can anyone recommend any bare-bones examples? I don't want to use global QSB, as it's not relavent for my type of app. Do I really need to get into Intents, searchable XML, new activities, content providers etc?
I'd like to implement search, where
pressing the search key on my device
will pop up the standard search box
(and on-screen keyboard if required),
and pass the result (onKeyDown) to
refreshListFromDB() - or is this
considered bad UI design?
I don't know about "bad UI design", but the standard search box doesn't do what you say you want it to do.
Search is a complex beast, so can
anyone recommend any bare-bones
examples?
I used to have a bare-bones example, but that was before QSB, which added another pile of bones on top of the bones I had. You can still look at the larger pile of bones here, and the pieces you seek are described in (ahem) a book.
Do I really need to get into Intents,
searchable XML, new activities,
content providers etc?
To use the "standard search box", you need the first two in your list, and possibly the third depending on how you want to do it. I have both reused existing activities and created new ones in my search experiments. You will not need a content provider, though.
You could also have a look at the Searchable Dictionary Sample Application that comes with the SDK, although I think this does integrate with the Quick Search Box.