Example #1
0
 @Override
 public void handleMessage(Message msg) {
   if (msg.what == 1) {
     UpdateInfo updateInfo = (UpdateInfo) msg.obj;
     if (updateInfo != null) {
       int hasUpdate = updateInfo.getUpdateApk() + updateInfo.getUpdateData();
       if (hasUpdate != 0) {
         Toast.makeText(MainActivity.this, R.string.update_hint, Toast.LENGTH_LONG).show();
       }
     }
   }
   super.handleMessage(msg);
 }