title: How to get the default application name for dialer app android
body: <p>I need to check if my dialer app is default dialer app or not. Currently I'm using this code</p>
  
  <pre><code>private boolean isDefault() {
          Intent i=new Intent(Intent.ACTION_DIAL);
          i.addCategory(Intent.CATEGORY_DEFAULT);
          ResolveInfo info=getPackageManager().resolveActivity(i,0);
          CharSequence name=getPackageManager().getApplicationLabel(info.activityInfo.applicationInfo);
          Log.d(TAG, "isDefault: "+name);
          return name==getString(R.string.app_name);
      }
  </code></pre>
  
  <p>But <code>name</code> is always <strong>"Android System"</strong>
  Your help will be greatly appreciated. Thanks</p>