A request sent before an Android or iOS app directs to the domain name. now, you need to change the B domain name. Is there A better solution than the newly packaged Android?

Source: Internet
Author: User
If you re-package the app, the app may not be updated, so this solution is not very good. of course, it is best to fix the domain name requested by the Android app at the beginning of the design. how can this problem be solved? That is, can I download a piece of code to overwrite the local code so that there is a security problem? If the package is repackaged, the user may not update the application, so this solution is not very good.

Of course, it is best to leave the domain name requested by the Android application undefined at the beginning of the design. how can this problem be solved? That is, can I download a piece of code to overwrite the local code so that there is a security problem?

Reply content:

If the package is repackaged, the user may not update the application, so this solution is not very good.

Of course, it is best to leave the domain name requested by the Android application undefined at the beginning of the design. how can this problem be solved? That is, can I download a piece of code to overwrite the local code so that there is a security problem?

Yes. you asked the person who wrote the interface to send a request to domain B on domain a and return the data to you. haha, I 'd like to ask, is repacking very troublesome? Do not understand mobile development

You can request background data once when starting the app. Set A label. if it is 1, the address is loaded. if it is 0, the B address is loaded.

If you already have online applications, this may happen. There is basically only one solution: let the backend developers work hard to redirect all requests sent to point A to Point B and return the response data.Note:: It is best not to change the format of the data. Otherwise, Crash may occur if the fault tolerance is insufficient.

Of course, the application itself also has a solution to this problem, but it needs to be designed in advance on the architecture. For example, iOS and Android have some hotfix implementation technologies. If your APP already has such an architecture, you can put the developed patch on the server to request data from point B. The APP automatically downloads the patch and applies it to the APP itself. Then the APP can automatically request data from point B.

If the two conditions are balanced, you will find that point B has been developed. The first solution is the most time-consuming and fastest.

1. server side: let the server side Configure nginx in minutes.
2. from the App perspective: Domain name changes should not be frequent. I personally think that the domain name is issued in push mode, and then stored on the app side; or, prepare an excuse for obtaining the domain name

It seems that the server is more effort-saving

Package the package again and pack the package in minutes. you only need to update the package.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.