Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean hasMytext(String string, String mytext) { if (TextUtils.isEmpty(string) && TextUtils.isEmpty(mytext)) return false; else { if (string.contains(mytext)) return true; else return false; } } }