Langsung ke konten utama

Postingan

Menampilkan postingan dari Juni, 2016

What is Activity

Hi, today we will talk about one of the basal things in Android application an Activity. How to understand an Activity Activity is the basis of your application and entry point as well. From the user side, it's a single focused thing that user can do while interacting with your application. Most of the Activities interact with the user and take care of creating a window for your UI.  Also, using multiple Activities to represent various tasks helps a programmer to make app's code less complex and easier to maintain.  Activities can be used as fullscreen or floating windows and as a part of another activity (in an ActivityGroup , note that it's deprecated since API 13). Activity insights Firs of all to start an activity you should define it in your manifest using <activity>  tag inside <application> . Like this: <manifest> <application> <activity android:name=".MyActivity" /> </application> </manifest > Every class

Google starting Android Developer Certification

Certifications for developers is not a new thing. For example, Microsoft offers a  wide range of certifications not only for developers but for almost anyone who works with their products (Office, Skype, Microsoft Server etc.). Oracle , Cloudera , and a plethora of other IT companies make certification programs for their products as well.  These (in theory) help employers to connect with those who search for work in their field. It's (should be) kind of a confirmation that you have these skills that you're talking about. But in practice, it doesn't work that well, many certified programmers don't know much about real software development process and don't have the necessary experience to start working in a team of qualified developers. So, employers did understand that and ceased to pay attention to certificates. The most important criterion in employment is what applicant really did and can do, his portfolio and capability of learning from mistakes and failures. 

Upload File to Server using Retrofit in Android

Hello friends, In this post, I will show you how to upload Image/Video/Any Files to the Server in Android using Retrofit 2. In Retrofit 2 Image or any type of files will be uploaded as Multipart. The File is received using php. This Code is Updated with Multiple File Upload. Upload Single File Web Part: Create a PHP file named as upload_image.php and paste the following lines. <?php $target_dir = "uploads/"; $target_file_name = $target_dir .basename($_FILES["file"]["name"]); $response = array(); // Check if image file is a actual image or fake image if (isset($_FILES["file"])) { if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file_name)) { $success = true; $message = "Successfully Uploaded"; } else { $success = false; $message = "Error while uploading"; } } else { $success = false; $message = "Required Field Missing"; } $response[

Google Code Labs

The best (and the easiest as well) way of learning is by doing. But to get the idea of what you need to do you need someone to tell you (this is the main purpose of this blog). Google Code Labs are doing exactly that. In codelab, you go through the lesson and build a small app that contains some feature like Google Sign in, Android Pay, Face Detection etc. There are also codelabs that teach you to use new tools of SDK and Android Studio like ConstraintLayout. At the moment, I've tried one codelab called " Build a Material Design App with Android Design Support Library " and have learned about ViewPager and NavigationDrawer also you can learn how to implement flexible space with image during this code lab. One flaw that me and my friend noticed is the lack of comments in the code. Most of the codelab you will be asked to copy/paste/rewrite some code to make things work the desired way. But for me, it was an encouragement to learn about used thing trough reading docs and b

Automatic Update Checker for Android - Library

Featured In  Created By How to use this Library: Gradle:  compile 'androidmads.updatehandler:updatehandler:1.0.3' Maven: <dependency> <groupId>androidmads.updatehandler</groupId> <artifactId>updatehandler</artifactId> <version>1.0.3</version> <type>pom</type> </dependency> How to use this Library:  After importing this library, use the following lines to check version update for your application automatically. /** * This library works in release mode only with the same JKS key used for * your Previous Version */ UpdateHandler updateHandler = new UpdateHandler(MainActivity.this); // to start version checker updateHandler.start(); // prompting intervals updateHandler.setCount(2); // to print new features added automatically updateHandler.setWhatsNew(true); // to enable or show default dialog prompt for version update updateHandler.showDefaultAlert(true); // listener for custom update prompt updateHandler.setOnUpd

Benefits of Awareness

Today apps are more and more bound to the users context and developers seek for the way to provide a unique experience for each and every user. One of the first apps that were designed to do so was Google Now a Google's smart mobile assistant that was meant to provide the user with information like weather, traffic, flight delays even before the user needs it. To make this kind of apps, you need to be aware of user context. What is around him? Is it raining? What is he doing? To answer these questions, you need to use sensors, a bunch of APIs and do it all in the background. It means that your app will drain the battery and affect the system health even if it's not accessed at the moment. Bad influence on the battery life can be the cause of your app deletion from user's smartphone. But these battery and performance optimizations can be a cause of pain for the developer. You need to develop the main idea of your app to make it clear and straight. And here comes Awareness AP