-
-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
weihuagu
committed
Mar 28, 2019
1 parent
eaf626a
commit fa0ee85
Showing
13 changed files
with
429 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apply plugin: 'com.android.application' | ||
android { | ||
compileSdkVersion 27 | ||
defaultConfig { | ||
applicationId "com.weihuagu.receiptnotice" | ||
minSdkVersion 19 | ||
targetSdkVersion 25 | ||
versionCode 4 | ||
versionName "0.4" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
|
||
signingConfigs{ | ||
debug { | ||
|
||
} | ||
release { | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
|
||
} | ||
release { | ||
} | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'com.android.support:appcompat-v7:27.0.2' | ||
implementation 'com.android.support:design:27.0.2' | ||
implementation 'com.android.support.constraint:constraint-layout:1.0.2' | ||
implementation 'com.squareup.okhttp3:okhttp:3.11.0' | ||
implementation 'com.github.wangjintao:TLog:v1.0.1' | ||
implementation 'com.github.pedrovgs:lynx:1.1.0' | ||
implementation 'com.gcssloop.util:encrypt:1.0.2' | ||
testImplementation 'junit:junit:4.12' | ||
testImplementation "org.mockito:mockito-core:1.10.19" | ||
androidTestImplementation 'com.android.support.test:runner:1.0.1' | ||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.weihuagu.receiptnotice"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<application | ||
android:name=".MainApplication" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".LogActivity"> | ||
</activity> | ||
<activity android:name="com.github.pedrovgs.lynx.LynxActivity"/> | ||
<activity android:name=".PreferenceActivity"/> | ||
|
||
<service android:name=".NLService" | ||
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> | ||
<intent-filter> | ||
<action android:name="android.service.notification.NotificationListenerService" /> | ||
</intent-filter> | ||
</service> | ||
<service android:name=".NotificationCollectorMonitorService"/> | ||
</application> | ||
</manifest> |
58 changes: 0 additions & 58 deletions
58
app/src/main/java/com/weihuagu/receiptnotice/DESUtilWithIV.java~
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
app/src/main/java/com/weihuagu/receiptnotice/IllustrateDecryptActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.weihuagu.receiptnotice; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.widget.TextView; | ||
|
||
public class IllustrateDecryptActivity extends AppCompatActivity { | ||
private TextView text_method; | ||
private TextView text_passwd; | ||
private TextView text_iv; | ||
private PreferenceUtil preference; | ||
private void initView() { | ||
text_method = (TextView) findViewById(R.id.info_text_method); | ||
text_passwd = (TextView) findViewById(R.id.info_text_passwd); | ||
text_iv = (TextView) findViewById(R.id.info_text_iv); | ||
preference=new PreferenceUtil(getBaseContext()); | ||
|
||
} | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_illustratedecrypt); | ||
initView(); | ||
setText(); | ||
} | ||
|
||
private void setText(){ | ||
String encrypt_type=preference.getEncryptMethod(); | ||
if(encrypt_type==null) | ||
text_method.setText("您没有设置加密方法"); | ||
if(encrypt_type.equals("des")){ | ||
|
||
String method="DES/CBC/PKCS5Padding"; | ||
text_method.setText("解密的方法为:"+method); | ||
String key=preference.getPasswd(); | ||
if(key!=null){ | ||
text_passwd.setText("解密秘钥为:"+key+"(des秘钥必须为8位,如果你设置的不是8位,请修改)"); | ||
text_iv.setText("解密的初始化向量为:"+key); | ||
|
||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
app/src/main/java/com/weihuagu/receiptnotice/IllustrateDecryptActivity.java~
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.weihuagu.receiptnotice; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.widget.TextView; | ||
|
||
public class IllustrateDecryptActivity extends AppCompatActivity { | ||
private TextView text_method; | ||
private TextView text_passwd; | ||
private TextView text_iv; | ||
private PreferenceUtil preference; | ||
private void initView() { | ||
text_method = (TextView) findViewById(R.id.info_text_method); | ||
text_passwd = (TextView) findViewById(R.id.info_text_passwd); | ||
text_iv = (TextView) findViewById(R.id.info_text_iv); | ||
preference=new PreferenceUtil(getBaseContext()); | ||
|
||
} | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_illustratedecrypt.xml); | ||
initView(); | ||
setText(); | ||
} | ||
|
||
private void setText(){ | ||
if(preference.getEncryptMethod().equals("des")){ | ||
|
||
String method="DES/CBC/PKCS5Padding"; | ||
text_method.setText("解密的方法为:"+method); | ||
String key=preference.getPasswd(); | ||
if(key!=null){ | ||
text_passwd.setText("解密秘钥为:"+key); | ||
text_iv.setText("解密的初始化向量为:"+key); | ||
|
||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context="com.weihuagu.receiptnotice.MainActivity"> | ||
<android.support.v7.widget.Toolbar | ||
android:id="@+id/my_toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="?attr/colorPrimary" | ||
android:elevation="4dp" | ||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"/> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/my_toolbar" | ||
android:orientation="vertical"> | ||
<android.support.v7.widget.CardView | ||
xmlns:card_view="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/card_view" | ||
android:layout_gravity="center" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
card_view:cardCornerRadius="4dp"> | ||
|
||
<TextView | ||
android:id="@+id/info_text_method" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
</android.support.v7.widget.CardView> | ||
|
||
<android.support.v7.widget.CardView | ||
xmlns:card_view="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/card_view" | ||
android:layout_gravity="center" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
card_view:cardCornerRadius="4dp"> | ||
|
||
<TextView | ||
android:id="@+id/info_text_passwd" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
</android.support.v7.widget.CardView> | ||
|
||
<android.support.v7.widget.CardView | ||
xmlns:card_view="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/card_view" | ||
android:layout_gravity="center" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
card_view:cardCornerRadius="4dp"> | ||
|
||
<TextView | ||
android:id="@+id/info_text_iv" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
</android.support.v7.widget.CardView> | ||
|
||
</LinearLayout> | ||
|
||
|
||
|
||
</android.support.constraint.ConstraintLayout> |
Oops, something went wrong.