Android Open Source - CSCI567---Workspace Android Nfc Activity






From Project

Back to project page CSCI567---Workspace.

License

The source code is released under:

MIT License

If you think the Android project CSCI567---Workspace listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/***************************************************************************
 * /*from w w  w.  j a va 2  s  .  c  o m*/
 * This file is part of the 'NDEF Tools for Android' project at
 * http://code.google.com/p/ndef-tools-for-android/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 ****************************************************************************/


package org.ndeftools.boilerplate;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

/**
 * 
 * Boilerplate activity selector.
 * 
 * @author Thomas Rorvik Skjolberg
 *
 */

public class AndroidNfcActivity extends Activity {
  
    private static final String TAG = AndroidNfcActivity.class.getName();
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
    setContentView(R.layout.main);
    
    if (android.os.Build.VERSION.SDK_INT >= 14) {
            View view = findViewById(R.id.beamer);
            view.setVisibility(View.VISIBLE);
        }
    }
    
    public void writer(View view) {
      Log.d(TAG, "Show tag writer");
      
      Intent intent = new Intent(this, DefaultNfcTagWriterActivity.class);
      startActivity(intent);
    }

    public void reader(View view) {
      Log.d(TAG, "Show reader");
      
      Intent intent = new Intent(this, DefaultNfcReaderActivity.class);
      startActivity(intent);
    }
    
    public void beamer(View view) {
      Log.d(TAG, "Show beam writer");
      
      Intent intent = new Intent(this, DefaultNfcBeamWriterActivity.class);
      startActivity(intent);
    }
    
}




Java Source Code List

com.example.linearlayoutexample.MainActivity.java
com.example.relativelayoutexample.MainActivity.java
csci567.FragmentExample.Fragmentmanageractivity.java
csci567.FragmentExample.MainActivity.java
csci567.FragmentExample.MyFragment.java
csci567.FragmentExample.MyStaticFragment.java
csci567.alarmexample.MainActivity.java
csci567.alarmexample.SampleAlarmReceiver.java
csci567.asynctaskexample.MainActivity.java
csci567.buttonexample.MainActivity.java
csci567.checkboxexample.MainActivity.java
csci567.doodleexample.MainActivity.java
csci567.doodleexample.SampleAlarmReceiver.java
csci567.doodleexample.SampleBootReceiver.java
csci567.doodleexample.SampleSchedulingService.java
csci567.eventreceiver.DataReceiver.java
csci567.eventreceiver.MainActivity.java
csci567.eventreceiver.RebootReceiver.java
csci567.helloworld.MainActivity.java
csci567.simpledbexample.DBHelper.java
csci567.simpledbexample.MainActivity.java
csci567.suggestionapp.MainActivity.java
csci567.writefile.MainActivity.java
org.ndeftools.boilerplate.AndroidNfcActivity.java
org.ndeftools.boilerplate.DefaultNfcBeamWriterActivity.java
org.ndeftools.boilerplate.DefaultNfcReaderActivity.java
org.ndeftools.boilerplate.DefaultNfcTagWriterActivity.java
org.ndeftools.boilerplate.NdefRecordAdapter.java
org.ndeftools.nfcdemo.TagViewer.java
org.ndeftools.nfcdemo.simulator.FakeTagsActivity.java
org.ndeftools.nfcdemo.simulator.MockNdefMessages.java