Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Spotlight ANE brings iOS 9 spotlight library to Adobe Air applications. With this ANE, you can index search items at runtime and even from user generated content.

License

myflashlab/Spotlight-ANE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotlight ANE for iOS Adobe AIR apps

Spotlight ANE brings the spotlight library to Adobe AIR applications. With this ANE, you can index search items at runtime and even from user generated content.

Main Features:

  1. Add search items to iOS spotlight indexing system
  2. group the search items for easier managing them
  3. delete all items or specefic groups
  4. Listeners to be invoked as soon as your app opens from Spotlight search results

IMPORTANT: Implementing ANEs in your AIR projects means you may be required to add some dependencies or copy some frameworks or editing your app's manifest file. Our ANE setup instruction is designed in a human-readable format but you may still need to familiarize yourself with this format. Read this post for more information

If you think manually setting up ANEs in your projects is confusing or time-consuming, you better check the ANELAB Software.

The ANE-LAB Software

Tech Support

If you need our professional support to help you with implementing and using the ANE in your project, you can join MyFlashLabs Club or buy a premium support package. Otherwise, you may create new issues at this repository and the community might help you.

Air Usage

import com.myflashlab.air.extensions.spotlight.*

var _ex:Spotlight = new Spotlight();
_ex.addEventListener(SpotlightEvents.INDEXING_SUCCESS, onIndexingSuccess);
_ex.addEventListener(SpotlightEvents.INDEXING_FAILURE, onIndexingFailure);
_ex.addEventListener(SpotlightEvents.DELETING_SUCCESS, onDeletingSuccess);
_ex.addEventListener(SpotlightEvents.DELETING_FAILURE, onDeletingFailure);
_ex.addEventListener(SpotlightEvents.SEARCH_SELECTED, onSearchSelected);

trace("isIndexingAvailable = " + _ex.isIndexingAvailable);

// add as many required items as required by your app
var att:AttributeSet = new AttributeSet(ContentType.kUTTypeItem, "com.site.uniquIdentifier.1", "domain.identifier.1");
att.general.title = "The title";
att.documents.contentDescription = "The description";
att.general.keywords = ["Adobe Air", "ANE", "MyFLashLabs"];
att.general.thumbnailURL = File.applicationDirectory.resolvePath("spotlightIcon.jpg").nativePath;

// you should index your search items like this:
_ex.indexItems([att]);

private function onIndexingSuccess(e:SpotlightEvents):void
{
	trace("on indexing completed successfully");
}

private function onIndexingFailure(e:SpotlightEvents):void
{
	trace("on indexing failed! try again: " + e.msg);
}

private function onDeletingSuccess(e:SpotlightEvents):void
{
	trace("on deleting success");
}

private function onDeletingFailure(e:SpotlightEvents):void
{
	trace("on deleting failed: " + e.msg);
}

private function onSearchSelected(e:SpotlightEvents):void
{
	// when an item is touched in the spotlight search results, the unique identifier will be delivered here
	// so you will know which of your items has been selected and can take the user to a specefic page related
	// to what they have clicked.
	trace("on search result touched: " + e.msg);
}

Are you using this ANE in your project? Maybe you'd like to buy us a beer 🍺?

paypal

Add your name to the below list? Donate anything more than $100 and it will be.

Sponsored by...

your_website.com
Your company motto can be here!

About

Spotlight ANE brings iOS 9 spotlight library to Adobe Air applications. With this ANE, you can index search items at runtime and even from user generated content.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published