Posts
How to add Shadow and Text on ImageView in AndroidAndroid Development

How to add Shadow and Text on ImageView in AndroidAndroid Development
Basically, it works like a stack where each view is stacked on top of the other
Create a drawable
file for shadow view and assign name as image_shadow
and add code in this file.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<corners
android:radius="10dp"
/>
<gradient
android:angle="270"
android:centerX="300%"
android:startColor="#00000000"
android:endColor="#99000000"
android:type="linear"
/>
<size
android:width="270dp"
android:height="60dp"
/>
<stroke
android:width="1dp"
android:color="#878787"
/>
</shape>
Now, xml
file and add the below code into it and set this drawable
file as view background
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/imageView"
android:layout_width="250dp"
android:layout_height="250dp"
android:scaleType="centerCrop"
android:src="@drawable/shopping_image"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<View android:id="@+id/view"
android:layout_width="250dp"
android:layout_height="250dp"
android:background="@drawable/image_shadow"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:textColor="@android:color/white"
android:text="Write your text here"
android:textSize="25sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/view"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
How can I run my app on my phone without USB connection with my pcAndroid Development

How can I run my app on my phone without USB connection with my pcAndroid Development
we learning in this blog run your app without connecting a USB cable.The main purpose of this blog user-run app without any restriction.Some time connect cable with device and device disturbing and the app not run properly issues
Step 1:
Notes:
- the third image in an already installed plugin in my android studio so friend your android studio in install this plugin.
- then your android studio restart - this point flow.
- your android studio again start then forth image in showing "ADB Wifi" option showing
- click ADB Wifi and below image showing one look open in your android studio
- a simple click to connect
- before click to connect remember your device and pc in connect same wifi otherwise not connect the device
- android studio open first time one time connect your device with USB then not needed
Balanced Scorecard : Strategic Management System-2Human Resource

Balanced Scorecard : Strategic Management System-2Human Resource
In the last Blog we have discussed the Basics of BSC, let's start a discussion about four perspectives of BSC.
A Balance Scorecard looks at an organization from four different perspectives to measure its health, each of these perspectives focuses on various sides of the company and creating a balanced view of the organization.
And yes all four areas of BSC are interrelated we cannot ignore any out of four to the success of the organization.
Financial perspective:
This perspective views organizational financial performance and the uses of financial resources.
We need to focus on two points:
- Is the company achieving its financial goals?
- How well the strategies and operations contribute to improving financial health?
Well, now the question is how we can measure the output of the financial perspective?
these data always past focused, we need to gather two types of data
- Historical Data: How did we do last month, last week, last year, and so on.
- Current Data: How we are doing right now, Today?
For instance,
- our net profit for the year versus last year
- Our sales revenue this year versus last year
These measures of corporate performance are based on history and also vary from organization to organization.
As the BSC is holistic approach, any key objectives that is related to company's financial health and the performance may include in this perspective as given below:
- Cost Saving and efficiencies [Specified Goals: Reduced production cost 10% by 2021]
- Profit Margins [increase operational profit Margins]
- Revenue Sources [adding new revenue channels/department/products]
In the end,
- are you making money?
- Are your investors happy?
If yes then be happy...
The financial health of your Organisation may be the indicators of your past decisions but still incredibly important.
' Money keeps the company alive ' and the financial perspective focus solely on this.
Internal Process Perspective:
This perspective views various organizational processes and the efficiency of the particular process.
- from this view, the question should be asked what internal processes have added values within the organization and what activities need to carry in the organization (In all three perspectives).
- The internal Process perspective looks at how smoothly your business is running (Here, Efficiency is important )
- It's all about,
- Reducing waste,
- Speeding process/ production/
- Doing more with less
We need to focus on one point:
- IS the company improving the critical process?
- Are there any obstacles standing between ideas and execution?
- How quickly you can adapt to changing business conditions?
This perspective answer the question :
"what process we must excel at to satisfy our shareholders/financial Backers and customers?"
To know more about BSC please read my weekly Blog.
How to increase 10 X salesSales

How to increase 10 X salesSales
Simply put, the rule of 10 X is taking any target you set for your company or sales team, and multiplying it by 10.
So if the goal is to increase revenue by 5% using the 10X rule, you will increase that goal to 50%.
What the 10X rule does is force you and your sales team to think in terms of LEVERAGE. Because all of a sudden, instead of focusing on the “real” goal, the goal is achieved through the roof.
Contact customer acquisition with a solid plan. Build a foundation by developing relationships with your target audience.
Achieve customers differently as you progress toward strategic goals. Here are four lessons to guide your team:
1. Create an engagement
It is highly unlikely that a first time visitor will stumble upon your website and automatically purchase your products. Potential customers should be fully engaged with your brand before making a purchase.
2. Be present on social media
If you are not present on social media, you are lost in a huge market that your competitors are already taking advantage of.
Having a social media presence should also not be expensive. Creating a business account on Facebook, Twitter, Instagram, and LinkedIn is free. Just join discussions and groups related to your industry. Provide helpful answers to questions and insights on various posts to make yourself known.
3. Keep your sales simple
Everyone is on sale, even if your job or business has no impact, Cardo told those in attendance. And many entrepreneurs and professionals overreact to it.
Sales is a game of touch. It’s about finding someone who can buy, who has the power to make decisions, and who is interested. Then you contact them with offer fur, talk price, and ask. It's not always easy, though it's really easy. The most successful salespeople focus on simplifying their sales process.
4. Put your problem customers
We have it all - the customers that we meet today or in the future take up more of our time for business.
5. All your customers are committed to staying in touch after purchasing from you
Keep an eye out for ways you can sell them extra items. Don’t keep your customers engaged to monopolize your time, but you can help them gain an understanding of strategy opportunities.
6. Host an event
Hosting an event is a great way to do this because it gives potential customers the opportunity to meet your brand on a more personal level. Depending on your product or service, you can either host a personal event where customers can meet you or host an online webinar where it still feels personal - just like you are in front of your audience.
Which Logo File Format to Use Part-1Design

Which Logo File Format to Use Part-1Design
There are multiple logo file formats you need and here’s
Digital logo applications such as websites and anything seen on the screen use the RGB color spectrum. This color spectrum is more varied than standard printed material so digitally used logo files are designed a little differently. They usually do not require high-resolution art and are not limited to one color.
The printed logo application like printed brochures, business cards, T-shirts, decals, folders, and ink on paper is 99% of the time prepared with CMYK and Pantone color spectrum. This spectrum is handled differently than a digital application and requires high resolution so that it looks crisp when printed on paper.
Logo File Formats
Logo file formats can come in many shapes and sizes. The format is driven by how it will be used, now and in the future, as well as what the logo looks like. When your logo designer provides the digital file formats to you, place them somewhere secure so you do not misplace them and can consistently reference the files. Below are common logo file formats that cover 99% of all logo marketing applications.
- JPG
- PNG
- GIF
- EPS
- AI
- SVG
Which logo file formats are most common?
It is very common to have JPG or PNG logo file formats. This is most common because of many programs such as Word and PowerPoint import/drop. When you use these file formats on the screen, it is mostly acceptable. But have you ever tried to enlarge one of these file formats and the logo starts to get blurred or pixelated? This is because these formats are pixel-based and limited in how much they can be expanded before image quality deteriorates.
Here is a breakdown of logo file formats and their best uses:
The use of JPG (or JPEG) does not require digital and print, as it is the RGB and CMYK color space. If you don't have software like Photoshop, it creates colorful spots. One way to determine which large size JPG logo file can be used is to drag and drop the logon into your web browser window; You can use a digital app and some small print apps when viewing four or five-inch spots or more logos. JPG files are pixel-based and can be quite large. They also do not support PNG (listed below) as a demonstration background.
PNG Logo files are good for placing your logo on a photo above a photo or on a colored background in a digital app as it supports transparency. PNG logo file formats are widely supported on websites. PNG for any printed projects. Do not use files. PNG files are pixel-based and do not expand well.
How to Test Android Applications - part 2Testing

How to Test Android Applications - part 2Testing
In the previous article, we learned 4 cases for how to test Android Applications.
In this article, we will learn more cases for how to test Android Applications.
5. Compatibility testing test cases
Six compatibility test case scenarios questions:
- Have you tested on the best test devices and operating systems for mobile apps?
- How does the app work with different parameters such as bandwidth, operating speed, capacity, etc.?
- Will the app work properly with different mobile browsers such as Chrome, Safari, Firefox, Microsoft Edge, etc.
- Does the app's user interface remain consistent, visible and accessible across different screen sizes?
- Is the text readable for all users?
- Does the app work seamlessly in different configurations?
6. Security testing test cases
Twenty-four security testing scenarios for mobile applications:
- Can the mobile app resist any brute force attack to guess a person's username, password, or credit card number?
- Does the app allow an attacker to access sensitive content or functionality without proper authentication?
- This includes making sure communications with the backend are properly secured. Is there an effective password protection system within the mobile app?
- Verify dynamic dependencies.
- Measures taken to prevent attackers from accessing these vulnerabilities.
- What steps have been taken to prevent SQL injection-related attacks?
- Identify and repair any unmanaged code scenarios
- Make sure certificates are validated and whether the app implements certificate pinning
- Protect your application and network from denial of service attacks
- Analyze data storage and validation requirements
- Create session management to prevent unauthorized users from accessing unsolicited information
- Check if the encryption code is damaged and repair what was found.
- Are the business logic implementations secure and not vulnerable to any external attack?
- Analyze file system interactions, determine any vulnerabilities and correct these problems.
- What protocols are in place should hackers attempt to reconfigure the default landing page?
- Protect from client-side harmful injections.
- Protect yourself from but vicious runtime injections.
- Investigate and prevent any malicious possibilities from file caching.
- Protect from insecure data storage in app keyboard cache.
- Investigate and prevent malicious actions by cookies.
- To provide regular checks for the data protection analysis
- Investigate and prevent malicious actions from custom-made files
- Preventing memory corruption cases
- Analyze and prevent vulnerabilities from different data streams
7. Localization testing test cases
Eleven localization testing scenarios for mobile applications:
- The translated content must be checked for accuracy. This should also include all verification or error messages that may appear.
- The language should be formatted correctly.(e.g. Arabic format from right to left, Japanese writing style of Last Name, First Name, etc.)
- The terminology is consistent across the user interface.
- The time and date are correctly formatted.
- The currency is the local equivalent.
- The colors are appropriate and convey the right message.
- Ensure the license and rules that comply with the laws and regulations of the destination region.
- The layout of the text content is error free.
- Hyperlinks and hotkey functions work as expected.
- Entry fields support special characters and are validated as necessary (ie. postal codes)
- Ensure that the localized UI has the same type of elements and numbers as the source product.
8. Recoverability testing test cases
Five recoverability testing scenarios questions:
- Will the app continue on the last operation in the event of a hard restart or system crash?
- What, if any, causes crash recovery and transaction interruptions?
- How effective is it at restoring the application after an unexpected interruption or crash?
- How does the application handle a transaction during a power outage?
- What is the expected process when the app needs to recover data directly affected by a failed connection?
9. Regression testing test cases
Four regression testing scenarios for mobile applications:
- Check the changes to existing features
- Check the new changes implemented
- Check the new features added
- Check for potential side effects after changes start
That's it. If you want a good application, take these tips and follow cases for Android Application test. It will help to make quality & standardize your Applications.
How to increase profit in our business - 2Sales

How to increase profit in our business - 2Sales
In this article, we will learn more about how to increase profit in our business. Maximizing Profit depends on the strategies that business owners take. There are only two ways to do this:
1. Increase Prices
2. Reduce Cost.
You simply cannot say that you are going to increase the profit of your business without a specific strategy. All you can do to increase profit is to improve the variables that ultimately determine your Profitability. Let's see 7 more points to increase profit.
7. Know your sales Channel
8. Find a new Customer
9. Remove unprofitable service and product
10. Reduce labor costs with part-time workers
11. Develop a CEO monthly letter to employees to create teamwork and communication
12. Invest in your people
13. Send personal notes of congratulations or thank employees at their home
That's it. If you want to run a profitable business, take these tips and apply them to your business. It will help your business perform better, keep growing, and increase profits.
How to generate thumbnails by using Spatie Media LibraryLaravel

How to generate thumbnails by using Spatie Media LibraryLaravel
It's also providing support to convert your images to thumbnails while storing images. you can generate a thumbnail of the image with the size (height, width) you want.
They are calling thumbnails to Conversions. You can generate multiple thumbnails with different sizes as you want.
So let's see some short example which helps us to create thumbnails of an uploaded image.
Implement the HasMediaTrait into your Model
Here we have a User model and we want to generate a thumbnail of the user upload his profile image. you have to add HasMediaTrait
to the User model and need to extend HasMedia
.use IlluminateDatabaseEloquentModel;
use SpatieMediaLibraryModelsMedia;
use SpatieMediaLibraryHasMediaHasMedia;
use SpatieMediaLibraryHasMediaHasMediaTrait;
class User extends Model implements HasMedia
{
use HasMediaTrait;
public function registerMediaConversions(Media $media = null)
{
$this->addMediaConversion('profile-thumb')
->width(150)
->height(150);
}
}
registerMediaConversions
in which we can manage the size of a thumbnail, which means how much height or width we want for the thumbnail.So when we upload an image using the media library,
$media = User::first()->addMedia($pathToImage)->toMediaCollection();
How to fetch the generated thumbnail?
$media->getPath(); // the path to the where the original image is stored
$media->getPath('profile-thumb') // the path to the converted image with dimensions 150*150
$media->getUrl(); // the url to the where the original image is stored
$media->getUrl('profile-thumb') // the url to the converted image with dimensions 150*150
How to generate multiple thumbnails for a single image?
..... in User Model .....
use SpatieImageManipulations;
public function registerMediaConversions(Media $media = null)
{
$this->addMediaConversion('profile-thumb')
->width(150)
->height(150);
}
$this->addMediaConversion('old-profile-thumb')
->sepia()
->border(8, 'black', Manipulations::BORDER_OVERLAY);
}
That's it, you can read more about the spatie media library conversions (thumbnails) here.
Keep connected to us for more interesting posts about laravel.