Today the illumination API was released and I tried to make a simple app of showing of a blink of the illumination bar upon click of a button. I just copy-pasted the code in the sony developers website, but it gives error that, there is no acitivity to handle this intent START_LED. Here's the main_activity:
package com.example.myillumin;
import com.sonyericsson.illumination.IlluminationIntent;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class MainActivity extends Activity {
private Button b1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1= (Button) findViewById(R.id.button1);
b1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View arg0){
Intent intent=new Intent(IlluminationIntent.ACTION_START_LED);
intent.putExtra(IlluminationIntent.EXTRA_LED_COLOR,0xFFFF0000);
intent.putExtra(IlluminationIntent.EXTRA_PACKAGE_NAME, "com.example.myillumin");
startActivity(intent);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
And here's the manifest file I tried to modify seeing other posts of stackoverflow.
<uses-permission android:name="com.sonyericsson.illumination.permission.ILLUMINATION"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.myillumin.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.sonyericsson.illumination.IlluminationIntent"
android:label="@string/activity_name"
android:exported="false">
<intent-filter>
<action android:name="com.sonyericsson.illumination.intent.action.START_LED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Please help me out :(