Sample Code - CipherLab RK25 User Manual

Android programming
Hide thumbs Also See for RK25:
Table of Contents

Advertisement

Android Programming Guide

3.1.5. SAMPLE CODE

package com.example.sdupdateexample;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends Activity {
private Button sd ;
private TextView TextViewVaule;
String ErrorValue ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// ***************************************************//
// Create an IntentFilter to get intents which we want
// Register an IntentFilter
// Add "com.cipherlab.OtaUpdateService.ErrorMessage" for fetching the
error message
// ***************************************************//
IntentFilter filter_return = new IntentFilter();
filter_return.addAction("com.cipherlab.OtaUpdateService.ErrorMessage");
registerReceiver(myReceiver_return, filter_return);
TextViewVaule = (TextView)findViewById(R.id.textView1);
82

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RK25 and is the answer not in the manual?

Table of Contents