Homepage 0, quick portal for mobile apps, and homepage 0 mobile apps

Source: Internet
Author: User

Homepage 0, quick portal for mobile apps, and homepage 0 mobile apps

Homepage No. 0, mobile application quick Portal

All our existing applications use the Android notification bar as a "traditional notification", such as text messages, and QQ. However, there are also innovative ways to use the same region, such as the oldest music playing control, now the 360 smart key, Baidu search all began to occupy the notification bar, as a quick entry to its application, see the attached figure.



 

 

 

 

 

 

 

From the evaluation of the success degree of the mobile App, "occupying the first three screens of the mobile phone", to the current installation of a large number of apps, except for a few commonly used apps, the rest are sleeping in the ice, it is difficult to remember how to use "Find-click.

However, after Android3.0, with Ongoing (running), you can occupy the fastest entry to your mobile phone from a technical point of view and implement "homepage 0 ". As an entertainment tool-type application, SoLoMo's check-in (Checkin), LBS-type queries, and personal accounting can also provide "rich function" Notification reminders and notification reminders for backward operations, some quick tools. As an enterprise application, ticket reminders and quick operations, attendance check-in, etc.

Of course, to use this method of "occupying and staying", we must first ensure that our applications are "available and usable", or "mandatory" for work/enterprise applications ", otherwise, it will be counterproductive to be occupied by annoying rogue applications, allowing users to download them more quickly.

Technical Implementation

In the new Notification service, Android adds the Ongoing option, Notification. FLAG_ONGOING_EVENT enables "running" Notification reminders, that is, you can resident in the notification bar to implement "permanent notification" and add other actions to the notification.

For "other operations", buttons, text, images, and lists commonly used in information systems can be added for display. The RemoteViews mechanism is used to implement a custom view in the "homepage 0" area.

The custom Layout of Notification is RemoteViews. In the custom view layout file, only FrameLayout, LinearLayout, RelativeLayout layout controls and AnalogClock, Chronometer, Button, ImageButton, ImageView, ProgressBar, TextView, ViewFlipper, ListView, GridView, StackView, and layout display controls are supported, subclass of these classes or other controls provided by Android are not supported.

At the same time, Notification can be combined with sound, three-color lights, vibration and screen reminders to achieve a better user experience.

Sample Code:

Public void addongoingpolicy () {NotificationCompat. Builder mBuilder = new Builder (this); RemoteViews mRemoteViews = new RemoteViews (getPackageName (), R. layout. view_policy );

MRemoteViews. setImageViewResource (R. id. policy_ongoing_icon_1, R. drawable. policy_ongoing_icon_2 );

MRemoteViews.setTextViewText(R.id.txt _ label ");

MRemoteViews. setViewVisibility (R. id. _ policy_button, View. VISIBLE );

MRemoteViews. setImageViewResource (R. id. btn_policy_1, R. drawable. btn_policy_2 );

// Button action Processing

Intent buttonIntent = new Intent (ACTION_BUTTON );

ButtonIntent. putExtra (INTENT_BUTTONID_TAG, BUTTON_PREV_ID );

PendingIntent intent_prev = PendingIntent. getBroadcast (this, 1, buttonIntent, PendingIntent. FLAG_UPDATE_CURRENT );

MRemoteViews. setOnClickPendingIntent (R. id. btn_policy_1, intent_prev );

 

MBuilder. setContent (mRemoteViews)

. SetContentIntent (getDefalutIntent (Notification. FLAG_ONGOING_EVENT ))

. SetSmallIcon (R. drawable. policy_ongoing_icon_2)

. SetPriority (Notification. PRIORITY_DEFAULT)

. SetWhen (System. currentTimeMillis ())

. SetTicker ("resident notice @ Shi fengshi inspection ")

. SetOngoing (true );

Notification producer y = mBuilder. build ();

Required Y. flags = Notification. FLAG_ONGOING_EVENT;

Micationicationmanager. notify (yyid, notify );

}

 

Set Vibration: setVibrate (long [] pattern)

Set three-color light: setLights (intledARGB, intledOnMS, intledOffMS)

Set sound: setSound (Uri sound)

 

Technical support is the foundation, and application scenarios are full of imagination. From the existing technical solutions, innovating and designing new products or applications is our greatest happiness.

Address, http://blog.xufun.cn /? P = 660


What is a mobile portal?

Mobile portal Introduction: mobile portal is an e-commerce platform in the mobile Internet era. Merchants can publish information in real time, implement transactions, and conveniently complete delivery. Consumers can access, purchase, and pay through mobile phones anytime, anywhere. At present, the domestic enterprise mobile portal applications mainly focus on mobile marketing and sales promotion. With the construction and improvement of mobile payment platforms, transactions and delivery will also develop rapidly. Yonyou enterprise mobile portal supports mobile real-name, QR code and other quick access methods. It uses mobile information technologies such as SMS, MMS, WAP, video/streaming media, and integrates advanced customer management ideas, it is an indispensable e-commerce platform for enterprises in the mobile Internet era. At present, there are many well-known customers such as Yanjing Beer, xinggang, Atlantic Department Store, Foshan Lighting, France hesheng yuan, and Hangzhou beinmei. Mobile portals can help enterprises: · Provide a mobile portal for customers to obtain information anytime and anywhere. When customers want to know information, whether on a bus or before preparing for shopping, you only need to send a text message via your phone to learn about the latest products, services, marketing, promotions, membership points, and other dynamic information of your company in real time. You can also conveniently leave a message, book a reservation, or complain. Move portals to help enterprises get more customers! · The customer has full control over the mobile portal, allowing potential customers and old customers of the enterprise to master and publish information of interest to the customer in a targeted manner. If enterprises are so familiar with customers, the customers will certainly return more. · Precise interaction, efficient promotion, and publishing of promotion information. enterprises can send the correct information to the right people immediately ...... Mobile portals make marketing highly effective and evaluable! The unique green settings allow customers to block unwanted information and make customers more satisfied.

What are the portal websites of China Mobile?

China Mobile Communication Center www.chinamobile.com
Each Provincial/Municipal Branch website can be opened by adding the first letter of Chinese pinyin between www and chinamobile.
Www.monternet.com
The province/municipality Branch's mobile Dream network can be opened by adding the province/municipality pinyin initials between www and monternet.
Www.139sc.com, a mobile website of Sichuan Mobile

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.