on 03-29-2011 12:17 PM
Hi,
I have created app by DAD and running BB application on device but it uses GPRS not WI-FI well even though i have enabled both GPRS-WIFI on device it doesnt use wi-fi transport. I have seen following code in generated code API's :
/**
Returns list of transports available on blackberry device. This list may
include 0 or more from the following transports: <br>
BES, BIS, TCP, WAP1.0, WAP2.0, WIFI, UNITE
<p>
While setting transport for synchronization user should check for the
suffificient coverage using {@link isCoverageSufficient()} and set the
transport in sycnhronization profile as follows:
<p>
<code>
if(MyDatabase.isCoverageSufficient("WIFI"))
{
MyDatabase.getSynchronizationProfile().setString("transport", "WIFI");
MyDatabase.synchronize();
}
</code>
@return
*/
well i dont know where to add this code to affect whole application to use wi-fi. Anyone if has experience on it could please help me.
Regards
Tahir
Edited by: ozmrdn on Mar 29, 2011 1:18 PM
Hi all,
I am facing an error while connecting to sup server via wifi in blackberry device. I am getting a Communication error :tunnel failed ..
I saw this code
if(MyDatabase.isCoverageSufficient("WIFI"))
{
MyDatabase.getSynchronizationProfile().setString("transport", "WIFI");
MyDatabase.synchronize();//line 1
}
but I don't know whether to add any parameter to sychronize() function call in line 1 or not and where exactly to add this code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Replace the synchronize() method of ProjectNameDB.java with
public void synchronize(){
if(MyDatabase.isCoverageSufficient("WIFI"))
{
MyDatabase.getSynchronizationProfile().setString("transport", "WIFI");
MyDatabase.synchronize(...);
}else {
MyDatabase.synchronize(...);
}
}
It will work now.
I have tested the above code in Blackberry Storm 2
Edited by: Pradeep Gudipati on May 16, 2011 9:01 PM
Edited by: Pradeep Gudipati on May 16, 2011 9:02 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.