Ejemplo n.º 1
0
 protected static void requestDownloadBitmap(String url, String path) {
   if (!mapDownloadingUrl.containsKey(url)) {
     mapDownloadingUrl.put(url, url);
     AndroidEventManager.getInstance()
         .pushEventEx(EventCode.HTTP_DownloadBitmap, sInstance, url, path);
   }
 }
Ejemplo n.º 2
0
  @Override
  public void onCreate() {
    super.onCreate();
    sInstance = this;

    CrashHandler.getInstance().init(this);

    sMainThreadHandler = new Handler();

    WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
    DisplayMetrics dm = new DisplayMetrics();
    wm.getDefaultDisplay().getMetrics(dm);
    sScreenWidth = dm.widthPixels;
    sScreenHeight = dm.heightPixels;
    sScreenDpi = dm.densityDpi;

    AndroidEventManager.getInstance()
        .registerEventRunner(EventCode.HTTP_DownloadBitmap, new HttpDownloadRunner());
  }