title: android different interval variables
body: <p>How can I get broadcast methods variables?</p>
  
  <p>There is only a variable in broadcast. Here is my part of code:  </p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {  
         super.onCreate(savedInstanceState);  
         setContentView(R.layout.main);  
         //I want to use a in here like textview.settext(a);
               IntentFilter intent = new IntentFilter();  
               registerReceiver(searchDevices, intent);
       }  
       private BroadcastReceiver searchDevices = new BroadcastReceiver() {      
       public void onReceive(Context context,  Intent intent) {  
                 int a=0;
        }
       }
  </code></pre>