Kanaksinh / gtalksms

Automatically exported from code.google.com/p/gtalksms
0 stars 0 forks source link

Send Clipboard button not working #218

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Press "Send Clipboard" Button.
2. On the receiving client, Clipboard text is blank
3. It seems that it is sending null string

What is the expected output?

What do you see instead?
I figure out that the intention of this button is to send Clipboard text to the 
recipient. 

To copy the clipboard, the code should send a "copy" intent with empty string 
("") argument. Current code is :

  intent.putExtra("cmd", "copy");
  intent.setClassName("com.googlecode.gtalksms", "com.googlecode.gtalksms.MainService");
   startService(intent);

But the code send the intent with __no argument__ which will be interpreted as 
null (null string) instead of "". 

Tested with this code:
  intent.putExtra("cmd", "copy");
  intent.putExtra("args", "");
  intent.setClassName("com.googlecode.gtalksms", "com.googlecode.gtalksms.MainService");
   startService(intent);

It works fine with this modification.

Additional informations:
Phone model: <enter phone model>

Original issue reported on code.google.com by gujab...@gmail.com on 31 Aug 2011 at 12:50

GoogleCodeExporter commented 8 years ago
Hmm, that is exactly what's done by getAllCommands() ( 
http://code.google.com/p/gtalksms/source/browse/src/com/googlecode/gtalksms/cmd/
Command.java#44 ) which is called by the clipboard command ( 
http://code.google.com/p/gtalksms/source/browse/src/com/googlecode/gtalksms/cmd/
ClipboardCmd.java#22 ). Also the clipboard button works for me.

Could it be that the clipboard was, in fact, empty when you pressed the button?

Original comment by fschm...@gmail.com on 31 Aug 2011 at 7:37

GoogleCodeExporter commented 8 years ago

Original comment by fschm...@gmail.com on 9 Sep 2011 at 9:47