NathanWalker / nativescript-fancyalert

Fancy alerts for NativeScript.
Other
147 stars 38 forks source link

Not working with Nativescript 6 Android Version #76

Closed YoussefGheith closed 5 years ago

YoussefGheith commented 5 years ago

The plugin stop working on android after upgrading the app to Nativescript 6

"ERROR Error: Uncaught (in promise): Error: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference"

works very will on IOS.

OPADA-Eng commented 5 years ago

Same here. any solution?

OPADA-Eng commented 5 years ago

@NathanWalker The problem as I see from this instruction: var alert = new cn.refactor.lib.colordialog.PromptDialog(app.android.currenntContext); if you change it to: var alert = new cn.refactor.lib.colordialog.PromptDialog(app.android.foregroundActivity); it will work! because of currenntContext is no longer available in the new version of tns-core-modules.

OPADA-Eng commented 5 years ago

I submitted a PR #77 if you want to merge.

prashantnirgun commented 5 years ago

kindly merge with stable code waiting for update

OPADA-Eng commented 5 years ago

Anything to fix this?

NathanWalker commented 5 years ago

Fixed in 3.0.9

xubmuajkub commented 5 years ago

@NathanWalker After update to v3.0.9, it works fine on android but seems like it's not working in iOS. Any solution?