Create a single device application using the Push Synchronization APIs described in this section.
Develop the push application directly from generated mobile business object (MBO) code.
private void sampleEnableSIS_Click(object sender, EventArgs e) { //Set synchronizaton profile properties SISsampleDB.GetSynchronizationProfile().ServerName = "example-xp2"; SISsampleDB.GetSynchronizationProfile().NetworkProtocol = "http"; SISsampleDB.GetSynchronizationProfile().PortNumber = 2480; //Set poll interval to 180 seconds. SISsampleDB.GetSynchronizationProfile().SISIntervalMS = 180000; //Register server sync configuration based on the connection profile properties. //This generates a configuration file for SybaseServerSync application under \Application Data\ SISsampleDB.RegisterServerSyncConfiguration(); //Start SybaseServerSync application. you can also start it manually before running the SIS sample. SISsampleDB.LaunchServerSyncHelper(); // Login to Unwired Server SISsampleDB.LoginToSync("test", "test123"); //Synchronize the syncgroup. SISsampleDB.Synchronize("ofs"); //Enable SIS on the "ofs" synchronization group. ISynchronizationGroup sg = SISsampleDB.GetSynchronizationGroup("ofs"); sg.EnableSIS = true; sg.Interval = 0; sg.Save(); // Register your callback handler if you want to handle notifications. SISsampleDB.RegisterCallbackHandler(new MyCallbackHandler()); // Start a background thread to do synchronization on notifications. SISsampleDB.StartBackgroundSynchronization(); //Synchronize the synchronization group to enable SIS on server. SISsampleDB.Synchronize("ofs"); sg = SISsampleDB.GetSynchronizationGroup("ofs"); System.Diagnostics.Debug.Assert(sg.EnabledSIS, "SISSubscription not created"); } private void sampleExit(object sender, EventArgs e) { SISsampleDB.StopBackgroundSynchronization(); SISsampleDB.ShutdownServerSyncHelper(); }