org.symbian.tools.wrttools/plugin.xml
changeset 374 92f6ae438d71
parent 373 85c2a2a29aad
child 375 d1edab2715d4
equal deleted inserted replaced
373:85c2a2a29aad 374:92f6ae438d71
   940 			var firstName = contact.FirstName;
   940 			var firstName = contact.FirstName;
   941 			var lastName = contact.LastName;
   941 			var lastName = contact.LastName;
   942 			var mobile = contact.MobilePhoneGen;
   942 			var mobile = contact.MobilePhoneGen;
   943 			var landPhone = contact.LandPhoneGen;
   943 			var landPhone = contact.LandPhoneGen;
   944 			var jobTitle = contact.JobTitle;
   944 			var jobTitle = contact.JobTitle;
   945 			// Consult WRT documentation for possible values
   945 			// Consult WRT documentation for other possible fields
   946 			// TODO Process contact information
   946 			// TODO Process contact information
   947 		}
   947 		}
   948 	} else {
   948 	} else {
   949 		var errorCode = result.ErrorCode;
   949 		var errorCode = result.ErrorCode;
   950 		var errorMessage = result.ErrorMessage;
   950 		var errorMessage = result.ErrorMessage;
   962 	var messaging = device.getServiceObject("Service.Messaging", "IMessaging");
   962 	var messaging = device.getServiceObject("Service.Messaging", "IMessaging");
   963 	var result = messaging.IMessaging.Send({ MessageType : "SMS", To : phoneNumber, BodyText : text });
   963 	var result = messaging.IMessaging.Send({ MessageType : "SMS", To : phoneNumber, BodyText : text });
   964 	if (result.ErrorCode != null) {
   964 	if (result.ErrorCode != null) {
   965 		var errorCode = result.ErrorCode;
   965 		var errorCode = result.ErrorCode;
   966 		var errorMessage = result.ErrorMessage;
   966 		var errorMessage = result.ErrorMessage;
       
   967 		// TODO Cannot send SMS message
   967 	}
   968 	}
   968           </content>
   969           </content>
   969        </item>
   970        </item>
   970        <item
   971        <item
   971              description="Adds callback that will be notified of orientation chnages"
   972              description="Adds callback that will be notified of orientation chnages"
   977 		SearchCriterion : "Orientation"
   978 		SearchCriterion : "Orientation"
   978 	};
   979 	};
   979 	var result = sensors.ISensor.FindSensorChannel(SensorParams);
   980 	var result = sensors.ISensor.FindSensorChannel(SensorParams);
   980 
   981 
   981 	if (result.ErrorCode == 0) {
   982 	if (result.ErrorCode == 0) {
   982 		var result2 = sensors.ISensor.RegisterForNotification({ ChannelInfoMap : result.ReturnValue[0], ListeningType : "ChannelData" }, ${orientationCallback});
   983 		var result2 = sensors.ISensor.RegisterForNotification({ ChannelInfoMap : result.ReturnValue[0], ListeningType : "ChannelData" }, orientationCallback);
   983 		if (result.ErrorCode == 0) {
   984 		if (result.ErrorCode == 0) {
   984 			var transactionId = result.TransactionID;
   985 			var transactionId = result.TransactionID;
   985 			// TODO Use this transaction ID to cancel notifications when watching orientation is no longer needed
   986 			// TODO Use this transaction ID to cancel notifications when watching orientation is no longer needed
   986 		} else {
   987 		} else {
   987 			var errorCode = result.ErrorCode;
   988 			var errorCode = result.ErrorCode;