How can I use Superfeedr to notify my android app about an update from a Blogspot blog?

134 views Asked by At

I have written a feed reader in android which uses an RSS feed from a blog on blogspot to display posts to users. I want the app to get a notification whenever the blog is updated. I found out about Superfeedr and PubSubHubbub and I've been searching for examples with android, but I'm not finding much help. This is the code that's getting the XML data for me at the moment:

try {
        url = new URL(address);
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("GET");
        InputStream inputStream = connection.getInputStream();
        DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = builderFactory.newDocumentBuilder();
        Document xmlDoc = builder.parse(inputStream);
        return xmlDoc;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }

Can anybody walk me through the steps and I want to know, how will the notification be triggered? Will the app have to do some internal polling of its own? No detail is too small. Thanks in advance

Oh yeah, lastly, will webhooks come into play here? I'm really not familiar with them. Thanks again.

0

There are 0 answers