2017年2月8日 星期三

輕鬆音樂

https://www.youtube.com/watch?v=oHuP8knuMEw
 MGS5 guitar

https://www.youtube.com/watch?v=Hi8mRK8DNwU
Bibio Why so serious


https://www.youtube.com/watch?v=jgrgCaSo8e4
Bibio light up the sky


https://www.youtube.com/watch?v=2bSk-8C76dc
Witcher  3 - romantic leisure


2017年2月6日 星期一

Camera相關知識

f no 對焦比
TTL 鏡後測光(Through The Lens,簡稱TTL)
EFL 焦距
thread size 螺旋size
fove 視野
sensor 感光元件大小

2017年1月19日 星期四

Android 執行緒Thread

1.執行緒徹底清空


onDestroy(),onPause(),onStop()三個函式,加入
A. finish()函式做事件收尾

B. Thread物件執行緒停止處理
 -thread.interrupted();

2.執行緒處理技巧:盡量不以重複new Thread()方式運行,改以如下(避免耗電過多):
public void run(){
while(insideApp){
while(controlFlag){
  //do this
}
}
}
其他區段的控制:
controlFlag = false;




2017年1月13日 星期五

Android 動作 事件呼叫

1. MainActivity進入別的Activity
or Home button
 or multi-app(square) button

onPause
onStop

2.由別的Activity回去MainActivity
  or Home button 離開後再回去
or multi-app button 離開後再回去

onResume

3.MainActivity按back button
onPause
onStop
onDestroy
onBackPressed

4.曾經開啟過App,離開後,再重新進入MainActivity
onResume
shouldDisplayHomeUp
onCreate

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
   }
}