Android Combat--third-party services Bmob Cloud application Storage Set small project (v)

Source: Internet
Author: User

Third-party services Bmob Cloud application Storage Set small project (v)

In advance: All operations here are implemented after integration of BMOBSDK, if Bmob still do not know, please follow my first article Bmob article

Project on-line: The project has been online Baidu market, the students need to download the anti-editing to learn, application bag: http://shouji.baidu.com/software/9529251.html

The project also involves Baidu Automatic Update components, follow-up I will launch in my blog Baidu Automatic Update component integration

Project significance: For the instant apps presented at the 2016 Google I/O Conference, users do not need to download the app to run the app's new concept

Smart you may think that H5app,webapp is the same effect, yes, today to do a download-free, free installation, click-to-run application storage set

Specific ideas:

Project:

Structure of the Background database table: (Right-click on the new tab to see the original)

Step One: Introduction of JavaBean

Categorical entity classes:

To apply an entity class:

Step Two: Select the category page and select the Application page, the GridView fill (here Only the category page fill, the application page fill step is the same)

Create a GridView layout (the Open source framework Gridviewwithheaderandfooter is used because there is a search bar in front):

Create a view layout to populate the GridView (the picture to the right of the left text, see the category page):

Create a GridView adapter to fit the view (here to load the image with Xutils, by the following 2 lines of code, the new object, display will do):

The code populates the GridView data:

Step Three: WebView page (i.e. the third page) to WebView page processing

Here's a look at my blog post on the WebView processing: http://blog.csdn.net/qq_30379689/article/details/51898640

Step four: Part of the H5app appear positioning function (Baidu map, etc.), then should have to solve the Android 6.0 system permissions problem, the permission request is placed in the Application page before the page opened, and then check to H5app need to locate the function will automatically pop-up permission to apply, where the use of the Bmob package is good

The following is an official description of Bmob:

Android6.0 in the dynamic authorization of the specific permissions, need to be manually granted at run time, the elderly clothing if the user refused to reapply after the user can also be a box to explain the role of permissions, the user click Confirm and then go to apply.

Therefore, we provide a rights-managed tool class, using the following:

Note: In the BMOBSDK internal integration class, from the future SDK will no longer provide this class, developers can download the supporting official demo of the package below to view the type of source code.

The first step: Add the following information on the Gradle of the project:

Add Dependencies:

Step two: Build the Premissionmanager class

Step three: Overwrite the Onresultpermissionresult method:

Android Combat--third-party services Bmob Cloud application Storage Set small project (v)

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.