Jump to content

how to insert one contact to the sim of the pda


Recommended Posts

Guest versek
Posted

Hello, my name is carlos and I develop a application that work whit the sim of the pda. The SO is Windows Mobile 2003 Phone Edition.

I try to insert one contact in the sim but the next method don't work. The metode don't return any exception, but don't insert the contact in the sim. I debbuging the application and I have seen that phonebookEntry.Text and phonebookEntry.Address remains target (phonebookEntry.Text = "").

I don't know because this happens, I hope that somebody can say to me since it becomes.

Private Sub miAfegirContacteSim_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miAfegirContacteSim.Click

	 Try

		  Dim sim2 As OpenNETCF.Phone.Sim.Sim = New OpenNETCF.Phone.Sim.Sim

		  Dim phonebook As OpenNETCF.Phone.Sim.Phonebook = sim2.Phonebook

		  Dim phonebookEntry As New OpenNETCF.Phone.Sim.PhonebookEntry



		  phonebookEntry.AddressType = OpenNETCF.Phone.AddressType.International

		  phonebookEntry.Plan = OpenNETCF.Phone.Sim.NumberPlan.Telephone

		  phonebookEntry.Text = "Carles"

		  phonebookEntry.Address = "937979797"


		  If (phonebook.Count < phonebook.Capacity) Then

			   Dim i As Integer = CType(sim2.Phonebook, System.Collections.IList).Add(phonebookEntry)

		  End If

		  sim2.Close()

	 Catch ex As Exception

		  MessageBox.Show(ex.Message)

	 End Try

End Sub

PD. Sorry but my english is very bad :rolleyes: (I can write also in spanish or catalan)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.