intel xdk tap/click not working - android

I have a problem using the intel xkd.
I used it for 2-3 month and it worked well.
Since the last update, my app doesn't work anymore.
The application works, but it seems that the device doesn't handle the tap on screen.
if i click on a button with the mouse on the pc it works, but i i tap it on the phone the event doesn't work.
I don't know why.
if i start a new project from a default template the problem is still there so i think it's a problem related to the XDK/Cordova, but searching on their forum i didn't found nothing.

Check the js file via the embedded editor. There's a high probability that you will see errors/warnings. It could be a missing semicolon or an unclosed bracket.
Secondly, add onclick like this:
function Tap(){
alert("tapped");
}
<button onclick="Tap();">ClickMe</button>

Related

Android Emulator on Mac OS X issues clicking

Really weird issue but when I try to click once it doesn't register on the emulator but then I click again and the click registers. This is using AVD. Every other click seems to trigger in the proper place. This has nothing to do with my app just base image.
Take a look at this:
https://www.youtube.com/watch?v=axvxtGj4HPo&feature=youtu.be
and notice the first click doesn't register.
I notice the age on this thread, so not sure if you have already figured this out. I ran into something similar like this today in which no clicks were being registered at all. This issue still persisted even after closing and reopening the simulator. One thing I did notice is that the power button still worked.
I ended up fixing this by:
Clicking and holding the Power Hard Key
Restarting the device OS by clicking the Restart
After the OS Reboots, everything seems to work again.
Note: the Hard Key for power is the power button next to the volume controls on the right.
In my case it usually happens when the size on disk is very high (see in AVD Manager) and the solution in my case is to make a Wipe Data
Update #1 (Because the solution from above not always works)
Another thing I found is that when you want to swipe up from the Google bar does not open the apps menu. Then I open first the Messages app or Chrome and close again. From there the Swipe up works again.

How to stop logcat from scrolling in Android Studio

I used Eclipse before and I could easily stop logcat from scrolling, but I can't find same funcionality in Android studio. Anyone knows how to do it?
There's no dedicated button for this, but you can just click on / highlight some text around where you want to stop scrolling.
android studio have this feature
you just click on the line three times and you can selectd the line , it will stops scrolling.
I had the same issue. Simple solution:
In Android monitor, on the right, change No Filters -> Show only selected application.
Android Studio Stop scrolling log
Disable Scroll to the end
If not - you are able to scroll to necessary line manually and LogCat will not be automatically scroll to down
I actually just had a problem (in 1.2.2) where I couldn't keep it from scrolling. I tried all the tricks and proper methods mentioned here, but it kept scrolling out from under me.
Turns out there was a problem trying to connect to an emulator that had long since been disconnected, and it kept retrying. And every time it did, it reloaded everything causing logcat to refresh. So it wasn't REALLY scrolling, it just felt like it was because of how big the buffer is.
I unplugged my physical device (that was running along side the emulator), restarted Android Studio, plugged the physical device back in, and boom, it no longer kept "scrolling".
Hopefully this might help someone else. Because I was getting incredibly frustrated for a while, there.
Goodness, the trick is to search. Search for something within LogCat and then scrolling will stop. Tested: running Android Studio 1.1.0 against a real device (S5). Also, was ticking one line up and one back down until I then right clicked. Then it totally stopped. After that, I can remove the search and the scrolling is no longer automatic.

Issue - blockWebkitDraw lockedfalse [duplicate]

This question already has answers here:
Android 4.3 and PhoneGap, cant tap link
(2 answers)
Closed 8 years ago.
I'm developing app on phonegap, when i execute my app on Samsung Galaxy S4 and in sony ericsson device i'm getting the following error "blockWebkitDraw lockedfalse".
many click events are not working properly and on the above mentioned devices my app seems not working, no events are getting triggered and i get the error "blockWebkitDraw lockedfalse"
Please any one suggest how to fix the problem.
Thanks in advance.
I was banging my head with a very similar issue while testing on a Galaxy Tab 2. Here's what I discovered:
The error message in my console with tag WebViewInputDispatcher and value blockWebkitDraw lockedfalse appears to occur every single time I touch the screen, regardless of whether I click on a button or link. Therefore, this error message relates to onTouch events, not your click events as you might have expected.
When originally testing by clicking on one of my links, I originally thought the Galaxy Tab was blocking my link. It turns out, the Galaxy Tab 2 is just very insensitive to click behavior so when I thought I was clicking on the link, I was actually missing. By clicking slightly higher than I thought was necessary, I was able to activate my link.
To validate my suspicion, I greatly increased the font size of my link. With the much bigger link, I am able to click the link successfully on the first try, and my app now performs as expected. I strongly suspect that if you just make your clickable elements a lot bigger, you'll be able to click them successfully.
Hello I had the same problem and it was driving me nuts. I solved it by adding a listener to a touch event, in my case it was touchmove, the listener executed e.preventDefault(); e.stopPropagation();
this solved the issue I was having but did not prevent the notices in logcat.
I had the same problem with samsung tab 2. I read it somewhere samsung's hardware acceleration broken webkit. The problem went aways after I turned off hardware acceleration in android manifest.

How to use Sikuli for Android testing?

I am testing an Android application with Sikuli, but each time the test runs the behaviour is different:
the test stops at the first command, not finding the first image
finds only some images and the test stops at a particular image which isn't found
finds all images and the test runs successfully
Sikuli is runned on Windows 7. Does anyone know if it's a problem of focus or something else and how to solve it?
Thanks
Maybe you can fix your recognition issue by changing the matching level. From Sikuli Gui :
Click on the image
In Pattern Settings > Matching Preview, drag the Similarity bar to a value below 1.0 (try different values)
You may also need to add a delay for the browse button to appear on the screen. You could try something like this
wait("Browse.png", 10 ) # Wait for up to 10s for the app to load
You might also try increasing the size of the picture that you are matching to. Try including nearby artifacts. Remember that you can change the location on the picture that is the mouse click point if your Browse button is not dead centre.
You can try any click action twice, using a try/except block.
Sometimes the vision algorithm just fails.
Running the Android Emulator (for anything) is paaaainffullly sloooow and arbitrary.
So, it pays with Android ems to make Sikuli statements a little "smarter,"
like this:
wait(browsebutton.png, 20)
onAppear(browsebutton.png, click(browsebutton.png))
Looks busier, but it makes the script "smart" in both waiting for the button, and then clicking it as soon as it appears (instead of waiting twenty seconds if it appears after five).

Android Emulator does not work with Mono for Android

I am trying to write an application with Mono for Android. In an attempt to do this, I'm using the default template in monodevelop. I can successfully compile and run the application. When I run the application, it looks similar to the one shown here: http://docs.xamarin.com/android/getting_started/hello_world
There are two oddities in my version though:
The button is red
I can't seem to actually click the button. When I use my computers mouse, it acts like it won't click the button. This is not limited to the application either. If I try to click the home or search button in the emulator itself, I noticed that nothing happens either. Its like the emulator is not responding to my mouse.
As someone new to working with Android, can someone please tell me what I'm doing wrong? I'm using MAC OS X with Lion installed. I'm assuming that I have the SDK and Java SDK installed properly considering the app compiles and when I press "play" I can load the app in the emulator. I just can't figure out why I can't actually click the button. So bizarre.
Any ideas?
The title of this question is pretty misleading, since you're saying that the emulator is not very responsive even outside the Mono for Android application. The problem here is with the emulator itself. The one thing I would recommend trying with respect to Mono for Android is to try starting the application without debugging, as debugging will add extra overhead to running the app.
The Android emulator is notoriously slow, since it is fully emulating the ARM instruction set in software. That said, there are certain things you can do in order to squeeze some more speed out of it. One thing that I've seen make a big difference is to decrease the screen size of the emulator image. Setting this to a small screen size (such as QVGA) can make a big difference. You can manage these settings through Android's AVD Manager.

Categories

Resources