Monday, August 12, 2013

[Android] Service


[Android] 在 Service 中啟動 Activity

Server要啟動Activity一定要加上 Intent.FLAG_ACTIVITY_NEW_TASK的Flag

Intent i = new Intent();

[Android] 用 bind 啟動 Service

Service 裏要有如下的程式,在 onBind 傳回 mBinder, Activity 裏的 onServiceConnected() 才能收到 bind 完成的訊號, 預設傳回 null 沒用。

public class LocalBinder extends Binder {
MusicService getService() {
return MusicService.this;
private final IBinder mBinder = new LocalBinder();
public IBinder onBind(Intent intent) {

Friday, August 2, 2013

Setup QT for Android on Windows (C++)


1. Download the following packages:
        The Android NDK
        Apache Ant v1.8 or later
        OpenJDK v6 or later

2. Install packages:
        QT: Install
        The Android SDK Tools: extract and update 
        The Android NDK: Extract (Cannot contain SPACE in folder path)
        Apache Ant: Extract (Cannot contain SPACE in folder path)
        OpenJDK: Install

3. Set Path for Qt Creator
    [Tools] [Option] [Android]: Assign path for SDK, NDK, ant and JDK

phpMyAdmin 無法存取 MariaDB 10 的解決方法