Reply To: Shield is in the car

Home Forums Hardware AutoSense Shield Shield is in the car Reply To: Shield is in the car

Profile photo of -Jeff-

Your last comments when we looked at this before:

It should be a colon ”:” as in ”channel:2”.

The code is as follows:

if (customIntent != null ) {
Intent intent = new Intent(getCustomIntent());
if (customIntentExtraData != null) {
String[] extraData = customIntentExtraData.split(”:”);
if (extraData.length == 2) {
intent.putExtra(extraData[0], extraData[1]);

Basically ”getCustomIntent()” returns the ”android.intent.action.BONOVO_SET_AUDIO_CHANNEL”, then it checks if there is extra data or not, and if so, splits it on the colon, ”channel:2” into an array as extraData[0] = channel, and extraData[1] = 2. Then it puts the extra data into the intent, ”putExtra(”channel”, 2)” and sends it off.
I did just have the though though, in the code you sent the ”2” is an integer, and I’m sending a string. I will make a quick change to check if the second part, the 2, is an integer or not, and if it is send an int not a string.

Also now the HD tuner does not always reconnect. ( might be a power thing)

Do the IO outputs work? can I make a button as a switch for an output? or an Output controlled by and app? it that functionality there yet?

  • This reply was modified 4 years, 2 months ago by Profile photo of Eric Eric.