Hello,
Sorry as it will be a stupid question for many of you. I have decided to learn more seriously how to use JavaObject and choosed a really simple sample : getting the LoudSpeaker state (this because there is an example on developer.android). And you know what ? I am already lost.
Well, if a good fellow around could help me understanding what I should do...
OK, here is the summary :
- seen here that I have to deal with AudioManager
- seen here that the class is "android.media.AudioManager"
- on the same page that I will get a Boolean while calling isSpeakerPhoneOn()
Well, well. So I started really slowly trying to understand, dealing with some sample found here but with no luck.
I have seen that
Produces no error. Classy
But it becomes difficult for me to understand the way to do. In fact, I wonder if I well understand the way to access the field (I am sorry if it is simple).
If it is stupidly written, I do apologize, but you would have laughed
Thanks a lot
Sorry as it will be a stupid question for many of you. I have decided to learn more seriously how to use JavaObject and choosed a really simple sample : getting the LoudSpeaker state (this because there is an example on developer.android). And you know what ? I am already lost.
Well, if a good fellow around could help me understanding what I should do...
OK, here is the summary :
- seen here that I have to deal with AudioManager
- seen here that the class is "android.media.AudioManager"
- on the same page that I will get a Boolean while calling isSpeakerPhoneOn()
Well, well. So I started really slowly trying to understand, dealing with some sample found here but with no luck.
I have seen that
B4X:
Dim Jo As JavaObject
Jo.InitializeStatic("android.media.AudioManager")
But it becomes difficult for me to understand the way to do. In fact, I wonder if I well understand the way to access the field (I am sorry if it is simple).
B4X:
Dim Jo As JavaObject
Jo.InitializeStatic("android.media.AudioManager")
Log(Jo.GetField("isSpeakerphoneOn"))
If it is stupidly written, I do apologize, but you would have laughed
Thanks a lot