Brandex07 Brandex07 - 1 year ago 93
Android Question

Trying to use Log.d function from static context in Android

Log.d seems to not be displaying anything in my terminal. Is this related to using a static method?

public static void setPosition(int pos){
DetailActivity.pos = pos;

Log.d("counter", "" + counter);

if(DetailActivity.counter == 1){
if (DetailActivity.mInterstitialAd.isLoaded()) {;
counter = 0;

Answer Source

Log is going to print to LogCat. In Android Studio, go to the Android Monitor tab to see this output.

You may add filters for your tag or message in the search box, for example entering "counter" should show your message.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download