出现android设备登录银行验证码是什么意思

出现android设备登录银行验证码是什么意思,第1张

工行的手机银行/融e联等客户端支持通过短信验证码登录或绑定设备。如您未进行过任何 *** 作,收到短信验证码有以下两种情况:1其他客户在登录时,输错了手机号导致;2不法分子正在用您的手机号尝试登录。请您提高警惕,不要随便告知他人验证码

package comyolandacodelibrarywidget;

import androidanimationValueAnimator;

import androidcontentContext;

import androidgraphicsBitmap;

import androidosHandler;

import androidutilAttributeSet;

import androidviewView;

import androidviewViewGroup;

import androidviewanimationAlphaAnimation;

import androidviewanimationAnimation;

import androidviewanimationLinearInterpolator;

import androidviewanimationTranslateAnimation;

import androidwidgetFrameLayout;

import androidwidgetImageView;

import androidwidgetSeekBar;

import androidwidgetTextView;

import comyolandacodelibraryR;

import comyolandacodelibraryviewDiyStyleTextView;

/

@author Created by Yolanda on 2018/10/31

@description 滑动拼图验证码

/

public final class DragImageView extends FrameLayout implements SeekBarOnSeekBarChangeListener {

    private final int showTipsTime = 1500;

    private final int animeTime = 333;

    private final int flashTime = 800;

    private ImageView ivCover;

    private ImageView ivBlock;

    private SeekBar sb;

    private TextView tvTips2;

    private DiyStyleTextView tvTips;

    private View vFlash, flContent;

    private Handler handler = new Handler();

    private Bitmap cover, block, completeCover;

    private boolean isNormal;

    public DragImageView(Context context) {

        super(context);

        init();

    }

    public DragImageView(Context context, AttributeSet attrs) {

        super(context, attrs);

        init();

    }

    public DragImageView(Context context, AttributeSet attrs, int defStyle) {

        super(context, attrs, defStyle);

        init();

    }

    private void init() {

        Viewinflate(getContext(), Rlayoutdrag_view, this);

        flContent = findViewById(Riddrag_fl_content);

        ivCover = findViewById(Riddrag_iv_cover);

        ivBlock = findViewById(Riddrag_iv_block);

        tvTips = findViewById(Riddrag_tv_tips);

        tvTips2 = findViewById(Riddrag_tv_tips2);

        vFlash = findViewById(Riddrag_v_flash);

        tvTipssetColorRegex("拼图|成功|失败|正确|[\\d\\%]+", 0xfff75151);

        sb = findViewById(Riddrag_sb);

        sbsetMax(getContext()getResources()getDisplayMetrics()widthPixels);

        sbsetOnSeekBarChangeListener(this);

        reset();

    }

    /

    设置资源

   

    @param cover        拼图

    @param block        滑块

    @param completeCover 完成的拼图

    @param block_y      滑块Y值比例

    /

    public void setUp(Bitmap cover, Bitmap block, Bitmap completeCover, float block_y) {

        thiscover = cover;

        thisblock = block;

        thiscompleteCover = completeCover;

        ivCoversetImageBitmap(completeCover);

        ivBlocksetImageBitmap(block);

        setLocation(1f covergetWidth() / covergetHeight(), 1f blockgetHeight() / covergetHeight(), block_y);

    }

    /

    设置比例大小

   

    @param cover_wph  bili

    @param block_size 滑块大小占高比

    @param block_y    滑块位置占高比

    /

    private void setLocation(final float cover_wph, final float block_size, final float block_y) {

        post(new Runnable() {

            @Override

            public void run() {

                final int w = flContentgetMeasuredWidth();

                int h = (int) (w / cover_wph);

                ViewGroupLayoutParams l = flContentgetLayoutParams();

                lwidth = w;

                lheight = h;

                flContentsetLayoutParams(l);

                ViewGroupMarginLayoutParams l2 = (MarginLayoutParams) ivBlockgetLayoutParams();

                l2height = (int) (h block_size);

                l2width = l2height blockgetWidth() / blockgetHeight();

                l2topMargin = (int) (h block_y);

                ivBlocksetLayoutParams(l2);

            }

        });

    }

    public void ok() {

        ivCoversetImageBitmap(completeCover);

        blockHideAnime();

        int penset = (int) (99 - (timeUse > 1 timeUse - 1 : 0) / 01f);

        if (penset < 1) penset = 1;

        tvTipssetText(Stringformat("拼图成功: 耗时%1f秒,打败了%d%%的用户!", timeUse, penset));

        tipsShowAnime(true);

        flashShowAnime();

        sbsetEnabled(false);

    }

    public void fail() {

        twinkleImage(ivBlock);

        tvTipssetText("拼图失败: 请重新拖曳滑块到正确的位置!");

        tipsShowAnime(true);

        handlerpostDelayed(resetRun, showTipsTime);

        sbsetEnabled(false);

    }

    public void reset() {

        final int position = sbgetProgress();

        if (position != 0) {

            ValueAnimator animator = ValueAnimatorofFloat(1f, 0);

            animatorsetDuration(animeTime)start();

            animatoraddUpdateListener(new ValueAnimatorAnimatorUpdateListener() {

                @Override

                public void onAnimationUpdate(ValueAnimator animation) {

                    float f = (Float) animationgetAnimatedValue();

                    sbsetProgress((int) (position f));

                }

            });

        }

        tipsShowAnime(false);

        tips2ShowAnime(true);

        sbsetEnabled(true);

        ivBlocksetVisibility(GONE);

        vFlashsetVisibility(GONE);

        ivCoversetImageBitmap(completeCover);

        isNormal = true;

    }

    //===================seekbar监听===================

    private long timeTemp;

    private float timeUse;

    @Override

    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {

        int cw = ivCovergetMeasuredWidth();

        int bw = ivBlockgetMeasuredWidth();

        ViewGroupMarginLayoutParams l = (MarginLayoutParams) ivBlockgetLayoutParams();

        lleftMargin = (cw - bw) progress / seekBargetMax();

        ivBlocksetLayoutParams(l);

    }

    @Override

    public void onStartTrackingTouch(SeekBar seekBar) {

        ivBlocksetVisibility(VISIBLE);

        ivCoversetImageBitmap(cover);

        tips2ShowAnime(false);

        timeTemp = SystemcurrentTimeMillis();

        isNormal = false;

    }

    @Override

    public void onStopTrackingTouch(SeekBar seekBar) {

        timeUse = (SystemcurrentTimeMillis() - timeTemp) / 1000f;

        if (dragListenner != null)

            dragListenneronDrag(seekBargetProgress() 1f / seekBargetMax());

    }

    //===================seekbar监听===================

    //闪烁滑块

    private void twinkleImage(final View view) {

        ValueAnimator animator = ValueAnimatorofFloat(0, 10F);

        animatorsetTarget(view);

        animatorsetInterpolator(new LinearInterpolator());

        animatorsetDuration(showTipsTime)start();

        animatoraddUpdateListener(new ValueAnimatorAnimatorUpdateListener() {

            @Override

            public void onAnimationUpdate(ValueAnimator animation) {

                float f = (Float) animationgetAnimatedValue();

                int time = (int) (showTipsTime f);

                if (time < 125)

                    viewsetVisibility(INVISIBLE);

                else if (time < 250)

                    viewsetVisibility(VISIBLE);

                else if (time < 375)

                    viewsetVisibility(INVISIBLE);

                else

                    viewsetVisibility(VISIBLE);

            }

        });

    }

    //提示文本显示隐藏

    private void tipsShowAnime(boolean isShow) {

        if ((tvTipsgetVisibility() == VISIBLE) == isShow)

            return;

        TranslateAnimation translateAnimation = new TranslateAnimation(

                AnimationRELATIVE_TO_SELF, 0f,

                AnimationRELATIVE_TO_SELF, 0f,

                AnimationRELATIVE_TO_SELF, isShow 1f : 0f,

                AnimationRELATIVE_TO_SELF, isShow 0f : 1f);

        translateAnimationsetDuration(animeTime);

        //translateAnimationsetInterpolator(new LinearInterpolator());

        tvTipssetAnimation(translateAnimation);

        tvTipssetVisibility(isShow VISIBLE : GONE);

    }

    //提示文本显示隐藏

    private void tips2ShowAnime(boolean isShow) {

        if ((tvTips2getVisibility() == VISIBLE) == isShow)

            return;

        AlphaAnimation translateAnimation = new AlphaAnimation(isShow 0 : 1, isShow 1 : 0);

        translateAnimationsetDuration(animeTime);

        //translateAnimationsetInterpolator(new LinearInterpolator());

        tvTips2setAnimation(translateAnimation);

        tvTips2setVisibility(isShow VISIBLE : GONE);

    }

    //成功完成拼图滑块消失

    private void blockHideAnime() {

        AlphaAnimation translateAnimation = new AlphaAnimation(1, 0);

        translateAnimationsetDuration(animeTime);

        //translateAnimationsetInterpolator(new LinearInterpolator());

        ivBlocksetAnimation(translateAnimation);

        ivBlocksetVisibility(GONE);

    }

    //失败震动动画

    private void failAnime() {

    }

    //成功高亮动画

    private void flashShowAnime() {

        TranslateAnimation translateAnimation = new TranslateAnimation(

                AnimationRELATIVE_TO_SELF, 1f,

                AnimationRELATIVE_TO_SELF, -1f,

                AnimationRELATIVE_TO_SELF, 0f,

                AnimationRELATIVE_TO_SELF, 0f);

        translateAnimationsetDuration(flashTime);

        //translateAnimationsetInterpolator(new LinearInterpolator());

        vFlashsetAnimation(translateAnimation);

        vFlashsetVisibility(VISIBLE);

        translateAnimationsetAnimationListener(new AnimationAnimationListener() {

            @Override

            public void onAnimationStart(Animation animation) {

            }

            @Override

            public void onAnimationEnd(Animation animation) {

                vFlashsetVisibility(GONE);

            }

            @Override

            public void onAnimationRepeat(Animation animation) {

            }

        });

    }

    //失败延时重置控件

    private Runnable resetRun = new Runnable() {

        @Override

        public void run() {

            tipsShowAnime(false);

            tips2ShowAnime(true);

            sbsetEnabled(true);

            final int position = sbgetProgress();

            ValueAnimator animator = ValueAnimatorofFloat(1f, 0);

            animatorsetDuration(animeTime)start();

            animatoraddUpdateListener(new ValueAnimatorAnimatorUpdateListener() {

                @Override

                public void onAnimationUpdate(ValueAnimator animation) {

                    float f = (Float) animationgetAnimatedValue();

                    sbsetProgress((int) (position f));

                }

            });

            isNormal = true;

        }

    };

    //监听

    private DragListenner dragListenner;

    public interface DragListenner {

        void onDrag(float position);

    }

    public void setDragListenner(DragListenner dragListenner) {

        thisdragListenner = dragListenner;

    }

}

1企业自身原因

①验证码短信里有违禁词,下发失败

②验证码短信签名格式不正确,或者与提交报备的签名不一致,下发失败

③获取次数超出设置范围。为什么要设置获取次数呢,不是用户想获取就获取几次更好吗,其实不是的,为了防止被刷,一般会设置每天每个号码的获取验证码的次数,比如同一个手机号码一天最多获取5次,一小时内最多3次,有效时间3-5分钟,超过限制,下发失败

2运营商原因

这个原因占比比较小,但是也不是没有可能,出现的情况就是出现极个别丢包现象

3用户自身原因

①用户手机号码被屏蔽了,无法接收验证码短信→打运营商客服电话解决

②用户处在信号比较弱的地方,如地下室,或者网络信号被屏蔽的地方

③用户手机欠费、关机甚至停机

④用户手机里有拦截软件,验证码短信被拦截了。

⑤用户设置了黑名单

4第三方短信验证码平台原因

①提供的短信通道不是短信运营商的直连通道,就会出现验证码短信延迟发送甚至无法发送。

②没有备份的短信通道,主通道不稳定的时候又没有备份的,容易下发失败

③第三方短信验证码平台的接口不稳定,技术不支持高并发,遇上用户访问量比较大的时候容易出现系统崩溃、系统错误,从而导致下发失败。

以上就是关于出现android设备登录银行验证码是什么意思全部的内容,包括:出现android设备登录银行验证码是什么意思、android滑动拼图验证码控件、android集成短信验证码发送失败等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/9537807.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-29
下一篇 2023-04-29

发表评论

登录后才能评论

评论列表(0条)

保存