关于APP上架到应用市场总结了一下:
1.首先是软著和各应用市场账号申请并创建应用。
1.隐私协议和用户协议
现在很多市场都要求用户协议和隐私政策
private void showProtocol() {
permissionProtocolDialog = new PermissionProtocolDialog(HomeAct.this);
TextView tv_content = permissionProtocolDialog.findViewById(R.id.tv_content);
TextView tv_agree = permissionProtocolDialog.findViewById(R.id.tv_agree);
TextView tv_refuse = permissionProtocolDialog.findViewById(R.id.tv_refuse);
String string = getResources().getString(R.string.protocol_permission);
String privacy_key1 = getResources().getString(R.string.privacy_tips_key1);
String privacy_key2 = getResources().getString(R.string.privacy_tips_key2);
int index1 = string.indexOf(privacy_key1);
int index2 = string.indexOf(privacy_key2);
SpannableString spannableString = new SpannableString(string);
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.btn_yellow));
spannableString.setSpan(foregroundColorSpan, index1, index1 + privacy_key1.length(), Spanned.SPAN_EXCLUSIVE_INCLUSIVE);
spannableString.setSpan(new ClickableSpan() {
@Override
public void onClick(@NonNull View widget) {
Intent intent = new Intent(context, ProtocolAct.class);
intent.putExtra(ConstantCfg.EXTRA_TYPE, 4);
startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint ds) {
ds.setUnderlineText(false);
}
}, index1, index1 + privacy_key1.length(), Spanned.SPAN_EXCLUSIVE_INCLUSIVE);
ForegroundColorSpan foregroundColorSpan2 = new ForegroundColorSpan(getResources().getColor(R.color.btn_yellow));
spannableString.setSpan(foregroundColorSpan2, index2, index2 + privacy_key2.length(), Spanned.SPAN_EXCLUSIVE_INCLUSIVE);
spannableString.setSpan(new ClickableSpan() {
@Override
public void onClick(@NonNull View widget) {
Intent intent = new Intent(context, ProtocolAct.class);
intent.putExtra(ConstantCfg.EXTRA_TYPE, 1);
startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint ds) {
ds.setUnderlineText(false);
}
}, index2, index2 + privacy_key2.length(), Spanned.SPAN_EXCLUSIVE_INCLUSIVE);
tv_content.setHighlightColor(Color.TRANSPARENT);
tv_content.setMovementMethod(LinkMovementMethod.getInstance());
tv_content.setText(spannableString);
tv_refuse.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
tv_agree.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SPUtils.put(ConstantCfg.SP_IS_PROTOCOL_SURE, true);
initOther();
hideProtocolDialog();
}
});
permissionProtocolDialog.show();
}
2.应用宝需要认领问题
上架应用宝有时需要认领,这时按照步骤,下载一个空的apk,大概只有几kb,然后用自己的keystore去签名这个apk,再把签名后的apk上传就行了