Posts

As I mentioned earlier, there is a contradiction in the usage of Bug and Defect. People widely say the bug is an informal name for the defect.
Defect : The variation between the actual results and expected results is known as defect.
If a developer finds an issue and corrects it by himself in the development phase then it’s called a defect.
Failure : Once the product is deployed and customers find any issues then they call the product as a failure product. After release, if an end user finds an issue then that particular issue is called as failure
Error : We can’t compile or run a program due to coding mistake in a program. If a developer unable to successfully compile or run a program then they call it as an error.
Severity
Critical: This defect indicates complete shut-down of the process, nothing can proceed further
Major: It is a highly severe defect and collapses the system. However, certain parts of the system remain functional
Medium: It causes some undesirable behavior, but the system is still functional
Low: It won't cause any major break-down of the system
Low: The Defect is an irritant but repair can be done once the more serious Defect has been fixed
Medium: During the normal course of the development activities defect should be resolved. It can wait until a new version is created
High: The defect must be resolved as soon as possible as it affects the system severely and cannot be used until it is fixed
New: When a new defect is logged and posted for the first time. It is assigned a status as NEW.
Assigned: Once the bug is posted by the tester, the lead of the tester approves the bug and assigns the bug to the developer team
Open: The developer starts analyzing and works on the defect fix
Fixed: When a developer makes a necessary code change and verifies the change, he or she can make bug status as "Fixed."
Pending retest: Once the defect is fixed the developer gives a particular code for retesting the code to the tester. Since the software testing remains pending from the testers end, the status assigned is "pending retest."
Retest: Tester does the retesting of the code at this stage to check whether the defect is fixed by the developer or not and changes the status to "Re-test."
Verified: The tester re-tests the bug after it got fixed by the developer. If there is no bug detected in the software, then the bug is fixed and the status assigned is "verified."
Reopen: If the bug persists even after the developer has fixed the bug, the tester changes the status to "reopened". Once again the bug goes through the life cycle.
Closed: If the bug is no longer exists then tester assigns the status "Closed."
Duplicate: If the defect is repeated twice or the defect corresponds to the same concept of the bug, the status is changed to "duplicate."
Rejected: If the developer feels the defect is not a genuine defect then it changes the defect to "rejected."
Deferred: If the present bug is not of a prime priority and if it is expected to get fixed in the next release, then status "Deferred" is assigned to such bugs
Not a bug:If it does not affect the functionality of the application then the status assigned to a bug is "Not a bug".
2. A defect is forwarded to the project manager for analysis.
3. The project manager decides whether a defect is valid.
4. Here the defect is invalid. The status is "Rejected".
The project manager assigns a rejected status.
If the bug is not resolved, the next step is to check that it is in scope.
Suppose we have another function - email functionality for the same application, and you find a problem with it. However, it is not part of the current version if such errors are assigned as a deferred or deferred status.
7. Next, the manager checks to see if a similar error has occurred earlier. If so, a duplicate status is assigned to the error.
8. If not, the bug is assigned to the developer, who starts correcting the code.
9. During this phase, the defect is assigned a status in process,
Once the code is fixed. A defect is assigned a status fixed.
Next, the tester tests the code again, If the test case is passed, the defect is closed. If the test cases fail again, the bug is reopened and assigned to the developer.
12. Consider a situation where, during the first release of the flight reservation, an error was detected in the fax order, which has been fixed and a status of closed has been assigned. The same error occurred again during the second upgrade version.
In such cases, a closed defect is opened again.
Export annotations of PDFTron using jqueryJavascript

Export annotations of PDFTron using jqueryJavascript
When we draw annotation we'll save them in the database and when we reload the same document we can retrieve saved annotations from database and can again show them, we will learn that in my next blog post.
Here is example of how to save and annotation in database.
WebViewer({ path: 'path_to_the_PDFTron_'lib'_folder_on_your_server', css: 'webviewer_css', licenseKey: 'YOUR_PDF_TRON_LICENSE_KEY', initialDoc: 'YOUR_FILE URL' //url of a file to load }, document.getElementById('viewer')) .then(function (instance) { let docViewer = instance.docViewer; let annotManager = instance.annotManager; annotManager.on('annotationChanged', (annots, action, e) => { if (e.imported) return; annotManager.exportAnnotations({ links: false, widgets: false, annotList: annots }).then(function (xfdfStrings) { annots.forEach(function (annot) { if (action === "delete") { deleteAnnotation(annot.mu); } else { saveAnnotation(annot.mu, xfdfStrings); } }); if (action === "add") { annotManager.selectAnnotation(annots[0]); if (annots[0]['Subject'] !== 'Comment') { // to open comment box document.getElementById('viewer').childNodes[0].contentWindow.document.querySelector('div[data-element="annotationCommentButton"]').click(); } } }); }); });
let saveAnnotation = function (annotationId, annotationXfdf) { let saveAnnotationUrl = ''; if (fromExtension) { saveAnnotationUrl = `YOUR_PROJECT_URL/annotations/${annotationId}`; } else { saveAnnotationUrl = `YOUR_PROJECT_URL/annotations/${annotationId}`; } $.ajax({ url: saveAnnotationUrl, type: 'POST', data: {annotation: annotationXfdf}, success: function (result) { console.log(result); }, error: function (result) { console.log(result); } }); };
let deleteAnnotation = function (annotationId) { let deleteAnnotationUrl = ''; if (fromExtension) { deleteAnnotationUrl = `YOUR_PROJECT_URL/annotations/${annotationId}`; } else { deleteAnnotationUrl = `YOUR_PROJECT_URL/annotations/${annotationId}`; } $.ajax({ url: deleteAnnotationUrl, type: 'DELETE', success: function (result) { console.log(result); }, error: function (result) { console.log(result); } }); };
How to Create Custom CardView in AndroidAndroid Development

How to Create Custom CardView in AndroidAndroid Development
dependencies { implementation ‘androidx.cardview:cardview:1.0.0’ }
res > drawable > New > Drawable Resource File.
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#FFAB00" android:endColor="#FFAB00"> </gradient> </shape>
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#0091EA" android:endColor="#00BFA5"> </gradient> </shape>
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#AEEA00" android:endColor="#FFD600"> </gradient> </shape>

You can change it according to your needs.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="173dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_marginEnd="20dp" app:cardCornerRadius="8dp"> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg1" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Assam" android:textColor="#000000" android:textSize="22sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Current Location" android:textColor="#000000" android:textSize="14sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="25" android:textColor="#000000" android:textSize="28sp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:text="o" android:textColor="#000000" android:textSize="13sp" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="18 %" android:textColor="#000000" android:textSize="14sp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:text="11.25 AM" android:textColor="#000000" android:textSize="14sp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="173dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_marginEnd="20dp" app:cardCornerRadius="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg2" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Delhi" android:textColor="@color/white" android:textSize="22sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2 days ago" android:textColor="@color/white" android:textSize="14sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="39" android:textColor="@color/white" android:textSize="28sp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:text="o" android:textColor="@color/white" android:textSize="13sp" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="35 %" android:textColor="@color/white" android:textSize="14sp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:text="01.05 PM" android:textColor="#D6D6D6" android:textSize="14sp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="173dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_marginEnd="20dp" app:cardCornerRadius="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg3" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Darjeeling" android:textColor="#000000" android:textSize="22sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2 weeks ago" android:textColor="#000000" android:textSize="14sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="12" android:textColor="#000000" android:textSize="28sp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:text="o" android:textColor="#000000" android:textSize="13sp" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="9 %" android:textColor="#000000" android:textSize="14sp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:text="05.00 AM" android:textColor="#000000" android:textSize="14sp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> </LinearLayout>
What are some important qualities of graphic designers?Design

What are some important qualities of graphic designers?Design
Our analysis helped us identify five important qualities employers are seeking in graphic design candidates. Here's what we found


Make fully configurable livewire searching componentLaravel

Make fully configurable livewire searching componentLaravel
Recently we have developed the livewire common searchable component which makes your searching easier, as you can specify which fields you want to search by just giving the field name into the component.
What you have to do is just create SearchableComponent a class into your App\Http\Livewire directory. just copy the following class on the given namespace.
<?php namespace App\Http\Livewire; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Livewire\Component; use Livewire\WithPagination; use Str; abstract class SearchableComponent extends Component { use WithPagination; /** * @var string */ public $search = ''; /** * @var int */ protected $paginate = 12; /** @var Builder */ private $query; /** * SearchableComponent constructor. * * @param $id */ public function __construct($id) { parent::__construct($id); $this->prepareModelQuery(); } /** * Prepare query */ private function prepareModelQuery() { /** @var Model $model */ $model = app($this->model()); $this->query = $model->newQuery(); } /** * @return mixed */ abstract function model(); /** * Reset model query */ protected function resetQuery() { $this->prepareModelQuery(); } /** * @return Builder */ protected function getQuery() { return $this->query; } /** * @param Builder $query */ protected function setQuery(Builder $query) { $this->query = $query; } /** * @param bool $search * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator */ protected function paginate($search = true) { if ($search) { $this->filterResults(); } $all = $this->query->paginate($this->paginate); $currentPage = $all->currentPage(); $lastPage = $all->lastPage(); if ($currentPage > $lastPage) { $this->page = $lastPage; } return $this->query->paginate($this->paginate); } /** * @return Builder */ protected function filterResults() { $searchableFields = $this->searchableFields(); $search = $this->search; $this->query->when(! empty($search), function (Builder $q) use ($search, $searchableFields) { $searchString = '%'.$search.'%'; foreach ($searchableFields as $field) { if (Str::contains($field, '.')) { $field = explode('.', $field); $q->orWhereHas($field[0], function (Builder $query) use ($field, $searchString) { $query->whereRaw("lower($field[1]) like ?", $searchString); }); } else { $q->orWhereRaw("lower($field) like ?", $searchString); } } }); return $this->query; } /** * @return mixed */ abstract function searchableFields(); }
<?php namespace App\Http\Livewire; use App\Models\Tag; use Illuminate\Contracts\Pagination\LengthAwarePaginator; class Tags extends SearchableComponent { public function render() { $tags = $this->searchTags(); return view('livewire.tags', [ 'tags' => $tags, ])->with("search"); } /** * @return LengthAwarePaginator */ public function searchTags() { $this->setQuery($this->getQuery()); return $this->paginate(); } function model() { return Tag::class; } function searchableFields() { return [
'name',
];
}
}
In searchable fields you can specify the field name that you want to search. and replace the Model with your records Model.
That it. Now you don't need to write search queries again and again. just extend your livewire component by searchable component.
Here are some Interesting livewire tutorials that you need to check :
How to explain the tricks to close your next dealSales

How to explain the tricks to close your next dealSales
Introduction
Let's review the persuasion strategy you can implement today to close your next deal.
1. Personalize your message
This doesn't mean you need to fully wing your sales calls, it does mean you need to be prepared to adjust your message based on what interests you in the potential.
2. Focus on problem-solving
3. Give social proof
While buyers may take your point as a sales representative with a grain of salt because they know you want to sell, they are more likely to trust a testimonial or story from a previous customer who was looking for a similar solution.
4. Assume goals
Then during a call, potentially throws out several turns, asking you questions and mentioning objections that you weren’t prepared to account for - the dream of every sales rip. But don't go too far. This is a valuable learning experience.
5. Empower empowerment decision making
6. Make personal connections
7. Don’t rush into the process
How To Integrate onesignal push notification in AndroidAndroid Development

How To Integrate onesignal push notification in AndroidAndroid Development
Add OneSignal dependency and plugin to your build.Gradle app-level.
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' dependencies { implementation 'com.onesignal:OneSignal:3.12.6' }
buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]' } }
- login your OneSignal Account than create an app
- Enter Your Android Application Name & Select platform Google Android(FCM)
- Generate a Firebase Server Key Read the documentation.
- Enter your Firebase Server Key & Firebase Sender ID.
Step: 3 Add Your Created Onesignal App ID
android { compileSdkVersion 30 buildToolsVersion "30.0.2" defaultConfig { applicationId "com.myapplication.app" minSdkVersion 17 targetSdkVersion 30 versionCode 1 versionName "1.0.0" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" manifestPlaceholders = [onesignal_app_id : "Enter Your App ID", onesignal_google_project_number: " Enter Firebase Sender ID"] } buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
import android.app.Application; import android.content.Context; import androidx.multidex.MultiDex; import com.onesignal.OneSignal; public class MyApplication extends Application { public static Context context; @Override public void onCreate() { super.onCreate(); context = getApplicationContext(); context = this; OneSignal.startInit(this) .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification) .unsubscribeWhenNotificationsAreDisabled(true) .init(); } public static Context getContext() { return context; } }
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapplication.app"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <application android:name="com.myapplication.app.MyApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:requestLegacyExternalStorage="true" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name="com.myapplication.app.activity.SplashActivity" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
How to Create Floating Widget in AndroidAndroid Development

How to Create Floating Widget in AndroidAndroid Development
Service stops are one of the biggest problems when you clear the application from background functions.
public class FloatingViewService extends Service { private WindowManager mWindowManager; private View mFloatingView; private View floatingButton; private final static float CLICK_DRAG_TOLERANCE = 10; private float downRawX, downRawY; private float dX, dY; int LAYOUT_FLAG; private SpeechRecognizer speechRecognizer; public FloatingViewService() { } Context context; public FloatingViewService(Context applicationContext) { super(); context = applicationContext; Log.i("HERE", "here service created!"); } @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int flags, int startId) { KeyguardManager myKM = (KeyguardManager) this.getSystemService(Context.KEYGUARD_SERVICE); if( myKM.inKeyguardRestrictedInputMode()) { Intent i = new Intent(this,FloatingViewService.class); startService(i); // //it is locked } else { Intent i = new Intent(this, FloatingViewService.class); startService(i); //it is not locked } return START_STICKY; } @Override public void onCreate() { super.onCreate(); mFloatingView = LayoutInflater.from(this).inflate(R.layout.floating_layout, null); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { LAYOUT_FLAG = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; } else { LAYOUT_FLAG = WindowManager.LayoutParams.TYPE_PHONE; } final WindowManager.LayoutParams params = new WindowManager.LayoutParams( WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT, LAYOUT_FLAG, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSLUCENT); mWindowManager = (WindowManager) getSystemService(WINDOW_SERVICE); mWindowManager.addView(mFloatingView, params); floatingButton.setOnTouchListener(new View.OnTouchListener() { private int initialX; private int initialY; private float initialTouchX; private float initialTouchY; @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: initialX = params.x; initialY = params.y; initialTouchX = event.getRawX(); initialTouchY = event.getRawY(); downRawX = event.getRawX(); downRawY = event.getRawY(); dX = v.getX() - downRawX; dY = v.getY() - downRawY; return true; case MotionEvent.ACTION_UP: float upRawX = event.getRawX(); float upRawY = event.getRawY(); float upDX = upRawX - downRawX; float upDY = upRawY - downRawY; return true; case MotionEvent.ACTION_MOVE: params.x = initialX + (int) (event.getRawX() - initialTouchX); params.y = initialY + (int) (event.getRawY() - initialTouchY); mWindowManager.updateViewLayout(mFloatingView, params); return true; } return false; } }); } @Override public void onDestroy() { super.onDestroy(); } }
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.endless"> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"></uses-permission> <uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android:name="android.permission.WAKE_LOCK" /> <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"> <service android:name=".FloatingViewService" android:enabled="true" android:exported="false"> </service> <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>
You can use the following code to check if the service is running. If the service is already in running mode, it does not need to be restarted otherwise start in your MainActivity.
FloatingViewService mFloatingService = new FloatingViewService(getApplicationContext()); Intent mServiceIntent = new Intent(getApplicationContext(), mFloatingService.getClass()); if (!isMyServiceRunning(mFloatingService.getClass())) { startService(mServiceIntent); }
Method isMyServiceRunning() is below add this in your MainActivity. private boolean isMyServiceRunning(Class<?> serviceClass) { ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) { if (serviceClass.getName().equals(service.service.getClassName())) { Log.i ("isMyServiceRunning?", true+""); return true; } } Log.i ("isMyServiceRunning?", false+""); return false; }
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <RelativeLayout android:id="@+id/rl_close_button" android:layout_width="100dp" android:layout_height="wrap_content"> <RelativeLayout android:id="@+id/relativeLayoutParent" android:layout_width="80dp" android:layout_height="70dp"> <RelativeLayout android:layout_width="70dp" android:layout_height="70dp" android:background="@drawable/floating_round_main_shape"> <RelativeLayout android:layout_width="50dp" android:layout_height="50dp" android:layout_centerInParent="true" android:background="@drawable/floating_inner_round_shape"> <ImageView android:layout_width="25dp" android:layout_height="25dp" android:layout_centerInParent="true" android:src="@drawable/ic_voice_icon" /> </RelativeLayout> </RelativeLayout> </RelativeLayout> </RelativeLayout> </RelativeLayout>
I hope it will help these services.
Note:-This service will run better in Oreo and above versions.