Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write test app for api #9

Open
ZacSweers opened this issue Nov 13, 2013 · 2 comments
Open

Write test app for api #9

ZacSweers opened this issue Nov 13, 2013 · 2 comments

Comments

@ZacSweers
Copy link
Owner

Should be simple, just make a button that starts an intent that would activate our api after we implement it. Maybe a second button or editable textview to customize the flash pattern (basically show its flexibility)

@ghost ghost assigned teracross Nov 13, 2013
@ZacSweers
Copy link
Owner Author

Make an API request like this:

Intent i = new Intent("com.leepapesweers.flashnotifier.API");

// Put flash pattern in request
// OPTIONAL
ArrayList<Integer> pattern = new ArrayList<Integer>();
pattern.add(50);
pattern.add(50);
i.putIntegerArrayListExtra("flash_pattern", pattern);

// Put sending application package name
// REQUIRED
i.putExtra("calling_application", getPackageName());

// Send the broadcast
sendBroadcast(i);

Must declare this in the manifest:

<uses-permission android:name="android.permission.ACCESS_FLASHNOTIFIER" />

@teracross
Copy link
Contributor

implemented simple preset tests in tester application (see link on fb). should have a gradle build file in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants