question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Background Mode Documentation

See original GitHub issue

Under the instructions for iOS background mode there is:

Pass restoreStateIdentifier and restoreStateFunction to BleManager constructor.

I think this can be elaborated. Can restoreStateIdentifier be any string? What’s the motivation for restoreStateFunction and how should it be used?

I think even a init template in the readme would provide a lot of context to help future users out.

const bleManager = new BleManager({
  restoreStateIdentifier: 'mystring',
  restoreStateFunction: (bleRestoredState: BleRestoredState) => {
     // ??
  },
});

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:5

github_iconTop GitHub Comments

2reactions
MaximeLozachcommented, Apr 25, 2022

Can someone give an example ? I’m currently struggling with BleManager making my connection in a state I can’t programatically recover from. It looks like setting BleManageroptions could resolve this, but I don’t relly get how it works. (my issue : #969 )

0reactions
LucasAndradcommented, May 14, 2021

@ortonomy Apple will kill your app after a few minutes (maybe a couple of hours) if the iphone peformance starts to leeking. The restore feature will restore your app and it’s previous bluetooth status.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring background execution modes - Apple Developer
Specify the background modes your app requires · Select your project in Xcode's Project navigator. · Select the app's target in the Targets...
Read more >
Cordova-Plugin-Background-Mode - Ionic Framework
Learn about Cordova-plugin-background-mode usage. This Cordova plugin, for Ionic Native Apps, prevents the app from going to sleep while in background.
Read more >
Background Mode Parameters - Conga Product Documentation
Background Mode parameters let you bypass the classic Conga Composer dialog box. For more information on background mode, see Automating Solutions using ...
Read more >
Background Modes Tutorial: Getting Started - Kodeco
In this tutorial, you'll create an app that uses audio playback, location updates, critical tasks, and background fetch to learn about the most ......
Read more >
Background Work Overview | Android Developers
Processing data in the background is an important part of creating an Android application that is both responsive for your users as well...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found