Android Activity Home Get getHostActivity()

Here you can find the source of getHostActivity()

Description

get Host Activity

License

Open Source License

Declaration

public static synchronized Activity getHostActivity() 

Method Source Code

//package com.java2s;
import java.lang.ref.WeakReference;
import android.app.Activity;

public class Main {
    protected static WeakReference<Activity> currHostActivity = new WeakReference<Activity>(
            null);//from   w w  w. jav a  2  s .  c  om

    public static synchronized Activity getHostActivity() {
        return (currHostActivity.get());
    }
}

Related

  1. goHome(Activity ctx)
  2. goHome2(Activity ctx)