title: Get information from surfaceview in activity
body: <p>I want to pass information(1 integer number) from surfaceview to activity, but throw intent and putextra i cant do this, throw surfaceview.fail i get 0. There is main peaces of code:</p>
  
  <pre><code>    public class Game extends SurfaceView {
      int fail=0;
      ...
       protected void onDraw(Canvas canvas) 
          {  if (sch==3){
  
                Context context = getContext(); 
                Intent intent = new Intent(context, Single_result.class);
  
                context.startActivity(intent);}
  fail+=1;
  ...(drawing)
  </code></pre>
  
  <p>int fail is increase after every frame, please, help, how i can get final value of fail in single_result class.</p>