I have been porting over my b4a app to b4i.
I have the user interface all converted and most of the logic.
What is stumping me at this point is how to have an audible click when a button is pressed. I have a custom keyboard for entering error codes and it would be nice to have audible feedback on key presses.
This worked great in development mode.
When I try to compile to release mode for testing it fails.
When I comment out the code for the audio it compiles .
Hi,
try this code, I have added the framework import:
B4X:
Sub PlayNotification (id As Int)
Dim no As NativeObject = Me
no.RunMethod("playNotification:", Array(id))
End Sub
#if objc
#import <AudioToolbox/AudioToolbox.h>
- (void)playNotification:(int)soundId {
AudioServicesPlaySystemSound(soundId);
}
#end if
Hi,
try this code, I have added the framework import:
B4X:
Sub PlayNotification (id As Int)
Dim no As NativeObject = Me
no.RunMethod("playNotification:", Array(id))
End Sub
#if objc
#import <AudioToolbox/AudioToolbox.h>
- (void)playNotification:(int)soundId {
AudioServicesPlaySystemSound(soundId);
}
#end if