Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use in Java Project #75

Open
Lazy-Developer-here opened this issue Aug 6, 2021 · 2 comments
Open

Use in Java Project #75

Lazy-Developer-here opened this issue Aug 6, 2021 · 2 comments

Comments

@Lazy-Developer-here
Copy link

Hi ,

How to call / use in java project .

I am unable to create Class object and call method .

in kotlin we can use
AutoStartPermissionHelper.getInstance().getAutoStartPermission(context)

in same way how can i use call in Java.

Thanks.

@KristjanBulic
Copy link

KristjanBulic commented Sep 13, 2021

Create Kotlin class inside your project:

import com.judemanutd.autostarter.AutoStartPermissionHelper

class Autostarter {
    companion object{
        @JvmStatic fun autostart(){
            AutoStartPermissionHelper.getInstance().getAutoStartPermission(App.getAppContext());
        }
    }
}

and in bulid.gradle

plugins {
    id 'com.android.application'
    id "org.jetbrains.kotlin.android" version "1.5.30"
}

@d9j
Copy link

d9j commented Sep 13, 2021

kotlin dependency bloating project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants