Skip to content

Need an example using MainActivity.kt #12

@randyramig

Description

@randyramig

Despite the README saying to modify MainActivity.kt, the only example is for MainActivity.java.

If I do this in MainActivity.kt:

import dev.darttools.flutter_android_volume_keydown

class MainActivity : FlutterAndroidVolumeKeydownActivity()

It doesn't work.

MainActivity.kt:5:22 Packages cannot be imported.
MainActivity.kt:7:22 Unresolved reference 'FlutterAndroidVolumeKeydownActivity'.

Note that I also tried the volume_listener package following their README and it worked with MainActivity.kt.
https://pub.dev/packages/volume_listener

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions