News+ Documentation

repository·master·Indexed 18 days ago

https://github.com/noinnion/newsplus

News+ is an RSS reader application designed as a successor to Google Reader. It features a modular extension system allowing support for multiple third-party RSS services. The documentation provides guidance on developing extensions using the reader-api-r1.jar, implementing the ReaderExtension class for data synchronization, and registering services via AndroidManifest.xml using the ACTION_EXTENSION intent filter.

Tokens
1.7K
Snippets
4
Records
8
Agent score
63%

What's inside News+

  1. Getting Started with the News+ API

    master

    To develop a new extension for News+, follow these three steps:

    1. Import the API: Add the reader-api-r1.jar file to your Android project.
    2. Implement the Extension: Create a new service class that extends the ReaderExtension class.
    3. Register the Service: Add a <service> tag to your AndroidManifest.xml with the required <intent-filter> and <meta-data> elements.

    Once installed, your extension will appear in the News+ extension list (accessible by pressing the title in the action bar).

    /* Step 1: Import reader-api-r1.jar into your Android project */
  2. Install News+

    master

    News+ is an RSS reader application designed as a successor to gReader. To use any of the service-specific extensions, you must first install the base News+ application.

    Available versions:

    • Play Store: Standard version.
    • Premium: Paid version via Play Store.
    • Beta: Available via GitHub releases.
    * Play Store: https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus
    * Premium: https://play.google.com/store/apps/details?id=com.noinnion.android.newsplus.premium
    * Beta: https://github.com/noinnion/newsplus/raw/master/beta/
  3. Registering a News+ Extension in AndroidManifest.xml

    master

    News+ discovers extensions using Android's Intent mechanism. Your extension must be declared as a <service> in your AndroidManifest.xml with the following requirements:

    • Intent Filter: Must include an <intent-filter> with the action ACTION_EXTENSION.
    • Permissions: Must require the PERMISSION_READ_EXTENSION_DATA permission to ensure only News+ can bind to your service.
    • Meta-data: You must provide the following <meta-data> elements:
      • protocolVersion (required): Set to 1.
      • description (required): A one- or two-sentence string describing the extension.
      • loginActivity (required): The qualified component name for an activity in your package that News+ can launch when the user selects the extension.
    <!-- Example structure for AndroidManifest.xml -->
    <service
        android:name=".MyExtensionService"
        android:permission="PERMISSION_READ_EXTENSION_DATA">
        <intent-filter>
            <action android:name="ACTION_EXTENSION" />
        </intent-filter>
        <meta-data android:name="protocolVersion" android:value="1" />
        <meta-data android:name="description" android:value="My custom news extension description." />
        <meta-data android:name="loginActivity" android:value="com.example.MyLoginActivity" />
    </service>
  4. Download the News+ Beta APK

    master

    The Beta version of News+ is updated via a consistent download link. If you encounter a 'parse error' while attempting to install the APK through standard channels, use the direct download link provided below.

    To report issues, use the built-in feedback mechanism: Menu -> Feedback -> Send log. Providing the log file is highly recommended for troubleshooting.

    https://github.com/noinnion/newsplus/blob/master/beta/NewsPlus_beta.apk?raw=true
  5. Implement ReaderExtension to handle data synchronization

    master

    To create a functional extension, you must subclass ReaderExtension and implement several abstract methods. These methods allow News+ to pull data from your service:

    Data Retrieval Methods

    • handleReaderList(ITagListHandler tagHandler, ISubscriptionListHandler subHandler, long syncTime): Initializes the feed and folder structure. Use tagHandler.tags(List<ITag> tags) for tags/folders and subHandler.subscriptions(List<ISubscription> subscriptions) for feeds.
    • handleItemList(IItemListHandler handler, long syncTime): Retrieves items. Use the IItemListHandler to get sync parameters like stream(), limit(), newestFirst(), startTime(), excludeRead(), and continuation(). Import items via handler.items(List<IItem> items, int strategy).
    • handleItemIdList(IItemIdListHandler handler, long syncTime): Used for 2-way synchronization to retrieve item IDs from the server to detect changes. Use handler.items(List<IItem> items) to import IDs.

    State and Modification Methods

    • markAsRead(String[] itemUids, String[] subUids): Marks items as read. This is triggered in batches when changing feeds.
    • markAsUnread(String[] itemUids, String[] subUids, boolean keepUnread): Marks items as unread.
    • markAllAsRead(String stream, String title, String[] excludedStreams, long syncTime): Marks all items in a specific stream as read.
    • editItemTag(String[] itemUids, String[] subUids, String[] tags, int action): Modifies tags using actions like ACTION_ITEM_TAG_ADD_LABEL, ACTION_ITEM_TAG_REMOVE_LABEL, or ACTION_ITEM_TAG_NEW_LABEL.
    • editSubscription(String uid, String title, String url, String[] tags, int action): Modifies subscriptions using actions like SUBSCRIPTION_ACTION_EDIT, SUBSCRIPTION_ACTION_SUBSCRIBE, SUBSCRIPTION_ACTION_UNSUBSCRIBE, SUBSCRIPTION_ACTION_ADD_LABEL, or SUBSCRIPTION_ACTION_REMOVE_LABEL.
    • renameTag(String uid, String oldLabel, String newLabel): Renames a tag or folder.
    • disableTag(String uid, String label): Removes a tag or folder.
  6. Available News+ extensions

    master

    News+ provides extensions for a wide variety of RSS services. These can be installed via the Play Store or direct download depending on the service.

    Play Store Extensions:

    Direct Download Extensions:

    • CommaFeed
    • SubReader
    • Reedah