Download Mobile Printer Android SDK and API Reference Guide
Transcript
ZQ110
[Example]
public class MainActivity extends Activity {
…
private ZQ110 mZQ110;
…
public void onCreate(Bundle savedInstanceState) {
…
mZQ110 = new ZQ110(this, mHandler, null);
mZQ110.connect(null);
…
}
public void onDestroy() {
…
if (mZQ110 != null) {
mZQ110.disconnect();
}
…
}
private final Handler mHandler = new Handler(new Handler.Callback() {
public boolean handleMessage(Message msg) {
switch (msg.what) {
case ZQ110.MESSAGE_STATE_CHANGE:
if (msg.arg1 == ZQ110.STATE_CONNECTED) {
Rev. 1.00
- 106 -
Mobile Printer
Android SDK API Reference Guide