Skip to content

Commit

Permalink
there's no commit like the first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
scope committed Oct 12, 2017
1 parent cfd2fc0 commit c522dae
Show file tree
Hide file tree
Showing 10 changed files with 418 additions and 65 deletions.
24 changes: 11 additions & 13 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MyApp</name>
<name>Foo_tooth</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<content original-src="index.html" src="http://192.168.0.104:8100" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
Expand All @@ -16,11 +16,6 @@
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />

<!--
Change these to configure how the splashscreen displays and fades in/out.
More info here: https://github.com/apache/cordova-plugin-splashscreen
-->
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
Expand Down Expand Up @@ -81,10 +76,13 @@
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
<plugin name="cordova-plugin-statusbar" spec="https://github.com/apache/cordova-plugin-statusbar.git" />
<plugin name="cordova-plugin-device" spec="1.1.4" />
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
<allow-navigation href="http://192.168.0.104:8100" />
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-bluetooth-serial" spec="^0.4.7" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.15" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="git+https://github.com/apache/cordova-plugin-statusbar.git" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
</widget>
5 changes: 4 additions & 1 deletion ionic.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "bte",
"app_id": "",
"type": "ionic-angular"
"type": "ionic-angular",
"integrations": {
"cordova": {}
}
}
97 changes: 60 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,61 @@
{
"name": "bte",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.4.3",
"@angular/compiler": "4.4.3",
"@angular/compiler-cli": "4.4.3",
"@angular/core": "4.4.3",
"@angular/forms": "4.4.3",
"@angular/http": "4.4.3",
"@angular/platform-browser": "4.4.3",
"@angular/platform-browser-dynamic": "4.4.3",
"@ionic-native/core": "4.3.0",
"@ionic-native/splash-screen": "4.3.0",
"@ionic-native/status-bar": "4.3.0",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.7.1",
"ionicons": "3.0.0",
"rxjs": "5.4.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.0.0",
"typescript": "2.3.4"
},
"description": "An Ionic project"
}
"name": "bte",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.4.3",
"@angular/compiler": "4.4.3",
"@angular/compiler-cli": "4.4.3",
"@angular/core": "4.4.3",
"@angular/forms": "4.4.3",
"@angular/http": "4.4.3",
"@angular/platform-browser": "4.4.3",
"@angular/platform-browser-dynamic": "4.4.3",
"@ionic-native/bluetooth-serial": "^4.3.1",
"@ionic-native/core": "4.3.0",
"@ionic-native/splash-screen": "4.3.0",
"@ionic-native/status-bar": "4.3.0",
"@ionic/storage": "2.0.1",
"cordova-android": "^6.2.3",
"cordova-plugin-bluetooth-serial": "^0.4.7",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-ionic-webview": "^1.1.15",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "git+https://github.com/apache/cordova-plugin-statusbar.git",
"cordova-plugin-whitelist": "^1.3.1",
"ionic-angular": "3.7.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.4.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.0.0",
"typescript": "2.3.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-device": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-bluetooth-serial": {}
},
"platforms": [
"android"
]
}
}
5 changes: 4 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { HomePage } from '../pages/home/home';
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
IonicModule.forRoot(MyApp,{
scrollAssist: false,
autoFocusAssist: false
})
],
bootstrap: [IonicApp],
entryComponents: [
Expand Down
74 changes: 74 additions & 0 deletions src/pages/bluetooth-things/bluetooth-things.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<ion-header>

<ion-navbar>
<ion-title>Bluetooth Things</ion-title>
</ion-navbar>

</ion-header>


<ion-content padding>
<ion-slides pager="true">

<!--Slide 1-->
<ion-slide>
<ion-list padding>
<button ion-button block (click)="startScanning()">scan</button>

<ion-list-header>
Paired Devices
</ion-list-header>

<ion-item *ngFor="let device of pairedDevices">
<span (click)="selectDevice(device.address)">
{{device.name}} : {{device.address}}
</span>
</ion-item>

<button ion-button block (click)="disconnect()">Disconnect</button>

<ion-list-header>
Available Devices
</ion-list-header>

<ion-item *ngFor='let device of unpairedDevices'>
<span (click)="selectDevice(device.address)">
{{device.name}} : {{device.address}}
</span>
</ion-item>

<ion-spinner name="crescent" *ngIf="gettingDevices"></ion-spinner>
</ion-list>
</ion-slide>

<!--Slide 2-->
<ion-slide>

<ion-label>LED Response:</ion-label>
<p> {{model.ledResponse}} </p>
<button ion-button block (click)="turnOn()">on</button>
<button ion-button block (click)="turnOff()">off</button>

</ion-slide>

<!--Slide 3-->
<ion-slide>
<p> {{model.readResponse}} </p>
<button ion-button block (click)="readThings()">read</button>
<hr>
<ion-label>Write Things:</ion-label>
<ion-textarea type="text" [(ngModel)]="model.writeThis"></ion-textarea>
<button ion-button block (click)="writeThings()">write</button>
</ion-slide>

<!--Slide 4-->
<ion-slide>
<p>{{model.slideFourInfo}}</p>
<button ion-button block (click)="util()">util</button>
<button ion-button block (click)="showSettings()">settings</button>
<button ion-button block (click)="listThings()">list</button>
</ion-slide>

</ion-slides>

</ion-content>
17 changes: 17 additions & 0 deletions src/pages/bluetooth-things/bluetooth-things.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { BluetoothThingsPage } from './bluetooth-things';
import { BluetoothSerial } from '@ionic-native/bluetooth-serial';

@NgModule({
declarations: [
BluetoothThingsPage,
],
imports: [
IonicPageModule.forChild(BluetoothThingsPage)
],
providers: [
BluetoothSerial
]
})
export class BluetoothThingsPageModule {}
7 changes: 7 additions & 0 deletions src/pages/bluetooth-things/bluetooth-things.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
page-bluetooth-things {
.led-actions{
button{
margin-top: 40%;
}
}
}
Loading

0 comments on commit c522dae

Please sign in to comment.