Android News

Android News

Smartphones are important part of our life, they make our casual life easier and better.

THE BEST ANDROID APPS AVAILABLE FOR ALL

In the beginning, that Apple company Retail store possessed the principal amount of blog, together with iphone 8 people like far better options in comparison to the company become a member Google Android.

Nevertheless, its devices, which include Yahoo together with G2droid Back button is usually increasing with acceptance, builders are providing several blogs for any Google Android Sector. We should examine all very reputable Google Android blog you can get today.

Cam Scanner

Cam Scanner is a useful software application that pay for app reviews. The next unbelievable mobile or portable phone app permits ones Google Android telephone for an instant code reader. If you are an account manager who has to diagnostic paperwork active, Cam Scanner comes with a terrific together with 100 % free answer.

It is additionally excellent about duplication bills and also other fundamental paperwork for notes. In earlier times, a lot of this paperwork turning up with storage and tend to be rare to find in period. Paperless workplaces are the forthcoming, together with Cam Scanner assisting to take establishments in the 21st millennium.

The iPhone app Stumble Upon

Stumble Upon is an excellent internet product that will assists people see relevant one-way links with available the online marketplace. Just lately, the firm opens a good phone app. You will discover together with discussing interesting one-way links influenced by your requirements.

Using Stumble upon phone app, you can’t cease stumbling as soon as departing your personal property. You may pursue to see together with service one-way links inside a primed room in your home in the general practitioner and within a stopover in the international airport.

Hot Video camera

When you are searching for an excellent  use which terrific graphics, Hot Video camera is things you require. The following picture taking iPhone app converts one’s graphics inside cultured pictures in the previous. Will filter are generally on auto-pilot used on one’s graphics glimpse aged.

For any people with not necessarily plenty of time to help surf most of the graphics with Adobe Photoshop to help update these kinds of software programs are vital. Do you stylistic golf swings with a while using blog enjoy Hot Video camera.

Miraculous pic: Impression Updating active

If you happen to get pleasure from updating one’s graphics, pic can be an incredible, extraordinary phone app. You may get graphics in several ways with this particular. The idea will filter well suited for updating graphics of folks; you may switch that theme in the big eyes to change surroundings painting brush blemishes in the skin color on the issue.

Miraculous pic is accessible 100 % free with Sector, which means that there is absolutely no associated risk linked to intending. As soon as you get the idea, you can quickly update graphics with any setting with the very simple interface.

Whatever the particular tastes of each one person customer, there are plenty of blog are obtainable to pay people curiosities. Just about every supply unique options to produce lifetime better. Mobile phone handsets are adjusting the modern world, together with Company supporters stay cognizant of the hottest mobile or portable software programs available relating to the Google Android Sector.

Android Working with Volley String Request

Volley allows to categorized network request. In this article we will go through volley string request. It takes data on server in String format and return data in String format.

As we already created RestHelper class in previous article. Which we will use in volley string request article. It looks like below.

VolleyRestHelper.java

package com.naitiks.androidvolleyexample.volleyhelper; import android.content.Context; import com.android.volley.RequestQueue;import com.android.volley.toolbox.Volley; /** * Created by Naitik on 9/24/2017. */ public class VolleyRestHelper {    private static RequestQueue volleyQueue = null;    private static VolleyRestHelper _this = null;     private VolleyRestHelper(Context context){        volleyQueue = Volley.newRequestQueue(context);    }     public static VolleyRestHelper getRestHelper(Context context){        if(_this == null){            _this = new VolleyRestHelper(context);        }        return _this;    }}

We will write one interface which will help to forward all response including error to calling method. Interface will look like this

Interface OnVolleyComplete.java

package com.naitiks.androidvolleyexample.volleyhelper; import com.android.volley.VolleyError; /** * Created by Naitik on 9/24/2017. */ public interface OnVolleyComplete {    void onError(VolleyError error);    void onSuccess(Object response);}

To execute volley string request we need to add some more function in this class after modification class will look likes..

Method to make volley string request

This method will be placed inside VolleyRestHelper.java

public void volleyStringRequest (int requestMethod, String reqURL,                                   final String postData, String header, final OnVolleyComplete returnInterface){    StringRequest stringRequest = new StringRequest(requestMethod, reqURL, new Response.Listener() {        @Override        public void onResponse(String response) {            returnInterface.onSuccess(response);        }    }, new Response.ErrorListener() {        @Override        public void onErrorResponse(VolleyError error) {            returnInterface.onError(error);        }    }) {        @Override        public byte[] getBody() throws AuthFailureError {            String requestBody = postData;            try {                return requestBody == null ? null : requestBody.getBytes("utf-8");            } catch (UnsupportedEncodingException e) {                e.printStackTrace();                return null;            }        }    };    _this.volleyQueue.add(stringRequest);}

You can test api http://api.phpwithtea.info/get_names.php

FragmentStringRequest.java

package com.naitiks.androidvolleyexample; import android.os.Bundle;import android.support.annotation.Nullable;import android.support.v4.app.Fragment;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import android.widget.Button;import android.widget.EditText;import android.widget.TextView; import com.android.volley.Request;import com.android.volley.VolleyError;import com.naitiks.androidvolleyexample.volleyhelper.OnVolleyComplete;import com.naitiks.androidvolleyexample.volleyhelper.VolleyRestHelper; /** * Created by Naitik on 9/24/2017. */ public class FragmentStringRequest extends Fragment {     private View parentView = null;    private Button getReq, postReq = null;    private EditText postText = null;    private TextView responseView = null;    private VolleyRestHelper restHelper = null;    private final String GET_URL = "http://api.phpwithtea.info/get_names.php";    private final String POST_URL = "http://api.phpwithtea.info/post_names.php";     @Nullable    @Override    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {        parentView = inflater.inflate(R.layout.string_request, container, false);        initUI();        return parentView;    }     private void initUI(){        getReq = (Button) parentView.findViewById(R.id.btn_get);        postReq = (Button) parentView.findViewById(R.id.btn_post);        postText = (EditText) parentView.findViewById(R.id.post_data);        responseView = (TextView) parentView.findViewById(R.id.info_response);        getReq.setOnClickListener(new View.OnClickListener() {            @Override            public void onClick(View view) {                makeGetReq();            }        });         postReq.setOnClickListener(new View.OnClickListener() {            @Override            public void onClick(View view) {                makePostRequest();            }        });    }     private void makeGetReq(){        if(restHelper == null) {            restHelper = VolleyRestHelper.getRestHelper(getContext());        }        restHelper.volleyStringRequest(Request.Method.GET, GET_URL, null, null, new OnVolleyComplete() {            @Override            public void onError(VolleyError error) {                responseView.setText(error.getMessage());            }             @Override            public void onSuccess(Object response) {                responseView.setText(String.valueOf(response));            }        });    }}

 

string_request.xml

<!--?xml version="1.0" encoding="utf-8"?-->                       

I think now you have clear idea about how to work with volley string request. The above part of article explains to make GET request with volley string request.

Now we will go through volley string request using post

makePostRequest

This method will be places inside Fragment to execute post request.

private void makePostRequest(){    String postString = postText.getText().toString();    if(restHelper == null) {        restHelper = VolleyRestHelper.getRestHelper(getContext());    }    restHelper.volleyStringRequest(Request.Method.POST, POST_URL, postString, null, new OnVolleyComplete() {        @Override        public void onError(VolleyError error) {            responseView.setText(error.getMessage());        }         @Override        public void onSuccess(Object response) {            responseView.setText(String.valueOf(response));        }    });}

This method will execute post volley string request.