InfyOm Blog

latest-post

In our daily life, we are going through lots of packages, and some of us don't know how to build our own package into Laravel.

We are going to perform the core steps to create your own package in laravel. In this tutorial we are going to build zoom package, so we will perform steps related to it.

Setup Fresh Laravel Repo 

Setup fresh laravel repo, and then create directories within it. 

for e.g Create infyomlabs/zoom-api directory into root.


Now create src directory into zoom-api

Run Composer init Into src Directory

After hitting composer init it will ask some information from you, as you can see in below image I have entered some of information. you can just hit enter if you do not want to add other information.


Add your config file (Optional)

Create directory config into src directory and add your config.php file there from where you can manage your env variables. 


Add Service Provider

Create your service provider from where you can do lots of actions. like you can publish config/routes/ migrations files from there. here we are publishing the zoom config file. 


Add your class (Which contains all functions) 

Here we have added a Zoom class which will be contained all zoom functions. 

Update Composer.json 


Finally, Test it in your existing project

Put the following code to your main composer.json (in your project's root). and hit composer update

  "repositories": [
        {
            "type": "path",
            "url": "infyomlabs/zoom-api",
            "options": {
                "symlink": true
            }
        }
    ],
    "license": "MIT",
    "require": {
        "infyomlabs/zoom-api": "dev-develop"
    },


January 23, 20211 minuteuserVishal Ribdiya

Posts

post

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

Compatibility testing is performed to protect against mobile application failures as devices have different operating systems, sizes, resolutions, and so on.  Determines that an app works consistently across various platforms and environments. 

Six compatibility test case scenarios questions:

  1. Have you tested on the best test devices and operating systems for mobile apps?
  2. How does the app work with different parameters such as bandwidth, operating speed, capacity, etc.?
  3. Will the app work properly with different mobile browsers such as Chrome, Safari, Firefox, Microsoft Edge, etc.
  4. Does the app's user interface remain consistent, visible and accessible across different screen sizes?
  5. Is the text readable for all users?
  6. Does the app work seamlessly in different configurations? 

6. Security testing test cases

Security testing ensures that the application data and network security requirements are met per the guidelines.  It focuses on identifying possible risks and security vulnerabilities so that the application is not exploited and the data is protected. 

Twenty-four security testing scenarios for mobile applications:

  1. Can the mobile app resist any brute force attack to guess a person's username, password, or credit card number?
  2. Does the app allow an attacker to access sensitive content or functionality without proper authentication?
  3. This includes making sure communications with the backend are properly secured.  Is there an effective password protection system within the mobile app?
  4. Verify dynamic dependencies.
  5. Measures taken to prevent attackers from accessing these vulnerabilities.
  6. What steps have been taken to prevent SQL injection-related attacks?
  7. Identify and repair any unmanaged code scenarios
  8. Make sure certificates are validated and whether the app implements certificate pinning
  9. Protect your application and network from denial of service attacks
  10. Analyze data storage and validation requirements
  11. Create  session management to prevent unauthorized users from accessing unsolicited information
  12. Check if the encryption code is damaged and repair what was found.
  13. Are the business logic implementations secure and not vulnerable to any external attack?
  14. Analyze file system interactions, determine any vulnerabilities and correct these problems.
  15. What protocols are in place should hackers attempt to reconfigure the default landing page?
  16. Protect from client-side harmful injections.
  17. Protect yourself from but vicious runtime injections.
  18. Investigate and prevent any malicious possibilities from file caching.
  19. Protect from insecure data storage in app keyboard cache.
  20. Investigate and prevent malicious actions by cookies.
  21. To provide regular checks for the  data protection analysis
  22. Investigate and prevent malicious actions from custom-made files
  23. Preventing memory corruption cases
  24. Analyze and prevent vulnerabilities from different data streams 

7. Localization testing test cases

Localization testing ensures that the mobile app provides a flawless user experience in a specific locale based on the target language and country.  It aims to ensure that the functionality and content of the application is fully tailored to meet the needs of users in a particular location.  Since fully localized apps and websites outperform their competition, this is a test case that shouldn't be overlooked.  Partnering with a respected third party with global reach alleviates some stresses and unknown variables when using localization.  For example, Testis covers over 100 countries and over 140 languages. 

Eleven localization testing scenarios for mobile applications:

  1. The translated content must be checked for accuracy.  This should also include all verification or error messages that may appear. 
  2. The language should be formatted correctly.(e.g. Arabic format from right to left, Japanese writing style of Last Name, First Name, etc.) 
  3. The terminology is consistent across the user interface. 
  4. The time and date are correctly formatted. 
  5. The currency is the local equivalent. 
  6. The colors are appropriate and convey the right message. 
  7. Ensure the license and rules that comply with the laws and regulations of the destination region.
  8. The layout of the text content is error free. 
  9. Hyperlinks and hotkey functions work as expected. 
  10. Entry fields support special characters and are validated as necessary (ie. postal codes)
  11. Ensure that the localized UI has the same type of elements and numbers as the source product. 

8. Recoverability testing test cases

The recovery test is a non-functional testing technique that determines how quickly a mobile application can recover after a system crash or hardware failure. 

Five recoverability testing scenarios questions:

  1. Will the app continue on the last operation in the event of a hard restart or system crash?
  2. What, if any, causes crash recovery and transaction interruptions?
  3. How effective is it at restoring the application after an unexpected interruption or crash?
  4. How does the application handle a transaction during a power outage?
  5. What is the expected process when the app needs to recover data directly affected by a failed connection? 

9. Regression testing test cases

QA and mobile app testing doesn't end once an app is launched.  When an application is updated, even small changes can create unexpected problems.  This is why regression testing is key.  The purpose of regression testing is to ensure that new code changes in the software do not cause errors or interruptions. 

Four regression testing scenarios for mobile applications:

  1. Check the changes to existing features
  2. Check the new changes implemented
  3. Check the new features added 
  4. 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.

January 09, 20214 minutesauthorBhumi Khimani
post
In the previous article, we learned 6 areas or tips on How to increase profits in our business - part 1.

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




To stimulate your sales channel, you need to generate excitement and a reason to buy. This can be done by introducing vibrant, brightly colored sales that include all your products and services and by expressing a sense of urgency, encouraging sales partners, and adding subscription sales.

8. Find a new Customer




Follow up after meetings. Contact the people you meet to see if they are likely. If they say they no longer need your services, ask them when it's a good time to call, or if they have business associates who can use what you sell now.

9. Remove unprofitable service and product




If you have more than one product or service, any analysis will determine if one is more profitable than the other. If you have a lot of products in your offering, you can trust that some of them will not make money. The trick is to find out what they are and then put in motion plans to eliminate them. The basic tool for doing this is an orderly list that ranks all your products and services showing total revenue and all direct costs and total profits.

10. Reduce labor costs with part-time workers




Employment is lower than full-time workers than part-time workers. Take advantage of this luxury by hiring multiple part-time workers. Warn that if these people are presented to your company with a full-time opportunity they will leave them first.

11. Develop a CEO monthly letter to employees to create teamwork and communication




You'll want to have monthly conversations with your team, letting them know about any updates, highlighting individual performances, and reminding them of goals for the quarter and year. This will help build team morale and focus on expectations.

12. Invest in your people




Your team will only be able to make exceptional work progress and be competent when you invest in their improvement. Invest in their continuing education and also provide the best resources to do their job effectively.

13. Send personal notes of congratulations or thank employees at their home




When you send complimentary notes to employees ’homes, it shows that you think of them as a person rather than just a worker. This helps increase employee loyalty to your company.

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.
January 06, 20212 minutesauthorAnkit Kalathiya
post
Hope you guys are familiar with Spatie Media Library. It's a very useful and time-saving package to manage file uploading.

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);
    }
}

Here we have defined function 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();
it will auto-generate the thumbnails with given height and width. 

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);
    }
so, it will generate 2 thumbnails with different image properties. you can use different image properties directly while generating thumbnails.

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.  


January 05, 20212 minutesauthorVishal Ribdiya
post

We have recently developed a site into the gatsby. We want to add Google Analytics to the website.

So, this is the way we implemented Google Analytics in the Gatsby site.

Use Gatsby Google GTag Plugin

Gatsby has a plugin gatsby-plugin-google-gtag that be used to easily add Google Global Site Tag to your Gatsby site.

Install the package by running the following command:

npm i gatsby-plugin-google-gtag --save

Configuration

Once the installation is complete, you can now add this plugin to your gatsby-config.js:

Configure trackingIds and other options. Add this into the plugins array. Like,

module.exports = {
  // ...
  plugins: [
    {
      resolve: `gatsby-plugin-google-gtag`,
      options: {
              // You can add multiple tracking ids and a pageview event will be fired for all of them.
              trackingIds: [
                "GA-TRACKING_ID", // Google Analytics / GA
                "AW-CONVERSION_ID", // Google Ads / Adwords / AW
                "DC-FLOODIGHT_ID", // Marketing Platform advertising products (Display & Video 360, Search Ads 360, and Campaign Manager)
              ],
              // This object gets passed directly to the gtag config command
              // This config will be shared across all trackingIds
              gtagConfig: {
                optimize_id: "OPT_CONTAINER_ID",
                anonymize_ip: true,
                cookie_expires: 0,
              },
              // This object is used for configuration specific to this plugin
              pluginConfig: {
                // Puts tracking script in the head instead of the body
                head: false,
                // Setting this parameter is also optional
                respectDNT: true,
                // Avoids sending pageview hits from custom paths
                exclude: ["/preview/**", "/do-not-track/me/too/"],
              },
      },
    },
  ],
}

This plugin automatically sends a “pageview” event to all products given as “trackingIds” on every Gatsby's route change.

If you want to call a custom event you have access to window.gtag where you can call an event for all products.

Check out this code.

typeof window !== "undefined" && window.gtag("event", "click", { ...data })

NOTE: This plugin only works in production mode! To test your Global Site Tag is installed and 

You need to run the following command for firing events correctly.

gatsby build && gatsby serve

If you need to exclude any path from the tracking system, you can add one or more to this optional array.

January 05, 20212 minutesauthorShailesh Ladumor
post

Development:








The Balanced Scorecard (BSC) was originally developed by Robert Kaplan of Harvard University and Dr. David Northon as a framework for measuring organizational performance using the more " BALANCED " set of performance measures.

Traditionally companies used only short-term financial performance as a measure of success but now non-financial strategic measures also added in order to focus on long-term success.
The BSC system evolved over the years and is now considered a fully integrated "Strategic Management System".

What is a Balanced Scorecard (BSC)?








  • A Balanced Scorecard is a performance metric used to identify, improve, and control a business's various internal processes and resulting outcomes.
  • Balance Scorecard is a framework to implement and manage strategies.
  • The Balance scorecard is derived from the idea of looking at strategic measures to get a more balanced view of performance. The concept of a Balanced Scorecard evolved beyond the simple use of perspectives, every business can implement it according to the requirements and therefore it is a holistic system for managing strategy.

Why do we need to implement it?








  • The key benefit of using a BSC framework is that it gives way to the organization  to "Connect the Dots" between various components of strategic planning and management and it means there will be a visible connection between Projects and Programs that people are working on it.
  • BSC framework also helps management to meet pre-decided targets.

Perspectives of Balanced Scorecard:







Indeed balanced scorecard plays a significant role to aid management to keep updated internal processes and the external Business world as well.
The framework Balanced Scorecard divided into four areas (perspectives) that are critical to business success as given below.
balanced_scorecard_perspectives.png 223.33 KB
  1. Financial 
  2. Internal process 
  3. Learning and Growth 
  4. Customer 
The BSC suggests that we view the Organization from four Perspectives to develop Objectives, Measures, Targets, and initiatives (relative to each of these points of view).

To know more details about all four perspectives, read my upcoming weekly Blogs.

January 02, 20212 minutesauthorMariyam Bemat
post
Few main things remember to test an Android Application which are mention below:

1. Functional testing test cases

There are many hands involved in creating a mobile app.  These stakeholders may have different expectations.  Functional testing determines whether a mobile app complies with these various requirements and uses.  Examine and validate all functions, features and competencies of a product.

Twelve functional test case scenario questions:

  1. Does the application work as intended when starting and stopping?  
  2. Does the app work accordingly on different mobile and operating system versions?
  3. Does the app behave accordingly in the event of external interruptions?
  4. (i.e. receiving SMS, minimized during an incoming phone call, etc.)
  5. Can the user download and install the app with no problem?
  6. Can the device multitask as expected when the app is in use or running in the background?
  7. Applications work satisfactorily after installing the app.
  8. Do social networking options like sharing, publishing, etc. work as needed?
  9. Do mandatory fields work as required?  Does the app support payment gateway transactions?
  10. Are page scrolling scenarios working as expected?
  11. Navigate between different modules as expected.
  12. Are appropriate error messages received if necessary? 

There are two ways to run functional testing: scripted and exploratory.


Scripted
Running scripted tests is just that - a structured scripted activity in which testers follow predetermined steps.  This allows QA testers to compare actual results with expected ones.  These types of tests are usually confirmatory in nature, meaning that you are confirming that the application can perform the desired function.  Testers generally run into more problems when they have more flexibility in test design.

Exploratory
Exploratory testing investigates and finds bugs and errors on the fly.  It allows testers to manually discover software problems that are often unforeseen;  where the QA team is testing so that most users actually use the app.  learning, test design, test execution and interpretation of test results as complementary activities that run in parallel throughout the project.  Related: Scripted Testing Vs Exploratory Testing: Is One Better Than The Other? 

2. Performance testing test cases

The primary goal of benchmarking is to ensure the performance and stability of your mobile application

Seven Performance test case scenarios ensure:

  1. Can the app handle the expected cargo volumes?
  2. What are the various mobile app and infrastructure bottlenecks preventing the app from performing as expected?
  3. Is the response time as expected?  Are battery drain, memory leaks, GPS and camera performance within the required guidelines?
  4. Current network coverage able to support the app at peak, medium and minimum user levels?
  5. Are there any performance issues if the network changes from / to Wi-Fi and 2G / 3G / 4G?
  6. How does the app behave during the intermittent phases of connectivity?
  7. Existing client-server configurations that provide the optimum performance level? 

3. Battery usage test cases

While battery usage is an important part of performance testing, mobile app developers must make it a top priority.  Apps are becoming more and more demanding in terms of computing power.  So, when developing your mobile app testing strategy, understand that battery-draining mobile apps degrade the user experience.  Device hardware - including battery life - varies by model and manufacturer.  Therefore, QA testing teams must have a variety of new and older devices on hand in their mobile device laboratory.  In addition, the test environment must replicate real applications such as operating system, network conditions (3G, 4G, WLAN, roaming) and multitasking from the point of view of the battery consumption test.

Seven battery usage test case scenarios to pay special attention to:

  1. Mobile app power consumption 
  2. User interface design that uses intense graphics or results in unnecessarily high database queries
  3. Battery life can allow the app to operate at expected charge volumes
  4. Battery  low and high performance requirements
  5. Application operation if used when battery is removed Battery usage and data leaks
  6. New features and updates do not introduce new battery usage and data 
  7. Related:  The secret art of battery testing on Android 

4. Usability Testing Test Cases

Usability testing of mobile applications provides end users with an intuitive and user-friendly interface.  This type of testing is usually done manually, to ensure the app is easy to use and meets real users' expectations.

Nine usability test case scenarios ensure:

  1. The buttons are of a user-friendly size. 
  2. The position, style, etc. of the buttons are consistent within the app
  3. Icons are consistent within the application
  4. The zoom in and out functions work as expected
  5. The keyboard can be minimized and maximized easily.
  6. The action or touching the wrong item can be easily undone.
  7. Context menus are not overloaded.
  8. Verbiage is simple, clear and easily visible.
  9. The end user can easily find the help menu or user manual in case of need.
  10. Related: High impact usability testing that is actually doable 

We will see more points in our next articles.

January 02, 20214 minutesauthorBhumi Khimani
post
Snackbars are fairly common in the Android app. Almost every app uses a snack bar to display some information about what's going on in the app. You can consider Snackbar as an alternative or the best version of Toasts in Android.

Step 1:- Using a normal Snackbar

To use Snackbar in your app, you just have to have the material design dependency in your app. Add Material design dependency to your build.Gradle app-level.

dependencies {
    implementation "com.google.android.material:$latest_version"
}
And then you can use the snack bar just like toast. For example:

Snackbar.make(view, "Show some message here", Snackbar.LENGTH_SHORT).show()
Step 2: Working with the MainActivity.xml


<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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:id="@+id/coordinatorLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.application.snackbarapp.MainActivity">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <Button
            android:id="@+id/button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:text="show snackbar" />

    </RelativeLayout>

</android.support.design.widget.CoordinatorLayout>
Step 3: Creating a custom layout for a snack bar

Under Layout, the folder creates a layout for the snack bar that must be inflated when creating a snack bar under the mainactivity.java file.

import android.graphics.Color;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    private CoordinatorLayout coordinatorLayout;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        coordinatorLayout = findViewById(R.id.coordinatorLayout);
        button = findViewById(R.id.button);

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showSnackbar();
            }
        });
    }

    public void showSnackbar() {
        Snackbar snackbar = Snackbar.make(coordinatorLayout, "Marked as Read", Snackbar.LENGTH_INDEFINITE)
                .setAction("UNDO", new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Snackbar snackbar1 = Snackbar.make(coordinatorLayout, "Undo successful", Snackbar.LENGTH_SHORT);
                        snackbar1.show();
                    }
                })
                .setActionTextColor(Color.RED);

        snackbar.show();
    }
}

January 02, 20211 minuteauthorVivek Beladiya
post
One of our clients once asked me to explain what CMYK means and what is the difference between it and RGB. Here's why it's important.






We discussed the need for one of their vendors to provide or convert a digital image file as CMYK. If this conversion is not done properly, the resulting image may have muddy colors and lack vibrancy that may reflect badly on your brand.


CMYK is an acronym for Cyan, Magenta, Yellow, and Key (Black) - the ink colors used in the typical four-color printing process. RGB is an acronym for red, green, and blue light colors used in digital display screens.


CMYK is a term widely used in the graphic design business and is also known as "full-color". This printing method uses a process where each ink color is printed with a specific pattern, each subtractive color overlapping to create a spectrum. In the subtractive color spectrum, the more color you overlap, the darker the color becomes. Our eyes interpret this printed color spectrum as images and words on paper or printed surfaces

Printing a four-color process is not possible with what you see on your computer monitor.

RGB is an additive color spectrum. By default, any image displayed on a monitor or digital display screen will be created in RGB. In this color space, the more overlapping color you add, the lighter the resulting image. For this reason, almost every digital camera saves its images in the RGB color spectrum.

2.png 80.5 KB

RGB color spectrum is higher than CMYK.


CMYK is for printing. RGB is for digital screens. But the thing to remember is that the RGB color spectrum is larger than CMYK, so what you see on your computer monitor is not possible by printing a four-color process. When we are designing artwork for our clients, careful attention is paid when converting artwork from RGB to CMYK. In the example above, you can see how RGB images with very bright colors can see unnecessary color shifts when converting to CMYK.



At Trillion, a combination of quality devices and expert eyes results in colors that look great in whatever environment they appear in, so your brand will always look its best. Don't let RGB fool you. If your brand has experienced a mismatch between your print and digital marketing efforts and you want to improve things.
January 01, 20212 minutesauthorKishan Savaliya