android.net.ConnectivityManager.requestRouteToHost(int, int)

1,681 views
Skip to first unread message

André Oriani

unread,
Aug 11, 2009, 12:17:01 AM8/11/09
to android-platform
Can android.net.ConnectivityManager.requestRouteToHost(int, int) be
used to force a GPRS connection even when Wifi is up ( and
therefore is is the preferred network interface). Keep in mind that
some services can only be handled on carrier's network.


Tks,
André Oriani

Eric Shienbrood

unread,
Aug 11, 2009, 10:26:21 AM8/11/09
to android-platform
requestRouteToHost() doesn't establish connectivity on any network, it
only ensures that any traffic for the specified host will be routed
via the specified network type (wifi or mobile). Connectivity must
already exist on the specified network. Currently, the only way to
achieve simultaneous connectivity on both wifi and mobile data
networks is to use ConnectivityManager.startUsingNetworkFeature(int,
String), where the second argument specifies the network feature to be
used. The only network feature supported is to enable connectivity to
the MMS APN, so that MMS messaging can be done while a wifi connection
is active.

So the bottom line is that there is currently no general-purpose way
to force a mobile data connection to exist when a wifi connection
already exists.

Eric Shienbrood

André Oriani

unread,
Aug 11, 2009, 2:56:08 PM8/11/09
to android-platform
Thanks Eric, that settles my question and link the dots of the code I
saw in the framework level. Strange that MMS was the only thing
foreseen as a "carrier-network-only-service". IM, OMA PoC, VVM(?) ...
would need similar support. Anyway, now we just have to wait for the
candy after donut :)

Thanks and Regards,
André Oriani

tauntz

unread,
Nov 26, 2009, 4:56:07 PM11/26/09
to android-...@googlegroups.com
Are there more options other than MMS in Eclair (like using the
general gprs APN)?

Sorry for being off-topic for this list since I don't plan to
contribute anything regarding this topic BUT maybe someone else will
if he/she sees that this piece is missing from the framework and there
is a need for this (just search all the lists for questions about
this) ;)

Tauno
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

pe...@openduck.com

unread,
Jan 7, 2010, 7:40:31 AM1/7/10
to android-platform
I would like to see this feature implemented too, at the moment my
only option is to have my app disable wifi, perform data retreival and
then restore wifi to its previous state.

On Nov 27 2009, 5:56 am, tauntz <tau...@gmail.com> wrote:
> Are there more options other than MMS in Eclair (like using the
> general gprs APN)?
>
> Sorry for being off-topic for this list since I don't plan to
> contribute anything regarding this topic BUT maybe someone else will
> if he/she sees that this piece is missing from the framework and there
> is a need for this (just search all the lists for questions about
> this) ;)
>
> Tauno
>

Reply all
Reply to author
Forward
0 new messages