tags:

views:

86

answers:

3

Is there a way to determine what kind of data plan a device has so an app provides a less rich experience if a data plan is not available? I imagine the connector factory would still be able to return me an HTTPConnection but it would cost the user serious money for lots of data, and I'd like to be nice and prevent that.

I thought there would be a way to query device capabilities in the MIDP API, but maybe it's in CLDC?

A: 

No there is no way to do this.

funkybro
Not even a way to detect if the user is connected via WiFi? I know Java wants to abstract the actual connection from me, but that information can be obtained in something like Symbian C++.
SB
No there really is no way! All you get is an HttpConnection with no indication of connection mechanism or data plan.You could set up a server which the user can connect to, and measure the connection speed between them, and if it's really fast, perhaps deduce that they're on WiFi. But 3/3.5G is pretty damn fast anyway these days, you may end up just sending lots of data over their expensive pay-per-KB data connection!Best perhaps just invite the user to select a "light" data option if they are concerned about costs.
funkybro
A: 

As far as I know there is no way to do this. To address this precise issue, on first download we provide a big bold letter warning saying our apps require data plan. You can do something similar.

Or you can provide an option on first download for the user to say whether he has a data plan or not, and provide a degraded user experience if he doesnt. Dont forget to keep this as an option in application settings and allow the user to enable data services later, as he/she may get a data plan and want to use your app.

omermuhammed
+1  A: 

Since you mention it in your comments, you can probably make a Symbian OS C++ application that only connects via a specific set Wi-Fi access points (and just stay offline if none of these are available) but I can't think of a way to figure out the current user data plan or whether a given Wi-fi network is free.

None of that is available in J2ME, at least not until something like JSR 307 is implemented.

You might want to look into how the Nokia IAPInfo API behaves on actual phones (including Sony-Ericsson and Samsung Series60 phones, potentially) since it is the closest thing to what you want.

QuickRecipesOnSymbianOS