Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Intro

This document expands on some of the technical details of SMSSync Issue 11 and proposes a solution for communicating results of outgoing SMS messages processsed by SMSSync.

SMSSync has a basic HTTP client in MainHttpClient.java it should suffice for the purposes of this feature.

Prerequisites

@mandric
mandric / gist:9606333
Last active August 29, 2015 13:57
SMSSync Issues
  • Saving return code from SMS API call and passing back into kujua medic/cht-core#423

  • Feasibility of delivery receipts ushahidi/SMSSync#11

  • Integrating SMS portals to bypass SMS 100 msgs/hour limit on android https://github.com/vaneyck/sms-portals

  • Get our SMSSync branch fixed up in a way so that it can be merged. And we don't have to maintain our own branch. We might have to work with Ushahidi to create an API for SMSSync to send updates back to a server. HTTP callbacks migh work here but needs to be modified to pass in data from the Android API to know return value of API calls.

{
"_id": "29f9ea9dd74edf1d6b72f6ad7715fd2e",
"type": "market",
"name": "Local Test Market",
"url": "http://localhost:5984/market/_design/market/_rewrite/"
}
{
"type": "reminder_registration",
"form": { "code": "ANCR" },
"auto_id": {
"property_name": "patient_id",
"format": "11111"
},
"responses": {
"valid": {
"en": "Thank you {{chw_name}} for registering {{patient_name}}. Patient ID is {{patient_id}}. ANC visit is needed in {{weeks}} weeks.",

FAQ: Can you watch my stuff for me while I go use the bathroom?

Ok, it's bad enough that we live in a society where people steal, rape and pillage. The only thing worse is when someone accepts that society as normal, starts dividing people into good and bad groups, never once taking any responsibility for their surroundings. Living completely in a box without any sense of moral responsibility for their environment. This is true ignorance and lack of culture. Yes "accountability" has a dark side -- it's another word for blame. We all shed the responsibility of creating a better world when this happens. It's immoral and self-defeating. It's wrong.

@mandric
mandric / gist:3959916
Created October 26, 2012 16:59 — forked from guyht/gist:1684328
Twitter Bot in NodeJS
/*
* Load external modules and init variables
*/
var twitter = require('ntwitter'),
http = require('http'),
bitly = require('bitly'),
b = new bitly('USER', 'API_KEY'),
tweeted = {},
load_time = Math.round(new Date().getTime() / 1000),
score_threshold = 100;
@mandric
mandric / events.js
Created May 3, 2012 16:21
kanso session handling
// lib/events.js
// topnav ala bootstrap
// stores a reference to the modal dialog
var m;
session.on('change', function (userCtx) {
if (!$('#session_menu').length) {
$('#topnav .pull-right').append(
#!/usr/bin/env python
import os,sys
tiles = []
if len(sys.argv) != 2:
print 'Usage: upload-files db'
exit(1)
else:
db = sys.argv[1]
exports.env = {
// the default env will be used when you just do "kanso push"
default: {
db: "http://username:password@hostname:5984/dbname"
},
// you can also define named environments this one will
// be used when you do "kanso push production"
production: {
db: "http://username:password@production-hostname:5984/production-db",
// tells the module package to minify modules.js
var rewrites = require('kujua-sms/rewrites').rules,
_ = require('underscore')._;
/**
* Rewrite settings to be exported from the design doc
*/
module.exports = _.union(rewrites, [
{from: '/static/*', to: 'static/*'},
{from: '/install', to: '_show/docs', method: 'GET'},