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
Developer
Posts: 23
Registered: ‎06-05-2009
My Device: Not Specified

Copy to Clipboard works in sim, not on device

[ Edited ]

Hello,

 

I have created a button in my app that will copy messageField to clipboard when pressed, and then display a dialog saying the information had been copied.  This works as expected in the device SIM from 4.5 clear through 5.0.  However, on the device it does not copy the text.. Below is the code I have used:

 

 

public void copy(){
    try{Clipboard.getClipboard().put(messageField);
    }catch(Exception e){ System.out.println(e.getMessage());}
    }

 

 

and

 

 

else if (field == copyButton){
            copy();
            Dialog.inform("Copied!");
            }

 

 

 

is there something I am missing here?

 

thanks in advance

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

Are you gettting any type of exception?

 

This could be due to Application Permissions settings.

 

 

Developer
Posts: 23
Registered: ‎06-05-2009
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

There is no exception at all, I have event checked the event log for one and there isnt anything.  I have, as well as many others, set permissions to allow all to no avail still.  I am at a loss..

 

Anyone have any other ideas?

 

Developer
Posts: 23
Registered: ‎06-05-2009
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

I am still experiencing the same issue. This works fine in all the device sims but will not work on an actual device.  Anyone have ANY suggestions for me?

Developer
Posts: 19,629
Registered: ‎07-14-2008
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

How many devices have you tested this on?  What OS levels are these devices using?

Developer
Posts: 23
Registered: ‎06-05-2009
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

I have tested this on:

 

9630-4.7.1 and 5.0

9550-5.0

9530-5.0

9000-5.0

8530-5.0

8330-4.5

9700-5.0

 

Developer
Posts: 23
Registered: ‎06-05-2009
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

still no one?  I know there has to be someone out there that has some insight on this..

New Developer
Posts: 18
Registered: ‎07-17-2009
My Device: Not Specified

Re: Copy to Clipboard works in sim, not on device

Please pardon my ignorance, but I don't see how that System.out.println() would be visible on a live device.

 

Perhaps if you did a Dialog.alert() with that info, you would see if you were actually getting an exception.

 

(Sorry, but this doesn't address your issue, I'm just hoping this will provide more info for you to help resolve the issue.)