Showing posts with label apps. Show all posts
Showing posts with label apps. Show all posts

Friday, 14 October 2016

Getting Started with Android Wearable App Development - Basics

The wearable device is really useful where you need to check updates on the go without unlocking your phone and swiping the notification at regular interval. But one may claim that it's too much to have a wearable and getting notifications instead checking your phone. The design and way it syncs with your handheld device are awesome and even more awesome when apps respond you based on contexts like location, temperature and other conditions.

Getting Started with Android Wearable App Development - Basics

Scope :

Android wearable application development is really a broad topic where as it's growing drastically. Even now recently Google announced inbuilt android play store, the keyboard for wearable and last year they introduced emoji and WiFi support for wearable apps. we will see about basics of Android wearable development and types to support existing apps.

Prerequisites : 

1) Knowledge on Basics of Android development

Design for wearable API :

Wearable is meant for checking updates on the go and quick replies. It's not same as your handheld device to show all available information to the user. It must be optimised to show the relevant and Updated data to the user in regular intervals.

For example : consider the Weather app, which shows you weather details for next seven days in single activity and it's data structure will be like 
  • Min temperature
  • Max temperature
  • Type of weather condition ( cloudy, sunny, rainy or moderate )
  • Atmospheric Pressure details
But your wearable app doesn't need such amount of data to be displayed on that small screen. so choose wisely which is more relevant data for the user to adapt Round or square wearable devices. In my opinion what I'll choose is
  • Today's Min Temperature
  • Today's Max Temperature
  • Type of Weather condition as Drawable ( Bitmap )
with time and date.

So, It's important to focus more on design and relevant data to the end user based on context.

Getting Started with Android Wearable App Development - Basics

Types of Wearable Development 

Basically, whenever your app shows notification in your handheld device it will automatically push to the wearable device at no cost of coding it. But when you need to support it extensively with actions, paging additional information as slider you should support it via notification App compat support library.

1) Notifications App compat support library.
2) Watch Face design and Data communication and syncing.
3) Extensively designing UI and installing an app in wearable.

Notification App compat : 

Notification App compat is all about extending support for existing notification in wearable devices without writing additional code for wearable. with notification app compat library you can simply create a notification for your device and wearable devices with additional options such as Actions, Quick reply intents etc.

Watch Face Design : 

Basically, watch face is nothing but just like your home screen with widgets but it can run only one app at a time, showing multiple data such as temperature, steps your while jogging, the heartbeat can be obtained through content providers or sensors. There are tonnes of watch face in play store. Watch face is considered as a home screen where you can check regular and frequent updates.

It has two modes namely ,

1) Ambient Mode
2) Normal Mode

In the Ambient mode, your watch tries to save battery by not allowing to update the screen frequently. you will get the chance to get updates in minutes basis. Most specifically your watch face should use Black and white pixel colour while in the Ambient mode to save energy by repainting the view now and then. you can't able to update second hand in the clock where it requires every second update.

In normal mode, you are allowed to use colours and drawable but that doesn't require high resource and frequent updates that make your watch face unresponsive sometimes.

When the user is using we can switch over to normal mode, where other times wearable will be going automatically to ambient mode after the speicific interval of time.( checked in Moto 360) 

Designing UI for wearable :

Designing extensively for Android wearable using layouts such box inset layout, grid view pager, Watch view stubs and a variety of layout is supported by support libraries. Data communication API, Message API is available with Wearable API that comes under google play services, which delivers and sync data between the handheld device and a wearable device.


So we just covered the basics of Android Wearable App development which is different from app development in terms of Design and types to support your app. I'll soon publish the post on these types to designing and work with these API for wearable apps.

Recently Google announced that Wearable major update 2.0 preview that doesn't require a phone to be connected always. you can use it wherever you go and sync via the cloud. we're eagerly waiting for stable SDK support and watch yet to be released early 2017. For now preview 2.0 is available at official Android developer site.

For bugs, hugs just comment below. in case any doubts drop me a mail, or chat wiht me in G+/ Facebook. share is care.

Wednesday, 31 August 2016

P1 Popular Movies App - Udacity Android Nanodegree Recap and Review

Recently, became Udacity project reviewer where I would be reviewing Android Nanodegree Basics Course student project works.so, Continuing exciting the Nanodegree journey with Udacity, the second project was building popular movies application.This was challenging one to build because we need to use the same source-code to build for the next upcoming project which concentrates on extending the user interface for tablets too.so,let's see what we learnt and implemented as project.
P1 Popular Movies App - Udacity Android Nanodegree Recap and Review
Project Repo : link 

Scope of this project :

To understand & implement themoviedb.org api and performing networking operations in AsyncTask (background thread) and updating UI(main) thread.

Process and Concepts :

The ultimate aim of this project is

  • Connect mobile app with Cloud
  • Performing Network operations in background thread
  • loading images from Internet and deciding optimised sizes for corresponding views.
  • Clear understanding with RecyclerView or ListView working
  • Intents to navigate between activities 
  • Concentrating more on SavedInstance State Bundle

Concepts demystified :

We'll look into the above mentioned concepts with few lines and reference links which i've used to learn while building the App.

Connect mobile app with Cloud :

The first thing about android app it should fetch data from cloud or API or server with updated details and making sure it works offline by caching it in Sqlite database or sharedpreferences.This Google I/O session is the best session ever made to understand the networking operations coding approach while you build your app for the next billion users coming over online.


Developer reference : link

Loading Images from internet :

One of the major nightmare of mobile developer is out of memory error in java,it means you have consumed the Heap memory in VM and having strong reference to the objects created.since, we have created strong reference to the object GC can't collect it to free the VM Heap memory.especially, when you're about to load Bitmap through JPEG image into the memory it's really nightmare for developers to manage the memory. 

So, here comes Jake Wharton to help us with his image loading library named as Picasso and it also supports cache,recycling the images,animations and effects.
there are few other libraries named Glide,Fresco from facebook.

Developer reference : link

Clear understanding of ListView & Recyclerview :

Listview & Recyclerview is useful view for developers from google engineers is to show large homogeneous data in our mobile device.Consider you have 1000's of contacts in your contacts app where you need to show them all on demand, you can't load all the contacts in to memory at once where you may lead to Out of Memory error very soon.
Obviously, some Algorithmic students may claim  that we could use binary search algorithm to view the contacts, but in real life is the user is going to type and search contacts every time ? That will be a bad User Experience.
so,how does the listview or recyclerview works ?
yes we've learnt in our concepts of operating system namely Paging concept.when the listview gets initialise it measures the height of the layout and decides the number of list to be shown in the view and loads the particular count of data from adapter to the view, it also prefetches few data set front and back to manage stagger less scrolling.it uses the same object and recycles for other data set and inflates the view into the Listview.Note that Recyclerview is enhanced version of Listview.

difference between Listview and Recyclerview - Stackoverflow Link

Developer Reference : link

What the Hell is savedInstanceState bundle ?

before understanding the saving the instance state of View in android, you must be aware of the lifecycle of android application such as onCreate, onStop, onResume, onPause and even more for handling orientation and configuration changes.one of the best video to understand why we need concentrate more on Activity lifecycle.


so, when the apps move foreground and background we need to save our current state of the app so that it, can be resumed when the user once again visits the application.we need to manage this smoothly without any lag while recovering the state of the application.

consider the scenario :

when you type important whatsapp message to your friends/crush, all of a sudden you receive phone call from someone continuing you get facebook message from friend after replying back you come back to  whatsapp what if whole message has been destroyed which you have typed already ? It hurts User Experience so,here comes savedinstance state to guarantee you to save some text/image/serializable object for you in background to recover you back when user renters the app.

so, by default activity lifecycle callbacks such as onCreate, onResume , OnPause,onConfigurationChanged passes you bundle to save the state of the current activity before the lifecycle event happens.

Most popular guide for fragments and activity : inthecheesefactoy guide for savedinstancestate

Developer Reference : link 

That's it.These were the main challenges I faced and learnt during the Project 2 Android Nanodegree.hope the above resource will be helpful to get started with Android development.

My Screencast of the Project :

Next Project Preview :

The next project was awesome, it's all about using the same source code to optimize the android app to work for Tablet user Interface consuming large amount of user space and handling the orientation changes.

for bugs,hugs and comments just comment below or mail me.Chat with me in G+/Facebook for help and improved version of this article.Share is care.

Friday, 8 July 2016

P0 Android Basics - Udacity Android Nanodegree Recap and Review

Udacity with Google has done excellent job in delivering standard and updated courses via Udacity android development courses with variety of categories such as Games,Beginners,Building App with Google API's and even more.They are also about to provide Associate Android Developer certificates by taking few test as projects over online as announced in Google I/O 2016.Me and My friends +venkat raman , Ajay are in track with Android Nanodegree course and projects.The course objective is to master basic Android concepts and adapt to future changes in design,coding style and updates.I'll try to reproduce the concept i learnt and applied during the project and passed reviews in this post.


Project Repo : Link

Process & Concepts :

The first project was just to build a mere Android app with specified layout,buttons and Onclick listeners implementations.(you can check my code).The goal was to ensure that users are able to work with Android studio and produce results from those by running it in emulator or phone.Luckily I have latest Android Smartphone with latest updates from Google.(6.0.1).

What I've Concentrated ?

  • Making my Java code readable one :D 
  • Concentrating on strings.xml file organising and not hard coding it.
    Though it was tough in beginning when you move forward and app grows in many countries and your user may expect in different languages,this technique will be scalable approach and managing it in one place.
  • writing reusable code in java - link
  • Few patient in testing in emulator,device.
Accomplishment of P0 - udacity android nanodegree





The next part was basics of Android such as components,form factors and do's and don't in the development process.with those installation and Android jargon such as Android API levels and Numbers,SDK levels,Compile version,Minimum and maximum SDK target levels and few more publishing techniques too.

Next Video Lectures :

The first section video consist of Android Studio tutorials,drag and drop widget tutorials and connecting the xml design file with java code and maintaining their lifecycle,connecting the app to the cloud with network code(http) and few views such ListView to handle huge amount of homogeneous data types.This leads to next level project as Popular Movies app by consuming themoviedb.org API to display popular movies running in nearby theatres.Mean while check out my Github repo and try practising it. 

Results : 

That's it and i've passed the project 0 with flying colours within a hour of starting the course :D with my friends +venkat raman and ajay.

Subscribe the blog for next upcoming recap and reviews.chat with me in G+/fb.for more discussion just leave a comment below.Thanks for reading.share is care.


Thursday, 2 June 2016

Top 100 motivational Quotes - MotiveTown - Motivational App

Recently Launched Mobile & web app based on concept of motivating others using inspiring pictures and quotes from various sources such as simpleremainders,spiritofscience & Motivational guides.combining all resource and categorizing the quotes and images,generated a unified format to form a web service.Additional to this we've optimized the Image using opensource tools such as Imagemagick and few shell scripts to automate the process.We named the App as MotiveTown - Motivational App So,let's see about the various features implemented in mobile app below.



Download From Playstore | Download from Amazon Store - Rate and review the app at playstore/amazonstore

Why this App ?

Everyone needs motivation in some point of life either letting-go or to chase their dream,this makes us to search to read books,quotes,inspiring videos,lectures even in soundcloud for audio speech.Some peoples watch movies,videos where others check out magazines,daily.And targeting this fragmented categories,we decided to bring unified platform with personalized newsfeed contents with videos,audio and quotes with images via simple Mobile App.Thus as a result we were able to publish first version of this app with limited contents of news,images and quotes and features.

Why Ads ? 

We need to provide you reliable backend service without outages and crash.so, we rented a economy server package and customized backend to adapt daily updates.we too optimized several hundred KB image files to less than 100 KB JPG compressed files with automated scripts and Imagemagick opensource tools.so,to keep running these operations smooth and more faster we adopted ads to generate some amount to maintain hosting.

Categories - MotiveTown App

We have Daily updated 23+ categories of Motivational quotes 
• Achieving Gratitude
• Daily Inspiration
• Business Leadership
• Changing the World
• Community Thoughts
• Conquer Negativity
• Walking in Faith
• Various Saying
• Uplifting Music
• Success Secrets
• Staying Motivated
• Relationship Dynamics
• Recover and Loss
• Positive Thinking
• Overcoming Fear
• New Awakenings
• Mindful Living
• Letting Go
• Law of Attraction
• Impact Media
• Healthy Living
• Forgiveness
• Exploring Thoughts
About 23+ categories and 3000+ images,quotes,articles and videos combined we're making a unified platform for everyone to engage and get the benefits out of it.Download the MotiveTown - Motivational App from Playstore.

App description :

MotiveTown App Provides various categories of motivational quotes,images and text poems.Motivation is the Key point for everyone and that can act as turning point in their life.Push them Ahead with spirit in their mind to succeed and compete with others.It also providesMotivational quotes for success in Tamil,English and even more supported languages.Start your day with motivational quotes everyday category to get some random quotes and you can customize your own news feed for Motivational Quotes for Daily inspiration.Share quotes,images directly with your friends from the motivational quotes by great persons.

Screenshots :

check it out in playstore : Link


To Become Beta tester,developing for other platforms,exposing API's and join with me for further development drop me a mail : s.shivasurya@gmail.com or chat with me in G+ hangouts/Facebook.Don't forget to rate the App in Playstore.

Friday, 20 March 2015

Getting Started With Google App Scripts - Send Email From Google Spreadsheets

In This Modern World it would be better to have triggers to do our works automatically with less input feed and make more automated manner.and Recently,This was running in my head and concurrently i'm one of the member of Google Student club in my College and we were about to conduct a small workshop and one of the member took in-charge of getting online forms filled and select 30 students and sending them a confirmation mail to them and instruction.and it was successfully implemented in native hand written scripts in PHP and MYSQL.And there comes my idea of using Google App Scripts with Triggers in Action to Automate our Selection panel and E-mail Sending to who have registered.and suddenly gone through DOCS and tried with my mail and was sending mails in minutes from spreadsheet and thought of sharing it my followers,and recently i got request to write Google Apps scripts tutorial.

This is just Kick Start for Google App Scripts @ +i-visionblog !You can expect more business and Productivity based app scripts soon in our blog or personally contact me in mail for Other Apps Scripts for Business and Productivity.



Reference : Demo | Download Script

Motive :

Our Goal in this post is to send Email to the peoples who have submitted the form or recorded response and as well as Admin.The mail will be delivered from your mail inbox to the client through Gmail API.

Prerequisites :

  • A Google Account with Google Drive Enabled.
  • A Little knowledge in JavaScript to handle Arrays and functions.
  • Google Forms and Spreadsheet.
And little patient to test and Debug the code and check the log for error handling! 

Procedure :

Setup up A Basic Form with Google Forms.
    • Open the link create Simple Form with Name and Email as TEXT attribute and make it as mandatory by ticking required.
    • Then publish the form public and test whether it is working and accepting the form submission over public.
select Script Editor
Setting up Basic Script for sending the Mail with Script editor in Spreadsheet :
  • Go to the corresponding the Response Form Spreadsheet and open and view in Browser.
  • under Tools > Script Editor select it and will open the new tab with Google scripts page.
  • create new blank Project in Google App Script Editor.
  • And then with default code.gs file will be prompting you to type the code.
  • So,it's time now to write down the code for Responding the user with the mail who submitted the form with our function written in Google App Script Editor.

 Code : 

 function onFormSubmit(e) {

  var timestamp = e.values[0];
  var mailaddress = e.values[2];
  var body = e.values[1];
  MailApp.sendEmail(mailaddress,"TEST MAIL",body);

  }


The Above Code is self explanatory one ! however you could get the the response from the e variable as array e.values and with MailApp.sendEmail function you could send the email by passing the parameters as mail address ,Subject and body.note that always the first array value will be timestamp of submission and next will be your form values in according your arrangement in Google Form.

Steps to Execute :

Follow the steps correctly to test and execute the script.

select current project trigger

  • Click Current Trigger Project in Google App Script page Toolbar.
  • You will be listed with Triggers with corresponding functions written in code.gs,it must be mapped with corresponding events like spreadsheet on view,edit,update and adding entries and form submissions.
  • set up trigger 

    • Click on Notification > and change it to immediately for crash Reports 
    change to immediately to check your errors

    • Click Okay and in main Project Trigger confirm your identity by accepting the OAuth from google for delivering the mails on your behalf and with your name.
    • Now view the live form and test it in your browser and if all goes well just you will be getting mail who submitted the form with correct mail id.
    • If you need admin Email also just copy the same function and replace with your email hardcoded so that you may also get mail whenever the form is submitted.
    • If something you(Admin) will receive the script Failure Exception details via Email update immediately since we set immediately in our notification of current project triggers.

    My Result on Testing the Google Form :

    Test Mail successfully Received

    thus have a live Demo from above given link in reference section and download the code and try yourself.Always validate the input from the client! side for improving the security.

    Note: This post deals with the basic of Google App Script usage.You can do a lot with Google App Scripts almost you can Automate all your activities.Let us see about it in future post.subscribe our blog for updates and recent posts.

    For Bugs/Hugs/comments/doubts/updates and projects just drop mail to s.shivasurya@gmail.com or chat with me in Facebook/Google+ chat and for updates and interesting tweets/updates follow me in Twitter.
    Share is care.Feel free to comment

    Monday, 19 January 2015

    Developing iOS apps and Test with Ionic View For iOS - Apps Development

    i'm Big Fan of Ionic Framework and services,Eagerly waiting for ionic Creator GUI interface to develop cross platform apps.Ionic Framework becomes powerful Day to Day and web developers prefer to use it because Cross Platform Supported and good and Responsive User interface unless like JQuery Mobile and Powerful Angular Javascript for Application Logic and Controller.I love to Work with the this framework due to rich UI like bootstrap.Recently They have launched the iOS ionic view to Lively test your apps on ios via ionic Cloud service.Develop your apps wherever ! upload with single command and Download it and use it within the ionic view iOS app.This is Similar idea as like intel app framework to deploy on real device on Android.However since i don't have any MAC Device for Developing ios apps,this helped me to deploy it on original device and test it.



    Prerequisites :

    1) Learn Here to Install and Work with Ionic apps CLI and to Deploy.
    2) Create Account at ionic apps service

    Now let us create a Simple Ionic App to work it out in iOS through ionic view.

    Procedure :

    Open your command prompt and start typing command mentioned below,

    > ionic create <app name > blank

    This Above command will create Simple Template app with Hello world.

    Now just start creating the App from Scratch with HTML/JS/CSS may be cordova plugins for API Access.After just we have to upload the Project files to the ionic service.

    >ionic upload

    At the First moment it will prompt for Email and Password,Just give away the credentials and you application will be uploaded with success message.

    Caution : I had Recently updated Ionic , Cordova npm packages in my System,So.i didn't get any Error messages,So please Check your version and work it out.

    Confused State : 

    We didn't even add iOS as platform then how could we run it on iOS device,Actually i too had this Starnge :D funny idea but the whole fact is simple,we are uploading the HTML/JS/CSS files and running it in webview of iOS app.so when your deploying standalone app then you should add iOS platform to build the app and release.

    Work with your app on iOS :

    Download the ionic view app from your iTunes Store.Login with your ionic app service credentials and your app will listed in the app.Just click to deploy within the Webview of that app to test it out.That's it.

    My Experience : 

    Recently i was working with +Mothi Venkatesh for apps development for Blogging platforms,We just Tested it with our Blog simple RSS feeds.





    Thus We have Successfully Tested our app in iOS Device,but it may have numerous limitation i hope in future for advanced users and developers.

    For bugs/Errors/Comments/Hugs just comment below using Disqus or mail me to s.shivasurya@gmail.com or connect with me in Facebook/twitter/G+ hangout chats for Discussions and Help.Share is care.