├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── Aspsine.xml ├── scopes │ └── scope_settings.xml ├── encodings.xml ├── vcs.xml ├── misc.xml ├── modules.xml ├── gradle.xml └── compiler.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── ic_launcher-web.png │ │ ├── ic_launcher_pink-web.png │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_pink.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_pink.png │ │ │ ├── drawable-nodpi │ │ │ │ ├── incoming.9.png │ │ │ │ └── outgoing.9.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_pink.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_pink.png │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── attrs.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ └── colors.xml │ │ │ ├── layout │ │ │ │ ├── layout_notice_avatar.xml │ │ │ │ ├── fragment_device_list.xml │ │ │ │ ├── layout_actionbar_toolbar.xml │ │ │ │ ├── fragment_splash.xml │ │ │ │ ├── item_notice_news.xml │ │ │ │ ├── item_notice_system.xml │ │ │ │ ├── item_notice_time.xml │ │ │ │ ├── activity_guider.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_chat.xml │ │ │ │ ├── fragment_guider.xml │ │ │ │ ├── dialog_fragment_device.xml │ │ │ │ ├── item_device.xml │ │ │ │ ├── fragment_chat.xml │ │ │ │ ├── item_notice_incoming.xml │ │ │ │ └── item_notice_returning.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ ├── menu_guider.xml │ │ │ │ ├── menu_chat.xml │ │ │ │ └── menu_main.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── anim │ │ │ │ └── splash.xml │ │ │ └── drawable │ │ │ │ └── circle_mask.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── aspsine │ │ │ │ └── bluechat │ │ │ │ ├── listener │ │ │ │ ├── OnItemClickListener.java │ │ │ │ └── OnItemLongClickListener.java │ │ │ │ ├── App.java │ │ │ │ ├── util │ │ │ │ ├── DateUtils.java │ │ │ │ └── SharedPrefsUtils.java │ │ │ │ ├── model │ │ │ │ └── Device.java │ │ │ │ ├── ui │ │ │ │ ├── activity │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── GuiderActivity.java │ │ │ │ │ └── ChatActivity.java │ │ │ │ ├── fragment │ │ │ │ │ ├── GuiderFragment.java │ │ │ │ │ ├── SplashFragment.java │ │ │ │ │ ├── ChatFragment.java │ │ │ │ │ ├── DeviceDialogFragment.java │ │ │ │ │ └── DeviceListFragment.java │ │ │ │ └── widget │ │ │ │ │ ├── DividerItemDecoration.java │ │ │ │ │ └── BezelImageView.java │ │ │ │ ├── adapter │ │ │ │ ├── DevicesAdapter.java │ │ │ │ └── NoticesAdapter.java │ │ │ │ ├── CrashHandler.java │ │ │ │ └── service │ │ │ │ └── BluetoothService.java │ │ ├── java-gen │ │ │ └── com │ │ │ │ └── aspsine │ │ │ │ └── bluechat │ │ │ │ ├── greendao │ │ │ │ ├── DaoSession.java │ │ │ │ ├── DaoMaster.java │ │ │ │ └── NoticeDao.java │ │ │ │ └── model │ │ │ │ └── Notice.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── aspsine │ │ └── bluechat │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── app.iml ├── settings.gradle ├── README.md ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── DaoGenerator ├── build.gradle ├── src │ └── main │ │ └── java │ │ └── com │ │ └── aspsine │ │ └── daogenerator │ │ └── MyDaoGenerator.java └── DaoGenerator.iml ├── BlueChat.iml ├── gradle.properties ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | BlueChat -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':DaoGenerator' 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BlueChat 2 | A chat app via Bluetooth. Awesome,isn't it? 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/Aspsine.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher_pink-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/ic_launcher_pink-web.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/incoming.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-nodpi/incoming.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/outgoing.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-nodpi/outgoing.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-hdpi/ic_launcher_pink.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-mdpi/ic_launcher_pink.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher_pink.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher_pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Aspsine/BlueChat/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher_pink.png -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 8dp 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/aspsine/bluechat/listener/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.aspsine.bluechat.listener; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by Aspsine on 2015/2/5. 7 | */ 8 | 9 | public interface OnItemClickListener { 10 | public void onItemClick(int position, View view); 11 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_notice_avatar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/java/com/aspsine/bluechat/listener/OnItemLongClickListener.java: -------------------------------------------------------------------------------- 1 | package com.aspsine.bluechat.listener; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by Aspsine on 2015/2/5. 7 | */ 8 | public interface OnItemLongClickListener { 9 | public void onItemLongClick(int position, View view); 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/aspsine/bluechat/App.java: -------------------------------------------------------------------------------- 1 | package com.aspsine.bluechat; 2 | 3 | import android.app.Application; 4 | 5 | /** 6 | * Created by littlexi on 2015/1/30. 7 | */ 8 | public class App extends Application { 9 | 10 | 11 | @Override 12 | public void onCreate() { 13 | super.onCreate(); 14 | CrashHandler.getInstance(getApplicationContext()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_guider.xml: -------------------------------------------------------------------------------- 1 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/aspsine/bluechat/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.aspsine.bluechat; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/aspsine/bluechat/util/DateUtils.java: -------------------------------------------------------------------------------- 1 | package com.aspsine.bluechat.util; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | /** 7 | * Created by Aspsine on 2015/2/5. 8 | */ 9 | public class DateUtils { 10 | public static final String formatDate(Date date){ 11 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("hh:mm:ss"); 12 | return simpleDateFormat.format(date); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_device_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_actionbar_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_chat.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BlueChat 5 | Hello world! 6 | Settings 7 | ChatActivity 8 | Hello blank fragment 9 | GuiderActivity 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_notice_news.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_notice_system.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_notice_time.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /DaoGenerator/build.gradle: -------------------------------------------------------------------------------- 1 | project(':DaoGenerator') { 2 | apply plugin: 'application' 3 | apply plugin: 'java' 4 | 5 | mainClassName = "com.aspsine.daogenerator.MyDaoGenerator" 6 | 7 | // edit output direction 8 | def outputDir = "../app/src/main/java-gen" 9 | 10 | dependencies { 11 | compile fileTree(dir: 'libs', include: ['*.jar']) 12 | compile('de.greenrobot:greendao-generator:1.3.0') 13 | } 14 | 15 | task createDocs { 16 | def docs = file(outputDir) 17 | docs.mkdirs() 18 | } 19 | 20 | run { 21 | args outputDir 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_guider.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_chat.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/anim/splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 13 | 21 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_guider.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle_mask.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /BlueChat.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /app/src/main/java/com/aspsine/bluechat/model/Device.java: -------------------------------------------------------------------------------- 1 | package com.aspsine.bluechat.model; 2 | 3 | /** 4 | * Created by littlexi on 2015/1/30. 5 | */ 6 | public class Device { 7 | public String id; 8 | public String name; 9 | public String address; 10 | 11 | public Device(){ 12 | 13 | } 14 | 15 | public Device(String id, String name){ 16 | this.id = id; 17 | this.name = name; 18 | } 19 | 20 | public String getId() { 21 | return id; 22 | } 23 | 24 | public void setId(String id) { 25 | this.id = id; 26 | } 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | 36 | public String getAddress() { 37 | return address; 38 | } 39 | 40 | public void setAddress(String address) { 41 | this.address = address; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 17 | 18 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffffffff 4 | #ff000000 5 | #e51c23 6 | #e91e63 7 | 8 | #00000000 9 | 10 | 11 | #3f51b5 12 | #303f9f 13 | #c5cae9 14 | #FF4081 15 | #ffffff 16 | #ffffff 17 | #B6B6B6 18 | 19 | #000000 20 | 21 | 22 | @android:color/darker_gray 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_fragment_device.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_device.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 25 | 26 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion "21.1.2" 6 | 7 | defaultConfig { 8 | applicationId "com.aspsine.bluechat" 9 | minSdkVersion 14 10 | targetSdkVersion 21 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | 15 | sourceSets { 16 | main { 17 | manifest.srcFile 'src/main/AndroidManifest.xml' 18 | java.srcDirs = ['src/main/java', 'src/main/java-gen'] 19 | res.srcDirs = ['src/main/res'] 20 | } 21 | } 22 | 23 | buildTypes { 24 | release { 25 | minifyEnabled false 26 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 27 | } 28 | } 29 | } 30 | 31 | dependencies { 32 | compile fileTree(dir: 'libs', include: ['*.jar']) 33 | compile 'com.android.support:appcompat-v7:21.0.3' 34 | compile 'com.android.support:recyclerview-v7:21.0.3' 35 | 36 | compile 'de.greenrobot:greendao:1.3.7' 37 | compile 'com.jakewharton:butterknife:6.1.0' 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_chat.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 19 | 20 | 27 | 28 |