4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/PlayStoreImages/FeatureGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/PlayStoreImages/FeatureGraphic.png
--------------------------------------------------------------------------------
/PlayStoreImages/FeatureGraphic.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/PlayStoreImages/FeatureGraphic.xcf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | android-udpsender
2 | =================
3 |
4 | [UDP Sender](https://play.google.com/store/apps/details?id=com.hastarin.android.udpsender) is a simple application to allow sending UDP packets.
5 |
6 | 
7 |
8 | It supports the implicit [Intent](http://developer.android.com/reference/android/content/Intent.html) Intent.ACTION_SENDTO with a udp://host:port/data format URI.
9 |
10 | * data is treated as hex if it starts with 0x.
11 | * If a string starting with 0x is to be sent it can be escaped as \0x
12 |
13 | Added in v1.3.1 - Current in Beta see http://goo.gl/reibxw to join
14 | * Allow broadcast packets to be sent.
15 | * Fixed a bug causing a period to be prematurely inserted when entering an IP.
16 |
17 | Added in v1.3
18 | * Added support for Tasker to do variable replacement for the host/port as well as the text.
19 | * Remembers your settings when you quit and re-launch the app.
20 |
21 | Added in v1.2
22 | * Now supports multi line text messages.
23 | * Bugfix for Send button not working in Landscape mode.
24 |
25 | Added in v1.1
26 |
27 | * Also acts as a plugin for Locale and Tasker.
28 | * Variable replacement is supported for the Tasker plugin in the text field.
29 | * Changed theme to Holo (Dark)
30 | * Removed unused permissions
31 | * Various tweaks/fixes
32 |
33 |
34 | Tasker Integration
35 | ------------------
36 | Tasker plugin support is now complete and should be straight forward to use.
37 |
38 | 
39 |
40 |
41 | Alternatively UDP packets can be sent via [Tasker](http://tasker.dinglisch.net/) with the Misc/Send Intent action.
42 |
43 | Just set it up as follows:
44 | * Action = android.intent.action.SENDTO
45 | * Data = udp://host:port/data
46 | * Target = Activity
47 |
48 | 
49 |
50 | Example for a www.limitlessled.com Wi-Fi bridge at 192.168.1.100 to turn on all the white LEDs
51 | * Action = android.intent.action.SENDTO
52 | * Data = udp://192.168.1.100:50000/0x350055
53 | * Target = Activity
54 |
55 |
56 | Tasker Example Project
57 | ----------------------
58 |
59 | 
60 |
61 | You can get a copy of my current Tasker project (or at least a portion of it) [Lights.prj.xml](https://raw.github.com/hastarin/android-udpsender/screenshots/screenshots/Lights.prj.xml) that I'm using for controlling my lights.
62 |
63 | To give you an idea of how I'm using it I have the following:
64 | * Gesture control via my launcher (Nova) to turn all lights on/off/full bright/night mode and dim/brighten lights.
65 | * Using the Scene shown above I can turn all/individual zones on/off and control bright/dim/warm/cool.
66 | * NOTE: A swipe up/down in the colored square controls a bright/dim ramp and left/right for warm/cool.
67 | * An NFC tag on my bed that when tapped will turn the lights off, or keep some in night mode if I have guests.
68 | * When my phone connects to the Wi-Fi, and it's between sunrise and sunset, my entry hall light is turned on.
69 |
70 |
71 | NOTE: *It should be obvious but you will need to edit this to use it*
72 |
73 | * Insert your own Weather Underground API key instead of <YOURAPIKEYHERE>.
74 |
75 | See http://www.wunderground.com/weather/api/d/docs for more info on getting one.
76 |
77 | It's used by the "Get Sunrise/set" which is called once a day to update the global variables. I use this in "Check Night Time" to only turn my entry light on at night when I arrive home and connect to my Wi-Fi.
78 |
79 | * You'll want to replace the string for my SSID with your own. Search and replace C86241. Or remove the Stop commands that prevent things working when not on the correct Wi-Fi.
80 |
81 | * You'll obviously need to change IPs and Names to suit your setup.
82 |
83 | * Finally if you're using a device that has a different size screen (my S4 is 1920x1080) you'll need to edit the scene so it fits and adjust the maths for the gestures.
84 |
85 |
--------------------------------------------------------------------------------
/UDP Sender/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/UDP Sender/UDP Sender.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/UDP Sender/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'android'
2 | android {
3 | compileSdkVersion 19
4 | buildToolsVersion '19.0.3'
5 |
6 | defaultConfig {
7 | minSdkVersion 8
8 | targetSdkVersion 19
9 | }
10 |
11 | signingConfigs {
12 | release {
13 | storeFile file(RELEASE_STORE_FILE)
14 | storePassword RELEASE_STORE_PASSWORD
15 | keyAlias RELEASE_KEY_ALIAS
16 | keyPassword RELEASE_KEY_PASSWORD
17 | }
18 | }
19 |
20 | buildTypes {
21 | release {
22 | runProguard true
23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
24 | debuggable false
25 | signingConfig signingConfigs.release
26 | }
27 | debug {
28 | debuggable true
29 | runProguard false
30 | }
31 | }
32 | }
33 | dependencies {
34 | compile project(':libraries:locale-api')
35 | }
--------------------------------------------------------------------------------
/UDP Sender/proguard-rules.txt:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:/Development/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the ProGuard
5 | # include property in project.properties.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
--------------------------------------------------------------------------------
/UDP Sender/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
21 |
27 |
28 |
33 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
62 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
83 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.hastarin.android.udpsender;
14 |
15 | import android.content.Context;
16 |
17 | /**
18 | * Class of constants used by this Locale plug-in.
19 | */
20 | public final class Constants
21 | {
22 | /**
23 | * Log tag for logcat messages.
24 | */
25 | public static final String LOG_TAG = "UDPSender"; //$NON-NLS-1$
26 |
27 | /**
28 | * Flag to enable logcat messages.
29 | */
30 | public static final boolean IS_LOGGABLE = BuildConfig.DEBUG;
31 |
32 | /**
33 | * Flag to enable runtime checking of method parameters.
34 | */
35 | public static final boolean IS_PARAMETER_CHECKING_ENABLED = BuildConfig.DEBUG;
36 |
37 | /**
38 | * Flag to enable runtime checking of whether a method is called on the correct thread.
39 | */
40 | public static final boolean IS_CORRECT_THREAD_CHECKING_ENABLED = BuildConfig.DEBUG;
41 |
42 | /**
43 | * Determines the "versionCode" in the {@code AndroidManifest}.
44 | *
45 | * @param context to read the versionCode.
46 | * @return versionCode of the app.
47 | */
48 | public static int getVersionCode(final Context context)
49 | {
50 | if (Constants.IS_PARAMETER_CHECKING_ENABLED)
51 | {
52 | if (null == context)
53 | {
54 | throw new IllegalArgumentException("context cannot be null"); //$NON-NLS-1$
55 | }
56 | }
57 |
58 | try
59 | {
60 | return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;
61 | }
62 | catch (final UnsupportedOperationException e)
63 | {
64 | /*
65 | * This exception is thrown by test contexts
66 | */
67 |
68 | return 1;
69 | }
70 | catch (final Exception e)
71 | {
72 | throw new RuntimeException(e);
73 | }
74 | }
75 |
76 | /**
77 | * Private constructor prevents instantiation.
78 | *
79 | * @throws UnsupportedOperationException because this class cannot be instantiated.
80 | */
81 | private Constants()
82 | {
83 | throw new UnsupportedOperationException("This class is non-instantiable"); //$NON-NLS-1$
84 | }
85 | }
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/HexHelper.java:
--------------------------------------------------------------------------------
1 | package com.hastarin.android.udpsender;
2 |
3 | import java.util.Locale;
4 |
5 | public class HexHelper {
6 | public static byte[] hexStringToBytes(String input) {
7 | input = input.toLowerCase(Locale.US);
8 | int n = input.length() / 2;
9 | byte[] output = new byte[n];
10 | int l = 0;
11 | for (int k = 0; k < n; k++) {
12 | char c = input.charAt(l++);
13 | byte b = (byte) ((c >= 'a' ? (c - 'a' + 10) : (c - '0')) << 4);
14 | c = input.charAt(l++);
15 | b |= (byte) (c >= 'a' ? (c - 'a' + 10) : (c - '0'));
16 | output[k] = b;
17 | }
18 | return output;
19 | }
20 |
21 | public static String bytesToHex(byte[] bytes) {
22 | final char[] hexArray = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
23 | char[] hexChars = new char[bytes.length * 2];
24 | int v;
25 | for ( int j = 0; j < bytes.length; j++ ) {
26 | v = bytes[j] & 0xFF;
27 | hexChars[j * 2] = hexArray[v >>> 4];
28 | hexChars[j * 2 + 1] = hexArray[v & 0x0F];
29 | }
30 | return new String(hexChars);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hastarin.android.udpsender;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.net.Uri;
8 | import android.os.Bundle;
9 | import android.text.InputType;
10 | import android.view.Menu;
11 | import android.view.MenuItem;
12 | import android.view.View;
13 | import android.widget.EditText;
14 | import android.widget.TextView;
15 | import android.widget.Toast;
16 | import android.widget.ToggleButton;
17 |
18 | public class MainActivity extends Activity {
19 |
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | setContentView(R.layout.activity_main);
24 |
25 | // Restore preferences
26 | SharedPreferences settings = getPreferences(0);
27 | ToggleButton toggleButton = ((ToggleButton) findViewById(R.id.toggleButton));
28 | boolean checked = settings.getBoolean("toggleChecked", false);
29 | toggleButton.setChecked(checked);
30 | toggleButton.setVisibility(View.GONE);
31 | EditText editText = (EditText) findViewById(R.id.editTextIP);
32 | if (checked) {
33 | editText.setInputType(InputType.TYPE_CLASS_TEXT);
34 | }
35 | editText.setText(settings.getString("host", ""), TextView.BufferType.EDITABLE);
36 | editText = (EditText) findViewById(R.id.editTextPort);
37 | if (checked) {
38 | editText.setInputType(InputType.TYPE_CLASS_TEXT);
39 | }
40 | editText.setText(settings.getString("port", ""), TextView.BufferType.EDITABLE);
41 | editText = (EditText) findViewById(R.id.editTextData);
42 | editText.setText(settings.getString("dataText", ""), TextView.BufferType.EDITABLE);
43 | editText = (EditText) findViewById(R.id.editTextHexData);
44 | editText.setText(settings.getString("dataHex", ""), TextView.BufferType.EDITABLE);
45 | }
46 |
47 | @Override
48 | public void onPause() {
49 | super.onPause();
50 |
51 | // Get current values
52 | EditText editText = (EditText) findViewById(R.id.editTextIP);
53 | String host = editText.getText().toString();
54 | editText = (EditText) findViewById(R.id.editTextPort);
55 | String port = editText.getText().toString();
56 | editText = (EditText) findViewById(R.id.editTextData);
57 | String dataText = editText.getText().toString();
58 | editText = (EditText) findViewById(R.id.editTextHexData);
59 | String dataHex = editText.getText().toString();
60 |
61 | // We need an Editor object to make preference changes.
62 | // All objects are from android.context.Context
63 | SharedPreferences settings = getPreferences(0);
64 | SharedPreferences.Editor editor = settings.edit();
65 | editor.putString("host", host);
66 | editor.putString("port", port);
67 | editor.putString("dataText", dataText);
68 | editor.putString("dataHex", dataHex);
69 | editor.putBoolean("toggleChecked", ((ToggleButton) findViewById(R.id.toggleButton)).isChecked());
70 |
71 | // Commit the edits!
72 | editor.commit();
73 | }
74 |
75 | @Override
76 | public boolean onCreateOptionsMenu(Menu menu) {
77 | // Inflate the menu; this adds items to the action bar if it is present.
78 | getMenuInflater().inflate(R.menu.main, menu);
79 | return true;
80 | }
81 |
82 | @Override
83 | public boolean onOptionsItemSelected(MenuItem item) {
84 | // Handle item selection
85 | switch (item.getItemId()) {
86 | case R.id.action_send:
87 | this.sendData(null);
88 | return true;
89 | default:
90 | return super.onOptionsItemSelected(item);
91 | }
92 | }
93 |
94 | public void sendData(View view) {
95 | Context context = getApplicationContext();
96 |
97 | EditText editText = (EditText) findViewById(R.id.editTextIP);
98 | String host = editText.getText().toString();
99 | if (!host.matches("\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b")) {
100 | CharSequence text = "Error: Invalid IP Address";
101 | Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
102 | toast.show();
103 | return;
104 | }
105 | editText = (EditText) findViewById(R.id.editTextPort);
106 | String port = editText.getText().toString();
107 | if (!port.matches("^(6553[0-5]|655[0-2]\\d|65[0-4]\\d\\d|6[0-4]\\d{3}|[1-5]\\d{4}|[1-9]\\d{0,3}|0)$")) {
108 | CharSequence text = "Error: Invalid Port Number";
109 | Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
110 | toast.show();
111 | return;
112 | }
113 | editText = (EditText) findViewById(R.id.editTextData);
114 | String dataText = editText.getText().toString();
115 | editText = (EditText) findViewById(R.id.editTextHexData);
116 | String dataHex = editText.getText().toString();
117 | if (dataText.length() < 1 && dataHex.length() < 2) {
118 | CharSequence text = "Error: Text/Hex required to send";
119 | Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
120 | toast.show();
121 | return;
122 | }
123 | String uriString = "udp://" + host + ":" + port + "/";
124 | if (dataHex.length() >= 2) {
125 | uriString += Uri.encode("0x" + dataHex);
126 | } else {
127 | uriString += Uri.encode(dataText);
128 | }
129 | Uri uri = Uri.parse(uriString);
130 | Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
131 | intent.addFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
132 | intent.addCategory(Intent.CATEGORY_DEFAULT);
133 |
134 | startActivity(intent);
135 | }
136 |
137 | public void onToggleClicked(View view) {
138 | boolean on = ((ToggleButton) view).isChecked();
139 |
140 |
141 | EditText editTextIp = (EditText) findViewById(R.id.editTextIP);
142 | EditText editTextPort = (EditText) findViewById(R.id.editTextPort);
143 | if (on) {
144 | editTextIp.setInputType(InputType.TYPE_CLASS_TEXT);
145 | editTextPort.setInputType(InputType.TYPE_CLASS_TEXT);
146 | } else {
147 | editTextIp.setInputType(InputType.TYPE_CLASS_PHONE);
148 | editTextPort.setInputType(InputType.TYPE_CLASS_PHONE);
149 | }
150 | }
151 | }
152 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/PluginApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.hastarin.android.udpsender;
14 |
15 | import android.annotation.TargetApi;
16 | import android.app.Application;
17 | import android.os.Build;
18 | import android.util.Log;
19 |
20 | /**
21 | * Implements an application object for the plug-in.
22 | *
23 | * This application is non-essential for the plug-in's operation; it simply enables debugging options globally
24 | * for the app.
25 | */
26 | public final class PluginApplication extends Application
27 | {
28 | @Override
29 | public void onCreate()
30 | {
31 | super.onCreate();
32 |
33 | if (BuildConfig.DEBUG)
34 | {
35 | if (Constants.IS_LOGGABLE)
36 | {
37 | Log.v(Constants.LOG_TAG, "Application is debuggable. Enabling additional debug logging"); //$NON-NLS-1$
38 | }
39 |
40 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD)
41 | {
42 | enableApiLevel9Debugging();
43 | }
44 |
45 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
46 | {
47 | enableApiLevel11Debugging();
48 | }
49 |
50 | /*
51 | * If using the Fragment compatibility library, enable debug logging here
52 | */
53 | // android.support.v4.app.FragmentManager.enableDebugLogging(true);
54 | // android.support.v4.app.LoaderManager.enableDebugLogging(true);
55 | }
56 | }
57 |
58 | @TargetApi(Build.VERSION_CODES.GINGERBREAD)
59 | private static void enableApiLevel9Debugging()
60 | {
61 | android.os.StrictMode.enableDefaults();
62 | }
63 |
64 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
65 | private static void enableApiLevel11Debugging()
66 | {
67 | android.app.LoaderManager.enableDebugLogging(true);
68 | android.app.FragmentManager.enableDebugLogging(true);
69 | }
70 | }
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/SendToUriActivity.java:
--------------------------------------------------------------------------------
1 | package com.hastarin.android.udpsender;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 | import android.view.Menu;
9 |
10 | public class SendToUriActivity extends Activity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 |
16 | Intent intent = getIntent();
17 | final Uri uri = intent.getData();
18 | if (Constants.IS_LOGGABLE) {
19 | Log.v(getString(R.string.app_name), "Intent received " + uri.toString());
20 | }
21 | UdpSender udpSender = new UdpSender();
22 | udpSender.SendTo(this.getApplicationContext(), uri);
23 | finish();
24 | }
25 |
26 | @Override
27 | public boolean onCreateOptionsMenu(Menu menu) {
28 | return false;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/UdpSender.java:
--------------------------------------------------------------------------------
1 | package com.hastarin.android.udpsender;
2 |
3 | import android.content.Context;
4 | import android.net.Uri;
5 | import android.os.Handler;
6 | import android.util.Log;
7 | import android.widget.Toast;
8 |
9 | import java.io.IOException;
10 | import java.net.*;
11 |
12 | import static com.hastarin.android.udpsender.HexHelper.bytesToHex;
13 | import static com.hastarin.android.udpsender.HexHelper.hexStringToBytes;
14 |
15 | public class UdpSender {
16 | final Handler toastHandler = new Handler();
17 | public void SendTo(final Context context, final Uri uri) {
18 |
19 | if (uri == null) return;
20 | String msg = Uri.decode(uri.getLastPathSegment());
21 | if(msg == null) return;
22 | byte[] msgBytes = msg.getBytes();
23 | if (msg.startsWith("\\0x")) {
24 | msg = msg.replace("\\0x", "0x");
25 | msgBytes = msg.getBytes();
26 | } else if (msg.startsWith("0x")) {
27 | msg = msg.replace("0x", "");
28 | if(!msg.matches("[a-fA-F0-9]+")) {
29 | Toast.makeText(context, "ERROR: Invalid hex values", Toast.LENGTH_LONG).show();
30 | return;
31 | }
32 | msgBytes = hexStringToBytes(msg);
33 | }
34 |
35 | final byte[] buf = msgBytes;
36 |
37 | String appName = context.getString(R.string.app_name);
38 | if(Constants.IS_LOGGABLE) {
39 | Log.d(appName, new String(msgBytes));
40 | Log.d(appName, "0x" + bytesToHex(msgBytes));
41 | }
42 |
43 | new Thread(new Runnable() {
44 | public void run() {
45 | try {
46 | InetAddress serverAddress = InetAddress.getByName(uri
47 | .getHost());
48 | //Log.v(getString(R.string.app_name), serverAddress.getHostAddress());
49 | DatagramSocket socket = new DatagramSocket();
50 | if (!socket.getBroadcast()) socket.setBroadcast(true);
51 | DatagramPacket packet = new DatagramPacket(buf, buf.length,
52 | serverAddress, uri.getPort());
53 | socket.send(packet);
54 | socket.close();
55 | } catch (final UnknownHostException e) {
56 | toastHandler.post(new Runnable() {
57 | @Override
58 | public void run() {
59 | Toast.makeText(context, e.toString(),
60 | Toast.LENGTH_SHORT).show();
61 | }
62 | });
63 | e.printStackTrace();
64 | } catch (final SocketException e) {
65 | toastHandler.post(new Runnable() {
66 | @Override
67 | public void run() {
68 | Toast.makeText(context, e.toString(),
69 | Toast.LENGTH_SHORT).show();
70 | }
71 | });
72 | e.printStackTrace();
73 | } catch (final IOException e) {
74 | toastHandler.post(new Runnable() {
75 | @Override
76 | public void run() {
77 | Toast.makeText(context, e.toString(),
78 | Toast.LENGTH_SHORT).show();
79 | }
80 | });
81 | e.printStackTrace();
82 | }
83 | }
84 | }).start();
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/receiver/FireReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.hastarin.android.udpsender.receiver;
14 |
15 | import android.content.BroadcastReceiver;
16 | import android.content.Context;
17 | import android.content.Intent;
18 | import android.net.Uri;
19 | import android.os.Bundle;
20 | import android.util.Log;
21 | import com.hastarin.android.udpsender.Constants;
22 | import com.hastarin.android.udpsender.UdpSender;
23 | import com.hastarin.android.udpsender.ui.bundle.BundleScrubber;
24 | import com.hastarin.android.udpsender.ui.bundle.PluginBundleManager;
25 |
26 | import java.util.Locale;
27 |
28 | /**
29 | * This is the "fire" BroadcastReceiver for a Locale Plug-in setting.
30 | *
31 | * @see com.twofortyfouram.locale.Intent#ACTION_FIRE_SETTING
32 | * @see com.twofortyfouram.locale.Intent#EXTRA_BUNDLE
33 | */
34 | public final class FireReceiver extends BroadcastReceiver
35 | {
36 |
37 | /**
38 | * @param context {@inheritDoc}.
39 | * @param intent the incoming {@link com.twofortyfouram.locale.Intent#ACTION_FIRE_SETTING} Intent. This
40 | * should contain the {@link com.twofortyfouram.locale.Intent#EXTRA_BUNDLE} that was saved by
41 | * {@link com.hastarin.android.udpsender.ui.EditActivity} and later broadcast by Locale.
42 | */
43 | @Override
44 | public void onReceive(final Context context, final Intent intent)
45 | {
46 | /*
47 | * Always be strict on input parameters! A malicious third-party app could send a malformed Intent.
48 | */
49 |
50 | if (!com.twofortyfouram.locale.Intent.ACTION_FIRE_SETTING.equals(intent.getAction()))
51 | {
52 | if (Constants.IS_LOGGABLE)
53 | {
54 | Log.e(Constants.LOG_TAG,
55 | String.format(Locale.US, "Received unexpected Intent action %s", intent.getAction())); //$NON-NLS-1$
56 | }
57 | return;
58 | }
59 |
60 | BundleScrubber.scrub(intent);
61 |
62 | final Bundle bundle = intent.getBundleExtra(com.twofortyfouram.locale.Intent.EXTRA_BUNDLE);
63 | BundleScrubber.scrub(bundle);
64 |
65 | if (PluginBundleManager.isBundleValid(bundle))
66 | {
67 | final String host =
68 | bundle.getString(PluginBundleManager.BUNDLE_EXTRA_STRING_HOST);
69 | String portText = "";
70 | if (bundle.containsKey(PluginBundleManager.BUNDLE_EXTRA_STRING_PORT))
71 | {
72 | portText = bundle.getString(PluginBundleManager.BUNDLE_EXTRA_STRING_PORT);
73 | }
74 | else
75 | {
76 | final int port =
77 | bundle.getInt(PluginBundleManager.BUNDLE_EXTRA_INT_PORT);
78 | portText = Integer.toString(port);
79 | }
80 | String dataText =
81 | bundle.getString(PluginBundleManager.BUNDLE_EXTRA_STRING_TEXT);
82 | final String dataHex =
83 | bundle.getString(PluginBundleManager.BUNDLE_EXTRA_STRING_HEX);
84 | String uriString = "udp://" + host + ":" + portText + "/";
85 |
86 | if (dataHex.length() >= 2) {
87 | uriString += Uri.encode("0x" + dataHex);
88 | } else {
89 | uriString += Uri.encode(dataText);
90 | }
91 | Uri uri = Uri.parse(uriString);
92 | UdpSender udpSender = new UdpSender();
93 | udpSender.SendTo(context, uri);
94 | }
95 | }
96 | }
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/ui/AbstractPluginActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.hastarin.android.udpsender.ui;
14 |
15 | import android.annotation.TargetApi;
16 | import android.app.Activity;
17 | import android.content.pm.PackageManager.NameNotFoundException;
18 | import android.os.Build;
19 | import android.os.Bundle;
20 | import android.util.Log;
21 | import android.view.Menu;
22 | import android.view.MenuItem;
23 | import com.hastarin.android.udpsender.Constants;
24 | import com.hastarin.android.udpsender.R;
25 | import com.twofortyfouram.locale.BreadCrumber;
26 |
27 | /**
28 | * Superclass for plug-in Activities. This class takes care of initializing aspects of the plug-in's UI to
29 | * look more integrated with the plug-in host.
30 | */
31 | public abstract class AbstractPluginActivity extends Activity
32 | {
33 | /**
34 | * Flag boolean that can only be set to true via the "Don't Save"
35 | * {@link com.twofortyfouram.locale.api.R.id#twofortyfouram_locale_menu_dontsave} menu item in
36 | * {@link #onMenuItemSelected(int, MenuItem)}.
37 | */
38 | /*
39 | * There is no need to save/restore this field's state.
40 | */
41 | private boolean mIsCancelled = false;
42 |
43 | @Override
44 | protected void onCreate(final Bundle savedInstanceState)
45 | {
46 | super.onCreate(savedInstanceState);
47 |
48 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
49 | {
50 | setupTitleApi11();
51 | }
52 | else
53 | {
54 | setTitle(BreadCrumber.generateBreadcrumb(getApplicationContext(), getIntent(),
55 | getString(R.string.plugin_name)));
56 | }
57 | }
58 |
59 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
60 | private void setupTitleApi11()
61 | {
62 | CharSequence callingApplicationLabel = null;
63 | try
64 | {
65 | callingApplicationLabel =
66 | getPackageManager().getApplicationLabel(getPackageManager().getApplicationInfo(getCallingPackage(),
67 | 0));
68 | }
69 | catch (final NameNotFoundException e)
70 | {
71 | if (Constants.IS_LOGGABLE)
72 | {
73 | Log.e(Constants.LOG_TAG, "Calling package couldn't be found", e); //$NON-NLS-1$
74 | }
75 | }
76 | if (null != callingApplicationLabel)
77 | {
78 | setTitle(callingApplicationLabel);
79 | }
80 | }
81 |
82 | @Override
83 | public boolean onCreateOptionsMenu(final Menu menu)
84 | {
85 | super.onCreateOptionsMenu(menu);
86 |
87 | getMenuInflater().inflate(R.menu.twofortyfouram_locale_help_save_dontsave, menu);
88 |
89 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
90 | {
91 | setupActionBarApi11();
92 | }
93 |
94 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
95 | {
96 | setupActionBarApi14();
97 | }
98 |
99 | return true;
100 | }
101 |
102 | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
103 | private void setupActionBarApi11()
104 | {
105 | getActionBar().setSubtitle(BreadCrumber.generateBreadcrumb(getApplicationContext(), getIntent(),
106 | getString(R.string.plugin_name)));
107 | }
108 |
109 | @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
110 | private void setupActionBarApi14()
111 | {
112 | getActionBar().setDisplayHomeAsUpEnabled(true);
113 |
114 | /*
115 | * Note: There is a small TOCTOU error here, in that the host could be uninstalled right after
116 | * launching the plug-in. That would cause getApplicationIcon() to return the default application
117 | * icon. It won't fail, but it will return an incorrect icon.
118 | *
119 | * In practice, the chances that the host will be uninstalled while the plug-in UI is running are very
120 | * slim.
121 | */
122 | try
123 | {
124 | getActionBar().setIcon(getPackageManager().getApplicationIcon(getCallingPackage()));
125 | }
126 | catch (final NameNotFoundException e)
127 | {
128 | if (Constants.IS_LOGGABLE)
129 | {
130 | Log.w(Constants.LOG_TAG, "An error occurred loading the host's icon", e); //$NON-NLS-1$
131 | }
132 | }
133 | }
134 |
135 | @Override
136 | public boolean onMenuItemSelected(final int featureId, final MenuItem item)
137 | {
138 | final int id = item.getItemId();
139 |
140 | if (android.R.id.home == id)
141 | {
142 | finish();
143 | return true;
144 | }
145 | else if (R.id.twofortyfouram_locale_menu_dontsave == id)
146 | {
147 | mIsCancelled = true;
148 | finish();
149 | return true;
150 | }
151 | else if (R.id.twofortyfouram_locale_menu_save == id)
152 | {
153 | finish();
154 | return true;
155 | }
156 |
157 | return super.onOptionsItemSelected(item);
158 | }
159 |
160 | /**
161 | * During {@link #finish()}, subclasses can call this method to determine whether the Activity was
162 | * canceled.
163 | *
164 | * @return True if the Activity was canceled. False if the Activity was not canceled.
165 | */
166 | protected boolean isCanceled()
167 | {
168 | return mIsCancelled;
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/ui/EditTextHex.java:
--------------------------------------------------------------------------------
1 | package com.hastarin.android.udpsender.ui;
2 |
3 | import android.content.Context;
4 | import android.text.Editable;
5 | import android.text.InputFilter;
6 | import android.text.InputType;
7 | import android.text.TextWatcher;
8 | import android.util.AttributeSet;
9 | import android.widget.EditText;
10 |
11 | public class EditTextHex extends EditText {
12 |
13 | public EditTextHex(Context context) {
14 | super(context);
15 | initialize();
16 | }
17 |
18 | public EditTextHex(Context context, AttributeSet attrs) {
19 | super(context, attrs);
20 | initialize();
21 | }
22 |
23 | public EditTextHex(Context context, AttributeSet attrs, int defStyle) {
24 | super(context, attrs, defStyle);
25 | initialize();
26 | }
27 |
28 | private void initialize() {
29 | setInputType(InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS|InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
30 | setFilters(new InputFilter[] { new InputFilter() {
31 | @Override
32 | public CharSequence filter(CharSequence source, int start, int end,
33 | android.text.Spanned dest, int dstart, int dend) {
34 | if (end > start) {
35 | String destTxt = dest.toString();
36 | String resultingTxt = destTxt.substring(0, dstart)
37 | + source.subSequence(start, end)
38 | + destTxt.substring(dend);
39 | if (!resultingTxt
40 | .matches("[a-fA-F0-9]+")) {
41 | return "";
42 | }
43 | }
44 | return null;
45 | }
46 | } });
47 |
48 | addTextChangedListener(new TextWatcher() {
49 | @Override
50 | public void afterTextChanged(Editable s) {
51 | }
52 |
53 | @Override
54 | public void onTextChanged(CharSequence s, int start, int before,
55 | int count) {
56 | }
57 |
58 | @Override
59 | public void beforeTextChanged(CharSequence s, int start, int count,
60 | int after) {
61 | // Nothing happens here
62 | }
63 | });
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/ui/EditTextIPAddress.java:
--------------------------------------------------------------------------------
1 | package com.hastarin.android.udpsender.ui;
2 |
3 | import android.content.Context;
4 | import android.text.Editable;
5 | import android.text.InputFilter;
6 | import android.text.InputType;
7 | import android.text.TextWatcher;
8 | import android.util.AttributeSet;
9 | import android.widget.EditText;
10 |
11 | public class EditTextIPAddress extends EditText {
12 |
13 | public EditTextIPAddress(Context context) {
14 | super(context);
15 | initialize();
16 | }
17 |
18 | public EditTextIPAddress(Context context, AttributeSet attrs) {
19 |
20 | super(context, attrs);
21 | initialize();
22 | }
23 |
24 | public EditTextIPAddress(Context context, AttributeSet attrs, int defStyle) {
25 |
26 | super(context, attrs, defStyle);
27 | initialize();
28 | }
29 |
30 | @Override
31 | public void setInputType(int type)
32 | {
33 | super.setInputType(type);
34 | HandleInputType(type);
35 | }
36 |
37 | private void HandleInputType(int type)
38 | {
39 | switch (type) {
40 | case InputType.TYPE_CLASS_PHONE:
41 | setFilters(new InputFilter[] { new InputFilter() {
42 | @Override
43 | public CharSequence filter(CharSequence source, int start, int end,
44 | android.text.Spanned destination, int dstart, int dend) {
45 | if (end > start) {
46 | String destinationString= destination.toString();
47 | String resultingText = destinationString.substring(0, dstart)
48 | + source.subSequence(start, end)
49 | + destinationString.substring(dend);
50 | if (!resultingText
51 | .matches("^\\d{1,3}(\\.(\\d{1,3}(\\.(\\d{1,3}(\\.(\\d{1,3})?)?)?)?)?)?")) {
52 | return "";
53 | } else {
54 | String[] splits = resultingText.split("\\.");
55 | for (int i = 0; i < splits.length; i++) {
56 | if (Integer.valueOf(splits[i]) > 255) {
57 | return "";
58 | }
59 | }
60 | }
61 | }
62 | return null;
63 | }
64 | } });
65 | break;
66 | default:
67 | setFilters(new InputFilter[]{});
68 | break;
69 | }
70 | }
71 |
72 | private void initialize() {
73 |
74 | HandleInputType(getInputType());
75 |
76 | addTextChangedListener(new TextWatcher() {
77 | boolean deleting = false;
78 | int lastCount = 0;
79 |
80 | @Override
81 | public void afterTextChanged(Editable s) {
82 | boolean check = getInputType() == InputType.TYPE_CLASS_PHONE;
83 | if (check && !deleting) {
84 | String working = s.toString();
85 | String[] split = working.split("\\.");
86 | String string = split[split.length - 1];
87 | if (string.length() == 3
88 | || string.equalsIgnoreCase("0")
89 | || (string.length() == 2 && Integer.parseInt(string) > 25))
90 | {
91 | s.append('.');
92 | return;
93 | }
94 | }
95 | }
96 |
97 | @Override
98 | public void onTextChanged(CharSequence s, int start, int before,
99 | int count) {
100 | if (lastCount < count) {
101 | deleting = false;
102 | } else {
103 | deleting = true;
104 | }
105 | }
106 |
107 | @Override
108 | public void beforeTextChanged(CharSequence s, int start, int count,
109 | int after) {
110 | // Nothing happens here
111 | }
112 | });
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/java/com/hastarin/android/udpsender/ui/bundle/BundleScrubber.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.hastarin.android.udpsender.ui.bundle;
14 |
15 | import android.content.Intent;
16 | import android.os.Bundle;
17 |
18 | /**
19 | * Helper class to scrub Bundles of invalid extras. This is a workaround for an Android bug:
20 | * .
21 | */
22 | public final class BundleScrubber
23 | {
24 |
25 | /**
26 | * Scrubs Intents for private serializable subclasses in the Intent extras. If the Intent's extras contain
27 | * a private serializable subclass, the Bundle is cleared. The Bundle will not be set to null. If the
28 | * Bundle is null, has no extras, or the extras do not contain a private serializable subclass, the Bundle
29 | * is not mutated.
30 | *
31 | * @param intent {@code Intent} to scrub. This parameter may be mutated if scrubbing is necessary. This
32 | * parameter may be null.
33 | * @return true if the Intent was scrubbed, false if the Intent was not modified.
34 | */
35 | public static boolean scrub(final Intent intent)
36 | {
37 | if (null == intent)
38 | {
39 | return false;
40 | }
41 |
42 | return scrub(intent.getExtras());
43 | }
44 |
45 | /**
46 | * Scrubs Bundles for private serializable subclasses in the extras. If the Bundle's extras contain a
47 | * private serializable subclass, the Bundle is cleared. If the Bundle is null, has no extras, or the
48 | * extras do not contain a private serializable subclass, the Bundle is not mutated.
49 | *
50 | * @param bundle {@code Bundle} to scrub. This parameter may be mutated if scrubbing is necessary. This
51 | * parameter may be null.
52 | * @return true if the Bundle was scrubbed, false if the Bundle was not modified.
53 | */
54 | public static boolean scrub(final Bundle bundle)
55 | {
56 | if (null == bundle)
57 | {
58 | return false;
59 | }
60 |
61 | /*
62 | * Note: This is a hack to work around a private serializable classloader attack
63 | */
64 | try
65 | {
66 | // if a private serializable exists, this will throw an exception
67 | bundle.containsKey(null);
68 | }
69 | catch (final Exception e)
70 | {
71 | bundle.clear();
72 | return true;
73 | }
74 |
75 | return false;
76 | }
77 | }
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-hdpi/ic_locale_plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-hdpi/ic_locale_plugin.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-ldpi/ic_local_plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-ldpi/ic_local_plugin.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-mdpi/ic_local_plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-mdpi/ic_local_plugin.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-xhdpi/ic_local_plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-xhdpi/ic_local_plugin.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/UDP Sender/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/layout-land/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
16 |
25 |
26 |
37 |
38 |
48 |
49 |
58 |
59 |
69 |
70 |
80 |
81 |
90 |
91 |
105 |
106 |
115 |
116 |
127 |
128 |
136 |
137 |
138 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/layout-large-land/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
16 |
25 |
26 |
37 |
38 |
48 |
49 |
58 |
59 |
68 |
69 |
80 |
81 |
90 |
91 |
101 |
102 |
103 |
112 |
113 |
123 |
124 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
16 |
25 |
26 |
37 |
38 |
48 |
49 |
58 |
59 |
73 |
74 |
83 |
84 |
95 |
96 |
106 |
107 |
117 |
118 |
126 |
127 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UDP Sender
5 | Settings
6 | Destination IP
7 | Port
8 | Text
9 | Hex
10 | If set Hex values are sent instead of Text
11 | 192.168.1.100
12 | Text to send -or-
13 | HEX values to send
14 | 50000
15 | Send
16 | SendToUri
17 | UDP Sender
18 |
19 |
--------------------------------------------------------------------------------
/UDP Sender/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/android-udpsender.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | }
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:0.9.+'
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Apr 27 08:08:05 EST 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/libraries/locale-api/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/libraries/locale-api/License.txt:
--------------------------------------------------------------------------------
1 | Copyright 2013 two forty four a.m. LLC
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
4 |
5 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
--------------------------------------------------------------------------------
/libraries/locale-api/Read Me.txt:
--------------------------------------------------------------------------------
1 | This is a library project for the Locale Developer API. For documentation on Android Library Projects, please visit .
--------------------------------------------------------------------------------
/libraries/locale-api/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | mavenCentral()
4 | }
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:0.9.+'
7 | }
8 | }
9 |
10 | apply plugin: 'android-library'
11 |
12 | dependencies {
13 | compile 'com.android.support:support-v4:+'
14 | }
15 |
16 | android {
17 | compileSdkVersion 19
18 | buildToolsVersion "19.0.3"
19 |
20 | defaultConfig {
21 | minSdkVersion 7
22 | targetSdkVersion 19
23 | }
24 |
25 | sourceSets {
26 | main {
27 | manifest.srcFile 'AndroidManifest.xml'
28 | java.srcDirs = ['src']
29 | resources.srcDirs = ['src']
30 | res.srcDirs = ['res']
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/R.txt:
--------------------------------------------------------------------------------
1 | int drawable twofortyfouram_locale_ic_menu_dontsave 0x7f020000
2 | int drawable twofortyfouram_locale_ic_menu_help 0x7f020001
3 | int drawable twofortyfouram_locale_ic_menu_save 0x7f020002
4 | int id twofortyfouram_locale_menu_dontsave 0x7f030000
5 | int id twofortyfouram_locale_menu_help 0x7f030001
6 | int id twofortyfouram_locale_menu_save 0x7f030002
7 | int integer twofortyfouram_locale_maximum_blurb_length 0x7f060000
8 | int menu twofortyfouram_locale_help_save_dontsave 0x7f070000
9 | int string twofortyfouram_locale_breadcrumb_format 0x7f040000
10 | int string twofortyfouram_locale_breadcrumb_separator 0x7f040001
11 | int string twofortyfouram_locale_menu_dontsave 0x7f040002
12 | int string twofortyfouram_locale_menu_help 0x7f040003
13 | int string twofortyfouram_locale_menu_save 0x7f040004
14 | int style MotorolaListViewHackStyle 0x7f050003
15 | int style Theme_Locale_Dark 0x7f050000
16 | int style Theme_Locale_Dialog 0x7f050001
17 | int style Theme_Locale_Light 0x7f050002
18 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/classes.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/classes.jar
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/debug/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable/twofortyfouram_locale_ic_menu_dontsave.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable/twofortyfouram_locale_ic_menu_help.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/drawable/twofortyfouram_locale_ic_menu_save.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
18 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/menu/twofortyfouram_locale_help_save_dontsave.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-cs/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Zrušit
10 | Nápověda
11 | Hotovo
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-de/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Abbrechen
10 | Hilfe
11 | Fertig
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-es/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Cancelar
10 | Ayuda
11 | Listo
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-fr/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Annuler
10 | Aide
11 | OK
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-hdpi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 60
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-it/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Annulla
10 | Aiuto
11 | Fine
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-ja/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | キャンセル
10 | ヘルプ
11 | 完了
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-ko/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | 취소
10 | 도움말
11 | 완료
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-ldpi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 45
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-mdpi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 50
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-nb/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Avbryt
10 | Hjelp
11 | Ferdig
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-nl/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Annuleren
10 | Help
11 | Gereed
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-pt-rBR/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Cancelar
10 | Ajuda
11 | Concluído
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-ru/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Отмена
10 | Помощь
11 | Готово
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-sv/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Avbryt
10 | Hjälp
11 | Klar
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-v11/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-v14/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-v9/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values-vi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Hủy
10 | Giúp đỡ
11 | Xong
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/debug/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | %1$s%2$s%3$s
14 | \u0020>\u0020
15 | Cancel
16 | Help
17 | Done
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/R.txt:
--------------------------------------------------------------------------------
1 | int drawable twofortyfouram_locale_ic_menu_dontsave 0x7f020000
2 | int drawable twofortyfouram_locale_ic_menu_help 0x7f020001
3 | int drawable twofortyfouram_locale_ic_menu_save 0x7f020002
4 | int id twofortyfouram_locale_menu_dontsave 0x7f030000
5 | int id twofortyfouram_locale_menu_help 0x7f030001
6 | int id twofortyfouram_locale_menu_save 0x7f030002
7 | int integer twofortyfouram_locale_maximum_blurb_length 0x7f060000
8 | int menu twofortyfouram_locale_help_save_dontsave 0x7f070000
9 | int string twofortyfouram_locale_breadcrumb_format 0x7f040000
10 | int string twofortyfouram_locale_breadcrumb_separator 0x7f040001
11 | int string twofortyfouram_locale_menu_dontsave 0x7f040002
12 | int string twofortyfouram_locale_menu_help 0x7f040003
13 | int string twofortyfouram_locale_menu_save 0x7f040004
14 | int style MotorolaListViewHackStyle 0x7f050003
15 | int style Theme_Locale_Dark 0x7f050000
16 | int style Theme_Locale_Dialog 0x7f050001
17 | int style Theme_Locale_Light 0x7f050002
18 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/classes.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/classes.jar
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-hdpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-ldpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-mdpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_dontsave.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_help.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/bundles/release/res/drawable-xhdpi-v14/twofortyfouram_locale_ic_menu_save.png
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable/twofortyfouram_locale_ic_menu_dontsave.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable/twofortyfouram_locale_ic_menu_help.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/drawable/twofortyfouram_locale_ic_menu_save.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
18 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/menu/twofortyfouram_locale_help_save_dontsave.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-cs/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Zrušit
10 | Nápověda
11 | Hotovo
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-de/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Abbrechen
10 | Hilfe
11 | Fertig
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-es/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Cancelar
10 | Ayuda
11 | Listo
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-fr/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Annuler
10 | Aide
11 | OK
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-hdpi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 60
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-it/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Annulla
10 | Aiuto
11 | Fine
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-ja/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | キャンセル
10 | ヘルプ
11 | 完了
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-ko/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | 취소
10 | 도움말
11 | 완료
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-ldpi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 45
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-mdpi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 50
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-nb/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Avbryt
10 | Hjelp
11 | Ferdig
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-nl/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Annuleren
10 | Help
11 | Gereed
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-pt-rBR/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Cancelar
10 | Ajuda
11 | Concluído
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-ru/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Отмена
10 | Помощь
11 | Готово
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-sv/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Avbryt
10 | Hjälp
11 | Klar
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-v11/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-v14/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-v9/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values-vi/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %1$s%2$s%3$s
8 | \u0020>\u0020
9 | Hủy
10 | Giúp đỡ
11 | Xong
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/bundles/release/res/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | %1$s%2$s%3$s
14 | \u0020>\u0020
15 | Cancel
16 | Help
17 | Done
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/incremental/aidl/debug/dependency.store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/incremental/aidl/release/dependency.store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/incremental/mergeAssets/debug/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/incremental/mergeAssets/release/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/libs/locale-api.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hastarin/android-udpsender/5bb2d45edddf95c6f89d4fda9fd07c1f3f80dd56/libraries/locale-api/build/libs/locale-api.aar
--------------------------------------------------------------------------------
/libraries/locale-api/build/source/buildConfig/debug/com/twofortyfouram/locale/api/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package com.twofortyfouram.locale.api;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = Boolean.parseBoolean("true");
8 | public static final String PACKAGE_NAME = "com.twofortyfouram.locale.api";
9 | public static final String BUILD_TYPE = "debug";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = -1;
12 | public static final String VERSION_NAME = "";
13 | }
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/source/buildConfig/release/com/twofortyfouram/locale/api/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package com.twofortyfouram.locale.api;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = false;
8 | public static final String PACKAGE_NAME = "com.twofortyfouram.locale.api";
9 | public static final String BUILD_TYPE = "release";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = -1;
12 | public static final String VERSION_NAME = "";
13 | }
14 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/source/r/debug/com/twofortyfouram/locale/api/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package com.twofortyfouram.locale.api;
9 |
10 | public final class R {
11 | public static final class attr {
12 | }
13 | public static final class drawable {
14 | public static int twofortyfouram_locale_ic_menu_dontsave=0x7f020000;
15 | public static int twofortyfouram_locale_ic_menu_help=0x7f020001;
16 | public static int twofortyfouram_locale_ic_menu_save=0x7f020002;
17 | }
18 | public static final class id {
19 | public static int twofortyfouram_locale_menu_dontsave=0x7f030000;
20 | public static int twofortyfouram_locale_menu_help=0x7f030001;
21 | public static int twofortyfouram_locale_menu_save=0x7f030002;
22 | }
23 | public static final class integer {
24 | public static int twofortyfouram_locale_maximum_blurb_length=0x7f060000;
25 | }
26 | public static final class menu {
27 | public static int twofortyfouram_locale_help_save_dontsave=0x7f070000;
28 | }
29 | public static final class string {
30 | public static int twofortyfouram_locale_breadcrumb_format=0x7f040000;
31 | public static int twofortyfouram_locale_breadcrumb_separator=0x7f040001;
32 | public static int twofortyfouram_locale_menu_dontsave=0x7f040002;
33 | public static int twofortyfouram_locale_menu_help=0x7f040003;
34 | public static int twofortyfouram_locale_menu_save=0x7f040004;
35 | }
36 | public static final class style {
37 | public static int MotorolaListViewHackStyle=0x7f050003;
38 | public static int Theme_Locale_Dark=0x7f050000;
39 | public static int Theme_Locale_Dialog=0x7f050001;
40 | public static int Theme_Locale_Light=0x7f050002;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/source/r/release/com/twofortyfouram/locale/api/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package com.twofortyfouram.locale.api;
9 |
10 | public final class R {
11 | public static final class attr {
12 | }
13 | public static final class drawable {
14 | public static int twofortyfouram_locale_ic_menu_dontsave=0x7f020000;
15 | public static int twofortyfouram_locale_ic_menu_help=0x7f020001;
16 | public static int twofortyfouram_locale_ic_menu_save=0x7f020002;
17 | }
18 | public static final class id {
19 | public static int twofortyfouram_locale_menu_dontsave=0x7f030000;
20 | public static int twofortyfouram_locale_menu_help=0x7f030001;
21 | public static int twofortyfouram_locale_menu_save=0x7f030002;
22 | }
23 | public static final class integer {
24 | public static int twofortyfouram_locale_maximum_blurb_length=0x7f060000;
25 | }
26 | public static final class menu {
27 | public static int twofortyfouram_locale_help_save_dontsave=0x7f070000;
28 | }
29 | public static final class string {
30 | public static int twofortyfouram_locale_breadcrumb_format=0x7f040000;
31 | public static int twofortyfouram_locale_breadcrumb_separator=0x7f040001;
32 | public static int twofortyfouram_locale_menu_dontsave=0x7f040002;
33 | public static int twofortyfouram_locale_menu_help=0x7f040003;
34 | public static int twofortyfouram_locale_menu_save=0x7f040004;
35 | }
36 | public static final class style {
37 | public static int MotorolaListViewHackStyle=0x7f050003;
38 | public static int Theme_Locale_Dark=0x7f050000;
39 | public static int Theme_Locale_Dialog=0x7f050001;
40 | public static int Theme_Locale_Light=0x7f050002;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/tmp/packageDebugJar/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 |
3 |
--------------------------------------------------------------------------------
/libraries/locale-api/build/tmp/packageReleaseJar/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 |
3 |
--------------------------------------------------------------------------------
/libraries/locale-api/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/libraries/locale-api/locale-api.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
24 | * This class cannot be instantiated.
25 | */
26 | public final class BreadCrumber
27 | {
28 | /**
29 | * Static helper method to generate bread crumbs. Bread crumb strings will be properly formatted for the
30 | * current language, including right-to-left languages, as long as the proper
31 | * {@link com.twofortyfouram.locale.platform.R.string#twofortyfouram_locale_breadcrumb_format} string
32 | * resources have been created.
33 | *
34 | * @param context {@code Context} for loading platform resources. Cannot be null.
35 | * @param intent {@code Intent} to extract the bread crumb from.
36 | * @param currentCrumb The last element of the bread crumb path.
37 | * @return {@code String} presentation of the bread crumb. If the intent parameter is null, then this
38 | * method returns currentCrumb. If currentCrumb is null, then this method returns the empty string
39 | * "". If intent contains a private Serializable instances as an extra, then this method returns
40 | * the empty string "".
41 | * @throws IllegalArgumentException if {@code context} is null.
42 | */
43 | public static CharSequence generateBreadcrumb(final Context context, final Intent intent,
44 | final String currentCrumb)
45 | {
46 | if (null == context)
47 | {
48 | throw new IllegalArgumentException("context cannot be null"); //$NON-NLS-1$
49 | }
50 |
51 | try
52 | {
53 | if (null == currentCrumb)
54 | {
55 | Log.w(Constants.LOG_TAG, "currentCrumb cannot be null"); //$NON-NLS-1$
56 | return ""; //$NON-NLS-1$
57 | }
58 | if (null == intent)
59 | {
60 | Log.w(Constants.LOG_TAG, "intent cannot be null"); //$NON-NLS-1$
61 | return currentCrumb;
62 | }
63 |
64 | /*
65 | * Note: this is vulnerable to a private serializable attack, but the try-catch will solve that.
66 | */
67 | final String breadcrumbString = intent.getStringExtra(com.twofortyfouram.locale.Intent.EXTRA_STRING_BREADCRUMB);
68 | if (null != breadcrumbString)
69 | {
70 | return context.getString(R.string.twofortyfouram_locale_breadcrumb_format, breadcrumbString, context.getString(R.string.twofortyfouram_locale_breadcrumb_separator), currentCrumb);
71 | }
72 | return currentCrumb;
73 | }
74 | catch (final Exception e)
75 | {
76 | Log.e(Constants.LOG_TAG, "Encountered error generating breadcrumb", e); //$NON-NLS-1$
77 | return ""; //$NON-NLS-1$
78 | }
79 | }
80 |
81 | /**
82 | * Private constructor prevents instantiation.
83 | *
84 | * @throws UnsupportedOperationException because this class cannot be instantiated.
85 | */
86 | private BreadCrumber()
87 | {
88 | throw new UnsupportedOperationException("This class is non-instantiable"); //$NON-NLS-1$
89 | }
90 | }
--------------------------------------------------------------------------------
/libraries/locale-api/src/com/twofortyfouram/locale/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.twofortyfouram.locale;
14 |
15 | /**
16 | * Utility class containing constants for the Locale Developer Platform.
17 | */
18 | /*
19 | * This class is NOT part of the public API.
20 | */
21 | /* package */final class Constants
22 | {
23 | /**
24 | * Log tag for logcat messages generated by the Locale Developer Platform
25 | */
26 | /*
27 | * This is NOT a public API. Third party apps should NOT use this log tag for their own log messages.
28 | */
29 | /* package */static final String LOG_TAG = "LocaleApiLibrary"; //$NON-NLS-1$
30 |
31 | /**
32 | * String package name for Locale.
33 | */
34 | /*
35 | * This is NOT a public API. Third parties should NOT rely on this being the only package name for Locale.
36 | */
37 | /* package */static final String LOCALE_PACKAGE = "com.twofortyfouram.locale"; //$NON-NLS-1$
38 |
39 | /**
40 | * Private constructor prevents instantiation
41 | *
42 | * @throws UnsupportedOperationException because this class cannot be instantiated.
43 | */
44 | private Constants()
45 | {
46 | throw new UnsupportedOperationException("This class is non-instantiable"); //$NON-NLS-1$
47 | }
48 | }
--------------------------------------------------------------------------------
/libraries/locale-api/src/com/twofortyfouram/locale/PackageUtilities.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.twofortyfouram.locale;
14 |
15 | import android.content.pm.PackageInfo;
16 | import android.content.pm.PackageManager;
17 |
18 | import java.util.Collections;
19 | import java.util.HashSet;
20 | import java.util.List;
21 | import java.util.Set;
22 |
23 | /**
24 | * A simple utility class to find a package that is compatible with hosting the Locale Developer Platform.
25 | */
26 | /*
27 | * This class is NOT part of the public Locale Developer Platform API
28 | */
29 | public final class PackageUtilities
30 | {
31 | /**
32 | * A hard-coded set of Android packages that support the Locale Developer Platform.
33 | */
34 | /*
35 | * This is NOT a public field and is subject to change in future releases of the Developer Platform. A
36 | * conscious design decision was made to use hard-coded package names, rather than dynamic discovery of
37 | * packages that might be compatible with hosting the Locale Developer Platform API. This is for two
38 | * reasons: to ensure the host is implemented correctly (hosts must pass the extensive Locale Platform
39 | * Host compatibility test suite) and to prevent malicious applications from crashing plug-ins by
40 | * providing bad values. As additional apps implement the Locale Developer Platform, their package names
41 | * will also be added to this list.
42 | */
43 | /*
44 | * Note: this is implemented as a Set rather than a String[], in order to enforce immutability.
45 | */
46 | private static final Set COMPATIBLE_PACKAGES = constructPackageSet();
47 |
48 | /**
49 | * @return a list wrapped in {@link Collections#unmodifiableList(List)} that represents the set of
50 | * Locale-compatible packages.
51 | */
52 | private static Set constructPackageSet()
53 | {
54 | final HashSet packages = new HashSet();
55 |
56 | packages.add(Constants.LOCALE_PACKAGE);
57 |
58 | /*
59 | * Note: Tasker is not 100% compatible with Locale's plug-in API, but it is close enough that these
60 | * packages are enabled. Tasker's known incompatibilities are documented on the Tasker website.
61 | */
62 | packages.add("net.dinglisch.android.taskerm"); //$NON-NLS-1$
63 | packages.add("net.dinglisch.android.tasker"); //$NON-NLS-1$
64 | packages.add("net.dinglisch.android.taskercupcake"); //$NON-NLS-1$
65 |
66 | return Collections.unmodifiableSet(packages);
67 | }
68 |
69 | /**
70 | * Obtains the {@code String} package name of a currently-installed package which implements the host
71 | * component of the Locale Developer Platform.
72 | *
73 | * Note: A TOCTOU error exists, due to the fact that the package could be uninstalled at any time.
74 | *
75 | * Note: If there are multiple hosts, this method will return one of them. The interface of this method
76 | * makes no guarantee which host will returned, nor whether that host will be consistently returned.
77 | *
78 | * @param manager an instance of {@code PackageManager}. Cannot be null.
79 | * @param packageHint hint as to which package should take precedence. This parameter may be null.
80 | * @return {@code String} package name of a host for the Locale Developer Platform, such as
81 | * "com.twofortyfouram.locale". If no such package is found, returns null.
82 | */
83 | public static String getCompatiblePackage(final PackageManager manager, final String packageHint)
84 | {
85 | /*
86 | * The interface for this method makes no guarantees as to which host will be returned. However the
87 | * implementation is more predictable.
88 | */
89 |
90 | final List installedPackages = manager.getInstalledPackages(0);
91 |
92 | if (COMPATIBLE_PACKAGES.contains(packageHint))
93 | {
94 | for (final PackageInfo packageInfo : installedPackages)
95 | {
96 | final String temp = packageInfo.packageName;
97 | if (packageHint.equals(temp))
98 | {
99 | return temp;
100 | }
101 | }
102 | }
103 |
104 | for (final String compatiblePackageName : COMPATIBLE_PACKAGES)
105 | {
106 | if (compatiblePackageName.equals(packageHint))
107 | {
108 | continue;
109 | }
110 |
111 | for (final PackageInfo packageInfo : installedPackages)
112 | {
113 | final String temp = packageInfo.packageName;
114 | if (compatiblePackageName.equals(temp))
115 | {
116 | return temp;
117 | }
118 | }
119 | }
120 |
121 | return null;
122 | }
123 | }
--------------------------------------------------------------------------------
/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':UDP Sender'
2 | include ':libraries:locale-api'
3 |
--------------------------------------------------------------------------------