2016年12月16日 星期五
2016年12月12日 星期一
Android 藍芽 Bluetooth Headset
1.Voice Input
http://stackoverflow.com/questions/14991158/using-the-android-recognizerintent-with-a-bluetooth-headset
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/1007/3548.html
http://www.cnblogs.com/wsfjlagr/p/3896087.html
http://stackoverflow.com/questions/8583406/saving-audio-input-of-android-stock-speech-recognition-engine
http://stackoverflow.com/questions/28450355/how-to-record-audio-from-bluetooth-headset-startbluetoothsco
https://developer.android.com/guide/topics/media/audio-capture.html
Sony tutorial:
https://developer.sony.com/develop/wearables/smarteyeglass-sdk/guides/use-bluetooth-for-audio-io/
http://blog.csdn.net/charein/article/details/12184835
2.藍芽 volume up & down event catching:
SettingsContentObserver mSettingsContentObserver = new SettingsContentObserver( new Handler() );
this.getApplicationContext().getContentResolver().registerContentObserver(
android.provider.Settings.System.CONTENT_URI, true,
mSettingsContentObserver );
class SettingsContentObserver extends ContentObserver {
public SettingsContentObserver(Handler handler) {
super(handler);
}
@Override
public boolean deliverSelfNotifications() {
return super.deliverSelfNotifications();
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
///do it
}
}
http://stackoverflow.com/questions/14991158/using-the-android-recognizerintent-with-a-bluetooth-headset
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/1007/3548.html
http://www.cnblogs.com/wsfjlagr/p/3896087.html
http://stackoverflow.com/questions/8583406/saving-audio-input-of-android-stock-speech-recognition-engine
http://stackoverflow.com/questions/28450355/how-to-record-audio-from-bluetooth-headset-startbluetoothsco
https://developer.android.com/guide/topics/media/audio-capture.html
Sony tutorial:
https://developer.sony.com/develop/wearables/smarteyeglass-sdk/guides/use-bluetooth-for-audio-io/
http://blog.csdn.net/charein/article/details/12184835
2.藍芽 volume up & down event catching:
SettingsContentObserver mSettingsContentObserver = new SettingsContentObserver( new Handler() );
this.getApplicationContext().getContentResolver().registerContentObserver(
android.provider.Settings.System.CONTENT_URI, true,
mSettingsContentObserver );
class SettingsContentObserver extends ContentObserver {
public SettingsContentObserver(Handler handler) {
super(handler);
}
@Override
public boolean deliverSelfNotifications() {
return super.deliverSelfNotifications();
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
///do it
}
}
2016年11月28日 星期一
2016年11月23日 星期三
工具軟體
Winmerge 比較與Merge:
a.解決中文 編碼問題:
編輯 > 選項 > 編碼頁 > 自訂編碼頁 65001
aida64 硬體偵測:
process explorer 資料夾解鎖:
a.Ctrl + f :搜尋folder name 查看何程序使用其folder
a.解決中文 編碼問題:
編輯 > 選項 > 編碼頁 > 自訂編碼頁 65001
aida64 硬體偵測:
process explorer 資料夾解鎖:
a.Ctrl + f :搜尋folder name 查看何程序使用其folder
2016年11月1日 星期二
2016 各家網頁技術
網頁技術名詞:
laravel : 為網頁藝術家創造的 PHP 框架, 簡潔語法
Node.JS : 執行於server端的 工具,具備實際邏輯處理流程
Yeoman : web app開發工具,提供粗貌的架構 ,減少處理瑣碎的事情
AngularJS : javascript撰寫語法 之 Model View Control 的整合
BootStrap : 畫面縮放layout
Ionic : for mobile app UI
laravel : 為網頁藝術家創造的 PHP 框架, 簡潔語法
Node.JS : 執行於server端的 工具,具備實際邏輯處理流程
Yeoman : web app開發工具,提供粗貌的架構 ,減少處理瑣碎的事情
AngularJS : javascript撰寫語法 之 Model View Control 的整合
BootStrap : 畫面縮放layout
Ionic : for mobile app UI
AngularJS 技術
(A)angularjs 執行順序:
app.config()
app.run()
directive's compile functions (if they are found in the dom)
app.controller()
directive's link functions (again, if found)
(B)angularjs 超連結做法:
(b-1) <a ui-sref="profile"><i class="fa fa-fw fa-user"></i> Profile</a>
裡面的profile 找到對應的 App.js裡面的
.state('profile', {
url: '/profile',
templateUrl: '/views/profile.html',
parent: 'master',
requireAuth: true
})
(b-2)如果有傳遞參數則
<a ui-sref="home({foo: 'fooVal1', bar: 'barVal1'})">
對到$stateParams
.controller('MainRootCtrl', function($scope, $state, $stateParams) {
//..
var foo = $stateParams.foo; //getting fooVal
var bar = $stateParams.bar; //getting barVal
//..
$scope.state = $state.current
$scope.params = $stateParams;
})
(C)services的使用:
http://www.w3schools.com/angular/tryit.asp?filename=try_ng_services_custom
app.config()
app.run()
directive's compile functions (if they are found in the dom)
app.controller()
directive's link functions (again, if found)
(B)angularjs 超連結做法:
(b-1) <a ui-sref="profile"><i class="fa fa-fw fa-user"></i> Profile</a>
裡面的profile 找到對應的 App.js裡面的
.state('profile', {
url: '/profile',
templateUrl: '/views/profile.html',
parent: 'master',
requireAuth: true
})
(b-2)如果有傳遞參數則
<a ui-sref="home({foo: 'fooVal1', bar: 'barVal1'})">
對到$stateParams
.controller('MainRootCtrl', function($scope, $state, $stateParams) {
//..
var foo = $stateParams.foo; //getting fooVal
var bar = $stateParams.bar; //getting barVal
//..
$scope.state = $state.current
$scope.params = $stateParams;
})
(C)services的使用:
http://www.w3schools.com/angular/tryit.asp?filename=try_ng_services_custom
2016年10月31日 星期一
AngularJS 與 Node JS 融合
範例1 :
https://scotch.io/tutorials/creating-a-single-page-todo-app-with-node-and-angular
https://scotch.io/tutorials/creating-a-single-page-todo-app-with-node-and-angular
訂閱:
文章 (Atom)