I am new to Sony Smartwatch development. I am facing some issues while creating a demo Sony Smart watch app. I have an EditText and a Button in my activity . When I click on the Button , the string in the EditText should be sent to the smart watch and displayed on a control . I should also be able to change the text on the watch from my apps activity.
UPDATE:
1) I want to start a smart watch control extension from my Main App activity and display a simple text on it 2) The text should be sent from the Main App Activity.
From what I have understood from the SDK example (Please correct me if am wrong) : 1) To take full control of the smart watch screen and to display a textview or an image , I need to extend ControlExtension class (In my case -> DemoControlSmartWatch.java). 2) I need to register a BroadcastReceiver (DemoReceiver.java) in the manifest , which will start the extension service (DemoExtensionService.java) when it receives an Intent from the Host Application And/Or from the Smart Connect App. 3) Also Created a class (DemoRegistrationInformation.java) which extends the RegistrationInformation class and takes care of the registration stuff. 4) I have an activity (MainActivity.java) with a Button .Now, I want to send a String to the ControlExtension on click of the button.
I have found that to start an extension I need to do the following
Intent intent = new Intent(Control.Intents.CONTROL_START_REQUEST_INTENT);
intent.putExtra(Control.Intents.EXTRA_AEA_PACKAGE_NAME, "com.example.sonytest");
intent.setPackage("com.sonyericsson.extras.liveware.emulator");
sendBroadcast(intent, Registration.HOSTAPP_PERMISSION);
I tried writing this in the onCreate method of my MainActivity class, but it doesn't start my Control extension on the smart watch .Should I write the above code in the DemoExtensionService and bind my activity to the service ?