UC p

 INDEX


Sr.no.

Practicals

Date

Sign

1.

Design and Develop Location-Based Messaging App

30/07/2026


2.

Design and develop chat messaging app which is a location-based

13/08/2026


3.

Design and develop an Android application demonstrating Simple Downstream Messaging usingFirebase Cloud Messaging (FCM).

03/09/2026


4.

Design and develop an Android application demonstrating Simple Upstream Messaging usingFirebase Cloud Messaging (FCM).

10/09/2026


5.

Design and Develop an App for Device Group Messaging in Ubiquitous Computing

27/03/2026


8.

To design and develop a simple context-aware system using the Java Context-Awareness

Framework (JCAF) that creates a Person entity, registers it with the JCAF Context Service, adds a

location context, and detects a context change.

10/09/2026


9.

Human-Computer Interaction (HCI) in Ubiquitous Computing

27/03/2026



Steps of all and ZIP file of all practicals 
https://chatgpt.com/s/t_6ad7700f0dfc8191b432100d7f9db374

link of Pract UC ZIP











Practical No. 1

AIM: Design and Develop Location-Based Messaging App

Code :- 


Output:- 


PRACTICAL 2 


AIM

Design and develop a location-based application that retrieves device coordinates and

evaluates geographic boundaries (Geofencing).


Code: 


Output:





 Practical No. 3


AIM

Design and develop an Android application demonstrating Simple Downstream Messaging using Firebase Cloud Messaging (FCM).


Code:


Output:

 






 Practical No. 4

aim:

Design and develop an Android application demonstrating Simple Upstream Messaging usingFirebase Cloud Messaging (FCM).

Code :


Output:




PRACTICAL 5


Aim:

To design and develop an Android application that allows multiple devices/users to join a common group and exchange messages in real time using Firebase Realtime Database.


Code:


Output:

















Practical No. 8

Aim:

To design and develop a simple context-aware system using the Java Context-Awareness

Framework (JCAF) that creates a Person entity, registers it with the JCAF Context Service, adds a location context, and detects a context change.

Code:

Output:

Practical No. 9

Aim

To develop an Android application that demonstrates the principles of Human-Computer Interaction (HCI) in the context of ubiquitous computing, by allowing a user to input data through a simple, intuitive interface and receive immediate, context-aware feedback.


Code:


Output:





UC Practical Exam – All 7 Practical Codes

I’m organizing the codes from your uploaded PDFs in Java, XML, Gradle, and Python (where required), suitable for Android Studio.

Practical

Program

1

Location-Based Messaging App

2

Location-Based Chat Messaging App

3

Simple Downstream Messaging

4

Send Upstream Messages

5

Device Group Messaging

8

Context-Aware System (JCAF)

9

Human-Computer Interaction

Important: Your Practical 2 PDF actually contains GPS tracking and geofencing code rather than a complete chat application. Practical 8 has no uploaded code PDF. I'll preserve the supplied implementations and clearly identify the example code added for Practical 8.

Word document – Complete Code Collection

UC Practical Exam – All 7 Codes

Word document (.docx) · 14 pages · Copyable code with file headings

Download Word Document

Codes in the chat

The main program codes are below. The Word document additionally includes the XML layouts, AndroidManifest files, Firebase configuration instructions and other supporting code.

Practical 1 – Location-Based Messaging App

MainActivity.java


package com.example.locationmessagingapp;

import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.location.Priority;

public class MainActivity extends AppCompatActivity {

    private TextView txtLatitude, txtLongitude, txtMessage;
    private FusedLocationProviderClient locationClient;
    private static final int REQUEST_LOCATION = 100;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        txtLatitude = findViewById(R.id.txtLatitude);
        txtLongitude = findViewById(R.id.txtLongitude);
        txtMessage = findViewById(R.id.txtMessage);

        locationClient = LocationServices
            .getFusedLocationProviderClient(this);

        findViewById(R.id.btnLocation)
            .setOnClickListener(v -> getLocation());
    }

    private void getLocation() {
        if (ActivityCompat.checkSelfPermission(
            this, Manifest.permission.ACCESS_FINE_LOCATION)
            != PackageManager.PERMISSION_GRANTED) {

            ActivityCompat.requestPermissions(this,
                new String[]{
                    Manifest.permission.ACCESS_FINE_LOCATION,
                    Manifest.permission.ACCESS_COARSE_LOCATION
                }, REQUEST_LOCATION);
            return;
        }

        locationClient.getCurrentLocation(
            Priority.PRIORITY_HIGH_ACCURACY, null
        ).addOnSuccessListener(location -> {

            if (location != null) {
                double lat = location.getLatitude();
                double lon = location.getLongitude();

                txtLatitude.setText("Latitude: " + lat);
                txtLongitude.setText("Longitude: " + lon);

                if (lat >= 18.8 && lat <= 19.5 &&
                    lon >= 72.7 && lon <= 73.2) {
                    txtMessage.setText("Welcome to Mumbai!");
                } else {
                    txtMessage.setText("You are outside Mumbai.");
                }
            } else {
                txtMessage.setText("Unable to get location");
            }
        });
    }

    @Override
    public void onRequestPermissionsResult(
        int requestCode,
        @NonNull String[] permissions,
        @NonNull int[] grantResults) {

        super.onRequestPermissionsResult(
            requestCode, permissions, grantResults);

        if (requestCode == REQUEST_LOCATION) {
            if (grantResults.length > 0 &&
                grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                getLocation();
            } else {
                txtMessage.setText("Location permission denied");
            }
        }
    }
}

Practical 2 – GPS Tracking and Location Geofencing

MainActivity.java – Based on the supplied GPSTrace journal.


package com.example.practical.gpstrace;

import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

public class MainActivity extends AppCompatActivity
        implements LocationListener {

    private static final int PERMISSION_REQUEST = 100;

    private static final double COLLEGE_LAT = 19.205933;
    private static final double COLLEGE_LONG = 72.873450;
    private static final float RADIUS_METERS = 200f;

    private TextView latText, lonText, statusText;
    private LocationManager manager;
    private Location currentLocation;

    @Override
    protected void onCreate(Bundle state) {
        super.onCreate(state);
        setContentView(R.layout.activity_main);

        latText = findViewById(R.id.textView);
        lonText = findViewById(R.id.textView3);
        statusText = findViewById(R.id.textView2);

        manager = (LocationManager)
            getSystemService(Context.LOCATION_SERVICE);

        findViewById(R.id.button)
            .setOnClickListener(v -> updateUI());

        startLocationUpdates();
    }

    private void startLocationUpdates() {
        if (ActivityCompat.checkSelfPermission(
            this, Manifest.permission.ACCESS_FINE_LOCATION)
            != PackageManager.PERMISSION_GRANTED) {

            ActivityCompat.requestPermissions(this,
                new String[]{
                    Manifest.permission.ACCESS_FINE_LOCATION,
                    Manifest.permission.ACCESS_COARSE_LOCATION
                }, PERMISSION_REQUEST);
            return;
        }

        for (String provider : new String[]{
                LocationManager.GPS_PROVIDER,
                LocationManager.NETWORK_PROVIDER}) {

            if (manager.isProviderEnabled(provider)) {
                Location old =
                    manager.getLastKnownLocation(provider);

                if (old != null) {
                    onLocationChanged(old);
                }

                manager.requestLocationUpdates(
                    provider, 2000L, 1f, this);
            }
        }
    }

    @Override
    public void onLocationChanged(@NonNull Location location) {
        currentLocation = location;
        updateUI();
    }

    private void updateUI() {
        if (currentLocation == null) {
            statusText.setText("Waiting for GPS signal");
            return;
        }

        double lat = currentLocation.getLatitude();
        double lon = currentLocation.getLongitude();

        latText.setText("Latitude = " + lat);
        lonText.setText("Longitude = " + lon);

        Location college = new Location("college");
        college.setLatitude(COLLEGE_LAT);
        college.setLongitude(COLLEGE_LONG);

        float distance = currentLocation.distanceTo(college);

        if (distance <= RADIUS_METERS) {
            statusText.setText(
                "You are inside the College Area :)");
        } else {
            statusText.setText(
                "You are outside the College Area :(");
        }
    }

    @Override
    public void onRequestPermissionsResult(
        int code,
        @NonNull String[] permissions,
        @NonNull int[] results) {

        super.onRequestPermissionsResult(
            code, permissions, results);

        if (code == PERMISSION_REQUEST &&
            results.length > 0 &&
            results[0] == PackageManager.PERMISSION_GRANTED) {
            startLocationUpdates();
        } else if (code == PERMISSION_REQUEST) {
            statusText.setText("Permission denied");
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        manager.removeUpdates(this);
    }
}

Practical 3 – Simple Downstream Messaging

MainActivity.java


package com.example.simpledownstreammessaging;

import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import com.google.firebase.messaging.FirebaseMessaging;

public class MainActivity extends AppCompatActivity {

    private final ActivityResultLauncher<String> permissionLauncher =
        registerForActivityResult(
            new ActivityResultContracts.RequestPermission(),
            granted -> Log.d("FCM",
                "Notification permission: " + granted)
        );

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if (Build.VERSION.SDK_INT >=
                Build.VERSION_CODES.TIRAMISU &&
            ContextCompat.checkSelfPermission(
                this, Manifest.permission.POST_NOTIFICATIONS)
                != PackageManager.PERMISSION_GRANTED) {

            permissionLauncher.launch(
                Manifest.permission.POST_NOTIFICATIONS);
        }

        TextView status = findViewById(R.id.statusText);

        FirebaseMessaging.getInstance().getToken()
            .addOnCompleteListener(task -> {

                if (task.isSuccessful()) {
                    String token = task.getResult();
                    Log.d("FCM_TOKEN", token);

                    status.setText(
                        "FCM ready. Check Logcat: FCM_TOKEN");
                } else {
                    status.setText(
                        "FCM token error: " +
                        task.getException());
                }
            });
    }
}

MyFirebaseMessagingService.java


package com.example.simpledownstreammessaging;

import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;

public class MyFirebaseMessagingService
        extends FirebaseMessagingService {

    @Override
    public void onMessageReceived(
            @NonNull RemoteMessage remoteMessage) {

        String title = "New message";
        String body = "";

        if (remoteMessage.getNotification() != null) {
            title = remoteMessage.getNotification().getTitle();
            body = remoteMessage.getNotification().getBody();
        } else if (!remoteMessage.getData().isEmpty()) {
            title = remoteMessage.getData()
                .getOrDefault("title", title);
            body = remoteMessage.getData()
                .getOrDefault("body", "");
        }

        showNotification(title, body);
    }

    private void showNotification(String title, String body) {
        String channelId = "uc_downstream";

        NotificationManager manager =
            getSystemService(NotificationManager.class);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            NotificationChannel channel =
                new NotificationChannel(
                    channelId,
                    "Firebase Messages",
                    NotificationManager.IMPORTANCE_HIGH
                );

            manager.createNotificationChannel(channel);
        }

        NotificationCompat.Builder builder =
            new NotificationCompat.Builder(this, channelId)
                .setSmallIcon(android.R.drawable.ic_dialog_info)
                .setContentTitle(title)
                .setContentText(body)
                .setPriority(NotificationCompat.PRIORITY_HIGH)
                .setAutoCancel(true);

        manager.notify(
            (int)(System.currentTimeMillis() % 100000),
            builder.build()
        );
    }
}

Practical 4 – Send Upstream Messages

MainActivity.java


package com.example.upstreammessaging;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;

public class MainActivity extends AppCompatActivity {

    private static final String SERVER_URL =
        "http://10.0.2.2:5000/message";

    private final OkHttpClient client = new OkHttpClient();
    private EditText messageInput;

    @Override
    protected void onCreate(Bundle state) {
        super.onCreate(state);
        setContentView(R.layout.activity_main);

        messageInput = findViewById(R.id.messageInput);

        findViewById(R.id.sendButton).setOnClickListener(v -> {
            String message =
                messageInput.getText().toString().trim();

            if (message.isEmpty()) {
                Toast.makeText(
                    this,
                    "Please enter a message",
                    Toast.LENGTH_SHORT
                ).show();
                return;
            }

            sendMessage(message);
        });
    }

    private void sendMessage(String message) {
        try {
            JSONObject json = new JSONObject();
            json.put("message", message);

            RequestBody body = RequestBody.create(
                json.toString(),
                MediaType.get("application/json; charset=utf-8")
            );

            Request request = new Request.Builder()
                .url(SERVER_URL)
                .post(body)
                .build();

            client.newCall(request).enqueue(new Callback() {

                @Override
                public void onFailure(Call call, IOException e) {
                    runOnUiThread(() ->
                        Toast.makeText(
                            MainActivity.this,
                            "Failed: " + e.getMessage(),
                            Toast.LENGTH_SHORT
                        ).show()
                    );
                }

                @Override
                public void onResponse(
                        Call call, Response response) {

                    boolean ok = response.isSuccessful();
                    response.close();

                    runOnUiThread(() -> {
                        Toast.makeText(
                            MainActivity.this,
                            ok ? "Message sent successfully"
                               : "Server error",
                            Toast.LENGTH_SHORT
                        ).show();

                        if (ok) messageInput.setText("");
                    });
                }
            });

        } catch (JSONException e) {
            Toast.makeText(
                this,
                "Invalid JSON message",
                Toast.LENGTH_SHORT
            ).show();
        }
    }
}

server.py – Python Flask server

from flask import Flask, request, jsonifyapp = Flask(__name__)@app.route('/message', methods=['POST'])def receive_message():    data = request.get_json(silent=True) or {}    message = data.get('message', '')    print('UPSTREAM MESSAGE RECEIVED:', message)    return jsonify({        'status': 'success',        'message': 'Message received'    })if __name__ == '__main__':    app.run(host='0.0.0.0', port=5000)

Practical 5 – Device Group Messaging

MainActivity.java


package com.example.groupmessaging;

import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle state) {
        super.onCreate(state);
        setContentView(R.layout.activity_main);

        EditText etName = findViewById(R.id.etName);
        EditText etGroup = findViewById(R.id.etGroup);

        findViewById(R.id.btnJoin).setOnClickListener(v -> {

            String name =
                etName.getText().toString().trim();
            String group =
                etGroup.getText().toString().trim();

            if (name.isEmpty() ||
                    !group.matches("[A-Za-z0-9_-]+")) {

                Toast.makeText(
                    this,
                    "Enter name and valid group name",
                    Toast.LENGTH_SHORT
                ).show();
                return;
            }

            Intent intent =
                new Intent(this, ChatActivity.class);

            intent.putExtra("name", name);
            intent.putExtra("group", group);

            startActivity(intent);
        });
    }
}

ChatActivity.java


package com.example.groupmessaging;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.firebase.database.Query;

public class ChatActivity extends AppCompatActivity {

    private TextView messages;
    private EditText messageInput;
    private DatabaseReference groupReference;
    private ValueEventListener listener;
    private Query messageQuery;
    private String userName;

    @Override
    protected void onCreate(Bundle state) {
        super.onCreate(state);
        setContentView(R.layout.activity_chat);

        userName = getIntent().getStringExtra("name");
        String group = getIntent().getStringExtra("group");

        ((TextView)findViewById(R.id.tvGroup))
            .setText("Group: " + group);

        messages = findViewById(R.id.tvMessages);
        messageInput = findViewById(R.id.etMessage);

        groupReference = FirebaseDatabase.getInstance()
            .getReference("groups")
            .child(group);

        findViewById(R.id.btnSend)
            .setOnClickListener(v -> sendMessage());

        messageQuery = groupReference.limitToLast(100);

        listener = messageQuery.addValueEventListener(
            new ValueEventListener() {

                @Override
                public void onDataChange(
                        @NonNull DataSnapshot data) {

                    StringBuilder all = new StringBuilder();

                    for (DataSnapshot child : data.getChildren()) {
                        Message msg =
                            child.getValue(Message.class);

                        if (msg != null) {
                            all.append(msg.sender)
                               .append(": ")
                               .append(msg.text)
                               .append("\n\n");
                        }
                    }

                    messages.setText(
                        all.length() == 0
                            ? "No messages yet"
                            : all.toString()
                    );
                }

                @Override
                public void onCancelled(
                        @NonNull DatabaseError error) {
                    messages.setText(
                        "Database error: " + error.getMessage()
                    );
                }
            }
        );
    }

    private void sendMessage() {
        String text =
            messageInput.getText().toString().trim();

        if (text.isEmpty()) return;

        String key = groupReference.push().getKey();

        if (key != null) {
            groupReference.child(key)
                .setValue(new Message(userName, text))
                .addOnSuccessListener(v ->
                    messageInput.setText("")
                );
        }
    }

    @Override
    protected void onDestroy() {
        if (listener != null) {
            messageQuery.removeEventListener(listener);
        }
        super.onDestroy();
    }
}

Message.java


package com.example.groupmessaging;

public class Message {

    public String sender;
    public String text;

    public Message() {
        // Required by Firebase
    }

    public Message(String sender, String text) {
        this.sender = sender;
        this.text = text;
    }
}

Practical 8 – Context-Aware System (JCAF Concept)

This standalone Java example demonstrates context changes and automatic responses using concepts associated with JCAF. It is not an implementation using the original JCAF library.

ContextAwareDemo.java


import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class ContextAwareDemo {

    interface ContextListener {
        void contextChanged(
            String person, String key, String value);
    }

    static class ContextService {

        private final Map<String, Map<String, String>> entities =
            new HashMap<>();

        private ContextListener listener;

        void addEntity(String name) {
            entities.put(name, new HashMap<>());
        }

        void setListener(ContextListener listener) {
            this.listener = listener;
        }

        void updateContext(
                String person, String key, String value) {

            entities.get(person).put(key, value);

            if (listener != null) {
                listener.contextChanged(person, key, value);
            }
        }

        String getContext(String person, String key) {
            return entities.get(person).get(key);
        }
    }

    public static void main(String[] args) {

        ContextService service = new ContextService();
        String person = "Student";

        service.addEntity(person);

        service.setListener((name, key, value) -> {

            System.out.println(
                "Context updated: " + key + " = " + value);

            if ("location".equals(key)) {

                if ("classroom".equalsIgnoreCase(value)) {
                    System.out.println(
                        "Action: Enable silent study mode.");
                } else if ("library".equalsIgnoreCase(value)) {
                    System.out.println(
                        "Action: Suggest study resources.");
                } else {
                    System.out.println(
                        "Action: Normal phone mode.");
                }
            }
        });

        Scanner scanner = new Scanner(System.in);

        System.out.print(
            "Enter location (classroom/library/home): ");

        String location = scanner.nextLine().trim();

        service.updateContext(
            person, "location", location);

        System.out.println(
            "Stored location: " +
            service.getContext(person, "location")
        );
    }
}

Practical 9 – Human-Computer Interaction

MainActivity.java


package com.example.hciapp;

import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        EditText nameInput =
            findViewById(R.id.nameEditText);

        TextView result =
            findViewById(R.id.resultText);

        findViewById(R.id.submitButton)
            .setOnClickListener(v -> {

                String name =
                    nameInput.getText().toString().trim();

                if (name.isEmpty()) {
                    Toast.makeText(
                        this,
                        R.string.empty_name,
                        Toast.LENGTH_SHORT
                    ).show();
                } else {
                    result.setText(
                        getString(R.string.hello_user, name)
                    );

                    Toast.makeText(
                        this,
                        R.string.success,
                        Toast.LENGTH_SHORT
                    ).show();
                }
            });
    }
}

The Word document contains these seven practicals with their supporting source files arranged for copying into separate projects. The XML syntax, Flask Python syntax and standalone Practical 8 Java program were checked; the Android projects were not built or tested on an emulator.


Your new PDF contains the actual JCAF 1.5 Practical 8 code, which was missing from the earlier collection. It uses Eclipse, GenericEntity, ContextServiceImpl, and the Located relationship.

Practical 8 – Context-Aware System Using JCAF

1. Person.java


package practical8;

import dk.pervasive.jcaf.ContextEvent;
import dk.pervasive.jcaf.entity.GenericEntity;

public class Person extends GenericEntity {

    private String name;

    public Person(String id, String name) {
        super(id);
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void contextChanged(ContextEvent event) {
        System.out.println("================================");
        System.out.println("CONTEXT CHANGE DETECTED");
        System.out.println("Person: " + name);
        System.out.println("Entity ID: " + getId());
        System.out.println("Context item: " + event.getItem());
        System.out.println("================================");
    }
}

2. ContextAwareSystem.java


package practical8;

import dk.pervasive.jcaf.ContextService;
import dk.pervasive.jcaf.impl.ContextServiceImpl;
import dk.pervasive.jcaf.item.Location;
import dk.pervasive.jcaf.relationship.Located;

public class ContextAwareSystem {

    public static void main(String[] args) {

        try {
            Person person = new Person("person1", "Harshita");

            System.out.println("Person created.");
            System.out.println("Name: " + person.getName());
            System.out.println("ID: " + person.getId());

            ContextService contextService =
                    new ContextServiceImpl("practical8");

            contextService.addEntity(person);

            System.out.println();
            System.out.println("Person registered with JCAF.");
            System.out.println();

            Location location = new Location("Computer_Lab");

            Located located = new Located("Practical_8");

            contextService.addContextItem(
                    person.getId(),
                    located,
                    location
            );

            System.out.println();
            System.out.println("Location context added.");
            System.out.println("Location: Computer_Lab");

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

3. Command Prompt

First, open the extracted JCAF deploy_j2se folder in Command Prompt, then execute:


ContextService.bat practical8

Keep the service running. In Eclipse, run ContextAwareSystem.java as a Java Application. You will need the JCAF 1.5 deployment JARs added to the project's build path.

These two classes and the commands are taken from pages 4–8 of your uploaded journal.

JCAF_Practical_8_Context_Aware_System_Journal.pdf
JCAF_Practical_8_Context_Aware_System_Journal.pdf

Updated Word Document

UC Practical Exam – Complete 7 Codes (Updated)

15 pages · Word (.docx) · Includes corrected Practical 8 JCAF code

Download Updated Word Document

The document now includes Practicals 1, 2, 3, 4, 5, 8, and 9, with the actual Person.java and ContextAwareSystem.java from your newly uploaded PDF. Use this updated version instead of the previous one.

Comments