├── Devnull ├── .gitignore ├── src │ └── main │ │ ├── ic_launcher-web.png │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── styles.xml │ │ │ ├── dimens.xml │ │ │ └── strings.xml │ │ ├── layout │ │ │ ├── main_activity.xml │ │ │ ├── progress_dialog_fragment.xml │ │ │ └── main_fragment.xml │ │ └── values-w820dp │ │ │ └── dimens.xml │ │ ├── java │ │ └── com │ │ │ └── artemzin │ │ │ └── android │ │ │ └── dev_null │ │ │ ├── api │ │ │ ├── network │ │ │ │ ├── NetworkException.java │ │ │ │ └── NetworkRequest.java │ │ │ ├── dev_null │ │ │ │ └── DevNullApi.java │ │ │ └── Util.java │ │ │ ├── util │ │ │ ├── ActivityUtil.java │ │ │ ├── ThreadUtil.java │ │ │ ├── StringUtil.java │ │ │ └── TextValidator.java │ │ │ ├── activity │ │ │ └── MainActivity.java │ │ │ └── fragment │ │ │ ├── ProgressDialogFragment.java │ │ │ └── MainFragment.java │ │ └── AndroidManifest.xml └── build.gradle ├── settings.gradle ├── Devnull.apk ├── .gitignore ├── README.md └── LICENSE /Devnull/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':Devnull' 2 | -------------------------------------------------------------------------------- /Devnull.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artem-zinnatullin/dev-null-android/HEAD/Devnull.apk -------------------------------------------------------------------------------- /Devnull/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artem-zinnatullin/dev-null-android/HEAD/Devnull/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /Devnull/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artem-zinnatullin/dev-null-android/HEAD/Devnull/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Devnull/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artem-zinnatullin/dev-null-android/HEAD/Devnull/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Devnull/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artem-zinnatullin/dev-null-android/HEAD/Devnull/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Devnull/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/artem-zinnatullin/dev-null-android/HEAD/Devnull/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Devnull/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Devnull/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 7 | -------------------------------------------------------------------------------- /Devnull/src/main/java/com/artemzin/android/dev_null/api/network/NetworkException.java: -------------------------------------------------------------------------------- 1 | package com.artemzin.android.dev_null.api.network; 2 | 3 | /** 4 | * @author Artem Zinnatullin [artem.zinnatullin@gmail.com] 5 | */ 6 | public class NetworkException extends Exception { 7 | 8 | public NetworkException(String message) { 9 | super(message); 10 | } 11 | } -------------------------------------------------------------------------------- /Devnull/src/main/res/layout/main_activity.xml: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /Devnull/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | # *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | target/ 16 | 17 | # Local configuration file (sdk path, etc) 18 | local.properties 19 | 20 | # Eclipse project files 21 | .classpath 22 | .project 23 | 24 | # Idea IDE files 25 | *.idea/ 26 | *.iml 27 | 28 | .gradle/ 29 | gradle/ 30 | gradlew 31 | gradlew.bat -------------------------------------------------------------------------------- /Devnull/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenCentral() 4 | } 5 | dependencies { 6 | classpath 'com.android.tools.build:gradle:0.6.+' 7 | } 8 | } 9 | apply plugin: 'android' 10 | 11 | repositories { 12 | mavenCentral() 13 | } 14 | 15 | android { 16 | compileSdkVersion 18 17 | buildToolsVersion "18.1.0" 18 | 19 | defaultConfig { 20 | minSdkVersion 14 21 | targetSdkVersion 18 22 | } 23 | } 24 | 25 | dependencies { 26 | } 27 | -------------------------------------------------------------------------------- /Devnull/src/main/java/com/artemzin/android/dev_null/util/ActivityUtil.java: -------------------------------------------------------------------------------- 1 | package com.artemzin.android.dev_null.util; 2 | 3 | import android.app.Activity; 4 | import android.view.inputmethod.InputMethodManager; 5 | 6 | public class ActivityUtil { 7 | 8 | private ActivityUtil() {} 9 | 10 | public static void hideSoftKeyboard(Activity activity) { 11 | try { 12 | ((InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE)) 13 | .hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0); 14 | } catch (Exception e) { 15 | // do nothing 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Devnull/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dev null 5 | NULL IT! 6 | Settings 7 | Null 8 | 9 | Enter text to null it! 10 | 11 | Nulling your data… 12 | Your data was nulled successfully! 13 | Can not null your data, network problem 14 | 15 | 16 | -------------------------------------------------------------------------------- /Devnull/src/main/java/com/artemzin/android/dev_null/api/dev_null/DevNullApi.java: -------------------------------------------------------------------------------- 1 | package com.artemzin.android.dev_null.api.dev_null; 2 | 3 | import com.artemzin.android.dev_null.api.network.NetworkException; 4 | import com.artemzin.android.dev_null.api.network.NetworkRequest; 5 | 6 | public class DevNullApi { 7 | 8 | private static final String BASE_URL = "http://devnull-as-a-service.com/"; 9 | 10 | private DevNullApi() {} 11 | 12 | /** 13 | * F*ck, null() is deprecated method name in Java! 14 | * @return 15 | */ 16 | public static String nullIt(String text) throws NetworkException { 17 | return NetworkRequest.newPostRequestInstance(BASE_URL + "dev/null", text).getResponse(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Devnull/src/main/java/com/artemzin/android/dev_null/activity/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.artemzin.android.dev_null.activity; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | 6 | import com.artemzin.android.dev_null.R; 7 | import com.artemzin.android.dev_null.fragment.MainFragment; 8 | 9 | public class MainActivity extends Activity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.main_activity); 15 | 16 | if (savedInstanceState == null) { 17 | getFragmentManager().beginTransaction() 18 | .add(R.id.container, new MainFragment()) 19 | .commit(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ###Dev null as Service comes to android! 2 | 3 | #####What is Dev-Null-As-Service? Here is the link: http://devnull-as-a-service.com/home/ 4 | 5 | You can download Devnull.apk from repo or build it from sources and enjoy nulling texts from your android! You can use share intent for it! 6 | 7 | ####Screenshots: 8 | 9 | 10 |   11 | 12 | 13 | 14 |   15 | 16 | -------------------------------------------------------------------------------- /Devnull/src/main/res/layout/progress_dialog_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 | 23 | 24 | -------------------------------------------------------------------------------- /Devnull/src/main/java/com/artemzin/android/dev_null/util/ThreadUtil.java: -------------------------------------------------------------------------------- 1 | package com.artemzin.android.dev_null.util; 2 | 3 | import android.os.SystemClock; 4 | 5 | public class ThreadUtil { 6 | 7 | private ThreadUtil() {} 8 | 9 | /** 10 | * If action happens faster then required it will call sleep for the thread 11 | * Usefully for better user experience from UI 12 | * @param startTimeInMillis please use SystemClock.elapsedRealtime() to prevent bug when user changing datetime in system 13 | * @param minDurationInMillis action's minimal required duration in millis 14 | */ 15 | public static void sleepIfRequired(long startTimeInMillis, long minDurationInMillis) { 16 | final long realDurationInMillis = SystemClock.elapsedRealtime() - startTimeInMillis; 17 | 18 | if (realDurationInMillis < minDurationInMillis - 100) { 19 | SystemClock.sleep(minDurationInMillis - realDurationInMillis); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Artem 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Devnull/src/main/java/com/artemzin/android/dev_null/api/Util.java: -------------------------------------------------------------------------------- 1 | package com.artemzin.android.dev_null.api; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.InputStreamReader; 6 | import java.io.StringWriter; 7 | 8 | public class Util { 9 | 10 | private Util() {} 11 | 12 | /** 13 | * Converting input stream content to string 14 | * @param is input stream to convert 15 | * @return String with stream content 16 | * @throws java.io.IOException if problems with reading input stream 17 | */ 18 | public static String convertStreamToString(InputStream is) throws IOException { 19 | InputStreamReader r = new InputStreamReader(is); 20 | StringWriter sw = new StringWriter(); 21 | char[] buffer = new char[1024]; 22 | try { 23 | for (int n; (n = r.read(buffer)) != -1;) 24 | sw.write(buffer, 0, n); 25 | } 26 | finally{ 27 | try { 28 | is.close(); 29 | } catch (IOException e1) { 30 | e1.printStackTrace(); 31 | } 32 | } 33 | return sw.toString(); 34 | } 35 | } -------------------------------------------------------------------------------- /Devnull/src/main/res/layout/main_fragment.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 | 21 | 22 | 27 | 28 |