Étape 5: CODES pour APPLICATION
Le fichier APK est ajouté ici. Vous pouvez simplement le télécharger sur votre appareil Android et l’essayer.
Ou changer le fichier original par Ed (http://forum.rfduino.com/index.php?topic=44.0) manuellement. Dans ce cas :
Regarder dans le MainActivity.java pour le morceau suivant de code et ajoutez la ligne qui est en gras :
Private Sub addData (byte [] data) {}
Mode, mode = getLayoutInflater () .inflate (android. R.Layout.simple_list_item_2, dataLayout, false) ;
TextView text1 = (TextView) view.findViewById (android. R.ID.text1) ; text1.SetText(HexAsciiHelper.bytesToHex(Data)) ;
rfduinoService.send(data) ;
Chaîne ascii = HexAsciiHelper.bytesToAsciiMaybe(data) ;
Si (ascii! = null) {}
TextView Texte2 = (TextView) view.findViewById (android. R.ID.text2) ;
Text2.SetText(ASCII) ;
}
() dataLayout.addView
vue, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT) ;
}