From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
Line 10: Line 10:
 
===Change sound===
 
===Change sound===
  
;<code>[gn:act_nfcWidgetSoundChange]|[target,fileName]</code>
+
:;<code>[gn:act_nfcWidgetSoundChange]|[target,fileName]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] where the sound will be changed
 
| [[target]] where the sound will be changed
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
** [[GnEditText]]
+
** <code>[[GnEditText]]</code>
 
|-
 
|-
| fileName
+
| <code>fileName</code>
 
| hardcoded value which represents name of file stored in assets folder
 
| hardcoded value which represents name of file stored in assets folder
 
|-
 
|-
Line 28: Line 28:
  
 
====Example====
 
====Example====
<code>@+id/nfcScan</code> - GnEditText<br>
+
:<code>@+id/nfcScan</code> - GnEditText<br>
<code>myCustomNfcSound.mp3</code> - sound file name<br><br>
+
:<code>myCustomNfcSound.mp3</code> - sound file name<br>
<code>[gn:act_nfcWidgetSoundChange]|[@+id/nfcScan,myCustomNfcSound.mp3]</code>
+
:; ⤷ <code>[gn:act_nfcWidgetSoundChange]|[@+id/nfcScan,myCustomNfcSound.mp3]</code>
 
<hr>
 
<hr>

Revision as of 16:17, 12 July 2017

gn:act_nfcWidgetSoundChange

Description
Action used to change NFC sound from default to custom when NFC tag is scanned.
Action returns
void

Action signatures

Change sound

[gn:act_nfcWidgetSoundChange]|[target,fileName]
Parameter Description
target target where the sound will be changed
fileName hardcoded value which represents name of file stored in assets folder

Example

@+id/nfcScan - GnEditText
myCustomNfcSound.mp3 - sound file name
[gn:act_nfcWidgetSoundChange]|[@+id/nfcScan,myCustomNfcSound.mp3]