Skip to content

Route cannot be defined without class field #9

@danielevitali

Description

@danielevitali

In my config json file I have declared the default route to be handled by a custom handler, without specifying the activity, in the class field.

Everytime I get a deep link which is associated with the default route, I get an a JSONException.

I think this is because you handle the route in this way

private void handleRoute(JSONObject routeOptions, Map<String, String> routeParameters) throws JSONException {
   HandlerExecutor.executeHandlers(routeOptions, routeParameters, handlers);
   IntentBuilder.buildAndFireIntent(routeOptions, routeParameters, this);
}

The handler is called correctly, but the buildAndFireIntent execute this line instruction:

String activityName = routeOptions.getString("class");

which means the route must have a class field or a JSONException will be fired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions