update doc
This commit is contained in:
@@ -22,4 +22,4 @@ Android 4.0.3 及以上版本均可使用。
|
|||||||
|
|
||||||
## 联系
|
## 联系
|
||||||
|
|
||||||
有问题欢迎进群反馈,官方QQ群:42805407。
|
有问题欢迎进群反馈,官方QQ群:793015219。
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.host900.goproxy">
|
package="com.host900.goproxy">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
|
||||||
@@ -15,7 +16,8 @@
|
|||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
@@ -23,14 +25,14 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<!-- <service-->
|
<!-- <service-->
|
||||||
<!-- android:name=".GPService1"-->
|
<!-- android:name=".GPService1"-->
|
||||||
<!-- android:label="@string/app_name"-->
|
<!-- android:label="@string/app_name"-->
|
||||||
<!-- android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">-->
|
<!-- android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">-->
|
||||||
<!-- <intent-filter>-->
|
<!-- <intent-filter>-->
|
||||||
<!-- <action android:name="android.service.notification.NotificationListenerService" />-->
|
<!-- <action android:name="android.service.notification.NotificationListenerService" />-->
|
||||||
<!-- </intent-filter>-->
|
<!-- </intent-filter>-->
|
||||||
<!-- </service>-->
|
<!-- </service>-->
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import snail007.proxysdk.Proxysdk;
|
|||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
|
||||||
String TAG = "HomeFragment";
|
String TAG = "HomeFragment";
|
||||||
String serviceID = "srv";
|
String serviceID = "srv";
|
||||||
int log_line_cnt = 0;
|
int log_line_cnt = 0;
|
||||||
@@ -77,7 +78,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData mClipData = ClipData.newPlainText("ip", ((TextView)view).getText());
|
ClipData mClipData = ClipData.newPlainText("ip", ((TextView)view).getText());
|
||||||
cm.setPrimaryClip(mClipData);
|
cm.setPrimaryClip(mClipData);
|
||||||
Toast.makeText(view.getContext(), "IP已经复制", Toast.LENGTH_LONG).show();
|
Toast.makeText(view.getContext(), R.string.ip_copied, Toast.LENGTH_LONG).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -87,7 +88,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData mClipData = ClipData.newPlainText("qq", ((TextView)view).getText());
|
ClipData mClipData = ClipData.newPlainText("qq", ((TextView)view).getText());
|
||||||
cm.setPrimaryClip(mClipData);
|
cm.setPrimaryClip(mClipData);
|
||||||
Toast.makeText(view.getContext(), "QQ群号码已复制", Toast.LENGTH_LONG).show();
|
Toast.makeText(view.getContext(), R.string.qqcopied, Toast.LENGTH_LONG).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -95,8 +96,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
viewManual.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); //下划线
|
viewManual.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); //下划线
|
||||||
viewManual.getPaint().setAntiAlias(true);//抗锯齿
|
viewManual.getPaint().setAntiAlias(true);//抗锯齿
|
||||||
|
|
||||||
getSupportActionBar().setTitle("全能代理服务器");
|
getSupportActionBar().setTitle(getString(R.string.apptitle));
|
||||||
tip.setText("由 snail007/goproxy SDK " + sdkVersion + " 强力驱动!");
|
tip.setText(getString(R.string.hint0) + sdkVersion + getString(R.string.hint1));
|
||||||
ipaddrs.setText(getIpAddress(getBaseContext()));
|
ipaddrs.setText(getIpAddress(getBaseContext()));
|
||||||
|
|
||||||
joinQQ.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); //下划线
|
joinQQ.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); //下划线
|
||||||
@@ -119,7 +120,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Proxysdk.stop((serviceID));
|
Proxysdk.stop((serviceID));
|
||||||
editText.setEnabled(true);
|
editText.setEnabled(true);
|
||||||
status.setText("已停止");
|
status.setText(R.string.stopped);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -134,7 +135,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
args = args.substring(5);
|
args = args.substring(5);
|
||||||
}
|
}
|
||||||
if (args.replaceAll("\n","").length() == 0) {
|
if (args.replaceAll("\n","").length() == 0) {
|
||||||
Toast.makeText(ctx, "参数不能为空", Toast.LENGTH_LONG).show();
|
Toast.makeText(ctx, R.string.argsisempty, Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String err = Proxysdk.startWithLog(serviceID, args, "", new LogCallback() {
|
String err = Proxysdk.startWithLog(serviceID, args, "", new LogCallback() {
|
||||||
@@ -150,7 +151,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
if (!err.isEmpty()) {
|
if (!err.isEmpty()) {
|
||||||
Toast.makeText(ctx, err, Toast.LENGTH_LONG).show();
|
Toast.makeText(ctx, err, Toast.LENGTH_LONG).show();
|
||||||
// Log.d(TAG, err);
|
// Log.d(TAG, err);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
editText.setEnabled(false);
|
editText.setEnabled(false);
|
||||||
status.setText("运行中");
|
status.setText("运行中");
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:autoLink="none"
|
android:autoLink="none"
|
||||||
android:text="42805407"
|
android:text="793015219"
|
||||||
android:textColor="#F00"
|
android:textColor="#F00"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,11 @@
|
|||||||
<string name="title_home">主页</string>
|
<string name="title_home">主页</string>
|
||||||
<string name="title_dashboard">关于</string>
|
<string name="title_dashboard">关于</string>
|
||||||
<string name="args">运行参数</string>
|
<string name="args">运行参数</string>
|
||||||
|
<string name="ip_copied">IP已经复制</string>
|
||||||
|
<string name="qqcopied">QQ群号码已复制</string>
|
||||||
|
<string name="apptitle">全能代理服务器</string>
|
||||||
|
<string name="hint0">由 snail007/goproxy SDK</string>
|
||||||
|
<string name="hint1">强力驱动!</string>
|
||||||
|
<string name="stopped">已停止</string>
|
||||||
|
<string name="argsisempty">参数不能为空</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
include ':app'
|
include ':app'
|
||||||
rootProject.name='goproxy服务器版'
|
rootProject.name='goproxy'
|
||||||
|
|||||||
Reference in New Issue
Block a user