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
Trusted Contributor
Posts: 178
Registered: ‎02-20-2011
My Device: 8700
My Carrier: at&t

Send Attachment On SDCard

[ Edited ]

Is something wrong in my code to send a attachment on sdcard? I can show it but can't open it!

 

				recipients[0]= new Address("support@abc.com","support@abc.com");
				msg.addRecipients(Message.RecipientType.TO, recipients);
				msg.setSubject("Query About abc");
				
				String initial = "App Version: 1.3" +
								"\nDevice Name: " + DeviceInfo.getDeviceName() +
								"\nOS Version: " + DeviceInfo.getSoftwareVersion();
				
				byte[] data = new byte[256]; 
				Multipart multipart = new Multipart();
				SupportedAttachmentPart attach = new SupportedAttachmentPart( multipart,
						"application", Log.LOG_LOCATOR, data);
				multipart.addBodyPart(attach); 
				
//				msg.setContent(initial);
				msg.setContent(multipart);
				msg.setPriority(Message.Priority.HIGH);
				Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(msg));

 

 

# I tried to change the world, but I couldn't find the source code #



Trusted Contributor
Posts: 178
Registered: ‎02-20-2011
My Device: 8700
My Carrier: at&t

Re: Send Attachment On SDCard

Attachment was added in email, but can't open show content. The path is right.

9550.png 

 

# I tried to change the world, but I couldn't find the source code #