Android – setOnClickListener vs OnClickListener vs View.OnClickListener

The logic is simple. setOnClickListener belongs to step 2. You create the button You create an instance of OnClickListener* like it’s done in that example and override the onClick-method. You assign that OnClickListener to that button using btn.setOnClickListener(myOnClickListener); in your fragments/activities onCreate-method. When the user clicks the button, the onClick function of the assigned OnClickListener is called. *If you import android.view.View; you use View.OnClickListener. If you import android.view.View.*; or import android.view.View.OnClickListener; you use OnClickListener as far as … Read more

adb shell su works but adb root does not

By design adb root command works in development builds only (i.e. eng and userdebug which have ro.debuggable=1 by default). So to enable the adb root command on your otherwise rooted device just add the ro.debuggable=1 line to one of the following files: If you want adb shell to start as root by default – then add ro.secure=0 as well. Alternatively you could use modified adbd binary (which does not check for ro.debuggable) From https://android.googlesource.com/platform/system/core/+/master/adb/daemon/main.cpp

How can I use adb over WiFi?

Connect Android phone and host machine to same WiFi network Connect Android phone to host machine using USB cable (to start with) Run adb tcpip 5555 from a command prompt Run adb shell “ip addr show wlan0 | grep -e wlan0$ | cut -d\” \” -f 6 | cut -d/ -f 1″ to obtain the phone’s IP address Disconnect USB cable … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)