PhoneGap's vibrate() and beep() functions break in iPhone, Android emulators - iphone

I have a PhoneGap app that I'm testing on webOS, Android, and iPhone. I'm using physical devices as well as emulators (the ones that come with their respective SDKs, not the PhoneGap emulator).
Part of the code uses the navigator.notification.vibrate() and navigator.notification.beep() functions.
All the physical devices I'm using either perform the behavior or ignore it if they're not capable (e.g., the iPod can't vibrate). However, the emulators behave differently.
The Android emulator kills the app whenever the beep() function is called. The iPhone emulator causes the app to hang whenever the vibrate() function is called.
Is there any way to get the emulators to ignore those function calls when they are unable to execute them? That is, is there a way to get them to degrade gracefully so I can test the app both places without having to modify the code specifically for the emulators?

I don't think this is an issue with the emulators. I can use both vibration and audio alerts in my native applications. These both function fine in the emulator. I think it the problem is how PhoneGap is handling these functions in native code. Are you suggesting that these functions work on the device but not the emulator?

Related

can i create android and ios applications with flutter without android emulator , with just flutter sdk and vscode and browser

I learned dart and I want to access flutter, but I was surprised by android studio because my computer is weak.so,can i create android and apple applications with flutter without android emulator , with just flutter pack and vs code and browser
If you only work with simple UI widgets yes you can use the embedded development tools within the browser to get the dimensions of the device you working on like so
But, most of the cases there are libraries work differently according to the platform so it might work with the web but not with android or iphone and you can not test it without the actual device.
And yes VS code is a very good with flutter and might be better than android studio but it won`t make the difference you expected, in my opinion what make it faster is to use an actual device for testing and not using the emulator, also don't use a lot of application along side with the IDE, like if you are using spotify, listening to youtube video or following a tutorial just use your phone because browsers as bad as emulator.
You can use a text editor and the command line tools to build flutter apps and test them on a real device.
I wouldn't recommend it though.
You could give VSCode a try as it is a more lightweight environment.
Your computer should handle testing on a real device, which requires only a USB cable. Accessing the application in the browser would probably eat a lot more memory. You can read about how to use the real device with flutter here.

Android Launch screen take more time than a native one for Flutter

I'm new to Flutter, and I noticed that the launch screen for Android take more time than usual for a native app, I followed the instructions here
But for IOS, everything is working fine.
Is there a way to make the launch time for Android faster?
Thanks!
Flutter is a Cross Platform. When ever you to compare with Native then it always slower than Native Apps. Both Android and IOS handling and Behaviour are different so that why you got different for Lunching time..

Using IOS device to develop an Android game

as the title described my issue , my question seems to be dumb a little ; But because I don't own an Android device , But I published Android Apps using Genymotion Emulators. And I tried to download Unity Remote App on my Emulator but it does not work that well.
So my question here is : Can I use my iPhone device to test and develop the game that will be published to android users?
Yes, it is possible to do that since the Input methods being touches do not differ. The only thing you have to keep in mind is the wide range of resolutions used by android devices.
You can use can use your iphone for testing but jusst for the logic. The performance and resolutions are very different for android. Also if there is any platform specefic code you have written in unity then you have to take care of that.
Besides using your iPhone you can generate an APK from unity and install it on the android emulators to test.

Workaround for fast test of GWT app on iPhone?

I started a GWT project targeted for iPhone (and later for other mobile platforms). Now there's a problem:
* I can use Safari on iOS to test it, but I have to compile my app which takes a while even after performance optimizations mentioned for example how-do-i-speed-up-the-gwt-compiler;
* I can NOT use Safari in gwt-debug mode to make quick tests without compilation Java to JS because there's no GWT plugin for Safari on iOS.
So: is there a workaround for fast test of GWT app on iPhone?
Same thing here. I have been developing a GWT app using PhoneGap to bring it to iOs and Android. I ended up just using Firefox for development, every once in a while letting the app run in the iOS Simulator (coming with XCode). But since the app is using geolocation via PhoneGap, there was no way around installing it on the phone every once in a while to make sure it behaves.
I found some mobile dev emulators, one that is coming to my mind is called Ripple. There are others out there, but non of them worked for me.

Would it be possible to speed up Android Emulator by removing unnecessary apps?

I am using Android SDK 1.6 and developing some simple apps. It seems everytime Android Emulator loads every default apps, like message music browser etc... I guess this cause the booting process slow (takes 1 minute overhead for me to test the code every time).
Would it be possible to take these apps out and just have my apps on the emulator? My purpose is to have a faster boot up time on emulator.
emulator -help
there are a few things you can disable.
Why you would want to disable stuff instead of having a more accurate representation of how it will actually behave on the real device, I don't know.