Re: [android-developers] Re: EditText and the unwanted Quick Search Box

2011-10-06 Thread Eric Carman
Hello Alvaro,

I'm glad you got this worked out. This whole thing with the Edit Text is 
weird in so many ways. Like you I ended up getting around it after a lot of 
trial and error.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: EditText and the unwanted Quick Search Box

2011-10-05 Thread Alvaro Victor Cavalcanti
I'm facing the same problem here, but under different circumstances.

I've also a standard and simple EditText, but my Avtivity does not have any 
special behaviour. At first, it's superclass implemented OnClickListener, 
which was overridden by the activity, and we removed that. Each callback 
function was created as an Anonymous inner-type, and things got working. At 
least for 30 min, then the bug showed up again.

I tried your approach of using an AsyncTask, but as most of the 
initialization code is related to UI, it could not run in another thread. 
Even with the remaining code left on the task, the problem persisted.

Have anybody else crossed this problem and got it solved?

Oh, and the device we're using is the Galaxy S II.


All the best
-Alvaro.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: EditText and the unwanted Quick Search Box

2011-10-05 Thread Alvaro Victor Cavalcanti
Problem fixed, although I have no idea why it was yielding this error.

On my code I was initializing a progress dialog as follows:

dialogWait = ProgressDialog.show(*this*, ,
getResources().getString(R.string.msg_please_wait), *true*, *true*);

   dialogWait.setOnCancelListener(*new* OnCancelListener() {



@Override

*public* *void* onCancel(DialogInterface dialog) {

Log.d(FileSystemService.LOG_TAG, onCancel());

remoteTask.cancel(*true*);

setButtonsEnabled(*true*);



}

});

dialogWait.hide();

I found out that the highlighted line was the problem after commenting all
the code, and then uncommenting line per line. I changed the initialization
of the dialog to a more standard one:

dialogWait = new ProgressDialog(this);
dialogWait.setTitle();

dialogWait.setMessage(getResources().getString(R.string.msg_please_wait));
dialogWait.setCancelable(true);
dialogWait.setIndeterminate(true);

And everything was fine. Hope it helps. :o)


On Wed, Oct 5, 2011 at 2:43 PM, Alvaro Victor Cavalcanti 
alvarovic...@gmail.com wrote:

 I'm facing the same problem here, but under different circumstances.

 I've also a standard and simple EditText, but my Avtivity does not have any
 special behaviour. At first, it's superclass implemented OnClickListener,
 which was overridden by the activity, and we removed that. Each callback
 function was created as an Anonymous inner-type, and things got working. At
 least for 30 min, then the bug showed up again.

 I tried your approach of using an AsyncTask, but as most of the
 initialization code is related to UI, it could not run in another thread.
 Even with the remaining code left on the task, the problem persisted.

 Have anybody else crossed this problem and got it solved?

 Oh, and the device we're using is the Galaxy S II.


 All the best
 -Alvaro.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Alvaro Victor Cavalcanti
[e-mail/chat] alvarovic...@gmail.com
[skype] alvarovictor
[twitter] alvarocavalcant
Systems Engineer / Aspiring Game Designer

--
Loodo - Um blog sobre Jogos e Game Design
   www.loodo.com.br
--

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: EditText and the unwanted Quick Search Box

2011-07-09 Thread Eric Carman
I believe that I've come up with a work-around - at least in my case.

I don't know why this works, but the problem hasn't reappeared in the last 
month after making these changes.

The app has TTS and Voice Recognition. I was doing all the setup by creating 
an asynctask from the onCreate of the main activity. In an act of pure 
desperation, I moved the instantiation of the asynctask into a runnable that 
I executed with delay of approx 100ms. 

I have no idea why this worked, but apparently the create was able to finish 
and whatever was confusing the EditText seems to have gone away. While I'm 
not confident that this will work in all cases (or if I just got lucky), if 
you are still having difficulty, try moving whatever system 
altering/registering tasks otherwise done in the onCreate and see if that 
helps. 

While the following code snippets aren't going to be particularly relevant 
to your app, I'm including them for the sake of example. 

* At the end of onCreate*

// Feeble Attempt to fix google qsb issue
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
new InitialLoads().execute();
}
}, 100);

* The AsyncTask that gets called *

private class InitialLoads extends AsyncTaskVoid, Void, Void {

@@Override
protected Void doInBackground(Void... arg0) {
PackageManager pm = getPackageManager();

/* establish whether the TextToSpeech class is available to us */

// static {
try {
WrapTTS.checkAvailable();
mTTSClassAvailable = true;
}
catch (Throwable t) {
mTTSClassAvailable = false;
}
// }

if (mTTSClassAvailable) {
Intent checkIntent = new Intent();
checkIntent
.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);

// Check intent to make sure TTS can be satisfied. Then start
// the activity if it is OK to proceed.
ResolveInfo resolveInfo = pm.resolveActivity(checkIntent,
PackageManager.MATCH_DEFAULT_ONLY);

if (resolveInfo == null) {
// Not able to find the activity which should be started for
// this intent
}
else {
startActivityForResult(checkIntent, REQUEST_TTSOK);
}
}

// Check to see if a recognition activity is present
ListResolveInfo activities = pm.queryIntentActivities(new Intent(
RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
mVoiceAvailable = activities.size()  0;

if (!Constants.IsProduction) {
// Force voice available on the emulators
mVoiceAvailable = true;
}

// For use with preference screen
AdvPreferences.INSTANCE.setVoiceAvailable(mVoiceAvailable);

return null;
}

}



Best of Luck.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: EditText and the unwanted Quick Search Box

2011-06-06 Thread Eric Carman

System Logs showing the Quick Search Box being triggered.

Here the app begins to be displayed.
-

06-06 07:10:54.837: INFO/ActivityManager(96): Starting: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.maskeddomain.myproject/.MyActivity } from pid 180
06-06 07:10:54.877: INFO/ActivityManager(96): Start proc
com.maskeddomain.myproject for activity
com.maskeddomain.myproject/.MyActivity: pid=5013 uid=10046 gids={1015}

06-06 07:10:54.967: VERBOSE/RenderScript_jni(180): surfaceDestroyed
06-06 07:10:54.977: INFO/ActivityManager(96): Starting: Intent
{ act=android.speech.tts.engine.CHECK_TTS_DATA
cmp=com.svox.pico/.CheckVoiceData } from pid 5013
06-06 07:10:55.377: INFO/ActivityManager(96): Start proc com.svox.pico
for activity com.svox.pico/.CheckVoiceData: pid=5020 uid=10016 gids={}

These items look a little suspicious, but right now I grasping at
straws.
-

06-06 07:10:55.417: WARN/InputManagerService(96): Starting input on
non-focused client com.android.internal.view.IInputMethodClient$Stub
$Proxy@40759888 (uid=10046 pid=5013)
06-06 07:10:55.417: WARN/InputManagerService(96): Client not active,
ignoring focus gain of: com.android.internal.view.IInputMethodClient
$Stub$Proxy@4073c0c8

06-06 07:10:55.447: INFO/ActivityThread(5020): Pub
com.svox.pico.providers.SettingsProvider:
com.svox.pico.providers.SettingsProvider
06-06 07:10:55.477: INFO/ActivityManager(96): Displayed
com.maskeddomain.myproject/.MyActivity: +605ms
06-06 07:10:55.507: INFO/TextToSpeech.java(5013): initTts()
successfully bound to service
06-06 07:10:55.507: INFO/ActivityManager(96): Start proc android.tts
for service android.tts/.TtsService: pid=5027 uid=10026 gids={3003,
1015}
06-06 07:10:55.527: INFO/ActivityManager(96): No longer want
com.android.settings (pid 4730): hidden #16
06-06 07:10:55.567: VERBOSE/TtsService(5027): TtsService.onCreate()
06-06 07:10:55.587: VERBOSE/TtsService(5027): About to load /system/
lib/libttspico.so, applyFilter=true
06-06 07:10:55.597: VERBOSE/TtsService(5027):
TtsService.setLanguage(eng, USA, )
06-06 07:10:55.607: INFO/SVOX Pico Engine(5027): loaded en-US
successfully
06-06 07:10:55.607: INFO/SynthProxy(5027): setting speech rate to 100
06-06 07:10:55.627: INFO/TelephonyRegistry(96): notifyServiceState: 0
home T-Mobile T-Mobile 310260  HSDPA CSS not supported -1 -1RoamInd:
-1DefRoamInd: -1EmergOnly: false
06-06 07:10:55.647: INFO/TelephonyRegistry(96): notifyDataConnection:
state=2 isDataConnectivityPossible=true reason=null
interfaceName=rmnet0 networkType=8
06-06 07:10:56.097: DEBUG/dalvikvm(4999): GC_CONCURRENT freed 1142K,
50% free 3663K/7239K, external 1625K/2137K, paused 3ms+3ms
06-06 07:10:56.427: INFO/System.out(4999): [INFO:3699]: g: Response
[http=200,length=96]
06-06 07:10:56.427: INFO/System.out(4999): [INFO:3703]: g: Read id 1,
status code 200
06-06 07:10:56.437: DEBUG/WifiLocator(4999): Too many no-location APs.
Will not compute a location nor go to the server. hasLocation=0
noLocation=0 cacheMiss=0
06-06 07:10:56.447: DEBUG/CellLocator(4999): Found cell location:
Position [latE7=339212209, lngE7=-843352020, accuracyMm=1046000,
confidence=75, levelId=null]
06-06 07:10:56.457: DEBUG/gmmNlpServiceThread(4999): reporting
Location[mProvider=network,mTime=1307358656456,mLatitude=33.9212209,mLongitude=-84.335202,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=true,mAccuracy=1046.0,mExtras=Bundle[{networkLocationSource=cached,
networkLocationType=cell}]]
06-06 07:11:01.277: INFO/TelephonyRegistry(96): notifyServiceState: 0
home T-Mobile T-Mobile 310260  UMTS CSS not supported -1 -1RoamInd:
-1DefRoamInd: -1EmergOnly: false
06-06 07:11:01.307: INFO/TelephonyRegistry(96): notifyDataConnection:
state=2 isDataConnectivityPossible=true reason=null
interfaceName=rmnet0 networkType=3

Here is where the Quick Search Box begins to make an appearance. So,
what is calling this intent service?
-

06-06 07:11:04.277: INFO/ActivityManager(96): Starting: Intent
{ act=android.search.action.GLOBAL_SEARCH flg=0x1000
cmp=com.google.android.googlequicksearchbox/.SearchActivity (has
extras) } from pid 180
06-06 07:11:04.337: INFO/ActivityManager(96): Start proc
com.google.android.googlequicksearchbox for activity
com.google.android.googlequicksearchbox/.SearchActivity: pid=5036
uid=10063 gids={3003}
06-06 07:11:04.387: INFO/ActivityManager(96): No longer want
com.google.android.apps.uploader (pid 1355): hidden #16
06-06 07:11:04.387: INFO/ActivityManager(96): No longer want
com.google.android.apps.maps:BackgroundFriendService (pid 3184):
hidden #17

06-06 07:11:04.427: INFO/ActivityThread(5036): Pub
com.google.android.googlequicksearchbox.shortcuts:
com.google.android.googlequicksearchbox.ShortcutsProvider
06-06 07:11:04.427: 

[android-developers] Re: EditText and the unwanted Quick Search Box

2011-06-06 Thread Eric Carman
Additional information.

On the Nexus One (2.3.4 stock w/stock keyboard), when the app starts, 
touching the EditText will bring up the soft keyboard in one of the 
following states:

1. The keyboard will have the punctuation gallery displayed (? ! , etc.)

When in this state, typing will work as expected. The EditText will receive 
the characters and the application will behave as expected. Pressing the 
back key will cause the keyboard to close, as expected.

2. The keyboard will not have the punctuation gallery displayed.

When in this state, typing will start the Google Quick Search Box. Pressing 
the back key will close the app rather than closing the keyboard.

- I've been able to replicate this on a Nexus One (2.3.4) and G-Slate 
(3.0.1). 
- The problem is intermittent and usually requires the device to sit for at 
least an hour after a successful execution before trying it again. 
- After sitting, it is far more likely to reproduce the issue. Weird... 
- It would also seem that the problem in my app only reproduces immediately 
after startup. Once the keyboard works properly, the problem doesn't occur 
during that session.

The app has the min-sdk set to 3 and runs fine on the 1.5 emulator. This 
problem reproduced with the target apk at 1.6 and 2.3.3.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: EditText and the unwanted Quick Search Box

2011-06-06 Thread Zsolt Vasvari
FWIW, I've never seen this on my Nexus One 2.3.4

On Jun 7, 8:04 am, Eric Carman ewcarma...@gmail.com wrote:
 Additional information.

 On the Nexus One (2.3.4 stock w/stock keyboard), when the app starts,
 touching the EditText will bring up the soft keyboard in one of the
 following states:

 1. The keyboard will have the punctuation gallery displayed (? ! , etc.)

 When in this state, typing will work as expected. The EditText will receive
 the characters and the application will behave as expected. Pressing the
 back key will cause the keyboard to close, as expected.

 2. The keyboard will not have the punctuation gallery displayed.

 When in this state, typing will start the Google Quick Search Box. Pressing
 the back key will close the app rather than closing the keyboard.

 - I've been able to replicate this on a Nexus One (2.3.4) and G-Slate
 (3.0.1).
 - The problem is intermittent and usually requires the device to sit for at
 least an hour after a successful execution before trying it again.
 - After sitting, it is far more likely to reproduce the issue. Weird...
 - It would also seem that the problem in my app only reproduces immediately
 after startup. Once the keyboard works properly, the problem doesn't occur
 during that session.

 The app has the min-sdk set to 3 and runs fine on the 1.5 emulator. This
 problem reproduced with the target apk at 1.6 and 2.3.3.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: EditText and the unwanted Quick Search Box

2011-06-03 Thread Eric Carman
Unfortunately, I was able to reproduce this problem today.

As such, I believe we can conclude that Voice Recognition had nothing
to do with this issue.

Back to square one. Has anyone else run into this issue?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en