#1 2016-06-14 11:42:43

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 35

Default or native sound when "click" events!!!

Hello,

I am still learning with your software... pretty cool !!! ;-D.
Now I am trying to produce a sound when someone does a "click"... I know I can use "PlaySound" action, but I wonder if we can call the native or default touch, tap, or click sound define on mobile settings.

I have tried "Beep" action, but the sounds belong to notification sound at mobile settings... I wonder if we can call the tap, touch or click sound.

Hope you understand me!!! Any suggestion???

Thank you so much!!!

Eduardo.

Offline

#2 2016-06-14 12:18:17

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Default or native sound when "click" events!!!

Hello Eduardo,

I think we must start by searching where the system stores the default audio files. Then, probably we need to use the Media plugin for Apache Cordova (not included in App Builder "out of the box" but available like any other non included plugin) to reproduce such files. The first do not appear as easy as found certain media files, but we need also to know what of these files are predefined in the system: something I don't know right now how to achieve... except if we can found an Apache Cordova plugin to do this...

Offline

#3 2016-06-14 14:14:29

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 35

Re: Default or native sound when "click" events!!!

Hello,

I found this plug-in for PhoneGap that exactly makes "Native tick sound on button clicks", I tried to adapt for App Builder, but it is not working... maybe be one of you guys can help me... It is possible to adapt plugings from PhoneGap to App Builder???

https://github.com/VVelda/device-feedback

Thank you so much!!!

Offline

#4 2016-06-14 17:44:04

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Default or native sound when "click" events!!!

Hello Eduardo,

Taking a look at that plugin, I am not completely sure they are what you wanted. However, use the "feedback" plugin is quite easy, or maybe a little more complex if we wanted some of their features enabled. Please, let me to explain.

Use the plugin is as easy as add the plugin ID (cordova-plugin-velda-devicefeedback) in the app's option dialog, under the Cordova tab and the "Custom plugins" editbox. Then we can use the plugin's API, as you can see in this attached sample:

Feedback_plugin.zip

However, taking a look we apparently can use the plugin in other way, that is, using some events like "ontouchstart" and "ontouchend" in certain controls. This is also not quite difficult, but requires a little more Javascript code to prepare the events' listeners.

Offline

#5 2016-06-15 09:19:53

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 35

Re: Default or native sound when "click" events!!!

David,

THANK YOU SO MUCH!!! It is working so good... With this plug-in enabled, I can use the mobile setting for the touch or tap behavior (sound or vibrate), and respect the mobile owner audio/vibrate settings configuration. Thank you so much!!!

Offline

#6 2016-06-15 11:35:11

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Default or native sound when "click" events!!!

Hello Eduardo,

Always thanks you. And thanks also to the Cordova plugin's author. You can update your App Builder copy if you like, since this Apache Cordova's plugin is now implemented by an App Builder's plugin.

From the App Builder history file:

* Add the new Feedback App Builder's Javascript plugin. This plugin uses certain Apache Cordova's plugin to provide native feedback to the user in Android. The plugin provide to us six actions. Take a look also to the new Feedback application sample in order to view such actions working.

Hope this can be useful for you Eduardo.

Offline

#7 2016-06-15 12:33:08

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 35

Re: Default or native sound when "click" events!!!

David, you are simply amazing!!!!!!!!
Thank you so much, really...
Eduardo.

Offline

#8 2016-06-15 12:33:48

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Default or native sound when "click" events!!!

You're welcome! wink

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.