新增:首次使用重要提醒(新手必看)

pull/127/head
pppscn 2 years ago
parent 05ce6c1d72
commit a7fdf68ef1

@ -179,6 +179,26 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
}
}
SettingUtil.switchEnableSms(true);
//首次使用重要提醒
final SharedPreferencesHelper sharedPreferencesHelper = new SharedPreferencesHelper(MainActivity.this, "umeng");
boolean firstTime = sharedPreferencesHelper.getSharedPreference("firstTime", "true").equals("true");
if (firstTime && LogUtil.countLog("2", null, null) == 0) {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this)
.setIcon(R.mipmap.ic_launcher)
.setTitle("首次使用重要提醒")
.setMessage(R.string.tips_first_time)
.setCancelable(false)//点击对话框以外的区域是否让对话框消失
.setPositiveButton("前往系统设置", (dialogInterface, i) -> {
sharedPreferencesHelper.put("firstTime", "false");
dialogInterface.dismiss();
XXPermissions.startPermissionActivity(MainActivity.this);
}).setNegativeButton("稍后自行处理", (dialogInterface, i) -> {
sharedPreferencesHelper.put("firstTime", "false");
dialogInterface.dismiss();
});
builder.create().show();
}
}
@Override
@ -509,7 +529,7 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
succsebtn.setOnClickListener(v -> {
/* uminit为1时代表已经同意隐私协议sp记录当前状态*/
SharedPreferencesHelper sharedPreferencesHelper = new SharedPreferencesHelper(this, "umeng");
SharedPreferencesHelper sharedPreferencesHelper = new SharedPreferencesHelper(MainActivity.this, "umeng");
sharedPreferencesHelper.put("uminit", "1");
UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
/* 友盟sdk正式初始化*/

@ -19,7 +19,8 @@
android:layout_marginBottom="10dp"
android:text="@string/privacy_policy"
android:textColor="#000"
android:textSize="17sp" />
android:textSize="17sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
@ -52,14 +53,14 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/disagree"
android:text="@string/refuse"
android:textColor="#000"
android:textSize="20sp" />
<View
android:layout_width="0.5dp"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#5F6063" />
android:background="#514E4E" />
<TextView
android:id="@+id/succsebtn"

@ -277,7 +277,7 @@
<string name="send_sms_config_title2">Execute the operation returned by the interface</string>
<string name="privacy_policy">Privacy Policy</string>
<string name="agree">Agree</string>
<string name="disagree">Disagree</string>
<string name="refuse">Refuse</string>
<string name="privacy_policy_text">&#160;&#160;SmsForwarder (the "Application/App"), is 100\% free and open source, and is compliled and released basing on repository hosted on GitHub. The App will not collect any of your privacy data!\n\n Version information of the App will be sent in the following situations: \n&#160;&#160;1. As startup, version information will be sent to "Umeng +· U-APP Mobile Statistics" for user retention analyze and crash stats;\n&#160;&#160;2. Manual update check triggered by user;\n&#160;&#160;The App collects no any other data!!\n\n&#160;&#160;The App collects and uses version information only in accordance with the Privacy Policy, and will not collect any other information as an abuse of users\' consent to the Privacy Policy;</string>
<string name="GotifyWebServer">WebServer</string>
<string name="GotifyWebServerTips"><![CDATA[eg.: https://push.ppps.cn/message?token=<apptoken>]]></string>
@ -426,4 +426,5 @@
<string name="toast_granted_part">获取部分权限成功但部分权限未正常授予APP部分功能可能受限</string>
<string name="toast_denied_never">被永久拒绝授权,请前往系统设置手动授予权限!</string>
<string name="toast_denied">获取必需的权限失败APP功能可能受限</string>
<string name="tips_first_time">\n&#160;&#160;&#160;&#160;首次使用请按照1234步骤顺序设置数字点亮表示该步骤已设置(4点亮表示有成功日志)\n\n&#160;&#160;&#160;&#160;根据以往用户反馈90%的新用户最终排查结果都是手机权限设置问题5%的用户是APP保活问题其他问题排查参考Wiki中的常见问题APP右上角使用帮助入口\n\n&#160;&#160;&#160;&#160;强烈建议手动排查一下系统设置自启动、电源策略、APP的权限把所有权限打开始终允许不要“使用中允许”MIUI系统就全部变绿特别是一些国产定制系统加入隐私保护、验证码保护等例如MIUI 系统的 空白通行证)\n\n&#160;&#160;&#160;&#160;请选择是否立即“前往系统设置”检查,或“稍后自行处理”?</string>
</resources>

@ -276,8 +276,8 @@
<string name="send_sms_config_title2">请先填写服务端地址再启动服务APP轮询执行接口返回的操作</string>
<string name="privacy_policy">隐私政策</string>
<string name="agree">同意</string>
<string name="disagree">不同意</string>
<string name="privacy_policy_text">&#160;&#160;&#160;&#160;SmsForwarder-短信转发器(下称本软件) 100% 免费开源Github 在线编译发版,绝不会收集您的任何隐私数据! \n\n以下情形会上报本软件的版本信息 \n&#160;&#160;&#160;&#160;1、启动本软件时发送版本信息发送到《友盟+·U-App移动统计》用于分析本软件的用户版本留存与软件奔溃统计 \n&#160;&#160;&#160;&#160;2、手动检查更新时发送版本号用于检查新版本 \n&#160;&#160;&#160;&#160;除此之外,没有任何数据!!! \n\n&#160;&#160;&#160;&#160;本软件会遵循《隐私政策》收集、使用版本信息,但不会因为您同意了《隐私政策》而进行强制捆绑式的信息收集。\n\n&#160;&#160;&#160;&#160;提示首次使用请按照1234步骤顺序设置数字点亮表示该步骤已设置</string>
<string name="refuse">拒绝</string>
<string name="privacy_policy_text">&#160;&#160;&#160;&#160;SmsForwarder-短信转发器(下称本软件) 100% 免费开源Github 在线编译发版,绝不会收集您的任何隐私数据! \n\n以下情形会上报本软件的版本信息 \n&#160;&#160;&#160;&#160;1、启动本软件时发送版本信息发送到《友盟+·U-App移动统计》用于分析本软件的用户版本留存与软件奔溃统计 \n&#160;&#160;&#160;&#160;2、手动检查更新时发送版本号用于检查新版本 \n&#160;&#160;&#160;&#160;除此之外,没有任何数据!!! \n\n&#160;&#160;&#160;&#160;本软件会遵循《隐私政策》收集、使用版本信息,但不会因为您同意了《隐私政策》而进行强制捆绑式的信息收集。</string>
<string name="GotifyWebServer">WebServer</string>
<string name="GotifyWebServerTips"><![CDATA[例https://push.ppps.cn/message?token=<apptoken>]]></string>
<string name="title_template">标题模板</string>
@ -425,4 +425,5 @@
<string name="toast_granted_part">获取部分权限成功但部分权限未正常授予APP部分功能可能受限</string>
<string name="toast_denied_never">被永久拒绝授权,请前往系统设置手动授予权限!</string>
<string name="toast_denied">获取必需的权限失败APP功能可能受限</string>
<string name="tips_first_time">\n&#160;&#160;&#160;&#160;首次使用请按照1234步骤顺序设置数字点亮表示该步骤已设置(4点亮表示有成功日志)\n\n&#160;&#160;&#160;&#160;根据以往用户反馈90%的新用户最终排查结果都是手机权限设置问题5%的用户是APP保活问题其他问题排查参考Wiki中的常见问题APP右上角使用帮助入口\n\n&#160;&#160;&#160;&#160;强烈建议手动排查一下系统设置自启动、电源策略、APP的权限把所有权限打开始终允许不要“使用中允许”MIUI系统就全部变绿特别是一些国产定制系统加入隐私保护、验证码保护等例如MIUI 系统的 空白通行证)\n\n&#160;&#160;&#160;&#160;请选择是否立即“前往系统设置”检查,或“稍后自行处理”?</string>
</resources>

Loading…
Cancel
Save