forked from lubuwest/Friendiqa
24 lines
663 B
Java
24 lines
663 B
Java
|
package androidnative;
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.util.Log;
|
||
|
import org.qtproject.qt5.android.bindings.QtService;
|
||
|
|
||
|
public class AndroidNativeService extends QtService
|
||
|
{
|
||
|
private static String TAG = "AndroidNative";
|
||
|
|
||
|
public void startQtService(Context ctx) {
|
||
|
Log.d(TAG,"Friendiqa QtService");
|
||
|
ctx.startService(new Intent(ctx, AndroidNativeService.class));
|
||
|
}
|
||
|
|
||
|
public static void stopQtService(Context ctx) {
|
||
|
Log.d(TAG,"Friendiqa QtServiceStop");
|
||
|
|
||
|
ctx.stopService(new Intent(ctx, AndroidNativeService.class));
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|