title: Hardcoding Int reference as String to create JAR
body: <p>I have a situation where I am creating JAR and I don't want to reference any of String or Int from /res/values. So I am hardcoding it everywhere</p>
  
  <pre><code>event_info.put("CLIENT_HALT", new EventInfo(R.string.client_halt, R.drawable.error, 0, EV_PRIO_HIGH, 0));
  </code></pre>
  
  <p>As you see "R.string.client_halt" refers to String "Halt" in res/values/abc.xml</p>
  
  <p>But it is of type Int, hence I cannot do like this</p>
  
  <pre><code>event_info.put("CLIENT_HALT", new EventInfo("Halt", R.drawable.error, 0, EV_PRIO_HIGH, 0));
  </code></pre>
  
  <p>Below is EventInfo method</p>
  
  <pre><code>public EventInfo(int res_id_arg, int progress_arg, int priority_arg, int flags_arg)
      {
          res_id = res_id_arg;
          //icon_res_id = icon_res_id_arg;
          progress = progress_arg;
          priority = priority_arg;
          flags = flags_arg;
      }
  </code></pre>
  
  <p>How do I overcome this issue and hardcode int value in my method. I tried below case but it won't work and give me "NumberFormatException"</p>
  
  <pre><code>String halt = "Halt";
  int foo = Integer.parseInt(halt);
  </code></pre>
  
  <p>Thanks</p>