• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java InjectionAppCompatActivity类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中io.freefair.android.injection.app.InjectionAppCompatActivity的典型用法代码示例。如果您正苦于以下问题:Java InjectionAppCompatActivity类的具体用法?Java InjectionAppCompatActivity怎么用?Java InjectionAppCompatActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

InjectionAppCompatActivity类属于io.freefair.android.injection.app包,在下文中一共展示了InjectionAppCompatActivity类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setActivity

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
public void setActivity(InjectionAppCompatActivity activity) {
    if (activity == null) {
        mWeakReferenceActivity.clear();
        onActivityDetached();
    } else {
        onActivityAttached();
        mWeakReferenceActivity = new WeakReference<>(activity);
    }
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:10,
代码来源:BaseAsyncTask.java

示例2: RequestTask

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
/**
 *
 * @param context App context
 * @param type What type of request to be performed (download OCID, upload OCID, DB backup, etc.)
 * @param listener Allows the caller of RequestTask to implement success/fail callbacks
 */
public RequestTask(InjectionAppCompatActivity context, char type, AsyncTaskCompleteListener listener) {
    super(context);
    this.mType = type;
    this.mAppContext = context.getApplicationContext();
    this.mDbAdapter = new AIMSICDDbAdapter(mAppContext);
    this.mTimeOut = REQUEST_TIMEOUT_MAPS;
    this.mListener = listener;
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:15,
代码来源:RequestTask.java

示例3: showHideMapProgressBar

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
private void showHideMapProgressBar(boolean pFlag) {
    InjectionAppCompatActivity lActivity = getActivity();
    if (BuildConfig.DEBUG && lActivity == null) {
        Log.i(TAG, mTAG + "BaseTask showHideMapProgressBar() activity is null");
    }

    if (lActivity != null) {
        Fragment myFragment = lActivity.getSupportFragmentManager().findFragmentByTag(String.valueOf(DrawerMenu.ID.MAIN.ALL_CURRENT_CELL_DETAILS));
        if (myFragment instanceof MapFragment) {
            ((MapFragment) myFragment).setRefreshActionButtonState(pFlag);
        }
    }
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:14,
代码来源:RequestTask.java

示例4: onStart

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
@Override
public void onStart() {
    super.onStart();
    ((AppAIMSICD) getActivity().getApplication()).attach((InjectionAppCompatActivity) getActivity());
    if (TinyDB.getInstance().getBoolean(TinyDbKeys.FINISHED_LOAD_IN_MAP)) {
        setRefreshActionButtonState(false);
    }
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:9,
代码来源:MapFragment.java

示例5: attach

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
public void attach(InjectionAppCompatActivity activity) {
    if (activity == null) {
        return;
    }
   Log.d(TAG, mTAG + "BaseTask attach:" + activity.getClass().getCanonicalName());

    List<BaseAsyncTask<?, ?, ?>> tasks = mActivityTaskMap.get(activity.getClass().getCanonicalName().hashCode());
    if (tasks != null) {
        for (BaseAsyncTask<?, ?, ?> task : tasks) {
            task.setActivity(activity);
        }
    }
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:14,
代码来源:AppAIMSICD.java

示例6: RequestTask

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
/**
 *
 * @param context App context
 * @param type What type of request to be performed (download OCID, upload OCID, etc.)
 * @param listener Allows the caller of RequestTask to implement success/fail callbacks
 */
public RequestTask(InjectionAppCompatActivity context, char type, AsyncTaskCompleteListener listener) {
    super(context);
    this.mType = type;
    this.mAppContext = context.getApplicationContext();
    this.mDbAdapter = new RealmHelper(mAppContext);
    this.mTimeOut = REQUEST_TIMEOUT_MAPS;
    this.mListener = listener;
}
 

开发者ID:anticomarley,
项目名称:Android-IMSI-Catcher-Detector,
代码行数:15,
代码来源:RequestTask.java

示例7: showHideMapProgressBar

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
private void showHideMapProgressBar(boolean pFlag) {
    InjectionAppCompatActivity lActivity = getActivity();
    if (BuildConfig.DEBUG && lActivity == null) {
        log.verbose("BaseTask showHideMapProgressBar() activity is null");
    }

    if (lActivity != null) {
        Fragment myFragment = lActivity.getSupportFragmentManager().findFragmentByTag(String.valueOf(DrawerMenu.ID.MAIN.ALL_CURRENT_CELL_DETAILS));
        if (myFragment instanceof MapFragment) {
            ((MapFragment) myFragment).setRefreshActionButtonState(pFlag);
        }
    }
}
 

开发者ID:anticomarley,
项目名称:Android-IMSI-Catcher-Detector,
代码行数:14,
代码来源:RequestTask.java

示例8: onStart

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
@Override
public void onStart() {
    super.onStart();
    ((AndroidIMSICatcherDetector) getActivity().getApplication()).attach((InjectionAppCompatActivity) getActivity());
    if (TinyDB.getInstance().getBoolean(TinyDbKeys.FINISHED_LOAD_IN_MAP)) {
        setRefreshActionButtonState(false);
    }
}
 

开发者ID:anticomarley,
项目名称:Android-IMSI-Catcher-Detector,
代码行数:9,
代码来源:MapFragment.java

示例9: attach

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
public void attach(InjectionAppCompatActivity activity) {
    if (activity == null) {
        return;
    }
    log.debug("BaseTask attach:" + activity.getClass().getCanonicalName());

    List<BaseAsyncTask<?, ?, ?>> tasks = mActivityTaskMap.get(activity.getClass().getCanonicalName().hashCode());
    if (tasks != null) {
        for (BaseAsyncTask<?, ?, ?> task : tasks) {
            task.setActivity(activity);
        }
    }
}
 

开发者ID:anticomarley,
项目名称:Android-IMSI-Catcher-Detector,
代码行数:14,
代码来源:AndroidIMSICatcherDetector.java

示例10: BaseAsyncTask

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
public BaseAsyncTask(InjectionAppCompatActivity activity) {
    mWeakReferenceActivity = new WeakReference<>(activity);
    mApp = (AppAIMSICD) activity.getApplication();
    activity.getInjector().inject(this);
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:6,
代码来源:BaseAsyncTask.java

示例11: getActivity

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
protected InjectionAppCompatActivity getActivity() {
    return mWeakReferenceActivity.get();
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:4,
代码来源:BaseAsyncTask.java

示例12: BaseAsyncTask

点赞 2

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
public BaseAsyncTask(InjectionAppCompatActivity activity) {
    mWeakReferenceActivity = new WeakReference<>(activity);
    mApp = (AndroidIMSICatcherDetector) activity.getApplication();
    activity.getInjector().inject(this);
}
 

开发者ID:anticomarley,
项目名称:Android-IMSI-Catcher-Detector,
代码行数:6,
代码来源:BaseAsyncTask.java

示例13: getOpenCellData

点赞 1

import io.freefair.android.injection.app.InjectionAppCompatActivity; //导入依赖的package包/类
/**
* Description:      Requests Cell data from OpenCellID.org (OCID).
*
* Notes:
*
*       The free OCID API has a download limit of 1000 BTSs for each download.
*       Thus we need to carefully select the area we choose to download and make sure it is
*       centered on the current GPS location. (It is also possible to query the number of
*       cells in a particular bounding box (bbox), and use that.)
*
*       The bbox is described in the OCID API here:
*       http://wiki.opencellid.org/wiki/API#Getting_the_list_of_cells_in_a_specified_area
*
*       In an urban area, we could try to limit ourselves to an area radius of ~2 Km.
*       The (GSM) Timing Advance is limiting us to 35 Km.
*
*       The OCID API payload:
*
*       required:   key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>
*       optional:   &mcc=<mcc>&mnc=<mnc>&lac=<lac>&radio=<radio>
*                   &limit=<limit>&offset=<offset>&format=<format>
*
*       Our API query is using:  (Lat1,Lon1, Lat2,Lon2, mcc,mnc,lac)
*
*  Issues:
*
*      [ ] A too restrictive payload leads to many missing BTS in area, but a too liberal
*          payload would return many less relevant ones and would cause us to reach the
*          OCID API 1000 BTS download limit much faster. The solution would be to make the
*          BBOX smaller, but that in turn, would result in the loss of some more distant,
*          but still available towers. Possibly making them appears as RED, even when they
*          are neither fake nor IMSI-catchers. However, a more realistic BTS picture is
*          more useful, especially when sharing that info across different devices using
*          on different RAT and MNO.
*
*      [ ] We need a smarter way to handle the downloading of the BTS data. The OCID API
*          allows for finding how many cells are contained in a query. We can the use this
*          info to loop the max query size to get all those cells. The Query format is:
*
*          GET:        http://<WebServiceURL>/cell/getInAreaSize
*
*          The OCID API payload:
*
*          required:     key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>
*          optional:     &mcc=<mcc>&mnc=<mnc>&lac=<lac>&radio=<radio>&format=<format>
*
*          result:       JSON:
*                              {
*                                count: 123
*                              }
*
*      [x]  Q:  How is the BBOX actually calculated from the "radius"?
*           A:  It's calculated as an inscribed circle to a square of 2*R on each side.
*               See ./utils/GeoLocation.java
*
*  Dependencies:    GeoLocation.java
*
*  Used:
* @param cell Current Cell Information
*
*/
public static void getOpenCellData(InjectionAppCompatActivity injectionActivity, Cell cell, char type) {
    getOpenCellData(injectionActivity, cell, type, null);
}
 

开发者ID:5GSD,
项目名称:AIMSICDL,
代码行数:65,
代码来源:Helpers.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)