Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Does not work in flutter project #61

Open
matthias-glatthorn opened this issue Sep 18, 2020 · 0 comments
Open

Does not work in flutter project #61

matthias-glatthorn opened this issue Sep 18, 2020 · 0 comments

Comments

@matthias-glatthorn
Copy link

matthias-glatthorn commented Sep 18, 2020

I try to use JPSVolumeButtonHandler in a flutter project, but the volume buttons are not detected. This is how I used it:

AppDelegate.swift:

var volumeButtonHandler: JPSVolumeButtonHandler?
volumeButtonHandler = JPSVolumeButtonHandler(up: {self.doSomething()}, downBlock: {self.doSomething()})
volumeButtonHandler?.start(true)
...  
func doSomething() -> Void {  
...  
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant