// Path: app/src/main/java/link/anyauto/smartkey/demo/util/ToastUtil.java
// public class ToastUtil {
//     static Toast toast;
//     static ToastLayoutBinding binding;
// 
//     public static void toast(int resId) {
//         binding.toast.setText(resId);
//         toast.show();
//     }
// 
//     public static void toast(String str) {
//         binding.toast.setText(str);
//         toast.show();
//     }
// 
//     static void makeToast() {
//         if(toast == null) {
//             toast = new Toast(App.getInstance());
//             binding = ToastLayoutBinding.inflate(LayoutInflater.from(App.getInstance()));
//             toast.setView(binding.getRoot());
//             toast.setDuration(Toast.LENGTH_LONG);
//         }
//     }
// 
//     static {
//         makeToast();
//     }
// }


import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import link.anyauto.smartkey.demo.util.ToastUtil;
package link.anyauto.smartkey.demo;



/**
 * Created by discotek on 17-1-16.
 */

public class HelloService extends Service {

    Binder binder;

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
// Path: app/src/main/java/link/anyauto/smartkey/demo/util/ToastUtil.java
// public class ToastUtil {
//     static Toast toast;
//     static ToastLayoutBinding binding;
// 
//     public static void toast(int resId) {
//         binding.toast.setText(resId);
//         toast.show();
//     }
// 
//     public static void toast(String str) {
//         binding.toast.setText(str);
//         toast.show();
//     }
// 
//     static void makeToast() {
//         if(toast == null) {
//             toast = new Toast(App.getInstance());
//             binding = ToastLayoutBinding.inflate(LayoutInflater.from(App.getInstance()));
//             toast.setView(binding.getRoot());
//             toast.setDuration(Toast.LENGTH_LONG);
//         }
//     }
// 
//     static {
//         makeToast();
//     }
// }


// Path: app/src/main/java/link/anyauto/smartkey/demo/HelloService.java
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import link.anyauto.smartkey.demo.util.ToastUtil;

package link.anyauto.smartkey.demo;



/**
 * Created by discotek on 17-1-16.
 */

public class HelloService extends Service {

    Binder binder;

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        ToastUtil.toast(R.string.service_bound);