1. On the standby screen, click "Application".
2. Slide screen click "Set".
3. Click on "My Device".
4. Select "Sound".
5. The "vibration when the bell rings" can be ticked.
Down is the interaction between the left and the right: shake. xml
This basically completes the dynamic effect.
Directly in the Code:
Animation shakeAnimation = AnimationUtils.loadAnimation(this, R.anim.shake_xy);view.startAnimation(shakeAnimation);
Now, the mobile phone shake and QQ sound prompts are added to the shake effect:
SoundPool soundPoolsoundPool = new SoundPool (10, AudioManager. STREAM_SYSTEM, 5); // The maximum number of
I. apns
1. Registration
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert];
2. server push (Java)
Pushnotificationpayload payload = pushnotificationpayload. fromjson (Message); payload. addalert ("iPhone push test www.baidu.com"); // message content payload. addbadge (count); // The payload value in the red circle on the iPhone app icon. addsound ("default"); //
First, today the project involves setting this fast sound vibration and ringing, make the head big, before, just simple call system method can be realized, but now the company requirements, vibration is vibration, bell is ringing, I saw, also separate, do very good, but I wonder, how to do, There are a lot of ways to r
It is always complicated to set the vibration or sound of the software. I did some research today, but it is OK. It is not very complicated.
Among them, the software's vibration and sound, whether there is vibration, whether there is so
//Reset the corner mark, direct to the page generated by the notification 、、、
}
Play system vibration + sound and cyclic vibration + bells
Direct code:
Static PlaySystemSound *_instance; @implementation PlaySystemSound + (PlaySystemSound *) instance{if (!_instance) {_instance = [[Playsystemsoun]
D Alloc]init];
} return _instance; }//parameter can not
" Android:textcolor= "#ffffffff"/>Icon1″android:layout_width="Wrap_content" Android:layout_height="Wrap_content" Android:layout_marginright= "10dip"/>Use default values where applicable describes the method of using default sounds, vibrations, or both:int default = notification.default_sound; // Notification.default_sound // notification.default_vibrate // Notification.default_all = defaults;Note: The same notification id:r.layout.status_bar_notifications is used in the example, so each call to
This article illustrates the use of notification notification, This knowledge point is used as a notice of the display, including vibration, lighting, sound and other effects, share for everyone to reference, the specific content as follows
Effect Chart:
Mainactivity:
Import Java.io.File;
Import android.app.Activity;
Import android.app.Notification;
Import Android.app.NotificationManager;
I
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.