I have built a game. When the user clicks a button on the main page, he is redirected to another activity for a predefined time(say 20 s) and then he returns to the main page where he can choose another button. Now, this works perfectly on the emulator but on the phone when I clicks another button on the main page, it says the application has stopped unexpectedly. Force close. However, if I wait for say 3 s before clicking another button, it works. Is it because the images on the background of the buttons are too heavy?? Kindly help. Thanks in advance.
hey! i found out what was wrong. There was one picture which was too heavy!! it works fine now :)
Sometimes this error results from the widget like textview and so on, please delete the line related to something like textview.
Related
I have searched the same symptom but cannot be fixed.
I use appium to do some automation with UiAutomator1.
Every call the back button
driver.keyevent(4)
The app crash(or exit) and goes to the Android home page.
The log seems normal.
However, a click back button on the emulator is fine.
There is no way to go to that page without click back button.
How can I click back button, or get the view name and go to that view directly?
Thanks.
If you want to click on BACK button in android, I think the following code will work fine:
driver.pressKeyCode(AndroidKeyCode.BACK);
reference:
http://appium.io/docs/en/commands/device/keys/press-keycode/
I don't know how to fix it.
However, i use another way to fix my problem.
self.driver.start_activity("xxx", "xxx")
It may not the best solution, but it can go to the view directly
Got the same problem some time back, solved using this :
driver.navigate().back();
or you can also try using this :
driver.back();
I have a button on a banner in my home page. When I hit that button it will redirect to contact us page when in full screen. But the button is not clickable when accessing the page from an android phone. Any idea in resolving this?
it might not help much, but did you try giving "alert" in your button action? Just to check whether, the onclick function is getting executed?
Sorry for english
First this is the main screen on my application:
ok, so im creating a wallpaper application for android and when i have my xml file in this way with the image buttons:
It works completely fine.
But when i have in this format for tablets:
This version when i go back to home screen and select a diffrent category i get Force Close and i dont know why, with the first version it doesnt Force close but the other layout does? i dont under stand it could some one help me.
Thanks
Ok i found the error for some reason android doesnt like the layout format that way had to change it, thanks anyways everybody
When a webview is done loading it only shows a white page. The strangest part is that events (like a click on an anchor) are still working. After i perform this event and go back (with the back key), the webview is rendered correctly.
This behavior doesn't appear on a HTC Desire with Android 2.3.7, but it appears on the Asus Transformer Prime with Android 4.0.3.
If i put a Thread.sleep(10000) in onPageFinished() the page is visible for 10 seconds but then turns white, events are still working.
The Activity is the Launcher activity and extends a custom base activity. Every activity in my app extends this base activity. The base activity detects if a user is authorized and shows the login activity is needed. When i press the back button after the login activity is displayed, the launcher activity is shows the behavior as described above.
Don't know what to do right now to solve this problem...
The easiest way is to say that it is a bug in Android. But that doesn't solve my problem. Any suggestions to solve this case?
I have had the same problem for a couple of hours, what solved the problem for me was removing the setting below from my WebView constructor call:
this.setLongClickable(true);
I do not know why this worked.
I have created an app using appinvintor. The problem is when i hit the back button on my android it closes the whole application i just want it to go to the previous step or page, how would i code that
Currently you can't do that because right now we are given only one screen. But you can manipulate like this.
since beginning of 2012 there is the multiple screen feature in AI and now it is possible to catch the back button, see this example http://puravidaapps.com/backbutton.php
Taifun