I'm doing tests with different services and connections and in the logcat
it shows me the following error:
Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition (int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
Why is this? Does anyone know?
Servicio
:
public class MyIntentService extends Service {
WebSocketClient mWebSocketClient;
URI uri;
@Override
public void onCreate() {
super.onCreate();
try {
uri = new URI("ws://websockethost:8080");
} catch (URISyntaxException e) {
e.printStackTrace();
}
mWebSocketClient = new WebSocketClient(uri) {
@Override
public void onOpen(ServerHandshake serverHandshake) {
Log.i("Websocket", "Opened");
mWebSocketClient.send("Hello from " + Build.MANUFACTURER + " " + Build.MODEL);
}
@Override
public void onMessage(String s) {
mWebSocketClient.onMessage(s);
if(s.equals("s")){
//notificacion.....
}
}
@Override
public void onClose(int i, String s, boolean b) {
Log.i("Websocket", "Closed " + s);
}
@Override
public void onError(Exception e) {
Log.i("Websocket", "Error " + e.getMessage());
}
};
}
public int onStartCommand(Intent intent, int flags, int startId) {
mWebSocketClient.connect();
return START_STICKY;
}
@Nullable
@Override
public IBinder onBind(Intent intent) {
return null;
}
public void onDestroy() {
stopSelf();
Intent intent = new Intent("com.example.myapplication.MyIntentService");
intent.putExtra("yourvalue", "torestore");
sendBroadcast(intent);
}
}