@Override
  public boolean tryHandleIntent(UIContext context, Intent intent, Entity entity) {
    Uri uri = intent.getData();
    if (uri != null
        && SCHEME.equalsIgnoreCase(uri.getScheme())
        && context.getPackageName().equalsIgnoreCase(uri.getHost())) {
      String dynamicCall = createDynamicCall(uri);
      if (dynamicCall != null) {
        DynamicCallAction action = DynamicCallAction.redirect(context, entity, dynamicCall);
        if (action != null) {
          ActionExecution exec = new ActionExecution(action);
          exec.executeAction(); // Will also finish() the current activity.
          return true;
        }
      }
    }

    return false;
  }
示例#2
0
  protected void setParent(UIContext parent) {
    mParent = parent;

    if (mDataView == null) mDataView = parent.getDataView();
  }