title: App contains default.realm file yet "No default RealmConfiguration was found. Call setDefaultConfiguration() first"
body: <p>I am Converting CSV file to realm file on <strong>APP ONE</strong> then shipping this as the primary database in the <strong>APP TWO</strong> and setting as default database using</p>
  <pre><code>SharedPreferences wmbPreference = PreferenceManager.getDefaultSharedPreferences(this);
      boolean isFirstRun = wmbPreference.getBoolean(&quot;FIRSTRUN&quot;, true);
      if (isFirstRun)
      {
  
  
  
          RealmConfiguration config = new RealmConfiguration.Builder(context)
                  .name(Realm.DEFAULT_REALM_NAME)
                  .migration(new in.webic.oralcalculations.Row())
                  .assetFile(context, &quot;Default.realm&quot;)
                  .schemaVersion(0)
                  .build();
  
          realm = realm.getInstance(config);
          realm.close();
  
  
          SharedPreferences.Editor editor = wmbPreference.edit();
          editor.putBoolean(&quot;FIRSTRUN&quot;, false);
          editor.commit();
  
      }
  </code></pre>
  <p>and default.realm is saved in the app directory
  <a href="https://i.stack.imgur.com/yEg3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yEg3c.png" alt="enter image description here" /></a></p>
  <p>in my another activity i am trying to use this db by</p>
  <pre><code> public void prepare_test(int id){
      realm = realm.getDefaultInstance();
      RealmResults&lt;RowNew&gt; result2 = realm.where(RowNew.class)
              .equalTo(&quot;course&quot;, id)
              .findAll();
      String a=&quot;&quot;;
      for (RowNew u : result2) {
          a+=&quot; &quot;+u.getQp1();
      }
      Toast.makeText(this,a,
              Toast.LENGTH_LONG).show();
  }
  </code></pre>
  <p>giving me error</p>
  <blockquote>
  <p>No default RealmConfiguration was found. Call setDefaultConfiguration() first</p>
  </blockquote>
  <p>yet i have already shown the creation of the default db in the app<br>
  any help will be appritiated<br>
  thanks</p>