Quantcast
Channel: HTC Blog » Developer
Viewing all articles
Browse latest Browse all 13

OpenSense SDK Update Available for Download

$
0
0

It’s hard to believe it’s been over three months since Mobile World Congress in Barcelona where we announced some exciting new updates to the HTC OpenSense Software Development Kit (SDK).  Based on your response to that post it’s clear that you’re excited about the chance to build more applications that run on our platform.

Well, the time is here and we’re excited to announce these new APIs are available in the latest release of the SDK at htcdev.com!  Now you can download the update and begin implementing your own innovative new apps that plug into features like the Sound Enhancer, Lock Screen, new Common Controls or Media Link HD (coming soon).

For example, if you want to your app to check for the Sound Enhancer API and then set a click handler to start it up, you can do this with only a few lines of code:

/**
* Sets the click listener of passed in View to launch HTC Sound Enhancer if possible.
*
* @param enhanceSoundButton View to set click listener on
* @return true if the click listener was set
*/

private boolean setHtcSoundEnhancerOnClick(final View enhanceSoundButton) {
final Intent enhanceSoundIntent = new Intent(
“com.htc.HtcSoundEnhancerSetting.ShowSettingPage”);

// Check if API is supported.
final List<ResolveInfo> activities = getPackageManager()
.queryIntentActivities(enhanceSoundIntent, NO_FLAGS);

if (activities.isEmpty()) {
return false;
}

// Call it on click.
enhanceSoundButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(final View view) {
startActivity(enhanceSoundIntent);
}
});
return true;

}

This is really the essence of the API.  It’s clear, concise, and won’t take a lot of development cycles to bring a nice differentiating feature to your app when it runs on an HTC device.

We’ve also updated the Developer Center section of the HTCdev website to include new sample code, like the one above, and tutorials to help kick-start your development process.  If you’re starting from ground zero and want to know how to get started with Android development, you can always begin with the Orientation to Android Training as a launch point for your development needs!

At HTCDev our goal is to provide resources for those with development experience, but also to create new developers out of many of you who have been ‘thinking about writing an app.’ We know there’s a lot of you out there eager to start coding and put your creative juices to work.  Our enthusiastic group of Developer Evangelists is here for all your mobile development needs, so don’t be afraid to reach out to us!  Follow us on Twitter at @htcdev and any comments or suggestions are welcome.

Once you’re finished coding, click here to tell us about the awesome app you’ve built!


Viewing all articles
Browse latest Browse all 13

Trending Articles