title: Removing part of package name Android
body: <p>So I am dealing with a conflict. I am trying to launch the google play store from within my app, I have that functionality implemented. But, I can only hardcode the package value in the URI for it to work. I need a way where I can use getPackageName() and it returns the correct one from google play store.</p>
  
  <p>The Google Play Store package name that worked in the URI: <code>org.horaapps.leafpic</code> </p>
  
  <p>The Package Name getPackageName() returns: <code>org.horaapps.leafpic.debug</code> </p>
  
  <p>Here is the code for launching google play: </p>
  
  <pre><code>//Launches to the app in google play, if the package name ever does change you can do this
  //by changing the org section of the URI below. -beastlyCoder
  Uri uri = Uri.parse("market://details?id=org.horaapps.leafpic"); //dont want hardcoded value
  Log.d("tag", getApplicationContext().getPackageName());
  
  
  Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);
  try
  {
      startActivity(myAppLinkToMarket);
  
  } catch (ActivityNotFoundException e)
  {
      Toast.makeText(this, " unable to find market app", Toast.LENGTH_SHORT);
  }
  </code></pre>
  
  <p>How I can I remove the debug at the end so the two packages can correspond, (NOTE: this is an open source project so I'd prefer not making any drastic changes to the code like changing package structure and all of that.)</p>