Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 16
Registered: ‎05-28-2011
My Device: Passport
My Carrier: T-Mobile

Invoke MemoPad with preset title

public Object run(Object context){
        Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD,
        new MemoArguments( MemoArguments.ARG_NEW));
        return context;

 

I am using that code to Invoke a new memopad, but am wondering how to invoke it with a preset title. I came across this in the Javadocs, but am not sure how to implement it.

 

http://www.blackberry.com/developers/docs/6.0.0api/net/rim/blackberry/api/pdap/BlackBerryMemo.html

Contributor
Posts: 16
Registered: ‎05-28-2011
My Device: Passport
My Carrier: T-Mobile

Re: Invoke MemoPad with preset title

Anyone have any idea if this is possible?

Developer
Posts: 253
Registered: ‎08-14-2010
My Device: Not Specified

Re: Invoke MemoPad with preset title

 PIM p = PIM.getInstance();
		         BlackBerryMemoList memoList;
		         try {
		             memoList = (BlackBerryMemoList) p.openPIMList( BlackBerryPIM.MEMO_LIST, BlackBerryPIM.READ_WRITE );
		             BlackBerryMemo memo = memoList.createMemo();

  if ( memoList.isSupportedField( BlackBerryMemo.TITLE ) ) {
             memo.addString( BlackBerryMemo.TITLE, 0, "New Company Policy" );
         }
		             
		             if ( memoList.isSupportedField( BlackBerryMemo.NOTE ) ) {
		                // memo.addString( BlackBerryMemo.NOTE, 0, "Here are the details..." ); 
		               
		             }
		            
		             
		           
		             
		             Invoke.invokeApplication(Invoke.APP_TYPE_MEMOPAD, new MemoArguments( MemoArguments.ARG_NEW,memo));