AppWidgets绑定到AppWidgetHost - 机器人 [英] Binding AppWidgets to AppWidgetHost - Android

查看:187
本文介绍了AppWidgets绑定到AppWidgetHost - 机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你通常要添加在Android的一个AppWidget有一个列表,你需要选择一个部件并将其绑定到主屏幕。

When you normally want to add an AppWidget in Android there is a list where you need to pick one widget and it binds it to the home screen.

我想建立一个应用程序,它有它自己的 appWidgetHost 和具体应用程序的窗口小部件,我建立它。

I'm trying to build an app which has its own appWidgetHost and specific App Widgets that I built for it.

我有两个问题:

  1. 我想能够自动将插件绑定到我的AppWidgetsHost不从列表采摘用户。
  2. 我想我自己的'挑小部件列表并加载的我所创建的小部件。
  1. I would like to be able to automatically bind a widget to my AppWidgetsHost without the user picking from the list.
  2. I want to make my own 'pick widgets list' and to load only widgets that I have created.

要使它简单;还有就是我的应用程序,我AppWidgets,我想完全控制在一个appWidget绑定到appWidgetHost等方面。

To make it simple; There is my app with my AppWidgets and I want full control in terms of binding a appWidget to the appWidgetHost etc.

3人要求在谷歌论坛上类似的问题:

3 people asked similar questions in Google forums:

  1. 链接1
  2. <一个href="http://groups.google.com/group/android-developers/browse_thread/thread/231245ba6d1e690f/047b9d3f776d7e54?lnk=gst&q=bindAppWidgetId#047b9d3f776d7e54"相对=nofollow>链接2
  3. 链接3
  1. Link 1
  2. Link 2
  3. Link 3

我认为是有可能唯一的答案就是在链接数2 Paraneet(该repliers之一)说,你可以安装/数据/应用程序,因为一些安全问题,在/系统/应用程序,该应用程序来代替。但我不知道这是否是生产一个可靠的解决方案,我想更多地了解这样做的优点和缺点。

The only answer I found to be a possibility is in link number 2. Paraneet (one of the repliers) said that you can install the app under /system/app instead of /data/app because some security issue. but I'm not sure if it is a reliable solution for production, and I would like to know more about the pros and cons of doing this.

谢谢,夏嘉曦。

推荐答案

Unfortunatlly你(和我),Paraneet是正确的。

Unfortunatlly for you (and me), Paraneet is right.

结合appwidget是一个敏感的行动,因此,为了避免恶意软件它需要大部分用户的同意,但是如果您安装的应用程序到/系统/ data文件夹,那么你认为是操作系统的一部分,您将得到一个系统允许它可以让你决定要绑定appwidget你没有任何用户参与创建的。

binding appwidget is a sensitive action and thus, to avoid malware it requires the user's consent for the most part however if you install your app into the /system/data folder then you considered part of the OS and you are given a system permission which lets you decide to bind appwidget that you created without any user's involvement.

这篇关于AppWidgets绑定到AppWidgetHost - 机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆