Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

[Module dev] How to send data from an Activity which was not started by Ti proxy?

$
0
0

Hi,

I am writing a module for a third-part payment called Weixin app pay. When I call payment, the Weixin app will start and user will finish payment there. Then Weixin app will start one of my activity(exported=true or as a receiver) and send result to this activity. Below is the code of this activity:

public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
    @Override
    public void onResp(BaseResp resp) {
        Log.d("wx", resp.errCode);
        // what shall I do here to send the result to my module proxy?
    }
}
What shall I do here to send the result (resp.errCode) to my module's proxy? How can I get the instance of my module(like require('com.biddecor.wx'); in javascript) so I can call fireEvent()?

I look around in the docs and found out maybe I can use TiApplication.getAppProperties and set data in it? Is there any other way more straight?

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>