### Implement handleItemIdList for Item ID Synchronization (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method is useful for two-way synchronization, allowing the retrieval of item IDs from the server to track changes. It provides parameters for stream, limit, sorting, start time, and read exclusion. ```APIDOC public abstract void handleItemIdList(IItemIdListHandler handler, long syncTime) throws IOException, ReaderException @param handler: Handles item id entries from the service. String stream(): stream id of the syncing stream int limit(): number of items to be fetched boolean newestFirst(): sorting of the list (true: newest first, false: oldest first) long startTime(): time where items start boolean excludeRead(): unread only void items(in List items): import new items @param syncTime: Time of synchronization ``` -------------------------------- ### Implement handleItemList for Item Retrieval (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method is called to retrieve items from the service. Synchronization parameters can be retrieved from the IItemListHandler, including stream ID, limit, sorting, start time, read status, continuation, and excluded streams. ```APIDOC public abstract void handleItemList(IItemListHandler handler, long syncTime) throws IOException, ReaderException @param handler: Handles item entries from the service. String stream(): stream id of the syncing stream int limit(): number of items to be fetched boolean newestFirst(): sorting of the list (true: newest first, false: oldest first) long startTime(): time where items start boolean excludeRead(): unread only boolean continuation(): if a request does not get all items, should it use continue requesting for more items List excludedStreams(): stream ids which are excluded from synchronizing void items(in List items, int strategy): import new items @param syncTime: Time of synchronization ``` -------------------------------- ### Registering News+ API Extensions in AndroidManifest.xml Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This section details the required AndroidManifest.xml configuration for a News+ API extension service. It specifies the service declaration, intent filters for discovery, necessary permissions, and meta-data elements for protocol version, description, and login activity. ```APIDOC Service Declaration: - Extends ReaderExtension class. - Declared as a component in AndroidManifest.xml. Intent Filter: - Must include an with action: com.noinnion.android.newsplus.ACTION_EXTENSION. Permissions: - Must require the permission: com.noinnion.android.newsplus.PERMISSION_READ_EXTENSION_DATA. Meta-data Elements (within tag): - protocolVersion (required): - Name: "protocolVersion" - Value: 1 (integer) - description (required): - Name: "description" - Value: A one- or two-sentence description of the extension (string). - loginActivity (required): - Name: "loginActivity" - Value: The qualified component name for a login activity in the extension's package (string). Example AndroidManifest.xml structure: ``` -------------------------------- ### Implement handleReaderList for Feed and Tag Retrieval (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method is called to retrieve feeds, tags, or folders from the service. It initializes the feed and folder structure for display in the app. It requires handlers for tags and subscriptions, along with a synchronization timestamp. ```APIDOC public abstract void handleReaderList(ITagListHandler tagHandler, ISubscriptionListHandler subHandler, long syncTime) throws IOException, ReaderException @param tagHandler: Handles tag and folder entries from the service. void tagHandler.tags(List tags): import new tags @param subHandler: Handles feed entries from the service. void subscriptions(List subscriptions): import new subscriptions @param syncTime: Time of synchronization ``` -------------------------------- ### Implement markAsRead for Batch Item Status Update (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method marks items as read. It is not triggered immediately but in batches after changing to a new feed or folder. It requires item UIDs and optionally corresponding subscription UIDs. ```APIDOC public abstract boolean markAsRead(String[] itemUids, String[] subUids) throws IOException, ReaderException @param itemUids: Item ids which has to be marked as read @param subUids: Some services need to have corresponding subscription ids @return: true if success else false ``` -------------------------------- ### Implement editSubscription for Subscription Management (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method modifies subscriptions, allowing editing, subscribing, unsubscribing, and managing tags for a given subscription ID, title, and URL. It supports various actions for subscription management. ```APIDOC public abstract boolean editSubscription(String uid, String title, String url, String[] tags, int action) throws IOException, ReaderException @param uid: Subscription id which has to be modified @param title: Subscription title @param url: Subscription url @param tags: Tags to be added/removed from subscription @param action: {SUBSCRIPTION_ACTION_EDIT, SUBSCRIPTION_ACTION_SUBSCRIBE, SUBSCRIPTION_ACTION_UNSUBSCRIBE, SUBSCRIPTION_ACTION_ADD_LABEL, SUBSCRIPTION_ACTION_REMOVE_LABEL} @return: true if success else false ``` -------------------------------- ### API: Rename Tag/Folder Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This API method allows for renaming an existing tag or folder. It requires the unique identifier (UID) of the tag, its current label, and the desired new label. The method returns a boolean indicating whether the rename operation was successful. ```APIDOC public abstract boolean renameTag(String uid, String oldLabel, String newLabel) throws IOException, ReaderException * Rename a tag/folder * @param uid Tag id * @param oldLabel Old label * @param newLabel New Label * @return boolean true if success else false ``` -------------------------------- ### Implement markAllAsRead for Stream Status Update (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method marks all items as read for a specific stream. If the stream is null, it marks all items across all streams as read. It supports excluding certain streams and includes a synchronization timestamp. ```APIDOC public abstract boolean markAllAsRead(String stream, String title, String[] excludedStreams, long syncTime) throws IOException, ReaderException @param stream: Stream (subscriptions, tags or folders) that has to be marked as read. If stream == null then mark all as read @param title: Some services need to have stream label @param excludedStreams: Streams which are excluded from sync @param syncTime: Time of synchronization @return: true if success else false ``` -------------------------------- ### Implement markAsUnread for Item Status Update (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method marks items as unread. It takes item UIDs, optional subscription UIDs, and a flag to set the 'keep unread' status. ```APIDOC public abstract boolean markAsUnread(String[] itemUids, String[] subUids, boolean keepUnread) throws IOException, ReaderException @param itemUids: Item ids which has to be marked as unread @param subUids: Some services need to have corresponding subscription ids @param keepUnread: Set keep unread status @return: true if success else false ``` -------------------------------- ### Implement editItemTag for Item Tag Modification (Java) Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This method modifies tags for items. It allows adding, removing, or creating new tags based on a specified action, using item UIDs, subscription UIDs, and the tags themselves. ```APIDOC public abstract boolean editItemTag(String[] itemUids, String[] subUids, String[] tags, int action) throws IOException, ReaderException @param itemUids: Item ids @param subUids: Corresponding subscription ids @param tags: Tags to be added, removed or created for the items @param action: Which action to take on the given tags {ACTION_ITEM_TAG_ADD_LABEL, ACTION_ITEM_TAG_REMOVE_LABEL, ACTION_ITEM_TAG_NEW_LABEL} @return: true if success else false ``` -------------------------------- ### API: Disable Tag/Folder Source: https://github.com/noinnion/newsplus/blob/master/api/README.md This API method is used to disable or remove a specific tag or folder. It requires the unique identifier (UID) of the tag and its current label. The method returns a boolean value indicating the success or failure of the disable operation. ```APIDOC public abstract boolean disableTag(String uid, String label) throws IOException, ReaderException * Remove a tag/folder * @param uid Tag id * @param label Tag label * @return boolean true if success else false ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.