📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

285行目: 285行目:
ディスカバリは行わないため、LOCATIONのパーミッションは設定しない。<br>
ディスカバリは行わないため、LOCATIONのパーミッションは設定しない。<br>
  <syntaxhighlight lang="xml">
  <syntaxhighlight lang="xml">
  <!-- AndroidManifest.xml -->
  <!-- AndroidManifest.xmlファイル -->
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.keicode.android.testapps.bttest1c">
  <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.keicode.android.testapps.bttest1c">
308行目: 309行目:
  </syntaxhighlight>
  </syntaxhighlight>
<br>
<br>
状態を表示するためのTextViewと、サーバから送信される文字を表示するためのTextViewの計2つのTextViewを並べている。<br>
状態を表示するためのTextViewとArduinoおよびHC-06から送信される文字を表示するためのTextViewの計2つのTextViewを並べている。<br>
  <syntaxhighlight lang="xml">
  <syntaxhighlight lang="xml">
  <!-- res/layout/activity_main.xml -->
  <!-- res/layout/activity_main.xmlファイル -->
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
343行目: 345行目:
  <syntaxhighlight lang="java">
  <syntaxhighlight lang="java">
  // MainActivity.java
  // MainActivity.java
  package com.keicode.android.testapps.bttest1c;
  package com.keicode.android.testapps.bttest1c;
   
   
454行目: 457行目:
       OutputStream outputStrem;
       OutputStream outputStrem;
       BluetoothSocket bluetoothSocket;
       BluetoothSocket bluetoothSocket;
 
       public void run()
       public void run()
       {
       {