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

  • Home
  • SEARCH
  • 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 8865305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:28:16+00:00 2026-06-14T16:28:16+00:00

My application has functionality that send some content on server and (need) post it

  • 0

My application has functionality that send some content on server and (need) post it on facebook. It uses service for sending (for store data I’m use sqlite). Is it possible to handle facebook sessions e.t.c from service? I need it because time when content will be stored in DB and sending time can be different (may be connection will be lost on very long time and sending starts after connection will be available, but only sending service of my application will be active in this time). I can’t find any solution for this case(and good solution will be great). Please help.

  • 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-06-14T16:28:17+00:00Added an answer on June 14, 2026 at 4:28 pm

    Users must explicitly grant permissions to the application, and Android services do not support Activity.startActivityForResult(), so it is not possible to open a Session or add new permissions via reauthorize from a service.

    However, if you open/reauthorize a Session in one of the Activities of your app, the state of the Session is saved to SharedPreferences by default. If a Service creates a Session after this happens, it will end up in SessionState.CREATED_TOKEN_LOADED. If the Session.getState() is CREATED_TOKEN_LOADED, the Session is guaranteed to be able to openForRead() with no UI, and it is legal to pass a null Activity. The Session will have all the permissions granted that were saved by your Activity.

    To simplify all this, your service can just call:

    Session session = Session.openActiveSession(this);
    

    This call returns null if no valid token was in SharedPreferences.

    If your app UI has a settings area, an easy way to get the token stored in the first place is to include a LoginFragment as one of the settings panels. This will let your users log in/log out, and should save the Session state such that your service can pick it up if it is in the same app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an Adobe AIR application written in pure AS3 that has some functionality
I am making an Augmented Reality application that has picture taking functionality. It uses
I am creating an ASP.NET MVC application that has postcode lookup functionality. I capture
My application has many aggregate fields that need to be updated when any related
I'm writing an application that has POCO Entity Framework data access on the server.
I have an application that uses WebSphere MQ to send data through WebSphere to
I'm building a flex application It has a functionality that can upload files to
Our Application has a Class that wraps Jersey REST functionality. One Method is public
I have developed an application which has the functionality of receiving notifications from server.
My windows form application has IMessageFilter functionality. It seems to work except for that

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.