[AC-2848] Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40931b58
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-12-19T06:01:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, defect |
Reporter | Vinothbabu |
Assignee | Ritu Agrawal |
Created | 2012-01-24T11:44:19.000+0000 |
Updated | 2016-03-08T07:47:47.000+0000 |
Description
We are in a window, where upon saving the information we have to redirect the user to another window. So on the successful save, we are doing an activity.finish() and opening up the new window.
Titanium.Android.currentActivity.finish();
pm.view.newWindow().open();
[OR]
pm.view.newWindow().open();
Titanium.Android.currentActivity.finish();
On the new window, when i click or do any event handling stuffs... i get the following trace, with no activity happening.
TRACE] W/InputManagerService( 67): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41106250
Hi Vinoth, In order to address this issue, we need more details. Can you please send us some sample test case, steps to reproduce and the Titanium version you use? Once we get your reply, we will be able to consider this issue. Thanks,
what is resolution for this .... have you resolved or just taggged
Suman, We need a test case to move this forward. If you are experiencing the same issue, please post your test case and we will have it reviewed again. Thanks,
Testing Environment:
Ti CLI 3.2.0 Titanium SDK: 3.1.3 Android SDK: 4.2.2 Android DeviceTest Code
app.jsSteps to Test
1. Create a new project 2. Update app.js 4. And run android device 5. Click on “Test Button” 6. Second window opens correctlyhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Android.Activity-method-finish Excerpt from the documentation: In almost all cases, an activity is associated with a window. Activities are central to the Android Back button navigation - the Back button closes the current activity and returns to whatever activity was open previously. An activity is not created until the window is opened. When a window is created, its activity property refers to an empty JavaScript object. After the window is opened, a real Activity object is created and the properties from the JavaScript object are copied over. The activity property now refers to this real Activity object, which you can use to call the various Activity methods. Titanium.Android.currentActivity.finish() closes the current activity and goes back to the previous activity. If you have a single activity then there is no activity to go back to and you run into the error you described. You should design your application in a way so that you have an activity to fall back to. Please refer to the example code above that works fine since we are closing the second window activity in this case.