Android article,How to create vibrations in Android systems and its types
نوشته شده توسط : dotnek

In this tutorial, we will talk about different types of vibration modes and how to manage and create them. We use the vibration feature a lot every day, for example, we can use the vibration feature for alerts, calls, notifications and different types of places.

The things we will learn in this tutorial are as follows:

Vibration capability in Android systems - How to build a vibration project in Android Studio and manage it- Normal vibrations- Patterned vibrations- Cancel vibration1- I will create a new project in Android Studio with the desired name Vibrator.2- The type of activity that is used for this training and construction of this project is Empty Activity.3- It should be noted that the language used in this project and training is Java.4- We should check whether the device has a license to access the vibration capability or not. We review this review in the project manifest.<uses-permission android: name = "android. permission. VIBRATE" />5- By entering the above codes, we define the permission to access the vibration capability in the project manifest.

Note:

This license is not Dangerous Permissions so we do not define it in Runtime Permission.6- The codes that should be in the AndroidManifest.xml section are as follows:

<? xml version = "1.0" encoding = "utf-8"?>
<manifest xmlns: android = "http://schemas.android.com/apk/res/android"
package = "com.dotnek. vibrator">

<uses-permission android: name = "android. permission. VIBRATE" />

<application
android: allowBackup = "true"
android: icon = "@ mipmap / ic_launcher"
android: label = "@ string / app_name"
android: roundIcon = "@ mipmap / ic_launcher_round"
android: supportsRtl = "true"
android: theme = "@ style / AppTheme">
<activity android: name = ". MainActivity">
<intent-filter>
<action android: name = "android. intent. action. MAIN" />

<category android: name = "android. intent. category. LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

Normal vibration

How to create a normal vibration is that we must first create a Button inside the active layout.Of course, it should be noted that normal vibration is such that it creates a long and simple vibration for a while.7- The codes that should be in the activity_main.xml section are as follows: 

 

Read more on:https://www.dotnek.com/Blog/Apps/how-to-create-vibrations-in-android-systems-a

link:https://dotnek.mystrikingly.com/

Related link:Website Analysis





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 49
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : دو شنبه 18 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: