Tuesday, June 30, 2020

LinkedIn Outlines How Pandemic Has Made Job Hunters Active On Its Network And How The Platform Influenced Working Strategy To Shift On Digital Means

LinkedIn, the professional's network, shared a report in which they stated that since this pandemic, people have been active on its platform more than ever. This is for of course reasons. The entire businesses are being operated remotely. Everything is now being handled digitally. People are now...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Arooj Ahmed via Digital Information World

The Simplest Android App: Hello World

Learning to code Android apps is a great decision. It's fun and it's an in-demand skill for the tech industry. In this tutorial, you'll learn how to build the simplest Android App: Hello World. It's a great place to start making Android apps.

Prerequisites for Creating a Hello World App

Before you get started with this tutorial, you should have:

  • A basic understanding of object-oriented programming and the Java programming language.
  • A computer running Windows or Linux, or a Mac running macOS. 

Install Android Studio

Android Studio is the official integrated development environment for native Android app development. It comes with all the tools necessary for developing apps such as a powerful code editor, debugger, testing support, and performance tools . It also comes with a Gradle-based build system, fast emulators, code templates, and much more.

Android Studio is available for Windows, macOS, and Linux platforms, and you can download it from here.

Proceed to download the appropriate Android Studio distribution file and install it according to your operating system. 

Windows

  1. For a .exe file (recommended), double-click to launch it.
  2. For a .zip file, unpack the ZIP and copy the android-studio folder into your Program Files folder. Open the android-studio/bin folder and launch the .exe file.
  3. Follow the setup wizard guide to complete the installation. 

Linux

  1. Unpack the .zip file you downloaded to /usr/local for your user profile, or /opt for shared users.
  2. To launch Android Studio, open a terminal, go to the android-studio/bin directory, and run studio.sh.
  3. Choose whether to import previous Android Studio settings or not, and then click OK.
  4. Follow the setup wizard guide to complete the installation. 

Android Studio Install for Mac

  1. Launch the Android Studio DMG file.
  2. Drag and drop Android Studio into the Applications folder, and then launch Android Studio.
  3. Select whether to import previous Android Studio settings and then click OK.
  4. Follow the setup wizard guide to complete the installation. 

Hello World Android Application

First, a peek at what we'll be building. The completed Android hello world application will look like this:

completed hello world app

To create this simplest Android app, just follow along with the steps in this tutorial.

Create the App Project

Launch Android Studio, and you should see a welcome page, as shown below. 

Android homepage

In the welcome page above, click Start a new Android Studio project. The next window presents the activities page, as shown below.

Android activities

Create a Hello World Activity

Android Studio provides activity templates to help you get started. For the Hello World project, choose Empty Activity and click Next.

An activity is a crucial component of any Android app. It provides a screen with which users can interact to perform activities, such as dial the phone, take a photo, or send a message. Each Activity has a window in which to draw its user interface. The window typically fills the screen, but it may be smaller than the screen and float on top of other windows.

You can learn more about Activities and many other topics in Android development in the Android From Scratch series.

Configure the Hello World Project Details

We'll finish creating the project by configuring some details about its name, location and which API version it uses.

configure android project
  • Change the name of the application.
  • Change the default Project location to your preferred directory or just leave it the default location.
  • On the minimum API level, Ensure that API 15: Android 4.0.3 IceCreamSandwich is set as the Minimum SDK: this ensures that your application runs on almost all devices.

Click Finish.

The Gradle Build System

Each time you create a new application, Android Studio creates a folder for your projects and builds the project with its Gradle system. The Gradle process may take a few moments. Gradle is Android's build system, which is responsible for the compilation, testing, and deployment of code. It makes it possible for the app to run on the device.

Explaining the Files in an Android App Project

Whenever you start a new project, Android Studio creates the necessary folder structure and files for that app. Let's look at the different files involved in an Android app project.

project overview
The manifests Folder

The manifests folder contains the AndroidManifest.xml file. The manifest file describes essential information about your application. 

The java Folder

This folder contains the Java source code files. As you can see from the editor window above, the MainActivity.java file contains the Java source code for the app's main Activity.

The res Folder

This folder includes all non-code resources, such as:

  • layouts: Layouts are XML files that define the architecture for the UI in an Activity or a component of a UI. For example, in our application, the activity_main.xml file corresponds to the main Activity.
  • values: Contains the color, style, and string XML files for the application.
  • drawable: This is a catch-all for a graphics that can be drawn to the screen, eg. images.
  • build.gradle: This is an auto-generated file which contains information on details of the app such as the SDK version, build tools version, application ID, and more.

Coding the Hello World App

Now that you have a general view of the project structure let's describe the most critical component files that constitute the hello world application. 

The Default Main Activity

The main activity is the first screen that will appear when you launch your app.

Each Activity represents a screen of the Android app's user interface. Each Activity has a Java (or Kotlin) implementation file and a XML layout file.

The Default Main Activity Java Code

Below is the default Java code generated by the application for the main activity.

You don't need to understand this code fully. A lot of it is boilerplate and will be the same for any app. The code defines a MainActivity class and with the onCreate method defines what happens when the Activity is created. In this case, it simply initializes the view of the Activity with the layout from the activity_main layout file.

The Default Layout XML File

XML files are used for layouts. The main Activity layout XML file is found in the project's /app/src/main/res/layout directory. Layout files are named after what they represent. For example, the Hello World application has one layout, which is the  activity_main.xml named after the main Activity.

Here is the default activity_main.xml layout. It contains one text view element, with the text Hello World!

Changing the Activity Layout

As you can see, we don't need to change much to complete our Hello World app, but we'll make a small change so that the text stands out better—we'll change the text colour and font size.

The Strings File

The strings.xml file provides text strings for your application. For example, a default strings file looks like this: 

If you want to change your app name, you can do it here.

Running the Application

Connect your Android device to your computer with a USB cable. The right connection type should show up as connected as a media device.

You'll also need developer options enabled on your device. If this is not already enabled, follow these steps (this will work on most Android devices:

  • Open up the Settings menu on your Android phone and scroll to the bottom. 
  • Tap About phone and scroll down again until you see the Build number option
  • Tap the Build number multiple times. Soon you should see a pop-up that reads something similar to You are five taps away from being a developer.
  • Keep tapping until the pop-up says you're a developer. 
  • Go back to the main Settings > System > Advanced. Developer options should be the second-last option. Turn the Developer options on.

In Android Studio's navigate to the top menu, select Run 'app'. Android Studio will show a dialog where you can choose what device to run your Android app. Choose your connected device and click the OK button.

The Hello World application should now be running on your phone. From here, you can make modify your app to whatever you want and add more features.

hello world app

Conclusion

In this tutorial, I showed you how to install Android Studio and create your first app: Hello World, the simplest Android app. After following this tutorial to create your first Android app, you are on your way to a promising career in developing apps!

To learn more about Android programming, check out some of our other Android tuorials here on Envato Tuts+.


by Esther Vaati via Envato Tuts+ Code

How to Copy a WordPress Site From One Domain to Another

Final product image
What You'll Be Creating

There are times when you’ll need to move a WordPress site to a new domain. You might want to move your site to a new hosting provider, or you might just want to change the domain name. In this post you'll learn how. It's easier than you might think!

The good news is that in most instances, moving a site to a new domain doesn’t actually mean you have to physically move the site. Instead, you can change the WordPress settings so your site behaves as if it’s moved domains. But it still says where it is on your server.

Sometimes moving your domain name will also mean moving your site. Maybe you want to find a better hosting provider. Or maybe you want to move your site into or out of a multisite network. In that case, you’ll need to migrate the site as well as setting up the new domain.

In this tutorial, I’ll help you identify whether you need to physically move your site or not, and then show you how to move your site to a new domain, both if you need to migrate the site and if you don't.

So let’s get started.

Moving to a New Domain Name: Do You Need to Migrate the Site?

In most cases, moving your WordPress site to a new domain name can be done without physically moving the site.

But sometimes you’ll either need or want to migrate the site as well. Here are some scenarios in which that might be the case:

  • You want to redesign your site at the same time and change to a more suitable hosting plan.
  • You’re unhappy with your hosting provider and want to switch.
  • Your site is currently in a multisite network and you want to move it to a standalone site.
  • Your site is a standalone site and you want to move it into a multisite network (as well as changing the domain).

In these cases, you’ll need to migrate the site as well as changing the domain name. I’ll show you how to do that shortly. But first, let’s look at how you live to a new domain name without actually moving the site.

Switching Domain Names Without Moving Your Site

Changing your domain name is a lot simpler than you might think. And you can do it by tweaking your WordPress settings and running a search for the old domain name in your database, using a plugin.

There are three steps:

  • Register the new domain name and point it at your site.
  • Configure WordPress settings to use the new domain name.
  • Edit the database or set up redirects so internal links to your old domain name are replaced by link to the new one.

Let’s work through these steps.

Register the New Domain Name and Point it at Your Site

If you want to use a new domain name, the first step is to register it. Check that it’s available and if so, register it under your name.

If your hosting provider also registers domain names, it’s simpler to do this with them—that way, you know your new domain name will point at your site.

But if your hosting provider isn’t also a domain registrar, or you’ve also registered the domain name elsewhere, you’ll need to get it pointing at your site.

Check how you do this with your domain registrar. You’ll need to change one of the following:

  • Nameservers: This will make all aspects of your domain name point to your hosting provider, including email addresses. So if you already have email set up using your domain name, you’ll either need to set that up again with your hosting provider, or use a different option. I tend to use nameservers and then direct email at Gmail using MX records.
  • A records: Use this to point your domain name at the IP address where your website is hosted. Your hosting provider will be able to give you this. 

Once you’ve done that, your domain name will point to the right place, although it can take anything up to a couple of days to work. You can use WhatsMyDNS to check if your DNS changes have propagated around the internet.

WhatsMyDNS

Your domain name is now pointing at your site, but your site will still behave as if it’s using the old domain name. So you need to configure some settings.

Configure Domain Settings in WordPress

In the WordPress admin, go to Settings > General. Look for the WordPress Address and Site Address fields. Edit these so they have your new domain name instead of the old one.

General settings

Scroll down and click the Save Changes button to save your new domain name. Your site will now work on the new domain name.

Your site is now using a shiny new domain name, but there could still be a problem, and that’s links.

Redirect Links Using the Old Domain Name

If you’ve shared links to your site using the old domain name, anyone using that link will only be taken to the new site if you still have your old domain name pointing at it (which you should). And even if that’s the case, they won’t be taken to the correct page in the site—they’ll either find themselves on the home page or the 404 page.

So any important links need to have redirects set up. Install a redirection plugin like the free Redirection or the more full-featured premium Advanced WP Redirect plugin and create reductions from the relevant posts or pages using the old domain name to those using the new domain name.

Alternatively you can set up a wildcard redirect from the old domain name to the new one, using a plugin or using cPanel in your hosting provider’s dashboard. This will catch any old links and send them to a link with the same slug using the new domain name.

With the redirection plugin you can set up a wildcard redierct, which will redirect all slugs using your old domain name to the same slug on your new domain name. This means you have to keep the slugs for your posts the same when you change domino names, and that you mustn’t change the URL structure of your permalinks. If you just leave everything as it is, you won’t go wrong.

You’ll need to enable regex functions first, as the wildcard asterisk is a regex function.

Go to Tools > Redirection and go to Add new redirection section of the screen.

Creating a new redirect rule with the redirection plugin

Click on the URL Options/Regex drop down and check the Regex box.

Setting up a wildcard redirect with the Redirection plugin

In the Source URL field, type the old path with a wildcard. It needs to take the form /(.*)$. The entry for Target URL needs to take the source /$1

Click Save Changes to save your redirect settings.

Remove Internal Links Using the Old Domain Name

Redirects work for links you’ve shared externally. But for links internal to the site, there’s a better fix, and that’s to edit those links to point to the new domain name.

Install a plugin like Better Search Replace and use it to replace all instances of the old domain name in your database with the new domain name. This means any internal links in your post or page content or in widgets will be updated to reflect the new domain name.

Before you do this, you should always back up your database. This involves directly editing the database and if you do it wrong, it’ll be difficult to undo. So use your backup software of choice to make a backup and save it somewhere safe.

Then go to Tools > Better Search Replace to access the plugin screen.

Better Search Replace screen

In the Search for field, type in your old domain name. In the Replace with field, type in your new domain name. It’s a good idea to include the https:// or https:// so you don’t find yourself replacing instances of email addresses that haven’t changed. If you do, make sure you do it for both the search and replace fields.

Note: When you set up your new domain name, it’s good practice to add SSL to your site so it’s at https://yourdomain.com. Set this up before running a search and replace and use https:// in the replace field. Learn how to set up SSL with our free guide. 

Next, you can select the tables you want to search. Either leave this at all tables, or select the wp_posts table to replace instances of your domain in your posts and pages—this normally picks up everything you need.

Keep Run as dry run checked so you can test things before editing your database (not something you should do lightly).

Click the Run Search/Replace button to run the search. The plugin will tell you how many instances of your search term it found and give you the opportunity to run the replacement again for real. You can also look at the list of results it returns and check them. If you’re happy, run the search/replace for real.

You may then find you have to log into your site again because of the domain change, or that you have to refresh your browser cache to get rid of old links in any cached pages. Do this and your site should be running with the new domain name throughout.

One word of warning: if there are any valid instances of the old domain name (eg. email addresses) in your post or page content, you’ll need to exclude these from the search replace.

Your site will now be working on the new domain name—and you didn’t have to physically move the files at all.

Migrating Your Site to a New Location and Domain Name

But what if you do actually need to move your site from one place to another, as well as moving the domain name?

Moving your site will take a little longer, but can be done.

There are four possible ways to do it:

  • Ask your new hosting provider to run the migration for you, if you’re switching hosting providers. Most providers will do one migration for free.
  • Use an automated tool provided by your hosting provider to run the migration, if they provide one. Siteground, for example, has a migration tool that you install on your old site and it automatically moves all of your content and settings to your new site.
  • Use a migration plugin to migrate your site from one place to another. Code canyon has number of migration plugins that will do this for you.
migration plugins on code canyon
  • Run the migration manually. This will involve copying the files and the database as well as installing WordPress in the new location. You can find out how to do this in our guide to migrating WordPress manually.

If your site is moving into or out of a multisite network, this will complicate things - but not make them impossible. You can either use a migration plugin that supports multisite, or follow our guides to manually migrating WordPress out of a network or into a network.

Summary

Moving your WordPress site from one domain to another doesn’t have to mean moving your site at all. Instead, you can just point the domain name at your site and make some changes to the settings, and you’re done.

But if you do need to physically move your site, then it’s not so hard as you may think. Follow the tips above and you’ll soon have your site working on your shiny new domain name.

The Best WordPress Themes and Plugins on Envato Market

Explore thousands of the best WordPress themes ever created on ThemeForest and leading WordPress plugins on CodeCanyon. Purchase these high-quality WordPress themes and plugins and improve your website experience for you and your visitors. 

Here are a few of the best-selling and up-and-coming WordPress themes and plugins available for 2020.



by Rachel McCollin via Envato Tuts+ Code

Lvivity

Lvivity is a software development company that offers effective solutions for customers around the world. We create desktop, web and mobile applications tailored to meet individual business needs.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Doodle Patterns

Cool seamless hand-drawn vector patterns.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Facebook Collaborates With Fact-Checking Platform To Help Users Detect Fake Information Being Shared On Social Media

The American based social network, Facebook has decided to join hands with UK based website Full Fact in order to spot false news being circulated. This is for Europe, Africa and the Middle East users. Right now it is an alarming situation for Facebook due to the circulation of fake...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Arooj Ahmed via Digital Information World