-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
How to listening android.intent.action.PACKAGE_ADDED? #34
Comments
Really you could manage whatever events ... but, if such events are external ones, you have to re-route them (take a look at #17) This mean that you have:
LocalBroadcastManager.getInstance(context).sendBroadcastSync(intent); |
<application
android:icon = “ @drawable/ic_launcher”
android:label = “ @string/app_name” >
<receiver android:name = “MyReceiver” >
<intent-filter>
<action android:name = “android.intent.action.PACKAGE_ADDED” >
</action >
</intent-filter>
</receiver>
</application> public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
LocalBroadcastManager.getInstance(context).sendBroadcastSync(intent);
}
} |
sorry, I may forgot to mention I am using Ionic 2.
It is unsuccessful,
|
I've no idea the origin of the error. I don't know the class I've to check, if you have anything that could help me (config.xml, snippet, ... ) please share it |
您好,我使用的是ionic2 的nactive,我想问下在ionic2 中怎么样使用这个插件动态的监听安装成功的广播,我希望的是当我在app中点击下载按钮,在下载完成后自动跳转到软件安装,在这个时候注册并启用监听,当我安装完成后,给我个安装成功的返回状态,然后我在进行下一步操作,请问这个如何实现,我查了很久,由于对安卓原生不熟悉,所以没成功。谢谢 |
Sorry,My English is poor, now is the use of translation, I play Chinese is afraid of my expression is not clear, I am afraid that you can not understand translation. |
Hello, I use is ionic2 nactive, I would like to ask how to use this plugin dynamic monitor installation successful broadcast in ionic2, I hope that when I click the download button in app, when the download completes automatically jump to the software installation, registration at this time and enable listening, when I finished the installation then, give me a return to the state of installation is successful, then I in the next step, this is how to achieve, I look for a long time, because not familiar with the original Android, so there is no success. Thank you |
I'm arranging a ionic2 simple project so will be easier to understand how use this plugin |
OK,thank you |
May I listen to the android.intent.action.PACKAGE_ADDED now? |
@CjoyHome The steps should be:
|
As promised an ionic3 sample project using broadcaster https://github.com/bsorrentino/ionic-broadcaster-sample |
App into the background, can you receive the broadcast? |
Should I customize the plugin in the way you do it? |
I don’t know whether the app in background can receive message. This is an android matter, take a look here If yes, I don’t think that such native event could be sent to interface during background. Probably you have to cache it and send when app back in foreground |
how create a call recorder app in ionic 4 |
anyone please help ? |
Hi @Bhanu021 Why the a call recorder app is related to this plugin? I think that you could have more help asking on stackoverflow |
Is it possible to receive the broadcast from android.intent.action.PACKAGE_ADDED?
The text was updated successfully, but these errors were encountered: