Should java developer in android worry with Introduction of Kotlin:

Should java developer in android worry with Introduction of Kotlin:kotlin_250x250
Before going to the answer of the question, I would like to list few parameters.
Kotlin is a statically-typed programming language that runs on the Java Virtual Machine and also can be compiled to JavaScript source code or uses the LLVM compiler infrastructure.
It combines OO and functional features and is focused on interoperability and seamless support for mixed Java+Kotlin projects, safety, clarity and tooling support.
Its primary development is from a team of JetBrains programmers .

A: Why Kotlin
Kotlin compiles to JVM bytecode or JavaScript( interesting).
Kotlin is built with experiences from Industry to handle the practical issues due to programming languages.
Nothing to adopt, Opensource.
Can use java libraries and vice versa.

B: Features
Null pointer safety (This has been the biggest headache for the developer. Due to programming error, hw/ sw error, version incompatibility etc)..
Lean Syntax: Class, function defining made easier.
Unchecked Exception and many more…
Comparision of Java vs Kotlin from official link of kotlin:
https://kotlinlang.org/docs/reference/comparison-to-java.html
I would say programmer shouldnt worry with introduction of Kotlin. Programming logic are always the same, Its just syntax to learn and they are easy. This increase the productivty and popularity of Android.

C: Will the java be phased out: Nope

D: Will the app look different: Nope

Keep following our posts, tutorials on Kotlin coming soon
android_kotlin

How to add Search Functionality to List View in android





Adding search functionality gives us the easy interface to search the item if we have lots of items in the list. In this tutorial, I going to teach you how to add search functionality in the list view. Our tutorial allows user to filter the list by writing text in the  search box.

  1. Create a new project in Android Studio and fill in the required information.
  2. Create a required files to generate list view . In my case, I am using my activity_main.xml as list view and created a new xml file list_item.xml for single item in the list. Make sure to create a EditText above list view which will be used to search item in the list. My code looks something like below:

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.demo.searchinlistview.MainActivity">
    
    <EditText
        android:id="@+id/search"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Search"/>
    <ListView
        android:layout_below="@+id/search"
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"></ListView>
</RelativeLayout>

list_item.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:id="@+id/text"
        android:textColor="#000"
        android:textSize="20dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</LinearLayout>
  1. Now open your MainActivity.java file and paste the following code. In the following code, I have created my items as arrayItem.If you run this code you will be able to see the list view but you won’t be able to search the item in the list:
    package com.demo.searchinlistview;
    
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.text.Editable;
    import android.text.TextWatcher;
    import android.widget.ArrayAdapter;
    import android.widget.EditText;
    import android.widget.ListView;
    
    public class MainActivity extends AppCompatActivity {
    
        private ArrayAdapter<String> adapter;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            String[] arrayItem=new String[]{"HoneyComb","IceCream Sandwich","Jelly Bean","KitKat","Lollypop","Nouggat"};
    
            adapter=new ArrayAdapter<String>(getApplicationContext(),R.layout.list_item,R.id.text,arrayItem);
    
            ListView listView=(ListView)findViewById(R.id.list);
            listView.setAdapter(adapter);
        }
    }

    How to add Search Functionality to List View in android

  2. To be able to search the item in the list you need to pase the following code. Pay attention to the onTextChanged() method ,it is responsible for filtering the list view while you enter the text:
    EditText search=(EditText)findViewById(R.id.search);
    search.addTextChangedListener(new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
    
        }
    
        @Override
        public void onTextChanged(CharSequence cs, int i, int i1, int i2) {
            MainActivity.this.adapter.getFilter().filter(cs);
        }
    
        @Override
        public void afterTextChanged(Editable editable) {
    
        }
    });
  3. Now run the following code you will see search functionality in list view.How to add Search Functionality to List View in android

My final code in the MainActivity.java look like following:

package com.demo.searchinlistview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;

public class MainActivity extends AppCompatActivity {

    private ArrayAdapter<String> adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        String[] arrayItem=new String[]{"HoneyComb","IceCream Sandwich","Jelly Bean","KitKat","Lollypop","Nouggat"};

        adapter=new ArrayAdapter<String>(getApplicationContext(),R.layout.list_item,R.id.text,arrayItem);

        ListView listView=(ListView)findViewById(R.id.list);
        listView.setAdapter(adapter);

        EditText search=(EditText)findViewById(R.id.search);
        search.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

            }

            @Override
            public void onTextChanged(CharSequence cs, int i, int i1, int i2) {
                MainActivity.this.adapter.getFilter().filter(cs);
            }

            @Override
            public void afterTextChanged(Editable editable) {

            }
        });
    }
}

And AndroidManifest.xml looks like:

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

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

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

</manifest>

Install Android Studio




Install Android Studio :Few steps Installation guide

Reading this blog,you will know how to install Android Studio.As we know all about the android OS, which is the evolving OS. It is the most used OS in today’s world. But as developer you may want to know about how android apps are created and in which IDE android apps are created. There are two IDE’s where we can create our android apps-

But,I personally recommend Android studio to every beginner like you who are just crazy in learning to build Android apps because even I have started my career with Android studio .Moreover,it is commonly used IDE also in recent days for Android apps. Installation of Android Studio is very time consuming and little bit hard without  guidelines . At first I was also fade up and didn’t find a way to install it. But after some research I came up to the solution. And, thought that it might be helpful to all the other beginner who want to learn to develop android apps just like me and didn’t even find a way to install. Therefore, in this tutorial I will help you to install Android Studio and setup the environment which is a little geeky work.

  1. First you have to install jdk (Java Development Kit)
  • Download jdk and After completion of it, open that file and you may need administrator authorization if you need click Yes. Then you will see a window like this below.

Install Android Studio

  • Now, click next and you will see window something like this:

Install Android Studio

On this window, you can select or unselect the optional features for you and you can also change the location where you want to store the jdk(Java development kit). But I recommend you to leave as it is. And, click next.

  • On this next window you will see window something like this below. On this window you can change where you want to install jre(Java Resource Environment).

Install Android Studio

  • Click Next and your installation will start. Now keep patient and wait for some time. After your installation is complete you will see completion window something like below. In this window you can see documentation tutorials by clicking Next Steps or you can just close it and go to installation of android studio. Either you can now install android studio.

Install Android Studio

  1. Now you can install Android studio and keep patient now you are close to android app development
  • Download android studio from this link or you can search in google, it is available for free.
  • After completion of download open it up. For this purpose you may need administrator authorization so just click Yes and you will see a window like this:

Install Android Studio

  • Click Next and on the next window something like below. You can select or unselect the components which you want to install but I recommend to select all the components.

Install Android Studio

  • Click Next and on the next window read all the terms and agreements if you are not bored. Now click on I Agree
  • Now you will see window something like below. Here you can change the location where you want to install Android Studio and Android SDK.

Install Android Studio

  • Click Next button repeatedly if any other window occur and your installation will start.
  • After the installation is finished following window will appear. Now click on Finish.

Install Android Studio

Note: If you have any error while opening Android Studio something like below image:

Install Android Studio

Follow the following steps:

  • Right click on the MyComputer and click on Properties.
  • Then click on the Advanced system settings on the left side of your window.
  • A pop window will appear something like below:

Install Android Studio

  • Click on Environment Variables. Then a popup window will appear something like below:

Install Android Studio

  • On System variables make sure that your java path is initialized with the correct location path.android8
  • Also create new variable JAVA_HOME with correct path location of your jdk something like below:

android7

If the above Android installation tutorial is not beneficial for you, visit
For Windows-
Install Android studio for windows.

For linux-
Install Android studio for linux.

Hope this tutorial will help you to Install Android Studio in both windows and linux.If you have any problem in installation process ,you can comment below.Thank you!

Understanding More About Native Android App And Its Prerequisites




About Native Android App:Native App

Generally native android app refers to the app built for a specific operating system and be accessed usually only from the dedicated app store. In this cases, app developed for android only can be accessed by Android users only and is developed by using java.
Here are some benefits about the native android app:
1. Types of apps: Apps that are hardware and graphic intensive are usually developed with native platforms.
2. Device Features: Native apps have access to the full paraphernalia of device-specific features, including GPS, camera, gestures, and notifications.
3. Offline functioning: A native app is best if your app must work when there is no connectivity.
4. User Experience and Performance: Native apps provide the best user experience because they are specifically designed for a single app store with which one can get the best compatible apps. The screen size is take care off and so are the hardware capabilities. Native apps provide better performance, responsive and fluid experience and a user can navigate and interact with the app without noticing any loading delays.
5. Design of Interfaces: The native app development environment provides tools and design widgets for creating certain standard interfaces with native user interaction experience which are not currently available using hybrid app development tools. So, it is easier to create native app user experience using native app development environment.
6. Limitations: Native apps are developed using native app Design Tools that are provided for the purpose of building the mobile apps for the platform, so implementing many native features and new technologies are easily adoptable and built into the native mobile app Environment Tools that are provided for the platform. Hence, no limitations.
7. Security: Depending on the security requirements of the project, native apps may provide better security environment.
8. Support and Resources: Since native app development Environment provides a lot of resources and options to develop for mobile apps, there are more support and available resources for building native mobile apps.
9. Tools and Debugging: Native development provides better development environment and tooling to test and debug the work, so it is much easier and less time consuming to find and fix bugs using native development Tools
10. Popularity: Since native app Environment provide a more fluid user experience and less likely to have feature limitations, most of the large app companies use native app development environment rather than hybrid app environment.

Prerequisites for the development:
Building an Android app comes down to two major skills/languages: Java and Android. Java is the language used in Android, but the Android part encompasses learning XML for the design of the app, learning the concepts of Android, and using the concepts programmatically with Java. Once you learn Java and XML (XML is really easy to get used to, and you should learn the language as you program your app rather than learning it beforehand like you would with Java), you need to learn how to connect these two using Android principles.

IDEs for the development:
Android Studio and Eclipse are mostly used IDEs, or Integrated Development Environments for the development of native android apps.

Next post: Environment setup for the development of the native android app.

About Android





What is Android?

Android is the name of the mobile operating system made by American company; Google. Andriod most commonly comes installed on a variety of smartphones and tablets from a host of manufacturers offering users access to Google own services like Search, YouTube, Maps, Gmail and more.

This means you can easily look for information on the web, watch videos, search for directions and write emails on your phone, just as you would on your computer, but there’s more to Android than these simple examples.

android-icon

 

 

What can an Android phone do?

Android phones are highly customizable and as such can be altered to suit your tastes and needs with wallpapers, themes and launchers which completely change the look of your device’s interface. You can download applications to do all sorts of things like check your Facebook and Twitter feeds, manage your bank account, order pizza and play games. You can plan events on from your phone’s calendar and see them on your computer or browse websites on your desktop and pick them up on your phone.

Another neat feature of Android is that android automatically backs up your contacts for you. When you set up android phone you’ll need to create a Google Account or sign in with an existing one. Every time you save a number to the address book of your Android phone,android it will be synced to your Google Account.

The benefit of this is that if you lose your phone all of your numbers will be saved. The next time you get an Android phone (or and iPhone or Windows Phone if you prefer) and sign in with your Google Account, all of your contacts and friend’s numbers will be displayed in your new phone’s address book immediately, no need to transfer or back them up anywhere else.This is the plus point of having Android phone.

Syncing is a way for your phone to keep all your information; websites, contacts, calendar entries and apps up-to-date. This can happen over your phone’s mobile data or Wi-Fi connection, seamlessly, in the background.

To get more information about feature of android visit https://www.androidpit.com/ 

What apps can I get on an Android phone?

There are hundreds of thousands of apps and games available to download from the Google Play store (formerly the Android Market). Android provides thousands of apps including system apps (many of which are provided with device inbuilt), utility apps (apps like antivirus, battery saver, RAM booster and many more), entertainment apps, games (including 3d and 2d games), office package apps and many more. In fact, apps are also sorted according to the categories which are provided by Google Play store. Android provides a large area to browse and to get apps according to users desire. In parallel, android also provides a very good platform for developers to develop android apps. There are also a big numbers of developers developing android apps to provide user, apps of their need and desires.

How can I get apps on an Android phone?

The majority of apps can be downloaded from the Google Play store (the equivalent of Apple  App Store), which includes a mix of free as well as ‘premium’ apps that you have to pay for. Some apps have lite versions which are free, in the hope you’ll enjoy them and upgrade to the full premium version. Others – like Angry Birds – are free, but include adverts or the ability to make in-app purchases.

The same account that lets you backup your contacts can also have financial details added to it, allowing you the ability to purchase content from the Google Play store directly. You can pay either by debit or credit card and initial setup takes less than five minutes from a computer.

Although there are well over a million apps available to Android users in the Google Play store, some developers choose to make their apps available to download from their own sites or alternative app stores. In order to download these you’ll have to change some settings on your phone before visiting these sites on your Android phone’s web browser. By downloading apps outside of the Google Play store, you do run the risk of attack in the form of data theft leave yourself more susceptible to viruses, so be careful if you choose this route.

Should you upgrade or change your Android phone; log into your Google account and you’ll be able to download your previously owned apps again, without being charged.

File And Directory Location In Android/ Phonegap





In short: It has to do with the multi-user functionality introduced with Jelly Bean:

/storage/emulated/0/: to my knowledge, this refers to the “emulated MMC” (“owner part”). Usually this is the internal one. The “0” stands for the user here, “0” is the first user aka device-owner. If you create additional users, this number will increment for each.
/storage/emulated/legacy/as before, but pointing to the part of the currently working user (for the owner, this would be a symlink to /storage/emulated/0/). So this path should bring every user to his “part”.
/sdcard/:  is a symlink to…
/mnt/sdcard(Android < 4.0)
/storage/sdcard0(Android 4.0+)
/storage/sdcard0/: As there’s no legacypendant here (see comments below), the “0” in this case rather identifies the device (card) itself. One could, eventually, connect a card reader with another SDCard via OTG, which then would become /storage/sdcard1 (no proof for that, just a guess — but I’d say a good one)
Though one might get to the conclusion there should be a /storage/sdcard/legacy as well, there isn’t (see comments) — which completely makes sense with my assumption of the numbers here are not related to the user, but rather to possible multiple cards: “0” would always be the one in the card-slot of the device, so no need for a “legacy symlink” here.

from:  http://android.stackexchange.com/questions/39542/confused-by-the-many-locations-of-the-virtual-sdcard

Copyright © 2016 InfoxIT Portal. All rights reserved.
Seo wordpress plugin by www.seowizard.org.
Scroll To Top
Visit Us On FacebookVisit Us On Google PlusVisit Us On YoutubeCheck Our Feed