Back to project page AndroidPlugin.
The source code is released under:
MIT License
If you think the Android project AndroidPlugin listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.limemobile.app.demo.pluginclienta; /*from w w w .ja v a2 s . c o m*/ import android.content.Intent; import android.os.IBinder; import android.widget.Toast; import com.limemobile.app.plugin.PluginClientService; public class ClientAStartedService extends PluginClientService { @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate() { super.onCreate(); } @Override public int onStartCommand(Intent intent, int flags, int startId) { String action = intent.getAction(); if ("start".equals(action)) { Toast.makeText(mContext, "client A start", Toast.LENGTH_SHORT) .show(); } else { Toast.makeText(mContext, "client A stop " + action, Toast.LENGTH_SHORT).show(); } return super.onStartCommand(intent, flags, startId); } @Override public void onDestroy() { Toast.makeText(mContext, "client A onDestroy ", Toast.LENGTH_SHORT).show(); super.onDestroy(); } }