title: how to prevent opening some activities after the first run of the application?
body: <blockquote>
    <p>knowing that I use buttons to move from activity to another</p>
    
    <blockquote>
      <p>PS I am new in android so be kind </p>
    </blockquote>
  </blockquote>
  
  <pre><code>public class swipe2 extends AppCompatActivity implements View.OnClickListener 
  
  private   Button next,skip;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.swipe2);
      next = (Button) findViewById(R.id.next2);
      skip=(Button) findViewById(R.id.skip2);
      next.setOnClickListener(swipe2.this);
      skip.setOnClickListener(swipe2.this);
  }
  </code></pre>
  
  <blockquote>
    <p>I use this buttons here</p>
  </blockquote>
  
  <pre><code>@Override
  public void onClick(View v)
  {
      if(v==next)
      {
          Intent homeIntent = new Intent(swipe2.this, swipe3.class);
          startActivity(homeIntent);
          finish();
      }
  
      else
      {
          Intent homeIntent = new Intent(swipe2.this, lastswipe.class);
          startActivity(homeIntent);
          finish();
      }
  
  }
  </code></pre>
  
  <p>So what should I do in order to solve?</p>