News

New trigger samples posted

Added by n8fr8 over 1 year ago

Read on here: https://guardianproject.info/2016/10/17/if-this-then-panic-sample-code-for-triggering-emergency-alerts/
and find the code here: https://github.com/n8fr8/PanicKitSamples

Earlier this year, we announced the PanicKit Library for Android and Ripple, our basic app for alerts any compatible app that you are in an emergency situation. Rather than build a solitary, enclosed “panic button” app that only can provide a specific set of functionality, we decided, as we often do, to build a framework, and encourage others to participate. Since then, we’ve had over 10 different apps implement PanicKit responder functionality, including Signal, OpenKeyChain, Umbrella app, StoryMaker and Zom.

It is great to have so many apps implement helpful features for users to react during an emergency situation. This might include sending an emergency message, putting sensitive data behind a password, hiding the app icon, or even wiping data. All of this can be triggered by a simple tap and swipe on the Ripple’s app user interface.

However, we would like to promote PanicKit trigger functionality that goes beyond something a user has to actively do, or at least obviously do. In many emergency scenarios, the user might be unable to actively trigger a panic, because they are unconscious, detained or have had their device taken away. In some cases, the activation may need to be subtle, such typing an incorrect phone number. In others, rapidly pressing a button or shaking the phone, may be safer and easier than unlocking your device and using an app.

a truly panic-inducing situation

PanicKit works by connecting trigger apps with receiver apps. Triggers are what create the alert that there is an emergency or panic situation. Responders receive the alert, and take an appropriate, user configured or default action.

The new PanicKitSamples project demonstrates new possible triggers that could be implemented in an app like Ripple, or any app that wishes to do so. In the “info.guardianproject.fakepanicbutton.triggers” package, you will find the following classes:

BaseTrigger: a base class that handles launching of the “panic intent” from a set of stored preferences to trigger the responders

public static void launchPanicIntent (Context context) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext());

String email = prefs.getString("email",null);
String phone = prefs.getString("phone",null);
String subject = prefs.getString("subject","panic message");
String message = prefs.getString("message","i triggered a panic!");
launchIntent(context, email, phone, subject, message);
}

public static void launchIntent (Context context, String emailAddress, String phoneNumber, String subject, String message) {
final PackageManager pm = context.getPackageManager();
final Set<String> receiverPackageNames = PanicTrigger.getResponderActivities(context);

Intent intent = new Intent(Panic.ACTION_TRIGGER);

GeoTrigger: Using the awesome “LOST” open-source geofencing library, this trigger sends a panic if the device moves outside of a pre-defined area (in this sample, it is Times Square NYC)

private void setupGeoFence () {

//setup geofence for Times Square area
String requestId = "geof1-timesSquare";
double latitude = 40.758896;
double longitude = -73.985130;
float radius = 0.0001f;
Geofence geofence = new Geofence.Builder()
.setRequestId(requestId)
.setCircularRegion(latitude, longitude, radius)
.setExpirationDuration(Geofence.NEVER_EXPIRE)
.build();
GeofencingRequest request = new GeofencingRequest.Builder()
.addGeofence(geofence)
.build();

MediaButtonTrigger: This trigger will notice multiple rapid pushes of a headset mic button or a bluetooth mic call button, and send a trigger.

public class MediaButtonTrigger extends BaseTrigger {

private static int mTriggerCount = 0;
private final static int TRIGGER_THRESHOLD = 3;
private static long mLastTriggerTime = -1;
public MediaButtonTrigger(Activity context)
{
super (context);
}
@Override
public void activateTrigger() {
//if a headset button or a bluetooth "call" button is pressed, trigger this
IntentFilter filter = new IntentFilter(Intent.ACTION_MEDIA_BUTTON);
MediaButtonIntentReceiver r = new MediaButtonIntentReceiver();
getContext().registerReceiver(r, filter);
}
public class MediaButtonIntentReceiver extends BroadcastReceiver {
public MediaButtonIntentReceiver() {
super();
}
@Override
public void onReceive(Context context, Intent intent) {
KeyEvent event = (KeyEvent)intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
if (event == null) {
return;
}
int action = event.getAction();
if (action == KeyEvent.ACTION_DOWN) {
//check for 3 rapidly pressed key events
long triggerTime = new Date().getTime();
//if the trigger is the first one, or happened with a second of the last one, then count it
if (mLastTriggerTime == -1 || ((triggerTime - mLastTriggerTime)&lt;1000))
mTriggerCount++;
mLastTriggerTime = triggerTime;
if (mTriggerCount > TRIGGER_THRESHOLD) {
launchPanicIntent(context);
mTriggerCount = 0;
}
}
abortBroadcast();
}
}
}
PhoneNumberTrigger (OutgoingCallReceiver): This trigger monitors phone calls, looking for a pre-defined fake “panic number”.

public class OutgoingCallReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {

String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
if (phoneNumber != null
&& phoneNumber.equals(PhoneNumberTrigger.PHONE_NUMBER_TRIGGER)) {
PhoneNumberTrigger.launchPanicIntent(context);
}
}
}
SuperShakeTrigger: This trigger looks for the phone being rapidly shaken. It could be expanded to wait for a series of shakes within a certain time window to avoid false positives.

//setup shake detection using ShakeDetector library
SensorManager sensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);

ShakeDetector sd = new ShakeDetector(new ShakeDetector.Listener() {
public void hearShake() {

//you shook me!
launchPanicIntent(getContext());
}
});

sd.start(sensorManager);
WifiTrigger: This triggers waits for the user to connect to a specific wifi network (in this sample “Starbucks”). It could also be set to trigger if the devices leaves the wifi network.

NetworkInfo netInfo = intent.getParcelableExtra (WifiManager.EXTRA_NETWORK_INFO);
if (ConnectivityManager.TYPE_WIFI == netInfo.getType ()
&& netInfo.isConnected()) {

WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifiManager.getConnectionInfo();
String ssid = info.getSSID();
//Check if I am connected to the "trigger" SSID, and if so send an alert!
if (!TextUtils.isEmpty(ssid)
&& ssid.equals(WIFI_SSID_TRIGGER)) {
launchPanicIntent(getContext());
}
}

All of these samples are configured to work with the FakePanicButton sample app, which allows you to choose a contact to alert, and set a panic message. That said, these are meant to point in a direction of functionality, and have not been fully debugged or tested on all devices and OS versions.

If you have more ideas on other panic triggers that could be implemented, please share them here. We are also happy to take pull requests or fixes to our sample project, in order to improve on the ideas we have. Finally, we will announce more Panic responder and trigger apps, as they are available in the coming months. We looking forward to the continued growth of our PanicKit ecosystem, though of course, we hope even more for a world where there are less reasons to panic.

Signal adds Panic support

Added by hans over 1 year ago

Signal for Android is now a panic receiver, as of the upcoming release v3.18.0:

https://github.com/WhisperSystems/Signal-Android/pull/5550#issuecomment-243958565

updated list of apps that support PanicKit

Added by hans over 1 year ago

Here is the current known list of apps that support PanicKit:

Please post any new ones as comments here! Or email us at

state of panic pull requests

Added by hans almost 2 years ago

I just added a new pull request for Whisper Systems Signal:

Two more apps have merged support:

And I updated the Panic Button request:

more apps supporting Panic

Added by hans almost 2 years ago

A number of new apps have recently added PanicKit support. These are apps that now support PanicKit:

And these apps have merged PanicKit support, and will support it in their next release:

These are open pull requests for making these apps panic responders. If you want to see one of these apps gain PanicKit support, please post a message of support on the pull request!

new app release: Ripple

Added by hans about 2 years ago

This is the first BETA version of our honed panic button user experience. We are working now to add support to as many other apps as possible. Orweb and Zom already have support, these apps are coming very soon: Orfox, Courier, StoryMaker, SMSSecure, Lightning Browser, Signal.

Get it on Google Play or our FDroid repo.

Ripple is a "panic button" that can send it's trigger message to any app that is a "panic responder". Such apps can do things like lock, disguise themselves, delete private data, send an emergency message, and more. It is meant for situations where there is time to react, but where users need to be sure it is not mistakenly set off. Here are two example scenarios:

  • An organization gets regularly raided by the security forces, who search all of the computers and mobile devices on the premises. The organization usually has at least a minute or two of warning before a raid starts. They need a very reliable way to trigger wiping all of the data from the sensitive apps.
  • An aid worker has lots of sensitive data about people on their device. They regularly sync that data up with a secure, central database. Occasionally, the aid worker has to leave the country on very short notice. The border guards regularly download the entire contents of mobile devices of people crossing through. While waiting in line at the border, the aid worker sees the border guards seizing people's devices, and then remembers all the data on the device, so she unlocks her phone and hits the wipe trigger, which wipes all sensitive apps from the device. When the aid worker returns to the central office, the device is again synced up with the central database.

This was started as part of the T2 Panic work, since sharing location is so often a part of panic apps. Follow our progress here:
https://guardianproject.info/tag/panic
https://dev.guardianproject.info/projects/panic

Here is a video that demonstrates the user experience:
https://www.youtube.com/watch?v=mS1gstS6YS8

two example apps: FakePanicButton and FakePanicReceiver

Added by hans over 2 years ago

I've publicly posted my two example panic apps: FakePanicButton and
FakePanicReceiver. These are just meant to be simple examples of the panic
framework in action. I've been using them as my rapid prototyping platform
before thinking about how to integrate this stuff into real apps. Right now,
you can see the list of "panic receivers" when you open FakePanicButton, and
you can select them to receive the trigger that FakePanicButton sends.

On the FakePanicReceiver side, you can see the active panic trigger app, as
well as the panic config screen, which is just a fullscreen placeholder with
functional Cancel/Connect buttons.

Their git repos are on our GuardianProject organization: and you can get test builds here:

I've also been sketching things out in the panic wiki and issue tracker. You
can follow all the panic activity here:

https://dev.guardianproject.info/projects/panic/activity

new app release: Location Privacy

Added by hans almost 3 years ago

LocationPrivacy is not really app but rather a set of "Intent Filters" for all of the various ways of sharing location. When you share location from one app, LocationPrivacy offers itself as an option. It then recognizes insecure methods of sharing location, and then converts them to more secure methods. This mostly means that it rewrites URLs to use https, and even to use `geo:` URIs, which can work on fully offline setups. LocationPrivacy mostly works by reading the location information from the URL itself. For many URLs, LocationPrivacy must actually load some of the webpage in order to get the location.

LocationPrivacy can also serve as a way to redirect all location links to your favorite mapping app. All map apps in Android can view `geo:` URIs, and LocationPrivacy converts many kinds of links to `geo:` URIs, including: Google Maps, OpenStreetMap, Amap, Baidu Map, QQ Map, Nokia HERE, Yandex Maps.

This is the first beta release of a new idea for us, if you have problems or ideas, please post them on our issue tracker so we can improve this app!
https://dev.guardianproject.info/projects/panic/issues/new

This was started as part of the T2 Panic work, since sharing location is so often a part of panic apps. Follow our progress here:
? https://guardianproject.info/tag/panic
? https://dev.guardianproject.info/projects/panic

Join us and help translate the app:
https://www.transifex.com/projects/p/locationprivacy

(1-8/8)

Also available in: Atom