ASAP for Mobile Platforms

Community

These methods help you display your user community and all associated content on the ASAP add-on. 

Custom-Configuring Community Actions

Users can perform a range of actions, including editing and deleting topics; and adding, editing, and deleting comments, in the community module.

The following method helps you define which actions must be allowed and which actions must be disallowed when users access the community through the ASAP add-on. 

ZDeskCommunityConfiguration communityConfiguration = new ZDeskCommunityConfiguration();
communityConfiguration.setTopicEditAllowed(false);
communityConfiguration.setTopicDeleteAllowed(false);
communityConfiguration.setReplyEditAllowed(false);
MyApplication.deskInstance.setCommunityConfiguration(communityConfiguration);

Getting the Most Popular Topics

The following API fetches the forum topics with the most number of likes.

MyApplication.zohoDeskPortalSDKInstnace.getMostPopularTopics(new DeskCallback.DeskCommunityTopicsListCallback() {
	@Override
	public void onTopicsListCompleted(DeskTopicsList response) {
	    Log.i("APITEST", "success");
	}
	@Override
	public void onException(DeskException exception) {
	    Log.i("APITEST", "exception");
	}
}, categoryId, type, from, limit, includeCount);

Params

  1. DeskCallback.DeskCommunityTopicsListCallback is the callback object.

  2. categoryId - long - ID of the community category from which the topics must be fetched. If you want to include all categories, pass the value "-1". 

  3. type - string - Type of forum topic. Values allowed are: QUESTIONIDEAANNOUNCEMENTPROBLEM, and DISCUSSION.

  4. from - int - Index number, starting from which the topics must be fetched. Value starts from 1.

  5. limit - int - Number of topics to fetch

  6. includeCount - Boolean - Parameter that specifies whether the number of topics fetched must be displayed or not

Getting the Most Discussed Topics

The following API fetches the forum topics with the most number of comments.

MyApplication.zohoDeskPortalSDKInstnace.getMostDiscussedTopics(new DeskCallback.DeskCommunityTopicsListCallback() {
    @Override
    public void onTopicsListCompleted(DeskTopicsList response) {
        Log.i("APITEST", "success");
    }

    @Override
    public void onException(DeskException exception) {
        Log.i("APITEST", "exception");
    }
}, categoryId, type, from, limit, includeCount);

Params

  1. DeskCallback.DeskCommunityTopicsListCallback is the callback object.

  2. categoryId - long - ID of the community category from which the topics must be fetched. If you want to include all categories, pass the value "-1". 

  3. type - string - Type of forum topic. Values allowed are: QUESTIONIDEAANNOUNCEMENTPROBLEM, and DISCUSSION.

  4. from - int - Index number, starting from which the topics must be fetched. Value starts from 1.

  5. limit - int - Number of topics to fetch

  6. includeCount - Boolean - Parameter that specifies whether the number of topics fetched must be displayed or not