Hi,
everytime i run a socket connection my cellphone prompts a selection box with possible connection types "choose connection..."
I want to do this automatically by code without prompting but i don't know how to start.
Greetz
Franky
Hi,
everytime i run a socket connection my cellphone prompts a selection box with possible connection types "choose connection..."
I want to do this automatically by code without prompting but i don't know how to start.
Greetz
Franky
what you have to do is read all the list of IAP ID and store the one selected by the user in your database or file. Then connecting for the second time use the IAP ID directly, if that does not work then only ask user to select it again.
Code:// Create an RConnection using a defined IAP RSocketServ server; RConnection connection; TInt error; error = server.Connect(KESockDefaultMessageSlots); error = connection.Open(server, KConnectionTypeDefault); TCommDbConnPref prefs; prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt); prefs.SetDirection(ECommDbConnectionDirectionOutgoing); prefs.SetIapId(Iap); //Where IAP is the AP stored from the DB/member variable error = connection.Start(prefs); ... // Close connection / server once you are done // connection.Close(); // server.Close();
Cheers,
Mayank