Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用作按钮的 appwidget。我想彻底测试它,因为它会为我的应用程序启动重要活动。怎么可能这样做?
即兴发挥,我会将创建 的智能隔离RemoteViews在一个单独的方法中,该方法可以独立于 调用AppWidgetProvider,只需使用Context. 然后,您可以使用AndroidTestCase.
RemoteViews
AppWidgetProvider
Context
AndroidTestCase