I recently found out why autoprovisioning doesn't work for my
Activesync server on Android.
It turns out Android's implementation is only doing a small portion of
the procedure described in this whitepaper:
http://technet.microsoft.com/en-us/library/bb332063%28EXCHG.80%29.aspx
When I use this page: https://www.testexchangeconnectivity.com/Default.aspx
to test my server, it confirms that everything is in working order.

I went looking for the source on http://android.kernel.org and found
the source of the email application done by Marc Blank:

            // There are up to four attempts here; the two URLs that
we're supposed to try per the
            // specification, and up to one redirect for each (handled
in postAutodiscover)
            // Note: The expectation is that, of these four attempts,
only a single server will
            // actually be identified as the autodiscover server.  For
the identified server,
            // we may also try a 2nd connection with a different
format (bare name).

            // Try the domain first and see if we can get a response
            HttpPost post = new HttpPost("https://"; + domain +
AUTO_DISCOVER_PAGE);
            setHeaders(post, false);
            post.setHeader("Content-Type", "text/xml");
            post.setEntity(new StringEntity(req));
            HttpClient client = getHttpClient(COMMAND_TIMEOUT);
            HttpResponse resp;
            try {
                resp = postAutodiscover(client, post, true /
*canRetry*/);
            } catch (IOException e1) {
                userLog("IOException in autodiscover; trying alternate
address");
                // We catch the IOException here because we have an
alternate address to try
                post.setURI(URI.create("https://autodiscover."; +
domain + AUTO_DISCOVER_PAGE));
                // If we fail here, we're out of options, so we let
the outer try catch the
                // IOException and return null
                resp = postAutodiscover(client, post, true /
*canRetry*/);
            }

It's the part where the autodiscovery process should query the SRV-
record _autodiscover._tcp.domain.com which is missing and messing up
any possibility for a clean autoprovisioning.

I'm not a developer myself and am hoping some of you are.
Is there some way to mature the email application in Android and get
the full procedure implemented?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en.

Reply via email to