从现有类型账户服务创建电子邮件帐户账户、帐户、电子邮件、类型

2023-09-05 01:39:55 作者:有求B应

我已经走过的的 SampleSyncAdapter 的按Android的文档提供的,但据我所知,有我们需要添加自定义账户服务的帐户样本项目。 但我需要的是从设备的现有帐户服务创建一个电子邮件帐户。的

I have gone through SampleSyncAdapter sample project provided by Android doc, but as I understand, there we need to add an account of custom Account service. But my need is to create an email account from existing account services on device.

为了更清楚我的问题,我举个例子的

To be more clear about my question, I am giving an example

下面可在我的设备账户服务

Here are the Account services available on my Device

和我猜谷歌和电子邮件账户理财业务是提供每一个Android设备上。

and I guess 'Google' and 'Email' account services are available on each Android device.

现在我想配置的电子邮件账号,所以我必须请按照下列步骤如下:

Now I want to configure an 'Email' account, so I must follow these below steps:

第1步:的输入现有的电子邮件ID和密码

Step 1: Enter existing email id and password

第2步:[A] 的常规设置             属性: - (帐户名称,真实姓名,电邮地址)

Step 2: [a] General Settings Attributes : - (Account name, Real Name, Email Address)

第2步:[B] 的接收服务器             属性: - (POP或IMAP邮件服务器,服务器地址,用户名,密码)

Step 2: [b] Incoming server Attributes : - (POP or IMAP mail server, Server Address, user name, password)

第2步:[C] 的发送服务器             属性: - (SMTP服务器,用户名,密码)

Step 2: [c] Outgoing server Attributes : - (SMTP server, user name, password)

第三步:的通过选择高级设置中,我们可以配置端口和证书选项。

Step 3: By choosing Advanced settings, we can configure port and certificate options.

和我们需要去通过上述步骤手动的但我想通过上面的所有设置来创建一个电子邮件帐户编程的。

And we need to go through the above steps manually, but I want to create an Email account programmatically by using all above settings.

所以,我怎么可以创建新的电子邮件帐户,从现有的客户服务progrmatically?的我需要这个功能的MDM。

So how can I create new email account from existing Account Services progrmatically? I need this functionality for MDM.

推荐答案

您不允许这样做是为了安全。

You are not allowed to do this for security reasons.

想象帐户被配置为与设置是不明就里的用户 - 用户可能甚至不知道帐户正在不惜一切创造!这将是恶意软件,垃圾邮件等的首选目标点,因为没有验证码,用户权限或任何其他身份验证涉及。

Imagine accounts being configured with settings that are unknown to the users - the users might not even know the accounts are being created at all! This would be a prime target point for malware, spam etc since no captcha, user permission or any other authentication is involved.

因此​​,这是一种安全措施....和良好的一个。

So this is a security measure....and a good one at that.