Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You request to start your extension by sending the START_REQUEST intent, as defined in the SDK utility classes. There is also a reference of this in chapter 6.1 in the API specification of the <a href="http://developer.sonymobile.com/wportal/devworld/technology/smart-extras/smart-extension-sdk" rel="nofollow noreferrer">SDK</a>.</p> <pre><code>Intent intent = new Intent(Control.Intents.CONTROL_START_REQUEST_INTENT); intent.putExtra(Control.Intents.EXTRA_AEA_PACKAGE_NAME, "your.package.name"); intent.setPackage(hostAppPackageName); sendBroadcast(intent, Registration.HOSTAPP_PERMISSION); </code></pre> <p>The reference "your.package.name" is the package name that was stored to the extension database, when your extension was registered. If you look at the examples in the SDK, each extension example has a SampleRegistrationInformation with a method <em>getExtensionRegistrationConfiguration</em>. This is where the registration is stored to the database via a ContentProvider. The following line stores your package name.</p> <pre><code>values.put(Registration.ExtensionColumns.PACKAGE_NAME, mContext.getPackageName()); </code></pre> <p>I think, from looking at your examples, that your package name is "com.luaridaworks.smartwatch.bitmapcatcher"?</p> <p>The <em>hostAppPackageName</em> is the package name of the SmartWatch host application. Information about this package name is sent with every intent that you receive from the host application. In the SDK samples, we store the host app package name in a global variable to be used later, hence the reference in the code to <em>hostAppPackageName</em>. I talk a bit more about this in <a href="https://stackoverflow.com/questions/10869538/sony-smartwatch-how-to-get-host-app-package-name">this question</a>. If you want to hard code the host app package name, this is it: com.sonyericsson.extras.smartwatch. <strong>But I recommend you don't</strong>, since it could change in the future.</p> <p>So, the following (with hard coding) should work for you:</p> <pre><code>Intent intent = new Intent(Control.Intents.CONTROL_START_REQUEST_INTENT); intent.putExtra(Control.Intents.EXTRA_AEA_PACKAGE_NAME, "com.luaridaworks.smartwatch.bitmapcatcher"); intent.setPackage("com.sonyericsson.extras.smartwatch"); sendBroadcast(intent, Registration.HOSTAPP_PERMISSION); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload