简体   繁体   English

如何将小部件应用程序集成到另一个应用程序中

[英]How can I Integrate my Widget Application into my another Application

Hi guy's Please See the question asked on this link[ Integration of my widget with my application ][1] 嗨,大家好,请参阅此链接上的问题[ 我的小部件与我的应用程序集成 ] [1]

[1]: My problem is exactly same as the question asked on this link. [1]:我的问题与此链接上的问题完全相同。 Very first I have tried this Ans=> 首先,我尝试过这个Ans =>

1] i) Turn the Widget project into a Library project : properties -> Android -> and tick Is Library ii) Go to the original project and import the Widget project : properties -> Android -> Add iii)In the original project's Manifest, add the text between the (...) , including and , into the (...) But this didn't work for me.. Then I tried second ans ie--- 1] i)将Widget项目转换为Library项目:properties-> Android->并勾选Is Library ii)转到原始项目并导入Widget项目:properties-> Android-> Add iii)在原始项目的Manifest中,将(...)之间的文本(包括和)添加到(...)中,但这对我不起作用。。然后我尝试了第二个答案,即

2] Copy all code from one package to 2nd one and merge AndroidManifest.xml ... 2]将所有代码从一个包复制到第二个包并合并AndroidManifest.xml ...

But in this case My both application ie widget App and Another app has MainActivity.. So there is ambiguity between them.. ! 但是在这种情况下,我的两个应用程序(即小部件应用程序和另一个应用程序)都具有MainActivity ..因此它们之间存在歧义。 Please help..! 请帮忙..!

Finally I've solved my problem, what I did is-- 终于我解决了我的问题,我所做的是-

I have copied all Activities, Classes and Services form my widget app to my another app. 我已将所有活动,类和服务从我的窗口小部件应用程序复制到另一个应用程序。 After that I have merged the both Manifest files (One from widget app. and one from my another app) into my another app, so that it is a single Manifest file. 之后,我将两个清单文件(一个来自小部件应用程序,一个来自另一个应用程序)合并到另一个应用程序中,因此它是一个清单文件。 And the main problem was my widget app and another app both had the activity with same name ie MainActivity, so to resolve this problem I've just renamed MainActivity from my widget app to StartActivity, and problem got solved, now application is running fine.! 而且主要的问题是我的窗口小部件应用程序和另一个应用程序都具有相同名称的活动,即MainActivity,因此为了解决此问题,我将MainActivity从我的窗口小部件应用程序重命名为StartActivity,问题得以解决,现在应用程序可以正常运行。 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在我的应用程序中集成时钟小部件 - Integrate clock widget in my application 我可以将Microsoft Lens集成到我的应用程序中吗? - Can I integrate Microsoft Lens into my application? 如何将SQL Server和Android应用程序与Push集成 - How can I integrate SQL Server and my android application with Push 如何将我的应用程序与我的小部件集成? - How can i integrate my app with my widget? 如何通知另一个应用程序我的应用程序失败了? - How can I notify another application that my application has failed? 我可以将BlackBerry inApp Payment集成到我的android应用程序中吗? - can i integrate BlackBerry inApp payment into my android application? 如何将Box SDK集成到OAuth的android应用程序中? - How do I integrate the Box SDK into my android application for OAuth? 如何在我的应用程序中集成cisco webex api以显示存储在cisco服务器中的视频? - How can i integrate cisco webex api in my application to display video which is stored in the cisco server? 我可以防止我的应用程序无法被其他应用程序杀死吗? - Can I prevent my application cannot be killed by another application? 如何在我的Android应用程序中整合Cortana技能 - How to integrate cortana skill with my application in android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM