How to get your context in your phonegap plugin

后端 未结 1 1800
情书的邮戳
情书的邮戳 2020-12-29 18:49

This is my plugin for android and one of my method requires a context, Is there a way how can I get this context?

public class GaziruPlugin extends CordovaPl         


        
相关标签:
1条回答
  • 2020-12-29 19:38

    try to put this into your plugin:

    Context context=this.cordova.getActivity().getApplicationContext(); 
    
    0 讨论(0)
提交回复
热议问题