1. build gradle 파일에(app module) 아래 내용 추가.

1
2
3
4
5
6
7
// build.gradle(app 모듈)
 
dependencies {
    debugImplementation "com.github.brianPlummer:tinydancer:0.1.1"
    releaseImplementation "com.github.brianPlummer:tinydancer-noop:0.1.1"
    testImplementation "com.github.brianPlummer:tinydancer-noop:0.1.1"
}
 
cs

 

2. 프로젝트 구현부분에 아래 내용 추가. 나는 시작부분 onCreate()에 구현함.

1
2
3
4
5
6
7
8
9
10
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        TinyDancer.create().addFrameDataCallback(new FrameDataCallback() {
            @Override
            public void doFrame(long previousFrameNS, long currentFrameNS, int droppedFrames) {
                // do anything what you want.
            }
        }).show(this);
   }
cs

 

+ Recent posts