package Ġcom . threshold . pay . wechat Ċ Ċ import Ġandroid . content . Broadcast Receiver Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġcom . tencent . mm . opens dk . openapi . I WX API Ċ import Ġcom . tencent . mm . opens dk . openapi . WX API Factory Ċ Ċ /** Ċ Ġ* Ċ < receiver Ċ android : name =". wechat . App Register Broadcast Receiver " Ċ android : permission =" com . tencent . mm . plugin . permission . SEND " Ġ> Ċ < intent - filter > Ċ < action Ġandroid : name =" com . tencent . mm . plugin . openapi . Intent . ACTION _ REFRESH _ WX APP " Ġ/> Ċ </ intent - filter > Ċ </ receiver > Ċ Ġ*/ Ċ class ĠApp Register Broadcast Receiver Ġ: ĠBroadcast Receiver () Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġvar ĠAPP _ ID : ĠString ? Ġ= Ġnull ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Receive ( context : ĠContext ?, Ġintent : ĠIntent ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠAPP _ ID ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġapi : ĠI WX API Ġ= ĠW X API Factory . create WX API ( context , Ġnull ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// Ġå°Ĩ è¯¥ app æ³¨åĨĮ åĪ° å¾®ä¿¡ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġapi . register App ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }