Integrating my widget with my application

I created a widget that works fine for my part, and I also made an application for this also works well. Now I want to integrate this widget into my application so that both are in the same package.

How can i do this?
I need to make changes to the manifest file.
I did R&D, but all the links are for widget development from the start. Not for integration.

I saw a lot, but found nothing. Please help me in this regard.

Thanks in advance.

+7
source share
2 answers

It works for me, copying all my widget files to the project that I want to integrate with. Now, when I install the application on the device, its widget is also installed

0
source

I am not an apologist for Copying and pasting programming , so after a little research, we found a way to integrate the widget into several different projects.

  • Turn the Widget project into a library project: properties -> Android -> and check Is Library
  • Go to the source project and import the Widget project: properties -> Android -> Add
  • In the original project manifest, add text between <receiver>(...)</receiver> , including <intent-filter /> and <meta-data/> , in <application>(...)</application>

And preost, App + Widget integration without Copy-Paste programming!

0
source

All Articles