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

not work in fragment #23

Open
IbrahimSayed94 opened this issue Mar 7, 2019 · 5 comments
Open

not work in fragment #23

IbrahimSayed94 opened this issue Mar 7, 2019 · 5 comments

Comments

@IbrahimSayed94
Copy link

may be found problem in permission

@akardas16
Copy link

yes I got this error Attempt to invoke virtual method 'void com.stfalcon.smsverifycatcher.SmsVerifyCatcher.onStart()' on a null object reference

@vishalpatel1327
Copy link

I also having same issue in fragment not working

@sepehr-alipour
Copy link

why it doesn't work in fragment?

@Alireza-hr
Copy link

Alireza-hr commented Aug 6, 2019

Fixed !
you have 2 ways :
1- you cant use inside Fragment becuse this function SmsVerifyCatcher() first parameter is Activity type
you must definition a public function that setText code for Fragment from activity
i get Object Fragment from FragmentManager and setText my code to Fragment inside Activity
2-create a function that return Activity and call this function inside Fragment where SmsVerifyCatcher() called for example :
new SmsVerifyCatcher(((YourActicitvty)getActivity()),new ...)

@ezralazuardy
Copy link

another workaround is to use sharedViewModel with your parent activity

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

6 participants