These are very basic things in mobile development. but its very useful to keep them documented.First we will see how to get date time
Then we will see how to get device id from device
public static String getCurrentDateTime()
{
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss aaa");
return dateFormat.format(new Date(System.currentTimeMillis()));
}
Then we will see how to get device id from device
net.rim.device.api.system.DeviceInfo.getDeviceId()
No comments:
Post a Comment