1
This commit is contained in:
6
.idea/compiler.xml
generated
Normal file
6
.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
</component>
|
||||
</project>
|
||||
5
.idea/dbnavigator.xml
generated
5
.idea/dbnavigator.xml
generated
@@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="DBNavigator.Project.DataEditorManager">
|
||||
<record-view-column-sorting-type value="BY_INDEX" />
|
||||
<value-preview-text-wrapping value="true" />
|
||||
<value-preview-text-wrapping value="false" />
|
||||
<value-preview-pinned value="false" />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DataExportManager">
|
||||
@@ -31,6 +31,9 @@
|
||||
<component name="DBNavigator.Project.EditorStateManager">
|
||||
<last-used-providers />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.ExecutionManager">
|
||||
<retain-sticky-names value="false" />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.MethodExecutionManager">
|
||||
<method-browser />
|
||||
<execution-history>
|
||||
|
||||
15
.idea/jarRepositories.xml
generated
15
.idea/jarRepositories.xml
generated
@@ -41,5 +41,20 @@
|
||||
<option name="name" value="E:\AndroidSDK\extras\android\m2repository" />
|
||||
<option name="url" value="file:/E:/AndroidSDK/extras/android/m2repository/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="D:\sdk\extras\m2repository" />
|
||||
<option name="name" value="D:\sdk\extras\m2repository" />
|
||||
<option name="url" value="file:/D:/sdk/extras/m2repository/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="D:\sdk\extras\google\m2repository" />
|
||||
<option name="name" value="D:\sdk\extras\google\m2repository" />
|
||||
<option name="url" value="file:/D:/sdk/extras/google/m2repository/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="D:\sdk\extras\android\m2repository" />
|
||||
<option name="name" value="D:\sdk\extras\android\m2repository" />
|
||||
<option name="url" value="file:/D:/sdk/extras/android/m2repository/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -2,11 +2,9 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/HouseProperty.iml" filepath="$PROJECT_DIR$/HouseProperty.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/HouseProperty-app.iml" filepath="$PROJECT_DIR$/app/HouseProperty-app.iml" group="HouseProperty/app" />
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ninegridview/ninegridview.iml" filepath="$PROJECT_DIR$/ninegridview/ninegridview.iml" group="HouseProperty/ninegridview" />
|
||||
<module fileurl="file://$PROJECT_DIR$/wuye-HouseProperty.iml" filepath="$PROJECT_DIR$/wuye-HouseProperty.iml" group="HouseProperty" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/HouseProperty.iml" filepath="$PROJECT_DIR$/.idea/modules/HouseProperty.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HouseProperty.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HouseProperty.app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/ninegridview/HouseProperty.ninegridview.iml" filepath="$PROJECT_DIR$/.idea/modules/ninegridview/HouseProperty.ninegridview.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -10,14 +10,14 @@ android {
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
}
|
||||
|
||||
// signingConfigs {
|
||||
// defaultSignature {
|
||||
//// keyAlias 'key0'
|
||||
//// keyPassword 'haotian'
|
||||
//// storeFile file('/Users/wangchun/Documents/MyData/project/xianyangwuye/HouseProperty/haotian.jks')
|
||||
//// storePassword 'haotian'
|
||||
// }
|
||||
// }
|
||||
signingConfigs {
|
||||
defaultSignature {
|
||||
keyAlias 'key0'
|
||||
keyPassword 'haotian'
|
||||
storeFile file('haotian.jks')
|
||||
storePassword 'haotian'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
@@ -54,9 +54,9 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
// signingConfig signingConfigs.defaultSignature
|
||||
}
|
||||
// debug {
|
||||
// signingConfig signingConfigs.defaultSignature
|
||||
// }
|
||||
debug {
|
||||
signingConfig signingConfigs.defaultSignature
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -141,6 +141,7 @@ android {
|
||||
|
||||
implementation 'com.zhihu.android:matisse:0.5.2-beta2'
|
||||
implementation 'com.tencent.bugly:crashreport:latest.release' //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.2.0
|
||||
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BIN
app/haotian.jks
Normal file
BIN
app/haotian.jks
Normal file
Binary file not shown.
@@ -66,13 +66,17 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
<application
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
android:name="com.sl.house_property.MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:theme="@style/AppTheme">
|
||||
<queries>
|
||||
<package android:name="com.tencent.mm" />
|
||||
</queries>
|
||||
<provider
|
||||
android:name="com.sl.house_property.ImagePickerProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
|
||||
@@ -64,8 +64,8 @@ public class MyApplication extends Application{
|
||||
// CrashHandler crashHandler = CrashHandler.getInstance();
|
||||
// crashHandler.init(this);
|
||||
Bugly.init(this,"d45325664f",false);
|
||||
System.setProperty("http.proxyHost", "haotian.hoheng.cn");
|
||||
System.setProperty("http.proxyPort", "8080");
|
||||
// System.setProperty("http.proxyHost", "haotian.hoheng.cn");
|
||||
// System.setProperty("http.proxyPort", "8080");
|
||||
|
||||
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
|
||||
StrictMode.setVmPolicy(builder.build());
|
||||
|
||||
@@ -9,6 +9,11 @@ import android.widget.TextView;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.sl.house_property.R;
|
||||
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXImageObject;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
|
||||
import utils.QRCodeUtil;
|
||||
|
||||
@@ -19,6 +24,29 @@ public class ShareCodeDialog extends CenterPopupView {
|
||||
private ImageView ivCode;
|
||||
private TextView tvShare;
|
||||
private TextView tvCancel;
|
||||
// APP_ID 替换为你的应用从官方网站申请到的合法appID
|
||||
private static final String APP_ID = "wx7e09fff168f6e58d";
|
||||
// IWXAPI 是第三方app和微信通信的openApi接口
|
||||
private IWXAPI api;
|
||||
|
||||
private void regToWx() {
|
||||
// 通过WXAPIFactory工厂,获取IWXAPI的实例
|
||||
api = WXAPIFactory.createWXAPI(getContext(), APP_ID, true);
|
||||
|
||||
// 将应用的appId注册到微信
|
||||
api.registerApp(APP_ID);
|
||||
|
||||
// //建议动态监听微信启动广播进行注册到微信
|
||||
// registerReceiver(new BroadcastReceiver() {
|
||||
// @Override
|
||||
// public void onReceive(Context context, Intent intent) {
|
||||
//
|
||||
// // 将该app注册到微信
|
||||
// api.registerApp(Constants.APP_ID);
|
||||
// }
|
||||
// }, new IntentFilter(ConstantsAPI.ACTION_REFRESH_WXAPP));
|
||||
|
||||
}
|
||||
|
||||
public ShareCodeDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
@@ -43,6 +71,7 @@ public class ShareCodeDialog extends CenterPopupView {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
regToWx();
|
||||
tvShare.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -50,10 +79,29 @@ public class ShareCodeDialog extends CenterPopupView {
|
||||
}
|
||||
});
|
||||
tvPwd.setText("密码:" + pwd);
|
||||
Bitmap qrCodeBitmap = QRCodeUtil.createQRCodeBitmap(code, QRCodeUtil.dip2px(getContext(),220), QRCodeUtil.dip2px(getContext(),220));
|
||||
final Bitmap qrCodeBitmap = QRCodeUtil.createQRCodeBitmap(code, QRCodeUtil.dip2px(getContext(), 220), QRCodeUtil.dip2px(getContext(), 220));
|
||||
ivCode.setImageBitmap(qrCodeBitmap);
|
||||
}
|
||||
findViewById(R.id.tv_share).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
//初始化 WXImageObject 和 WXMediaMessage 对象
|
||||
WXImageObject imgObj = new WXImageObject(qrCodeBitmap);
|
||||
WXMediaMessage msg = new WXMediaMessage();
|
||||
msg.mediaObject = imgObj;
|
||||
msg.title = "临时门禁";
|
||||
msg.description="临时门禁";
|
||||
//构造一个Req
|
||||
SendMessageToWX.Req req = new SendMessageToWX.Req();
|
||||
req.transaction = "img";
|
||||
req.message = msg;
|
||||
req.scene = SendMessageToWX.Req.WXSceneSession;
|
||||
// req.userOpenId = getOpenId();
|
||||
//调用api接口,发送数据到微信
|
||||
api.sendReq(req);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void setPwd(String pwd) {
|
||||
|
||||
@@ -8,7 +8,8 @@ public class ApiConfig {
|
||||
/* public static String BASE_URL="http://5597755.com/Lottery_server/get_init_data.php/";
|
||||
public static String APPID="szo007";
|
||||
public static String webUrl="https://www.dafaok88.com";*/
|
||||
public static String BASE_PARENT_URL="https://wy.shiningsoft.top/";
|
||||
|
||||
public static String BASE_PARENT_URL="http://wy.dou1.net/";
|
||||
public static String BASE_URL= BASE_PARENT_URL + "api/";
|
||||
public static String APPID="api/";
|
||||
|
||||
|
||||
4
app/src/main/res/xml/network_security_config.xml
Normal file
4
app/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
Reference in New Issue
Block a user