Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6391127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:38:04+00:00 2026-05-25T03:38:04+00:00

I want to integrate Google Reader in my android application. Please help me on

  • 0

I want to integrate Google Reader in my android application.
Please help me on how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:38:04+00:00Added an answer on May 25, 2026 at 3:38 am

    Hope this helps:

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    
        try{  
            String auth = getGoogleAuthKey("<your gmail email address>","<your password>");
            String token = getGoogleToken(auth); 
            String result = postToGoogleReader(token, auth); 
            TextView tv = (TextView) findViewById(R.id.textView1); 
            tv.setText(result); 
        }catch(Exception e){
        }
    
    }
    
    protected String getGoogleAuthKey(String _USERNAME, String _PASSWORD) {
        String responseString = ""; 
        URL url;
        try {
            //open the connection 
            url = new URL("https://www.google.com/accounts/ClientLogin");
            HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
            urlConnection.setRequestMethod("POST");
            urlConnection.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
            urlConnection.setUseCaches(false);
            urlConnection.setDoOutput(true);  
    
            //create the body
            StringBuilder sb = new StringBuilder();
            sb.append("accountType="); 
            sb.append("GOOGLE"); 
            sb.append("&Email=");
            sb.append(_USERNAME);
            sb.append("&Passwd=");
            sb.append(_PASSWORD);
            sb.append("&service="); 
            sb.append("reader");
            sb.append("&source=");    
            sb.append("&lt;your app name&gt;"); 
    
            //make a request and retrieve results
            OutputStream outputStream = urlConnection.getOutputStream();  
            outputStream.write(sb.toString().getBytes("UTF-8"));
            outputStream.close(); 
            sb = null; 
    
            int responseCode = urlConnection.getResponseCode();
            InputStream inputStream;  
            if (responseCode == HttpURLConnection.HTTP_OK) {
                inputStream = urlConnection.getInputStream();
                responseString = convertStreamToString(inputStream);
                String _AUTHKEY = responseString.substring(responseString.indexOf("Auth="), responseString.length());
                responseString = _AUTHKEY.replace( "Auth=","" );
                inputStream.close();
                urlConnection.disconnect(); 
            }else {  
                urlConnection.disconnect(); 
                return "error"; 
            }
        } catch (Exception e) {
            return e.getMessage();  
        }
        Log.d("GoogleReader", "Auth.a=" + responseString); 
        return responseString.trim();
    }
    
    public String getGoogleToken(String authorization) {
        final String googleReaderTokenUrl = "https://www.google.com/reader/api/0/token"; 
        String responseString = ""; 
        URL url;
    
        try {
            //open the connection 
            url = new URL(googleReaderTokenUrl);
            HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
            Log.d("GoogleReader", "Auth.b=" + authorization); 
            urlConnection.addRequestProperty("Authorization", "GoogleLogin auth=" + authorization); 
            urlConnection.setRequestMethod("GET");
            urlConnection.setRequestProperty("Content-Type","application/x-www-form-urlendcoded");
            urlConnection.setUseCaches(false);
            urlConnection.setDoOutput(true);
    
            try {
                 InputStream inputStream = new BufferedInputStream(urlConnection.getInputStream());
                 responseString = convertStreamToString(inputStream);
            }catch(Exception e){
                int responseCode = urlConnection.getResponseCode();
                   return Integer.toString(responseCode); 
                //return e.getMessage(); 
            }finally {
                 urlConnection.disconnect();
            }
        } catch (Exception e) {
            return e.getMessage(); 
        }
        return responseString; 
    }
    
    public String postToGoogleReader(String token, String authorization){
        final String googleAuthUrl = "http://www.google.com/reader/api/0/item/edit"; 
        String responseString = "";  
        URL url;
        try { 
    
            //create the body
            StringBuilder sb = new StringBuilder();
            sb.append("accountType=");
            sb.append("GOOGLE");
            sb.append("&snippet=");
            sb.append(URLEncoder.encode("TheSnippet", "UTF-8"));
            sb.append("&T=");
            sb.append(URLEncoder.encode(token, "UTF-8"));
            sb.append("&share=");
            sb.append(false);
            sb.append("&url=");
            sb.append(URLEncoder.encode("http://developer.android.com/index.html", "UTF-8"));
            sb.append("&title=");
            sb.append(URLEncoder.encode("TheTitle", "UTF-8"));
            sb.append("&srcTitle=");    
            sb.append(URLEncoder.encode("TheSource", "UTF-8"));
            sb.append("&srcUrl=");    
            sb.append(URLEncoder.encode("www.your_web_site", "UTF-8"));
    
    
            //open the connection 
            url = new URL(googleAuthUrl);
            HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
            urlConnection.setRequestMethod("POST");
            Log.d("GoogleReader", "Auth.c=" + authorization); 
            urlConnection.addRequestProperty("Authorization", "GoogleLogin auth=" + authorization); 
            urlConnection.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
            urlConnection.setRequestProperty("Content-Length", Integer.toString(sb.toString().getBytes("UTF-8").length));
            urlConnection.setUseCaches(false);
            urlConnection.setDoOutput(true);
    
    
            //make a request and retrieve results
            OutputStream outputStream = urlConnection.getOutputStream();
            outputStream.write(sb.toString().getBytes("UTF-8"));
            outputStream.close();
            sb = null;   
    
            int responseCode = urlConnection.getResponseCode();
            InputStream inputStream;
            if (responseCode == HttpURLConnection.HTTP_OK) {
                inputStream = urlConnection.getInputStream();
                responseString = convertStreamToString(inputStream);
                inputStream.close();
                urlConnection.disconnect(); 
            }else {  
                inputStream = urlConnection.getInputStream();
                responseString = convertStreamToString(inputStream);
                urlConnection.disconnect(); 
                return "error"; 
            }
        } catch (Exception e) {
            return e.getMessage(); 
        }
        return responseString; 
    
    }
    
    private String convertStreamToString(InputStream is) {
        BufferedReader reader = new BufferedReader(new InputStreamReader(is));
        StringBuilder sb = new StringBuilder();
        String line = null;
        try {
            while ((line = reader.readLine()) != null) {
                sb.append(line + "\n");
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return sb.toString();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to integrate the zxing source code to my Android application. I have
I want to integrate bar-code scannerin my Android application. I attempted to add the
I've developed a RoR application, and want to integrate Google Analytics so I can
I want to integrate google plus in my application,but I dont know from where
I want to allow my company’s customers to integrate our Google App Engine application
I am creating a web application to integrate with Chargify . I want to
If I want to integrate DotNetOpenAuth (primary for people to use their Google/Yahoo accounts
I want to integrate a report writer in our web application. Right now ,
In my iphone application i have integrated Google Map.I want to show the country
I want to integrate Google Custom Search into my website searching box. The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.