cocos2d-x device vibrate in Lua - android

I would like some guidelines how to get device vibration working using Lua with cocos2d-x. Initially I would like a solution for Android, but eventually I require an iOS solution as well
I can see a solution here to get the vibration working in C++:
How to add vibration to cocos2d-x 3.2 on Android and iOS devices?
But I am unsure how to incorporate this solution into my Lua project so I can call the vibrate function from Lua.

Related

Xbox controller vibration on mobile device - Godot

I'm developing a game that uses vibration for the Xbox controller. It works fine on PC using Input.start_joy_vibration(), but when I'm testing it on an Android device it just doesn't work.
I tried to check the permissions and stuff like that, but none of them worked.
PS: I'm trying to vibrate the controller, not the device on Android!
For Android, you need to use Input.vibrate_handheld:
var duration_ms := 500
Input.vibrate_handheld(duration_ms)

How to query the music library of a mobile device (both iOS and Android) using the Qt framework?

I am trying to build yet another specialized music player which should run seamlessly both on Android and iOS (and of course on the more common desktop platforms such as Linux and MacOs and possibly Windows). The Qt framework seems to be the best option so I am currently using Qt 5.11.1 and began by cannibalizing their "Multimedia Player" example.
However, what I now need to do is to query and autoload the music library residing locally in the mobile device, and I need to do it reliably and portably across platforms. I cannot see any way to do this with Qt, and I am stuck with this problem; and by the way, the QStandardPaths class from Qt 5 seems to be completely broken as far as music is concerned: it reports reliably the music location path only for the MacOs desktop platform - Linux, Android and iOS are not reported correctly.
Is there any way to do this correctly? Please advise, thank you.

Call Native android signals using phonegap

Hi everyone am new to android and developed projects on c, dot net frameworks and python. I have to develop application for android and iPhone tablets. Currently I have to write application for android and have two options.
1) Use java and android sdk
2) Use Phonegap
I would love to use Phone-gap because it's seems pretty much easy as I am familiar with HTML, CSS and JavaScript. But that's not my limitation as I have used jav with E-clips earlier. much better hint is single app for android and Iphone.
My question is if phone-gap will work for me. what I need to start my app on start-up without showing desktop and always on top. and read screen on/off actions. I have crafted kiosk and installed 10.1" android 4.1 tablet. I have to develop app to give it a POS look. My app should start as early as my device boot and always remain on TOP unless explicitly closed.
Any suggestion will be helpful for me as I am new and have only created hello world app on both.

Using WebGL in native Android App

I need to make a 3D animation across the web, android and iOS platforms. My question is, is it possible to use WebGL to make the animations in native android and iOS apps? As I would write the animation once and it would in theory port to the android and iOS with out any problems or am I going to have to simply use the OpenGL ES to make the animations for the mobile devices and webGL for the web.
Disclaimer: I work for ludei
So, that's exactly what a company called ludei is preparing to launch ;)
We have it working on Android 2.3 (even on a Nexus One!) through 4.2, and iOS 4 (I think?) and up. We don't rely on the system browsers or webviews, so there are no "private libraries" problems, and we support versions of Android that can't have WebGL otherwise.
We're giving it the final touches now, but we should be able to release it in a few weeks :)
Check out http://impactjs.com/ for iOS they are allowing you to use threeJS //asmallgame.com/labsopen/webgl_impact/ right now for Android it is only supported on Chrome Beta and you have to enable the flag http://thenextweb.com/google/2013/01/25/google-finally-makes-it-easy-to-enable-webgl-support-in-latest-chrome-for-android-beta/ I would expect webGL to be fully supported with key lime pie version of android coming out soon. Also you can hack the iAd platform to support it on iOS but you will not get it through the app store due to using private libraries. github.com/benvanik/WebGLBrowser also be aware of github.com/kripken/emscripten because firefox recently came out with asmJS on odin monkey techcrunch.com/2013/03/21/firefox-nightly-now-includes-odinmonkey-brings-javascript-performance-closer-to-running-at-native-speeds/ this enabled firefox to port over unreal engine to webgl in only a few days at the last GDC so hopefully chrome and other browser start supporting asmJS for the obvious speed boost. techcrunch.com/2013/03/27/mozilla-and-epic-games-bring-unreal-engine-3-to-the-web-no-plugin-needed/
WebGL is not fully supported on all browsers, however both Android and iOS have native OpenGL views that can be used (and will provide a much faster experience than WebGL). Once your environments are set up for each platform, using the same code will be mostly trivial.
Although cocos2d-x does not support 3D animations, its documentation may help you get started for cross-platform apps using openGL.

PhoneGap Android iOS NFC

I want to build an Cross-Platform App with PhoneGap. This App should run on Android and iPhone. The Android Version should be able to scan NFC Tags. Is it possible to do this with PhoneGap or do I have to write two native Apps, one for Android and one for iOS?
Thanks
Iphone has no NFC enabled devices yet. You can build the app with Phone GAP and will work in Android (there's a lot of blogs that explain how to do it) however not sure about if the app will launch in iphone due to it NFC required capabilities....
Today I suggest to write the app Native on Android... and wait a little to the Iphone 5.
You can write a plugin for PhoneGap to provide the NFC capability of the platform you are on. Here's one for Android.
https://github.com/chariotsolutions/phonegap-nfc/
When iphone 5 comes out with NFC you can just write the plugin for iPhone and add it to your project.
Update: iPhone 5 doesn't have NFC. However iPhone 6 does, but only supports ApplePay and SDK/API is not yet provided by apple.

Categories

Resources