how do I return a javaobject of the type AudioManager
I need to get back AudioManager so I can pass it into a routine to create a RemoteControlClient
I've tried
ALL fail at compile time
BobVal
I need to get back AudioManager so I can pass it into a routine to create a RemoteControlClient
B4X:
Dim jo As JavaObject
Dim joAudioManager As JavaObject
jo.InitializeContext
joAudioManager = jo.RunMethod("GetAudioManager", Null)
#If JAVA
import android.app.PendingIntent;
import android.content.*;
import android.media.*;
import android.media.RemoteControlClient;
public AudioManager GetAudioManager {
AudioManager mAudioManager;
mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
return mAudioManager;
}
#end if
I've tried
B4X:
public JavaObject GetAudioManager
Public JavaObject GetAudioManager(void)
Public GetAudioManager(void) as JavaObject
ALL fail at compile time
BobVal