hymanho wrote:
> How I can get the UserID and PCID in Palm?
What is the PCID?
for the UserID or user name: in Java, using syncbuilder.jar:
// First get the user info: userID, username, and Password.
// userID is a unique int assigned to a username at the
// first synchronization.
UserInfo userinfoobject = dlp.getUserInfo();
// userID
int userid = 0;
userid = userinfoobject.getUserID();
if (userid != 0)
System.out.println("userID = " + userid );
else System.out.println("No userID ");
// username
String username = userinfoobject.getUsername();
if (username != null)
System.out.println("username = " + username );
else
{
System.out.println("No username ");
// No sense in going on if there is no username.
// Put a reminder in the users DateBook
// to set a username.
Database dbase = dlp.openDB
(new com.syncbuilder.storage.appointment.DatabaseImpl());
com.syncbuilder.storage.Record unreminder =
dbase.createRecord();
((com.syncbuilder.storage.appointment.Record)
unreminder).description =
"Set your PDA username using " +
"your Desktop application. " +
"You can't synchronize here until " +
"you do this. ";
dbase.putRecord(unreminder);
dbase.close();
}
// password
// Hmmm...The TRGpro sends a password...and I'm
// not sure I know where it comes from. The
// security password may or may not be set.
byte [] password = userinfoobject.getPassword();
if (password != null)
System.out.println("password = " + password );
else{
System.out.println("No password ");
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/