Skip to content

Commit

Permalink
Refactor sample
Browse files Browse the repository at this point in the history
  • Loading branch information
isaidamier committed May 19, 2021
1 parent 09b1be3 commit 49c7f1a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions BluetoothLeChat/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.fragment:fragment-ktx:1.3.3'
implementation 'androidx.activity:activity-ktx:1.3.0-alpha07'
implementation 'androidx.fragment:fragment-ktx:1.3.4'
implementation 'androidx.activity:activity-ktx:1.3.0-alpha08'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("ObjectPropertyName")

package com.example.bluetoothlechat.bluetooth

import android.app.Application
Expand Down Expand Up @@ -305,7 +307,7 @@ object ChatServer {
super.onStartFailure(errorCode)
// Send error state to display
val errorMessage = "Advertise failed with error: $errorCode"
Log.d(TAG, "Advertising failed")
Log.d(TAG, errorMessage)
//_viewState.value = DeviceScanViewState.Error(errorMessage)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@

<EditText
android:id="@+id/message_text"
android:inputType="text"
android:hint="@string/enter_message"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:importantForAutofill="no" />

<Button
android:id="@+id/send_message"
Expand Down
1 change: 1 addition & 0 deletions BluetoothLeChat/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
<string name="connect_device_prompt">Connect with nearby devices</string>
<string name="send_message_button">Send Message</string>
<string name="chatting_with_device">Chatting with %1$s</string>
<string name="enter_message">enter message</string>
</resources>
8 changes: 4 additions & 4 deletions BluetoothLeChat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.32"
ext.kotlin_version = "1.5.0"
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -31,7 +31,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
6 changes: 3 additions & 3 deletions BluetoothLeChat/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Sep 03 12:48:38 EDT 2020
#Wed May 19 13:24:30 EDT 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 49c7f1a

Please sign in to comment.