Android 2.0 Suppress local search on key event

by JP » Fri, 30 Oct 2009 13:06:19 GMT


Sponsored Links
 One of my apps implements a search function which is invoked when the
user presses the Search button.
In 1.6, Android Quick Search Box can be suppressed by overriding
Activity.onKeyDown() and picking out KEY_SEARCH.
On Android 2.0, no more... Android's Quick Search pops up no matter
whether Activity.onKeyDown(), Activity.onKeyUp() is overridden, or
Activity.setDefaultKey(DEFAULT_KEYS_DISABLE) is set.

Has anybody had any luck getting rid of the Android Quick Search?

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Getting ParserConfigurationException when trying to insert a new Calendar.

Hi ,

 I am developing an Android app which creates a new calendar on the
google server.
 Though the calendar does get created, I get an exception .
 This is how I insert the calendar.

CalendarService service = new CalendarService("CalendarFeed`");
CalendarEntry calendar = new CalendarEntry();
//Some code
URL postUrl = new URL(
                                "http://www.google.com/calendar/feeds/
default/owncalendars/full");
service.insert(postUrl, calendar);


After the calendar gets inserted , I get the following exception

WARN/dalvikvm(922): VFY: unable to resolve virtual method 16724:
Ljavax/xml/parsers/SAXParserFactory;.getSchema ()Ljavax/xml/validation/
Schema;
WARN/dalvikvm(922): VFY: unable to find class referenced in signature
(Ljavax/xml/validation/Schema;)
WARN/dalvikvm(922): VFY: unable to resolve virtual method 16732:
Ljavax/xml/parsers/SAXParserFactory;.setSchema (Ljavax/xml/validation/
Schema;)V
WARN/XmlParser(922): javax.xml.parsers.ParserConfigurationException:
org.xml.sax.SAXNotRecognizedException: 
http://xml.org/sax/features/external-parameter-entities
WARN/XmlParser(922): javax.xml.parsers.ParserConfigurationException:
org.xml.sax.SAXNotRecognizedException: 
http://xml.org/sax/features/external-parameter-entities
WARN/XmlParser(922): at
org.apache.harmony.xml.parsers.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:
84)
WARN/XmlParser(922): at
com.google.gdata.util.XmlParser.parse(XmlParser.java:682)
WARN/XmlParser(922): at
com.google.gdata.util.XmlParser.parse(XmlParser.java:576)
WARN/XmlParser(922): at
com.google.gdata.data.BaseEntry.parseAtom(BaseEntry.java:1015)
WARN/XmlParser(922): at
com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:
59)
WARN/XmlParser(922): at
com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:
39)
WARN/XmlParser(922): at
com.google.gdata.wireformats.input.CharacterParser.parse(CharacterParser.java:
100)
WARN/XmlParser(922): at
com.google.gdata.wireformats.input.XmlInputParser.parse(XmlInputParser.java:
52)
WARN/XmlParser(922): at
com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:
66)
WARN/XmlParser(922): at
com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:
34)
WARN/XmlParser(922): at
com.google.gdata.client.Service.parseResponseData(Service.java:2165)
WARN/XmlParser(922): at
com.google.gdata.client.Service.parseResponseData(Service.java:2098)
WARN/XmlParser(922): at
com.google.gdata.client.Service.insert(Service.java:1410)
WARN/XmlParser(922): at
com.google.gdata.client.GoogleService.insert(GoogleService.java:606)
WARN/XmlParser(922): at
NewCalendar.createCalendar(SetupCalendarNameActivity.java:205)
WARN/XmlParser(922): at
NewCalendar.handleCalendar(SetupCalendarNameActivity.java:113)
WARN/XmlParser(922): at NewCalendar.access
$2(SetupCalendarNameActivity.java:104)
WARN/XmlParser(922): at NewCalendar
$3$1.run(SetupCalendarNameActivity.java:97)
WARN/XmlParser(922): at java.lang.Thread.run(Thread.java:1096)
WARN/System.err(922): com.google.gdata.util.ParseException:
org.xml.sax.SAXNotRecognizedException: 
http://xml.org/sax/features/external-parameter-entities
WARN/System.err(922): at
com.google.gdata.util.XmlParser.parse(XmlParser.java:708)
WARN/System.err(922): at
com.google.gdata.util.XmlParser.parse(XmlParser.java:576)
WARN/System.err(922): at
com.google.gdata.data.BaseEntry.parseAtom(BaseEntry.java:1015)
WARN/System.err(922): at
com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:
59)
WARN/System.err(922): at
com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:
39)
WARN/System.err(922): at
com.google.gdata.wireformats.input.CharacterParser.parse(CharacterParser.java:
100)
WARN/System.err(922): at
com.google.gdata.wireformats.input.XmlInputParser.parse(XmlInputParser.java:
52)
WARN/System.err(922): at
com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:
66)
WARN/System.err(922): at
com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:
34)
WARN/System.err(922): at
com.google.gdata.client.Service.parseResponseData(Service.java:2165)
WARN/System.err(922): at
com.google.gdata.client.Service.parseResponseData(Service.java:2098)
WARN/System.err(922): at
com.google.gdata.client.Service.insert(Service.java:1410)
WARN/System.err(922): at
com.google.gdata.client.GoogleService.insert(GoogleService.java:606)
WARN/System.err(922): at
NewCalendar.createCalendar(SetupCalendarNameActivity.java:205)
WARN/System.err(922): at
NewCalendar.handleCalendar(SetupCalendarNameActivity.java:113)
WARN/System.err(922): at NewCalendar.access
$2(SetupCalendarNameActivity.java:104)
WARN/System.err(922): at NewCalendar
$3$1.run(SetupCalendarNameActivity.java:97)
WARN/System.err(922): at java.lang.Thread.run(Thread.java:1096)
WARN/System.err(922): Caused by:
javax.xml.parsers.ParserConfigurationException:
org.xml.sax.SAXNotRecognizedException: 
http://xml.org/sax/features/external-parameter-entities
WARN/System.err(922): at
org.apache.harmony.xml.parsers.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:
84)
WARN/System.err(922): at
com.google.gdata.util.XmlParser.parse(XmlParser.java:682)
WARN/System.err(922): ... 17 more

Here is the list of Jar files i included in the build path.
activation.jar,
framework.jar ,
gdata-calendar-2.0.jar,
gdata-calendar-meta-2.0.jar,
gdata-client-1.0.jar,
gdata-client-meta-1.0.jar,
gdata-core-1.0.jar,
gdata-docs-3.0.jar,
gdata-docs-meta-3.0.jar,
google-collect-1.0-rc1.jar,
jsr305.jar,
mail.jar,
servlet-api.jar.

What can be the reason for the exception?
Would be helpful if someone can tell me how to resolve this..

-- 

2. PackageManager.hasSystemFeature and hasSystemFeature buggy on emulator

How reliable is to use PackageManager.hasSystemFeature in production
code ?
This seems to be buggy on emulator.
I created a Virtual Device with no camera support, but calling
hasSystemFeature(FEATURE_CAMERA) still returns true.

-- 

3. Are there default permissions added to apps?

4. Media.insertImage locked to heavy compression

5. Block Call Text SMS

6. determine the cache size for bitmaps

7. Any api for mapview callout/bubble for tapped pins?