WeChat can't shoot small video problem

hi! what's up!

I am the blogger illa! Today I will introduce to you a difficult problem I encountered before!


Description of the problem: WeChat cannot shoot small videos normally, and it prompts that the camera data cannot be obtained. . .

Mental journey: At the time, when I saw this problem, I couldn't understand it. It didn't feel like it was a problem that was corrected. I thought it was a bug of Wechat itself, but later I removed the things I modified by myself, and the problem actually disappeared! At that time my heart almost collapsed! Just check step by step!

Solution process: The specific process is not much to say, the main thing is to delete and verify the things you modified step by step! It's all been deleted. I found that there was still a problem. In the end, I put my doubts on the model of the mobile phone, and it was ok to change it. But customers do need this model. How to do? see the following code

Specific code: In the end, I decided to randomly change a long and uncommon model, and then use the replace() method in textView.java to replace it with the model required by the customer!

\frameworks\base\core\java\android\widget\TextView.java

    @android.view.RemotableViewMethod
    public final void setText(CharSequence text) {
               if(text != null && text.toString().contains("XP-02")){
                    text = text.toString().replace("XP-02", "M9");
                }				   
        setText(text, mBufferType);
    }

As for why this model is not supported by WeChat, I don't know yet.

That's all for today, I hope the above code can inspire readers. We come to Japan for a long time!



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325795007&siteId=291194637