Home  | My Account  |  Membership
WorldDeveloper.org
Forum Details
Topics
Posts
Categories
 
577 member(s)
718,905 hit(s)
14 categories
51 topics
26 messages
0 online
Forums: Unfiled
download reporting
mickeystaines
1 topic(s)
1 post(s)

September 30, 2008 7:26 AM

I need to know how the hostj2me server manages to log the mobile configuration, profile,and the model number of the phone which downloads a mobile application from its server....How is it possible to query the phone OTA.......


hostj2me
43 topic(s)
23 post(s)

September 30, 2008 9:43 PM

HostJ2ME.com and WorldDeveloper.org use similar code to record application downloads and AMS notifications.

When your phone opens a connection to either server, it sends headers which contain the User-Agent. The servers record the all bytes from the connection and store them in a database. In some cases the IP addresses are resolved and the domains are normalized.

For AMS notifications, the server again records all bytes from the connection. Devices send status codes to the server. Below are some Java code excerpts.


download servlet:

StringBuffer buffer = new StringBuffer();
buffer.append(request.getRemoteAddr());
buffer.append("\nEncoding: ");
buffer.append(request.getCharacterEncoding());
buffer.append("\nRemote user: ");
buffer.append(request.getRemoteUser());
buffer.append("\nRemote host: ");
buffer.append(request.getRemoteHost());
buffer.append("\n\n");

Enumeration e = request.getHeaderNames();
while (e.hasMoreElements())
{
key = String.valueOf(e.nextElement());

if (key.toLowerCase().startsWith("cookie") || key.toLowerCase().startsWith("referer"))
continue;
buffer.append(key);
buffer.append("=");
buffer.append(request.getHeader(key));
buffer.append("\n");
}

e = request.getParameterNames();
while (e.hasMoreElements())
{
key = String.valueOf(e.nextElement());
if (key.toLowerCase().startsWith("cookie") || key.toLowerCase().startsWith("referer"))
continue;
buffer.append(key);
buffer.append("=");
buffer.append(request.getHeader(key));
buffer.append("\n");
}


©2008 WorldDeveloper.org - PO Box 310575 Miami, FL 33231

WorldDeveloper.org is a managed social network for application developers around the world.