Friday, June 24, 2016

iOS (10) , makes an iOS coder’s life easy, know Why

It took me around a week to get through all the WWDC videos. Thanks to Ohochuck for his great swiftscript which helped me to download all WWDC 2016 video locally and watch it even when I am travelling.
Undoubtedly, the most exciting part of WWDC was keynote . When Craig Federighi took over to stir us with his 10 pointers. It included almost everything that we love about iPhone. My personal favorites are updates in iMessage, Extension and Enhancement in face detection API.
Another exciting update: Siri Kit. I have been waiting for this one. I have worked on projects where we spend money over Nuance Dragon and other voice interpretation platform. And believe me I never want to spend money on it. I have always been hoping for a better and native solution from Apple on and Siri Kit might be the answer to it. Although Sirikit Video, didn’t mention that we can integrate and trigger Siri from within our application to understand voice command And It will be really disappointing if we can’t have that feature because it would not change much for us as coders.
When Tyler Fox presented Peek at 3D touch and introduced Home Screen Quick Actions, I said to myself, “this is the feature I want implement in my next application”. Giving user option to perform his favorite action of the application from dock, which is cool. Best part of this, it is easy as pie, I love it.
iMessages Apps is something that’ll make you happy too. That thing about ready to ship emoticon application is going to change the emoticon application’s world. Now anyone with graphic designing experience or a friend who has that experience, can have their emoticon application. Those might not get as popular as Kimoji, but you can share a similar platform that’s all what’s worth.
Not only that, now you can integrate iMessage within your application. And that is a big relief for all who have their application only for iOS platform and want to integrate messaging in their application. This provides awesome iMessage UI and message sending experience. This also comes with message store which will feature messaging application in it. Clicking on applications will lead user to get/purchase the application. So for example, you send a message from your application to your friend. Your friend doesn’t have same application, which you are using. The iMessage app will show a link to that application inside the message bubble. Friend can click on it which will lead him to download the application and create app specific response.
Most of these features are weaved around extensions that were introduced 2 years ago and now becoming an integral part of all UI/functional features.
Happy Coding!
Edit: Apple have also, launch Speech Framework with iOS 10 which work on 50  different languages. And all the features are almost similar to any other Web based solutions. Though speed api also provide local recognition to a limited extent. All what I could ask form now. Thanks to lehn0058's  answer on my query as he said, "SiriKit is for integrating with Siri outside of the context of your application. However, Apple did releases a Speech Recognition API for iOS 10 as well that sounds more like what you want. You can learn more about it in Speech Recognition API Video."

Thursday, November 20, 2014

Use google Custom Search API

Do you wanna implement google custom search api, in an application (ios/android)? Alright! Here, this link will solve everything for you.

Go check that!

Checked? 'And' back! That means you are one of my kind, unlike the geniuses who understand the encrypted documentation of these tech giants.

It took me 6-7 hours and tens of url keys (support URL and forum links) to decrypt the documentation they provided. I wanna save that time for you folk. Here is step by step process to for implementing google search api.

Initial X step will be common for all, and last few steps are dedicated for the application developers. In this document you'll learn:
  • Steps to implement the search API
  • Pictorial detail of steps
  • Make a final run of your application
Brief Step of the process:
  1. Create a Google account (ignore if you have one)
  2. You may found some peace of information related to pricing at the bottom of this page helpful(you can ignore this too)
  3. Create project and generate API key
    1. Go to google consol and create a project
    2. After project created, click on it to go to it's detail.
    3. On the left bar under Auth&API segment, click on APIs.
    4. Now you'll find CustomSearchAPI link in Brows APIs section (as it is not activated by default), turn it on by clicking on the button at right.
    5. Now click on Credentials, just below APIs option
    6. On this page under "Public API Access" click on Create New Key Button, for now choose browser key(as at first we wanna a test it on browser), create it and leave it, as it is for now.
  4. Create Custom Search Engine
    1. Now on the new tab, open Custom Search Engine page. On this page click on Create a custom search engine, button
    2. That will lead you to create new search engine page, here give your domain name in "Sites to search" field. (If you don't have one no worries, give any thing, that have www. in the start and .com in the end)
    3. Fill name, if it haven't pick one already, then click on create.
    4. So you got a jumping robo to congratulate you? ;) Yeah that's it. In this page step up to "Modify your search engine", by clicking on, "Control Panel" button
    5. There you are, now tern on the Image Search, (if you want to)
    6. Also in "Sites to search" section, select, "Search the entire web but emphasize on included item", instead of, the default one, which is "Search only included site"
    7. That is it at the bottom of this page click on update. And then come back to middle of the page and under the "Detail" title, click on Search engine ID, copy the Id, paste it somewhere.
  5. Make a search, using get request:
    1. To make a get request use this request URL
    2. In it replace, {API_KEY} which you have created under "Create project and generate API key" section
    3. And replace {SEARCH_ENGINE_KEY} with the Search engine Id you just copy pasted
    4. Call it with some different value, at query string, than 'a',{API_KEY}&cx={SEARCH_ENGINE_KEY} change a with any thing you wanna search you must have got the beautiful JSON of search result
  6. Other Stuff
    1. If you wanna see the request status, go back to your project page, that hoe may request placed, how many of those failed, ect. Click on the overview and you will get the graph for that, love you google
    2. If you have trouble with JSON, here are some links at your service,
      1. What is JSON 1, 2?
      2.  Use JSON in ios.
      3.  Use JSON in android.


Tuesday, July 30, 2013

Adding AChartEngine Library To Android Application

So here is a self sufficient place to find all about AChartEngine. Which includes link to download,

1. The AChartEngine 1.1.0 demo project source code. May 15 May 15 168 KB 8149
   2. The AChartEngine 1.1.0 javadoc documentation. May 15 May 15 374 KB 3610
   3. achartengine-1.1.0.jar The AChartEngine 1.1.0 binary build library. May 15 May 15 117 KB 5264

Which are latest for now(while posting this answer). Now follow these easy steps in order to add new chart file:

 - Download and add achartengine-1.1.0.jar to your project's lib section
 - Now right click on file and add it to build path, like in image

 - Now as define in previous answers, add following code to your class:

private GraphicalView mChartView;
private XYMultipleSeriesDataset dataset;
private XYMultipleSeriesRenderer renderer;
private BarChart.Type type;

protected void onResume() {
     if (mChartView == null) {
       LinearLayout layout = (LinearLayout) findViewById(;
       /*getBarChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type)
         Creates a bar chart view.*/
       mChartView = ChartFactory.getBarChartView(this, dataset, renderer, type);//tView(this,getBarDemoDataset(values),renderer,Type.DEFAULT);
     } else {

- To get detail about any class of AChartEngineAPI, download and open by clicking in index.html

- will be helpful during further deepar development where you can take reference for all charts

Friday, July 26, 2013


Well, I spend last 3 hours doing many things like leaning spring, and mailing and writing my diary about my day ad yeah cooking as well. But most important thing I did  was "Installing Apache Tomcat7.0.42" on my Mac OS X, yeah not Lion.. not till yet, as I am looking forward for upcoming
OS X 10.9 Mavericks. So may be then I'll upgrade my OS. 

Enough of chitchat, lets go to the point. I have been checking for various post while my search to install the TOMCAT. The one that help me a lot is Installing Tomcat on Mac OS X. As this link is for Tomcat 5.5 so don't be worried as I am here to provide you updated version for installing Tomcat 7.0.42 and may be it's later version as well. As with the zits that i got it's super easy to install tom cat on mac "Thank to Shell Script" for taking all load on it's head. Follow these easy X steps in order to install tomcat on your Mac OS X:
  1. Download latest version tomcat tar.gz file from here this is in core section (and second option at my time) check out this Image, 
  2. Now you have that in your downloads, so unzip that and copy the folder. Now paste it in any convenient place for you in "your system", for me it was my "java" inside my work folder, so here is path for my folder "/Users/arpitawasthi/Work/Java/Data" where I pasted "apache-tomcat-7.0.42".
  3. As this the name "apache-tomcat-7.0.42" is heck so change it to "Tomcat7042"
  4. Now open "terminal" navigate to "Tomcat7042" folder by using cd in this way Arpits-MacBook-Pro:bin arpitawasthi$ cd /Users/arpitawasthi/Work/Java/Data/Tomcat7042/
  5. Now simply go one more step ahead to "bin" directory as Arpits-MacBook-Pro:Tomcat7042 arpitawasthi$ cd bin
  6. Inside bin there's a shell script file named "" so what you need to do now is execute this file as Arpits-MacBook-Pro:bin arpitawasthi$ sh
That's it, that's all now you have tomcat installed in your system. To check this, type this URL http://localhost:8080/ on your browser. You should see something like:

Happy coding!