Build Android with Gradle (Testing)

Config

  • testPackageName
  • testInstrumentationRunner
  • testHandleProfiling
  • testFunctionalTest
Read More

Radxa Backup

這一次遇到的事情,是想要將一台 Radxa 設備的完整設定(連同System設定) Copy 到另外一台 Radxa 設備

相關的安裝以及操作可以參考Backing uprkflashtool for Linux and rk2808, rk2818 and rk2918 based tablets

Loader Mode

使用rkflashtool時必須以Loader Mode 進行。
不需要插電源線
只需要插上otg,並且在供電前按住recovery key(在正面左下的側面)

Read More

Swift Call(ed) by ObjectiveC

Swift 搭配 Cocoapod

執行完pod install之後
新增Bringing Header設定, project_name/project_name-Bridging-Header.h.
下圖的project_name為MyApp,所以名稱為MyApp/MyApp-Bridging-Header.h

新增Bringing Header

// MyApp-Bridging-Header.h
#import <ReactiveCocoa/ReactiveCocoa.h>

Source :

Swift & Cocoapods

Source :

How to call Objective C code from Swift

Twitter Fabric

今天終於收到Twitter的Fabric(Yahhhhhh!)

首先登入後會導引你到Download Plugins

IDE

Read More

Android Remote Debugging

Remote Debugging on Android with Chrome

事先準備

  • Android 4.0以上先灌好 Chrome
  • Android 4.4以上apps的WebView configured for debugging
開啟Debugging(Phone)
  • Settings > About phone > Build number * 點7下(打開隱藏版Debug)
  • Settings > Developer options > USB debugging
開啟Debugging(PC)
  • chrome://inspect
  • Chrome menu > Tools > Inspect Devices
  • Confirm that Discover USB Devices is checked:

APPETIZE.IO IOS Simulator in browser

線上IOS模擬器

在看完他的Demo之後,真心感覺非常強大

馬上就丟的一隻APP(CustomView)上去玩玩看,沒想到連Size Class都有支援,稍微可惜的地方是沒有IPhone 6+

IPhone

Potrait

Landscape

Read More

HTML Slides

Reveal.js

github

Install

  • Install Node.js
  • Install Grunt https://github.com/hakimel/reveal.js
  • Clone the reveal.js repository git clone https://github.com/hakimel/reveal.js.git
  • cd reveal.js
  • npm install
  • grunt serve
Read More

Yakindu(Statechart tool)

Some Finite State Machine Tool & Website

Name Pros Cons
Yakindu Built on eclipse
Open Source
Live Validation
Simulation
None
Finite State Machine Designer Online edit FSM
Can export to PNG & SVG & LaTeX
None
StateForge
Finite state machine diagram & code generators
Online edit FSM FSM(style:table)
Too many Steps
Generate xml from FSM Table
Code generator need Ant or Maven
Generate code from xml
Graphviz - Graph Visualization Software ??? ???

Install

Resource:

Android Listen Network State

Network listener Android

ConnectionChangeReceiver.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class ConnectionChangeReceiver extends BroadcastReceiver{

@Override
public void onReceive( Context context, Intent intent ){
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService( Context.CONNECTIVITY_SERVICE );
NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
NetworkInfo mobNetInfo = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE );

if ( activeNetInfo != null ){
Toast.makeText( context, "Active Network Type : " + activeNetInfo.getTypeName(), Toast.LENGTH_SHORT ).show();
}

if( mobNetInfo != null ){
Toast.makeText( context, "Mobile Network Type : " + mobNetInfo.getTypeName(), Toast.LENGTH_SHORT ).show();
}
}
}
AndroidManifest.xml
1
2
3
4
5
6
7
8
<!-- Needed to check when the network connection changes -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<receiver android:name="com.blackboard.androidtest.receiver.ConnectionChangeReceiver" android:label="NetworkConnection">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>

rrdtool

流程

  • 建立rrd file rrdtool create x.rrd
  • 更新rrd data rrdtool update x.rrd
  • 繪圖 rrdtool graph x.gif
Read More