MyAd

Friday 5 October 2018

Decompile any APK to get Source Code





In this video I will teach you how to compile any APK file to decompile and get the source code of any android app using Android Studio. 


Please watch till end









Thursday 19 October 2017

Custom Android Camera in Android Studio using Camera2 API

Custom Camera API Tutorial in Android Studio using Camera2 API

Welcome guys. So in this tutorial you will learn how to display the camera preview in your Android Application. So lets get started.

Introduction

Nowadays a lot of apps offer users to take pictures and record videos for various kind of purposes. In this tutorial you will learn how to do the same in your android application. You can integrate your camera in multiple ways. One of the most simple way is to use the built-in camera app of Android. This is a simple process where you just call your built-in camera application using intent and you just take picture and videos from it and save them in your android directory. This way of accessing camera wont give you much control over your camera in certain ways as most of the work is done by the built-in camera app. This way is most appropriate when you just want to take a picture and video. The second step is to use the Custom camera app in your android and then add the camera functionality on your own. So this way will require you more effort because all of the background work and most of the work will be done by the developer. Building custom Camera interface will be useful when you are building an application which mainly deals with images and videos just like Instagram app.

Source Code

First of all you have to specify the permissions which your app will be requiring when it will be installed on your android smartphone. So open AndroidManifest.xml and add these lines of code in the beginning. Now create your activity_main.xml and change the Layout to FrameLayout. Now add the following code in your MainActivity.java.





So the complete switch_on_camera() method will be like this:





So now you have to create another class ShowCamera and extend it with SurfaceView.


Wednesday 18 October 2017

Send data from Android to PC using TCP Sockets in Android Studio

So guys in this blog you will get the source code of how to send data from Android to PC using Sockets.


So first of all, the first step is to create a project and then create an activity. After that you have to modify your xml file so that it is able to take message input from the user.


First of all you must know the concepts about Sockets.
A socket is an end point of a two way communication between two computer programs running on a network. 
A socket contains two things. An ip address and the Port number.
So in Java we can initialize a socket like:

Socket s = new Socket("ip","port");


So basically we have a socket which communicates with a ServerSocket running on other network. After initializing socket, we need to write data to it through the class PrintWriter.
We can also use OutputDataStream to send the data either in the form of a string or in bytes.


So in our project we will create a separate class which inherits AsyncTask class.




So in this class we are connecting to the Server which contains the server socket running at port number 6000. So now our socket will try to connect with the server socket in that ip address. If it connects, write the data to it through PrintWriter class.

After that you need to modify your MainActivity.java file like this:




So finally you need to add the INTERNET permission in your Manifest file.
The AsyncTask enables the developers to use the UI thread properly and easily. 
This class allows you to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.

NETBEANS (SERVER code)



So you have to create a new project in netbeans or eclipse. After that you have to create a java file (jFrame) with a main method.




In your java project, you need to initialize the ServerSocket with its IP Address. After that you need to use the BufferedReader class and InputStreamReader streams to get the Data from the client.  So thats all. In this way you will be able to send data (messages) from Android to Your PC.

Things to Remember:


Make sure you are connected to the same Wifi router.

Introduction to my Blog

Programming Experts

Hello guys. From now onwards, i will be starting my new blog. So in my blog you will be able to see some tutorials regarding Android Programming. You will also get to know how you can start learning Android Development and excel in software market and industry. So this is my first blog and i hope you guys will like my work. I will also be uploading the source code of my android projects and topics for you to copy and use them in your projects.




Decompile any APK to get Source Code

In this video I will teach you how to compile any APK file to decompile and get the source code of any android app using Android Studio....