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 8364043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:20:14+00:00 2026-06-09T12:20:14+00:00

Is it possible to store an object on closing an activity and then retrieve

  • 0

Is it possible to store an object on closing an activity and then retrieve it when you start activity again?

So the issue is following – I am developing an app which connects to Bluetooth slaves. I have a different functionality in different activities. I am able to connect bluetooth slaves to each activity, but when I move to different activity, the previous is destroyed.
I would like to make them to work in parallel or at least continue previously established connection without need to reconnect.

So after connection I have a connection object. I was wondering if it is possible to store this object when I close the app and then when the app is ran again I check if this object exists and if it does, I am just using it.

Or do you have any other ideas how to overcome this problem and let those activities to run in parallel?

Thank you in advance.

  • 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-09T12:20:16+00:00Added an answer on June 9, 2026 at 12:20 pm

    I solved this issue relatively easy by using basic Java. I created a new static class as a connection table with simple setters and getters.
    onCreate I check if I have a connection object with my UUID stored in that static class and retrieve it. If I don’t find, create one and add to the table.

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

Sidebar

Related Questions

I need to store an object content in Sqlite. I was wondering which was
Is it possible to store a string and 11 integers in the same object.
Is it possible to store multiple different class types in a single std::list object?
I don't really need to store DateTime object. Would be possible to call modify
Is it possible to store a Date object using SharedPreferences ? Actually in my
Is it possible to store a mixture of object types in an ArrayList? If
Is it possible to store a .Net object in the registry? I want to
Is it possible to temporarily store an object? What I intend doing is to
Possible Duplicate: How or where should I store object instances that I require globally
The History API makes it possible to store a state object in the browser

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.