Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kenumir committed Oct 1, 2016
1 parent d19664a commit fe2476b
Show file tree
Hide file tree
Showing 147 changed files with 6,191 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ out/

# Gradle files
.gradle/
gradle
build/

# Local configuration file (sdk path, etc)
Expand All @@ -34,7 +35,10 @@ captures/

# Intellij
*.iml
.idea/workspace.xml
.idea

#work files
_work

# Keystore files
*.jks
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# Pinger
A graphic overlay on the system command `ping`. Android application.

<a href="https://play.google.com/store/apps/details?id=com.wt.pinger" target="_blank">
<img alt="Get it on Google Play"
src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="60"/>
</a>


![Screenshot1](https://raw.githubusercontent.com/kenumir/Pinger/master/screens/scr1.webp)
![Screenshot2](https://raw.githubusercontent.com/kenumir/Pinger/master/screens/scr2.webp)
![Screenshot3](https://raw.githubusercontent.com/kenumir/Pinger/master/screens/scr3.webp)
![Screenshot4](https://raw.githubusercontent.com/kenumir/Pinger/master/screens/scr4.webp)
2 changes: 2 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
fabric.properties
39 changes: 39 additions & 0 deletions app/android.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# android
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

# for native methods
-keepclasseswithmembernames class * {
native <methods>;
}

# component constructors
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

# activity
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

# parcelables
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

# enums
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
119 changes: 119 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}

dependencies {
//noinspection GradleDynamicVersion
classpath 'io.fabric.tools:gradle:1.+'
}
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"

defaultConfig {
applicationId "com.wt.pinger"
minSdkVersion 14
targetSdkVersion 24
versionCode 54
versionName "3.0.1"

resConfigs "en", "pl"
vectorDrawables.useSupportLibrary = true

buildConfigField "long", "APP_BUILD_TIMESTAMP", System.currentTimeMillis() + "L"

Properties props = new Properties()
props.load(new FileInputStream("local.properties"))

buildConfigField "boolean", "BUILD_FLAG_USE_API", "true"
buildConfigField "String", "API_BASE_URL", props.get('API_BASE_URL', '')
buildConfigField "String", "API_SECRET", props.get('API_SECRET', '')
buildConfigField "String", "SUPPORT_URL", props.get('SUPPORT_URL', '')
}

aaptOptions {
cruncherEnabled = false
}

signingConfigs {
debug {
// ignore keystore etc
return void
}
release {
storeFile file("../_work/sign/pinger_keystore.jks")
keyAlias "kenumir"
storePassword "pLfcLNqCCaQSnVFqeMZdCKJxXliTNrABQ0ugVXKOlabXOhsuMO1"
keyPassword "BY6OrKpRylOhRxKwMdVDyukhqnAyYdkOCqxbHaSUeSypnAmHde22"
}
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro',
'otto.pro',
'retrofit.pro',
'okio.pro',
'crashlytics.pro',
'support_design.pro',
'support_v7.pro',
'android.pro'
signingConfig signingConfigs.release
applicationVariants.all { variant ->
variant.outputs.each { output ->
//noinspection GroovyAssignabilityCheck
output.outputFile = new File(output.outputFile.parent, "Pinger-3-" + variant.buildType.name + "-" + defaultConfig.versionName + " [" + defaultConfig.versionCode + "].apk")
}
}
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

repositories {
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

def supportLibVersion = "24.1.1"

compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:recyclerview-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:cardview-v7:${supportLibVersion}"


compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true }
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.aurelhubert:ahbottomnavigation:1.4.0'
compile 'com.github.anrwatchdog:anrwatchdog:1.3.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.afollestad.material-dialogs:core:0.9.0.1'

// hivedi
compile 'com.github.Hivedi:Console:1.0.2'
compile 'com.github.Hivedi:QueryBuilder:1.0.2'
compile 'com.github.Hivedi:ErrorReportAdapter:2.1.0'
}
2 changes: 2 additions & 0 deletions app/crashlytics.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
1 change: 1 addition & 0 deletions app/okio.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-dontwarn okio.**
5 changes: 5 additions & 0 deletions app/otto.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-keepattributes *Annotation*
-keepclassmembers class ** {
@com.squareup.otto.Subscribe public *;
@com.squareup.otto.Produce public *;
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\Android\sdk_studio/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keep class com.wt.pinger.proto.** { *; }
-keep class com.wt.pinger.providers.data.** { *; }
-keep class com.wt.pinger.data.api.** { *; }
-keep class com.wt.pinger.data.api.NewsUser { *; }
10 changes: 10 additions & 0 deletions app/retrofit.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Platform calls Class.forName on types which do not exist on Android to determine platform.
-dontnote retrofit2.Platform
# Platform used when running on RoboVM on iOS. Will not be used at runtime.
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
# Platform used when running on Java 8 VMs. Will not be used at runtime.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
13 changes: 13 additions & 0 deletions app/src/androidTest/java/com/wt/pinger/ApplicationTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.wt.pinger;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
76 changes: 76 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.wt.pinger"
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:name=".App"
android:allowBackup="true"
android:fullBackupContent="@xml/backup"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<!-- meta -->
<meta-data
android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAIn-bFOypPMHP70jra_GECNtCfcu1HWfQ5LpvfZg"/>


<!-- Activity -->
<activity
android:name=".activity.StartActivity"
android:theme="@style/StartTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustNothing"/>
<activity
android:name=".activity.PingActivity"
android:label="@string/app_name"/>

<!-- service -->
<service
android:name=".service.CmdService"
android:enabled="true"
android:exported="false"/>
<service
android:name=".service.PingService"
android:enabled="true"
android:exported="false" />

<!-- provider -->
<provider
android:name=".providers.NetworkInfoProvider"
android:authorities="com.wt.pinger.providers.networkinfo"
android:enabled="true"
android:exported="false"/>
<provider
android:name=".providers.CmdContentProvider"
android:authorities="com.wt.pinger.providers.cmd"
android:enabled="true"
android:exported="false"/>
<provider
android:name=".providers.PingContentProvider"
android:authorities="com.wt.pinger.providers.ping"
android:enabled="true"
android:exported="false"/>
<provider
android:name=".providers.DbContentProvider"
android:authorities="com.wt.pinger.providers.db"
android:enabled="true"
android:exported="false" />

</application>

</manifest>
Loading

0 comments on commit fe2476b

Please sign in to comment.