Code example for SmsMessage: Receiving Text Messages (SMS)

Methods: getMessageBody, getOriginatingAddress, getTimestampMillis

0
			 
			 
			try 
			{ 
				MultipleSmsHandler smsHand = new MultipleSmsHandler();
				sms.put("origin", msg.getOriginatingAddress());
				sms.put("body", msg.getMessageBody());
				//sms.put("id", msg.getTimestampMillis()); 
				 
		        //String smsSimulation = " Absa: SPR 9437, Gesk, 29/06/12 DIREKTE DEBIET, DEAGOSTINI-4X000500, R-253.90, Saldo R4,093.75. Hulp 0860008600; VDWALPG043"; 
				try 
				{ 
			        if(smsHand.parseSMS(msg.getMessageBody() + ":" + msg.getTimestampMillis()))
			        { 
			         
						// When the Activity is not loaded, the currentPluginInstance is null 
						 
						if (currentPluginInstance != null)
						{ 
							// build code to call function 
							String code =  "javascript:" + callbackFunction + "(" + sms.toString() + ");";