title: How to send an IR code, convert a String to "IR string"
body: <p>I want to try to open my (old) car (who have an IR receptor) with a simple app.</p>
  
  <p>On the electronic board in the key I have a paper with a code (Exemple : 06495 167.5 )
  I think that the code in this exemple is only 06495, based on this source :
  <a href="http://farancullas.blogspot.fr/2012/10/recodificacion-receptor-infrarojo.html" rel="nofollow">http://farancullas.blogspot.fr/2012/10/recodificacion-receptor-infrarojo.html</a></p>
  
  <p>On android you have to send a HEX code converted to dec ?
  This is a part of my code (working because no exeption, and blue led on my note 3).</p>
  
  <p>I Just need some help to proper format the IR_CODE variable. I can send any string it seems to work because the led is flashing.
  Have you and idea to format this code ?
  I think It's something like hex2dec("195F") ? 195F is 6495 in hex</p>
  
  <p>It can be :
      IR_CODE=hex2dec(Integer.toHexString(Integer.decode(IR_CODE)));
  Based on this source : <a href="https://github.com/rngtng/IrDude/blob/master/src/com/rngtng/irdude/MainActivity.java" rel="nofollow">https://github.com/rngtng/IrDude/blob/master/src/com/rngtng/irdude/MainActivity.java</a> , but I'm not sure, and I can't test the app too much.</p>
  
  <pre><code>String IR_CODE="06495";
  Class irClass = irService.getClass();
  Class params[] = new Class[1];
  params[0] = String.class;
  try {
      Method sendIR = irClass.getMethod("write_irsend", params);
  
  for(int i=0;i&lt;2;i++)
      sendIR.invoke(irService, IR_CODE);
  }
  </code></pre>
  
  <p>Can you help me to format IR_CODE ?
  Thank you !</p>