Smid has gone open source - code available here: https://github.com/marekw2143/Smid.

Important info: Smid application was developed and tested on Xiaomi redmi Note 2 phone. It's checked to work there, it may not work on other phones

If you have tested this app, please let me know whether it works on your phone support@gdapplication.com

Demo:

Following movie presents demo of the application: https://www.dropbox.com/s/60f1uqtoqegtfvo/general_presentation.mkv?dl=0

What is Smid

It's an application detects gestures which you draw in space using your smartphone. It can work as Tasker plugin

Where is Facebook's fanpage:

Here you are: https://www.facebook.com/Smid-1822267581350773/

How to register a shape

Information about registering a shape is here.
Soon more detail instructions should be accessible - project is brand new ;)

How can I get Smid

It's available in Google Play - here: https://play.google.com/store/apps/details?id=com.smid.app

In case of any questions, feel free to ask at support@gdapplication.com

External service registration.

To register external service, simply you need to do following:

Define Activity, which will be responsible for service execution. Such activity should be runnable by implicit intents. Sample definition is following: To register an external service, call
com.smid.app.externalServices.ExternalServiceRegistration
intent with following extras put in bundle:


option's name option's meaning
FriendlyName Defines name of the external service. It will be seen in "Add action" window.
OptionsFetcher It's the intent which Smid application will call when user decides to create new action. Aim of this intent is to provide some id of action, so that External Service on the basis of the given id can perform concrete action. Generally when Smid will want to perform action, it will pass to the External Service data returned by this intent.
OptionsExecutor It's the intent which Smid will execute with given id of an action (that is Id returned by intent called "OptionsFetcher"). This intent is responsible for executing actions.

In case of any questions feel free to ask at support@gdapplication.com!

Parameter names:
package com.smid.smsService;

public class Consts {
    public static final String EXTERNAL_SERVICE_FRIENDLY_NAME = "FriendlyName";
    public static final String EXTERNAL_SERVICE_OPTIONS_FETCHER_INTENT = "OptionsFetcher";
    public static final String EXTERNAL_SERVICE_OPTIONS_EXECUTOR_INTENT = "OptionsExecutor";

    public static final String EXTERNAL_SERVICE_EXTERNAL_OPTION_ID = "ExternalOptionId";
    public static final String EXTERNAL_SERVICE_EXTERNAL_OPTION_FRIENDLY_NAME = "ExternalOptionFriendlyName";

}
Code for registering service in Smid:
Intent i = new Intent("com.smid.app.externalServices.ExternalServiceRegistration");

i.putExtra(Consts.EXTERNAL_SERVICE_FRIENDLY_NAME, "Send SMS");
i.putExtra(Consts.EXTERNAL_SERVICE_OPTIONS_EXECUTOR_INTENT, "com.smid.smsService.SMS_SendMessage");
i.putExtra(Consts.EXTERNAL_SERVICE_OPTIONS_FETCHER_INTENT, "com.smid.smsService.SMS_SelectAddress");

startActivity(i);
Activity fetchign action request from Smid:
package com.smid.smsService;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.v7.app.AppCompatActivity;

public class SendSMS extends AppCompatActivity {

    @Override
    public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
        super.onCreate(savedInstanceState, persistentState);
    }

    @Override
    protected void onResume() {
        super.onResume();

        ContactDataFetcher fetcher = new ContactDataFetcher();

        String contactUri = getIntent().getExtras().getString(Consts.EXTERNAL_SERVICE_EXTERNAL_OPTION_ID);
        String phoneNumber = fetcher.GetContactNumber(this, Uri.parse(contactUri));

        Intent smsIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("smsto:" + phoneNumber.replaceAll("\\s+", "")));
        smsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

        startActivity(smsIntent);
    }
}
Activity called when Smid wants to create action of given type:
package com.smid.smsService;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.provider.ContactsContract;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class SelectAddress extends AppCompatActivity {

    public static final int REQUEST_CODE_CONTACT_PICK = 1003;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_select_address);

        Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);

        startActivityForResult(i, REQUEST_CODE_CONTACT_PICK);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == REQUEST_CODE_CONTACT_PICK) {
            if (resultCode == Activity.RESULT_OK) {
                Uri contactUri = data.getData();
                ContactDataFetcher contactDataFetcher = new ContactDataFetcher();

                String name= contactDataFetcher.GetContactName(this, contactUri);
                Intent resultIntent = new Intent();

                // code below returns to Smid information about action. That information must be understandable by SendSMS activity  and that 
                // information will be passed by Smid to external action when it will want to trigger that action
                resultIntent.putExtra(Consts.EXTERNAL_SERVICE_EXTERNAL_OPTION_ID, contactUri.toString());
                resultIntent.putExtra(Consts.EXTERNAL_SERVICE_EXTERNAL_OPTION_FRIENDLY_NAME, "SMS to: " + name);


                setResult(Activity.RESULT_OK, resultIntent);
                finish();
            }
        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.smid.smsService">

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name="com.smid.smsService.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.smid.smsService.SendSMS">
            <intent-filter>
                <action android:name="com.smid.smsService.SMS_SendMessage" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:name="com.smid.smsService.SelectAddress">
            <intent-filter>
                <action android:name="com.smid.smsService.SMS_SelectAddress"/>

                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>
    </application>

</manifest>