Android :: How To Declare Default Searchable Activity
Oct 28, 2010
I am trying to implement search in my application.
My application contain 4 activities and I want to add the search dialog only on 3 of them while only one of them (ProductsActivity) will be the default context.
unfortunately while I activate the search I keep getting the following error:
"Key android.app.default_searchable expected String but value was a java.lang.Integer. The default value was returned." code...
View 1 Replies
Sep 10, 2010
In my thread I create an inner activity 'B' at one point in order to launch another activity for result. I need to declare this in my Android manifest file but can not work out what the name of it is as the standard ".B" does not work as it says that activity does not exist. How can I declare this activity?
View 1 Replies
View Related
Jan 27, 2012
I have a little doubt, I spend data from Activity A to B with a bundle in the intent.Where I should declare the keys? In Activity A or B? Only to avoid confusion, I'm talking about the string that defines the data that will be set in the Bundle.Ex: public static final String KEY = "MyKey";
I declare always in the Activity A, but I think that if I could let all the keys in a file would be better, like keys.java or something like that.Obviously, this is nothing that is generating errors, just a doubt about convention, a thing that I consider very important in software development.
View 5 Replies
View Related
Apr 25, 2010
I've followed the SearchManager documentation yet am still having trouble making one of my app's activities searchable. From my activity, the Search dialog appears, I enter a query, hit search, my activity reopens, then I see this in the log:
CODE:.....................
It appears to me that everything is fine up until the last three lines. The "NI" lines are getIntent().toString(), getIntent().getAction(), and getIntent().hasExtra(SearchManager.QUERY) respectively.
ActivityManager appears to be starting my activity with the correct action. Then when my activity starts, it contains no action!? What am I doing wrong?
The relevant portion of my manifest is:
CODE:..............................
View 1 Replies
View Related
Mar 16, 2010
I have a preferences.xml that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference android:name="Sample" android:enabled="true"
android:persistent="true" android:summary="Sample" android:defaultValue="3.0"
android:title="Sample" android:key="sample" /> </PreferenceScreen>
When I do sp.getString("sample", "3.0"), it works fine and returns a string, but it shouldn't be a string, it should be a float. Running sp.getFloat("sample", 3.0f) throws a ClassCastException because it is a string. What should I put in the XML so that the preference is stored as a float?
View 3 Replies
View Related
Aug 4, 2010
I have a doubt
For using Phone contact we have to set permission in manifest file
<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS" />
My doubt is where(in which file) it is written in Contact Application that you have to set these permissions. because i want to make a sample application and i want if anyone want to get data from my application, have to get some permission.
Please let me know that where we plan which permission has to get by other application to get data from a application.
View 3 Replies
View Related
Jan 31, 2012
How is declare global variable in android...some link send me...am searched various post..but am not clear about dis concept...send me valuable link..
View 3 Replies
View Related
Aug 27, 2009
I was wondering if anyone could give me hints on this one (i am re-posting an older version of a question i once had): i created a new attrs.xml that adds some functionality to the soft keyboard sample code.. code...
View 2 Replies
View Related
Apr 23, 2010
How do I declare an Android UI element using XML?
View 1 Replies
View Related
Jun 29, 2010
A few days ago I was struggling to find a way to use custom intents for my alarms. Although I got clear answer that I have to customize the Intents based on some unique ID eg. setAction() still have some problems.This can happen more than once for a contact. And when the second message is generated, the notification is raised well (message is fine there) but the intent when the user actions the notification it uses old data, so previous message is passed and not the brand new message.So someway the intent is caching and reusing previous extras. How can I make it unique per contact and per action?
View 3 Replies
View Related
Aug 4, 2012
how do i declare URL variables
i tried this, but the "URL"s are marked as errors
Code:
URL url = new URL("URL.goes.here.com");
URL cannot be resolved to a type, is what eclipse tells me
View 2 Replies
View Related
Jul 14, 2010
I have started the default SMS application and specified the SMS text to be sent through following code- intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:")); intent.putExtra("sms_body", "SMS Text"); startActivity(intent);It worked fine and sends the message to selected number from contact list.My requirement is that i want to know the number to which my SMS was sent?
View 6 Replies
View Related
Jul 17, 2010
I have two problems with the calendar on my Moto Droid. The first is that the calendar is not searchable. Does anyone know a way to do this? I like to be able to search my calendar into the future and in the past. The second problem, is things are being dropped off my calendar. Someone please help before I throw this thing.
View 13 Replies
View Related
Nov 3, 2009
I have implemented a SearchManager which make uses of a searchable.xml with all the settings and put it in the xml/ directory.
I tried to create a new directory called xml_v4/ to add some attributes (the android:includeInGlobalSearch ie) which isn't supported in sdk3/1.5 but the xml directory seems not to be supported by the dir_suffixes.
How do I deal with this?
View 4 Replies
View Related
Nov 21, 2010
I have the sample code packages for eclipse installed. On the webpage about Searchable Dictionary v2 http://developer.android.com/resources/samples/SearchableDictionary/i... it is noted that the project source code is contained in the SDK. But the SDK only contains V1 without database usage. Can the souces be downloaded somewhere else?
View 2 Replies
View Related
Jul 25, 2010
I was the Android Developer article on Search: http://developer.android.com/guide/topics/search/index.html and was wondering if I could add other UI Elements to the searchable.xml file?
Here is what I want to do:
CODE:..................
I wan to provide the gallery as a way to specify what category to search in. Is this possible? If it is, how and where do I access the the user selection for this component? If not, how else might I implement giving a choice to the user to search more specifically?
View 1 Replies
View Related
Jan 14, 2010
A quick search didn't turn up anything about this so I thought I'd let you all know.Android Zoom (to whom I'm not affiliated) is a great way to search for apps outside of the apps marketplace. Unlike the native web site, you can search it.
View 2 Replies
View Related
Dec 21, 2009
I have implemented code to start android built in applications like email application see the following code...
View 2 Replies
View Related
Oct 19, 2010
Is there a way to reprompt the user to choose a default activity for an intent? For example, user selects his default home apk and I want him to reconsider his choice once again. I know how to do that on 2.1 and before, but is there a way to do that now on 2.2? Famous Home Switcher, which did similar thing, does not work on 2.2 anymore thanks to google team.
View 1 Replies
View Related
Feb 15, 2009
Ben Williamson wrote: > I'm working on a social bookmarking tool and I was hoping someone > could help me figure out how to give an option to make my application > the default application for bookmarking. I've noticed Steel has the > option to set it as the default web browser, Exact call log has the > same ability for the call history.... anyone know how this is > accomplished?
View 2 Replies
View Related
Apr 11, 2009
How can you specify which item gets the default focus on Activity startup? Using requestFocus programmatically does not work. On setContextView the first focusable item listed in the XML is given the default focus. When using RelativeLayout, the first item listed is not always the desired item or necessarily on top.
View 3 Replies
View Related
May 6, 2010
In iPhone, they have got an option of creating such a list which gives them ability to jump to a particular character. see the pic attached
http://www.phonemag.com/blog/wp-content/uploads/2008/03/iphone_search...
Do we have any such thing in Android?
I can setTextFilterEnabled(true) but that requires the keyboard to be present, while perhaps there now way to implicitly show keyboard on the device as we have in the emulator.
I have tried setFastScrollEnabled(true) it is good, but doesn't let you jump to a particular character.
View 2 Replies
View Related
Oct 29, 2010
I am supporting search in my app, I'd like to display a unique hint in the search box depending on what activity is being viewed.
To that end, I have a two different searchable.xml files in my xml folder:
CODE:..........
When I reference searchable.xml, everything works as expected. The second searchable xml file has the same contents as the first, but this does not work:
CODE:............
Pressing the search key does not display the search box. If I just reference the first searchable instead, it works fine:
CODE:.....................
Again, both have the same content. It looks like there is a dependency on the name "searchable.xml" within android?
If we're not allowed to have searchables named anything but searchable.xml, how do we specify different hint strings for different activities?
For example:
CODE:..............
View 2 Replies
View Related
Sep 18, 2009
For those who are familiar with the search bar this would be a quick answer (hopefully). If you look @ the searchable dictionary example (http://developer.android.com/guide/samples/ SearchableDictionary/index.html) it uses a content provider to populate suggestions. That works great however when I use the navigation keys to focus on certain suggestions this does not update my current search string. And also how is it possible that instead of launching the search straight away, when a person clicks on a suggestion it only replaces the current search query. An example may help better understand the question.
Press Search Use keyboard to enter the letter 'a' in the search box The suggestions "apple" "altogether" "apricot" are shown
I use the down navigation key to get to" apricot", however the text in the search box is still just "a", I want it to become "apricot"
And also when I press apricot on the suggestion I dont want it to launch the intent but rather just replace the text in search box to the text selected, and only actually launch the intent when the user clicks the search button/enter key.
I'm sure its just a value I need to set somewhere but I cant seem to find it in the documentation.
View 2 Replies
View Related
Jul 27, 2010
I am working on a search app and since I am a beginner, I decided to start from the searchable dictionary sample, which is quite similar to what I'm trying to achieve. Got it to work, but I have a problem: the sample loads a blank page initially, telling the user to press on the search button to start performing a search. Once search is pressed, a new page loads with a search field and button on top, allowing the user to start searching for stuff.
What I want to do is get rid of that intermediary page, so that the search field and button are loaded from the beginning, on the very first screen the app loads when started. Any ideas on how to do this? Detailed instructions/examples would be greatly appreciated, as I am a beginner in Android programming.
View 1 Replies
View Related
Oct 26, 2010
I have an activity. It does not have a title bar. The content view is just a linear layout. It looks like android draws a drop shadow at the top of my content view, directly below the status bar. Is there a way to stop that from being drawn?
My layout is just:
I have no titlebar:
requestWindowFeature(Window.FEATURE_NO_TITLE);
View 2 Replies
View Related
Oct 11, 2009
I want to have a different text string for my icon and the text that appears in Searchable Items (QSB). I have the following lines in my AndroidManifest.xml -How do I specify a different text string for Searchable Items. Code...
View 2 Replies
View Related
Sep 25, 2010
I recently bought a DroidX and am looking to import 10 years of Outlook calendar info. I don't need to do a two-way synch as I am using Touchdown for Exchange synchronization and it works great (but it is not good with large calendar history files). I just need a stand-alone calendar app that has it's own data file and can import my Outlook calendar history and allow me to search.
View 3 Replies
View Related
Oct 22, 2010
I have tried to implement the searchable dictionary sample app. Everything seems to be working except when I try to pull the results from global search. I have tried to follow everything that has been described in the docs too. code...
View 2 Replies
View Related
Jul 20, 2010
I am invoking the default SMS activity by using the following code-
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:")); intent.putExtra("sms_body", "SMSText"); startActivityForResult(intent, 11); //Here 11 is my request code
The SMS activity gets opened in emulator (5554), i type the number 5556 (device number of my second emulator) and click on "Send"
The SMS is received in second emulator(5556) successfully. I click back on 5554 (my SMS generating emulator )and come back to my application. I notice that the onActivityResult method is getting called successfully as desired.
When i check for the result code i get it as RESULT_CANCELED ( 0 ) instead of RESULT_OK (-1). The data is also coming as null.
View 3 Replies
View Related