android--not solved.

Source: Internet
Author: User

1 Fragment life cycle processing Switch Interface bundle type Savedinstancestate I can save the check mark.

2 Save the image in the cache. JSON parsing is removed from the network. Then assign the value to the other controls

3 Dynamic Strong network changes. If you don't have a network, you can't get anything from the server.

Pull Up

4 Kanji converted to pinyin, can be based on the first letter of pinyin query, but also according to the whole pinyin to query.

5 download good data save to SDcard

6 Version Detection Upgrade

7 Network Connection

. Gson. JsonSyntaxException:java.lang.IllegalStateException:Expected Begin_object but is begin_array at line 1 column 2 path $

LOG.E ("TAG", String.valueof (Jsonobject));

PersonInfo PersonInfo = Gson.fromjson (string.valueof (jsonobject), personinfo.class);

LOG.E ("TAG", "Username:" + personinfo.getusername ());
LOG.E ("TAG", "Sex:" + personinfo.getuserinfo (). Getsex ());
LOG.E ("TAG", "Auto:" + personinfo.getauthorization ());

Mainactivity inside of the stringrequest. It's all right, just use it ...

Stringrequest jsobjrequest =NewStringrequest (URL,NewResponse.listener<string>() {@Override Public voidOnresponse (String s) {LOG.E ("TAG", s); List<Person> list =NewArraylist<>(); LOG.E ("TAG","Flag 1"); Try{PersonInfo person= Gson.fromjson (S, PersonInfo.class); } Catch(Exception e) {LOG.E ("TAG", e.tostring ()); } LOG.E ("TAG","Flag 2");//log.e ("TAG", Person.getusername ());//List.add (person);            }        }, NewResponse.errorlistener () {@Override Public voidonerrorresponse (Volleyerror volleyerror) {LOG.E ("TAG","the error is printed here:"+volleyerror); }}) {@Override PublicMap<string, string>Getheaders () throws Authfailureerror {final String authorization= Getintent (). Getstringextra ("Authorization"); Map<string, string> headers =NewHashmap<string, string>(); Headers.put ("Authorization", authorization); returnheaders; }        };
View Code

Research Tokenyje

6 put the landing in an interface, there is a small landing box, so good control

android--not solved.

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.