Programming & IT Tricks . Theme images by MichaelJay. Powered by Blogger.

Copyright

Facebook

Post Top Ad

Search This Blog

Post Top Ad

Responsive Ads Here

Archive

Post Top Ad

Contact


Editors Picks

Follow us

Post Top Ad

Fashion

Music

News

Sports

Food

Technology

Featured

Videos

Fashion

Technology

Fashion

Label

Translate

About

Translate

Sponsor

test

Weekly

Comments

Recent

Connect With us

Over 600,000+ Readers Get fresh content from FastBlog

About

Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Friday, January 5, 2018

How we recreated Amazon Go in 36 hours


John Choi, me, our project apparatus, Ruslan Nikolaev, and Soheil Hamidi at our demo!
My colleagues and I wanted to create something that would make people go “wow” at our latest hackathon.
Because imitation is the sincerest form of flattery and IoT is incredibly fun to work with, we decided to create our own version of Amazon Go.
Before I explain what it took to make this, here’s the 3 minute demo of what we built!
There were four of us. Ruslan, a great full-stack developer who had experience working with Python. John, an amazing iOS developer. Soheil, another great full-stack developer who had experience with Raspberry Pi. And finally, there was me, on the tail end of an Android developer internship.
I quickly realized that there were a lot of moving parts to this project. Amazon Go works on the basis of real-time proximity sensors in conjunction with a real-time database of customers and their carts.
We also wanted to take things a step further and make the entry/exit experience seamless. We wanted to let people enter and exit the store without needing to tap their phones.
In order to engage users as a consumer-facing product, our app would need a well-crafted user interface, like the real Amazon Go.
On the day before the hackathon, I put together a pseudo-design doc outlining what we needed to do within the 36 hour deadline. I incorporated the strengths of our team and the equipment at hand. The full hastily assembled design doc can be seen below.

There were six main components to EZShop, our version of Amazon Go.
A quick diagram I whipped up visualizing the components of this project

The Kairos Facial Recognition API

The Kairos facial recognition API was a fundamental component for us. It abstracted the ability to identify and store unique faces. It had two APIs that we used: /enroll and /verify.
/enroll is described as:
Takes a photo, finds the faces within it, and stores the faces into a gallery you create.
We enrolled all new customers into a single “EZShop” gallery. A unique face_id attribute would be returned and stored with the customer’s registered name in our real-time database.
When we wanted to verify a potential customer’s image, we would POST it to the /verify endpoint. This would return the face_id with the highest probability of a match.
In a real-world implementation, it probably would have been a better idea to use a natively implemented facial recognition pipeline with TensorFlow instead of a network API. But given our time constraints, the API served us very well.

The Realtime Firebase Database

The Firebase database was another fundamental piece to our puzzle. Every other component interacted with it in real time. Firebase allows customized change listeners to be created upon any data within the database. That feature, coupled with the easy set-up process, made it a no brainer to use.
The schema was incredibly simple. The database stored an array of items and an array of users. The following is an example JSON skeleton of our database:
{
  "items": [
    {
      "item_id": 1,
      "item_name": "Soylent",
      "item_stock": 1,
      "price": 10
    }
  ],
  "users": [
    {
      "face_id": 1,
      "name": "Subhan Nadeem",
      "in_store": false,
      "cart": [
        1
      ]
    }
  ]
}
New users would be added to the array of users in our database after registering with the Kairos API. Upon entry or exit, the customer’s boolean in_store attribute would be updated, which would be reflected in the manager and personal app UIs.
Customers picking up an item would result in an updated item stock. Upon recognizing which customer picked up what item, the item’s ID would be added to the customer’s items_picked_up array.
I had planned for a cloud-hosted Node/Flask server that would route all activity from one device to another, but the team decided that it was much more efficient (although more hacky) for everybody to work directly upon the Firebase database.

The Manager and Personal Customer Apps

John, being the iOS wizard that he is, finished these applications in the first 12 hours of the hackathon! He really excelled at designing user-friendly and accessible apps.

The Manager App


This iPad application registered new customers into our Kairos API and Firebase database. It also displayed all customers in the store and the inventory of store items. The ability to interact directly with the Firebase database and observe changes made to it (e.g. when a customer’s in_store attribute changes from true to false) made this a relatively painless process. The app was a great customer-facing addition to our demo.

The Personal Shopping App


Once the customer was registered, we would hand a phone with this app installed to the customer. They would log in with their face (Kairos would recognize and authenticate). Any updates to their cart would be shown on the phone instantly. Upon exiting the store, the customer would also receive a push notification on this phone stating the total amount they spent.

The Item Rack, Sensors, and Camera

Soheil and Ruslan worked tirelessly for hours to perfect the design of the item shelf apparatus and the underlying Pi Python scripts.
The item rack apparatus. Three items positioned in rows, a tower for the security camera, and ultrasonic sensors positioned at the rear
There were three items positioned in rows. At the end of two rows, an ultrasonic proximity sensor was attached. We only had two ultrasonic sensors, so the third row had a light sensor under the items, which did not work as seamlessly. The ultrasonic sensors were connected to the Raspberry Pi that processed the readings of the distance from the next closest object via simple Python scripts (either the closest item or the end of the rack). The light sensor detected a “dark” or “light” state (dark if the item was on top of it, light otherwise).
When an item was lifted, the sensor’s reading would change and trigger an update to the item’s stock in the database. The camera (Android phone) positioned at the top of the tower would detect this change and attempt to recognize the customer picking up the item. The item would then instantly be added to that customer’s cart.

Entrance and Exit Cameras

I opted to use Android phones as our facial recognition cameras, due to my relative expertise with Android and the easy coupling phones provide when taking images and processing them.
The phones were rigged on both sides of a camera tripod, one side at the store’s entrance, and the other at the store exit.
A camera tripod, two phones, and lots of tape
Google has an incredibly useful Face API that implements a native pipeline for detecting human faces and other related useful attributes. I used this API to handle the heavy lifting for facial recognition.
In particular, the API provided an approximate distance of a detected face from the camera. Once a customer’s face was within a close distance, I would take a snapshot of the customer, verify it against the Kairos API to ensure the customer existed in our database, and then update the Firebase database with the customer’s in-store status.
I also added a personalized text-to-speech greeting upon recognizing the customer. That really ended up wowing everybody who used it.
The result of this implementation can be seen here:
Once the customer left the store, the exit-detection state of the Android application was responsible for retrieving the items the customer picked up from the database, calculating the total amount the customer spent, and then sending a push notification to the customer’s personal app via Firebase Cloud Messaging.

Of the 36 hours, we slept for about 6. We spent our entire time confined to a classroom in the middle of downtown Toronto. There were countless frustrating bugs and implementation roadblocks we had to overcome. There were some bugs in our demo that you probably noticed, such as the cameras failing to recognize several people in the same shot.
We would have also liked to implement additional features, such as detecting customers putting items back on the rack and adding a wider variety of items.
Our project ended up winning first place at the hackathon. We set up an interactive booth for an hour (the Chipotle box castle that can be seen in the title picture) and had over a hundred people walk through our shop. People would sign up with a picture, log into the shopping app, walk into the store, pick up an item, walk out, and get notified of their bill instantly. No cashiers, no lines, no receipts, and a very enjoyable user experience.
Walking a customer through our shop
I was proud of the way our team played to each individual’s strengths and created a well put-together full-stack IoT project in the span of a few hours. It was an incredibly rewarding feeling for everybody, and it’s something I hope to replicate in my career in the future.
I hope this gave you some insight into what goes on behind the scenes of a large, rapidly prototyped, and hacky hackathon project such as EZShop.

Thursday, January 4, 2018

Top 3 Mobile Technology Trend, You Can’t Miss In 2018.


Before I kick-start this article, please allow me to wish
“ A Very Very Very… Happy New Year 2018” To all you lovely readers and my well wishers.
It has been an amazing journey so far being a part of this mobile app revolution since 2006, I feel blessed to see both pre & post smartphone evolution era and having experienced the change myself being the developer, leader and now a father of my own mobility startup. So thought to analyze the trend setters which kind of will rule this new year.
So here is my Top three technology trends you all should look out for in your endeavors in this new year 2018, which as always, will offer you loads of new opportunities to rock this world. Being a part of this mobile app ecosystem I feel immense pride while writing this piece of article for all you visionaries and future mobile apprenuer.

1. Augmented Reality/ Virtual Reality:

Wiki Defines AR as :

Augmented reality (AR) is a live direct or indirect view of a physical, real-world environment whose elements are “augmented” by computer-generated or extracted real-world sensory input such as sound, video, graphics, haptics or GPS data.

As per Wiki VR is :

Virtual reality (VR) is a computer technology that uses virtual reality headsets or multi-projected environments, sometimes in combination with physical environments or props, to generate realistic images, sounds and other sensations that simulate a user’s physical presence in a virtual or imaginary environment.
Mobile AR could become the primary driver of a $108 billion VR/AR market by 2021 (underperform $94 billion, outperform $122 billion) with AR taking the lion’s share of $83 billion and VR $25 billion.
In 2017 a lot has happened in this AR where Google & Apple invested heavily to harness the true potential of it. Apple has launched ARKit & Google has come up with ARCore, for developer to innovate and create some meaningful mobile solutions for the smartphone users.
source
As AR helps in adding a digital layer over virtual information to give a more realistic and unambiguous outlook. AR intertwined apps will gradually empower retail, life science, manufacturing, and many other domains through a wide range AR apps being developed to cater these sectors.

I Feel :

AR will take a huge leap forward to further revolutionize the ever progressing gaming industry and will stretch beyond it to empower the digital marketing world where gamification will be employed to attract & acquire new consumer for brands . All marketers need to adopt this tool to target their customers beyond conventional physical marketing. With most of the marketers seeing augmented reality as a way to provide a compelling user experience, we will soon be seeing a plethora of creative AR apps alluring consumers to buy their customized offerings
Virtual Reality technologies will be more focused on the game and events sphere as it is already doing so in 2017 and will go beyond to add more evolved app usage experience to offer an elevated dose of entertainment for the gaming user.

I find:

With iPhone X, Apple is trying to change the face of AR by making it a common use case for masses. Also A whole bunch of top tech players think this technology which is also called a mixed reality or immersive environments — is all set to create a truly digital-physical blended environment for the people who are majorly consuming digital world through their mobile power house

Some of The Popular AR/VR Companies(As reported by Fast Company):

  1. Google: is using VR to analyse your your living room
  2. Snapchat: Helping their app suer to control of their own augmented reality
  3. FACEBOOK: For gathering IRL friends in VR
  4. NVIDIA: For providing the power to process VR
& Many More …..
source: statista

2. Internet Of Things: A Connected World Of H/w & Software:

source
With Gartner predicting 26 bn connected devices by 2020 which ranges from LEDs, Toys, Sports equipment, medical equipment, to controllable power sockets.We will be privileged to witness the world where everything will connected with these small devices thereby bringing information right where you are standing. Also these information will be tapped right were it is being generated to empower the data centre using Edge Computing tech.
The smart objects will be interacting with our smartphone/tablets which will eventually function like our TV remort displaying and analyzing data, interfacing with social networks to monitor “things” that can tweet or post, paying for subscription services, ordering replacement consumables and updating object firmware.

Big Tech Gaints Are Already Bullish On IoT Connected World:

  • Microsoft is powering their popular IIS(Intelligent Systems Service) by integrating IoT capabilities to their enterprise service offerings.
  • Some of the known communication technology powering IoT concept is RFID, WIFI, EnOcean, RiotOS etc….
  • Google is working on two of its ambitious project called Nest & Brillo which is circled around usage of IoT to fuel your home automation needs. Brillo is an IoT OS which enables Wi-Fi, Bluetooth Low Energy, and other Android stuffs.
Established companies such as Microsoft, with its Intelligent Systems Service, and enterprise software vendors likes SAP, with its Internet of Things Solutions, are also adding Internet of Things capabilities to their offerings.
  • Amazon launched ‘Amazon Echo’ a amazing tech which works on your voice command to answer your queries, play songs and control smart devices within certain range.

I Feel:

IoT & IoT Based Apps:

Is here to stay and will be playing a very crucial rule in helping you navigate this world with more ease & comfort, making your commuting safe, your communication smart, your shopping productive, your learning more engaging and much more.. to make your living effective and efficient. In fact, IoT is slowly becoming part of every aspect of our lives. Not only will IoT apps augment our comfort, but they will also extend us more control to simplify routine work life and personal tasks.

Internet Of Things Evolution:

Most of IoT powered devices are already relying on mobile devices to syndicate data, especially in case of consumer IoT. With the surge in overall uses of Internet of Things , I feel more mobile apps will be developed for management of these smart devices.

3. Blockchain: Powering the World Of Cryptos:

As Per Investopedia:
A blockchain is a digitized, decentralized, public ledger of all cryptocurrency transactions. Constantly growing as ‘completed’ blocks (the most recent transactions) are recorded and added to it in chronological order, it allows market participants to keep track of digital currency transactions without central recordkeeping. Each node (a computer connected to the network) gets a copy of the blockchain, which is downloaded automatically.
To know more about blockchain, please refer
  1. Blockchain Technology Part 1 : What and Why ?
  2. Smart Contract A Blockchain Innovation for Non-Techies
As per recent study by IBM
9 in 10 government firms are planning to invest in blockchain for financial transaction management, asset management, contract management and regulatory compliance purposes.
Another research by Infosys says:
One-third of banks are expected to adopt commercial blockchain in 2018.
So it is quite clear that secured transactions based mobility solution will rule the fin-tech & other industry where security lies at the core. App developers will have a crucial role to play where they will be expected to develop more innovative app solutions to cater the need for secure & connected world. Your mobile phones are generating lots of confidential informations which needs to be secured from the third party breaches. So techies gear up and pull up your socks as, I feel Blockchain-based security mechanism are expected to be developed on mobile apps in the coming years and will needed in all kinds of industries ranging from fin-tech, eCommerce, Insurance tech etc….
Blockchain powered cryptos like bitcoin, ripple, Ethereum is already a rage in the technology & investment world. It has fascinated the imagination of many tech innovators leading them to adopt blockchain tech to develop wallets & currencies and most of them are being developed on mobile devices & computer systems, thereby offerings lots of opportunities for techies to adopt it as futuristic career options.
Using the blockchain tech entrepreneurs will be developing a solutions mostly over mobile to validate transactions securely, manage contracts smartly, store digital currencies(like bitcoins ,XRP etc), manage voting, secure hassle free shopping, powering banking transactions and many more innovative solutions which will be targeted towards making consumers life more resourceful and productive eventually.

Blockchain Use Case By R3:

There are many more trends which will be disrupting the mobility world like
  • Artificial Intelligence : Where Machine learning , Deep Learning all will play a crucial role in fueling intelligence to the machines to help them make smart decisions without human interventions. Mobile chatbots is one of the prime example of one such use case of AI. Apps like Siri, Google Now are already harnessing AI technology and will be inspiring many more voice based and Images based AI innovations to be made by mobile appreneurs. Mobile data will be tapped giving it more intelligent forms by app developers to make our life smarter with time.
  • Mobile computing/Cloud computing :Based mobility solutions will be in high demand specially for big enterprises where business decisions are made based on intelligent data analytics . All these will be stored over the cloud and mobile will play a major role in harnessing the power of those data to serve consumer in real time.
Some of My Other Relevant Tech Article Which Can be Useful:
  1. All About Edge Computing- How It Is Changing The Present Past & Future Of IoT?
  2. Top 3 Technology Trends For 2018, Which Will Be A Game Changer !
  3. All You Wanted To Know About BitCoin?
  4. NLP Fundamentals: Where Humans Team Up With Machines To Help It Speak
Summary:
Having seen the world of mobility, changing from feature phone to a smartphone era I feel amazed how it has transformed the life of humans. Now we can communicate in split seconds, transact in no time, buy what we need with one touch, get entertained when & where we want, shower our love to our closed ones without being physically present and do many more things which one can imagine just over this tiny powerful device.
So as a developer and as a tech visionary you have, the greater responsibility to make sure that you are creating tools which complements user needs and impacts them deeply. It’s your duty to entertain them, educate them, and to make them feel safe & secure on the go.
Ending by, extending my sincere gratitude to all you awesome readers for showering all your love & constantly inspiring me to write more & learn more eventually.


Wednesday, January 3, 2018

Mobile ARK Wallet — A Wallet for Everyone


We are happy to announce another huge achievement, with the release of the much awaited ARK Mobile Wallet. That’s right, you can now vote for a delegate, send ARK, or just check your balance straight from the palm of your hand. No sync needed, just open the app and conduct your business.
ARK’s mobile wallet is a hybrid application (using the same codebase for Android and iOS which helps with coordinated development). Created using Ionic framework and ARK’s TypeScript API to interact with the ARK network via your mobile phone, anytime, anywhere (as long as you have an internet connection).
The ARK wallet is still in a Beta version so you might encounter some quirks and bugs while checking it out. Give it a spin and please provide us feedback so we can improve our wallet in upcoming releases.
ARK Android Mobile Wallet:
Or go to Google Play store from your mobile wallet and in search field input ‘Mobile ARK’ — install. Requires Android 4.1+ to work.
ARK iOS Mobile Wallet :
1. Install ‘Ionic View — Test Ionic Apps’ https://itunes.apple.com/us/app/ionic-view-test-ionic-apps/id1271789931?mt=8
2. Open and click the eye at the bottom
3. Enter the ID 0894ffa2 and “View App”
The QR scanner is not compatible with ‘Ionic View — Test Ionic Apps’ so it won’t work on iOS.
This is currently a workaround as we are still waiting on approval from Apple (they are very strict with finance and cryptocurrency apps). When we get final approval for the iOS App store we’ll let you know via social channels.

Highlighted Features

  • Import your existing passphrase (import by QR feature or write/paste your passphrase).
  • Generate a new passphrase.
  • Encrypt access to your profile with a custom 6 digit PIN (AES256+PBKDF2).
  • Most transaction types are available: send, receive, vote, unvote, register a delegate.
  • Connects to both mainnet and devnet.
  • Option for additional profiles (separate profiles for different ARK addresses or networks).
  • Option to add contacts and easily transact with them.
  • Total balance of your combined ARK addresses.
  • Wallet backup — input your selected PIN to decrypt your wallet and gain view of your private data.
  • Change PIN — if you want to change your encryption/decryption PIN you can easily do so.
  • Clear Data — you can clear all your data from the phone (note: this will also delete all of your wallets so if you haven’t yet you should make a backup!).
  • Overview of network status with an option to change peer.
  • Current market value, along with weekly movements.
  • Support for showing data in different FIAT currencies.

Future

In the upcoming months we are going to be polishing up the ARK mobile wallet with input from ARKs community developers and users. We also aim to integrate:
  • Ledger Nano S support via On-the-Go (OTG) cable/adapter.
  • Dark theme.
  • Adding an option to add custom network types (eg. your own ARK-based chain or for instance Kapu, Blockpool, …) just from 1 IP address — use ARK wallet for any current or future ARK based blockchain project!
  • Ability to allow your fingerprint to act as a PIN to unlock your wallet (optional of course).
  • Notifications of receiving transactions.
  • Adding more localizations (you’ll be able to help in this regards to get ARK mobile wallet translated into your local language).
  • Saving your generated passphrase to .PDF.

Some Screenshots

Thank You

Android’s Account transfer API


Image Courtesy: Google
In today’s modern ever changing world nothing stays forever, how your Android phone can be an exception, Right?
Android is a vast Eco-system with wide verity of phones, whole different screen sizes ranges from 4 inches phones to 6.5 inches phablet which hardly fits in the pockets. up to 8 GB of RAM, Expandable storage and many more…
Within one year or two whole scenario of specs are changing in the phone and they are so much tempting that one cannot resist them selves from changing the phone and ended up with the new phone.
BUT wait what about all data in my old phone, Aaaah.
That’s not the problem at all. You can transfer them with wired way or wireless from old device to new device.
BUT another big problem still persists which is the apps and their credentials, which are very difficult to remember for some users.
No need to worry, Google at rescue.
Google has introduced a new way to transfer login or/and AUTH Tokens from your old phone to new phone.
Wait, what about my data security, What if some one stole my data.
Just relax on that part because it transfers the credentials via a Bluetooth connection or cable in encrypted connection without needing of data connectivity. So your credentials will be safe in encrypted format and transferred to your new device.

Developers have to make sure some things which are essential to make this transfer to work which is as follows.
The lowest version which is supported is ICS (Ice cream Sandwich) and the latest version is Oreo or higher. Latest version of Google play services are also essential on both of the phones. And most important thing, app must build APK using Google Play services SDK version 11.2.0 or higher
Your App must provide authenticator for Account Manager. This will list your app in the Android’s Account screen(Settings ->Accounts/User & Accounts).
For adding the support of transferring custom account you must declare START_ACCOUNT_EXPORTbroadcast receiver for authenticator service in your app’s manifest

Here comes the main part. For sending data from old phone to new phone add the following
AccountTransferClient client = AccountTransfer.getAccountTransferClient(this);
Task<Void> exportTask = client.sendData(ACCOUNT_TYPE, transferBytes);
try {
  // Wait for the task to either complete or provide the callback.
  Tasks.await(exportTask, TIMEOUT_API, TIME_UNIT);
} catch (ExecutionException | InterruptedException | TimeoutException e) {
  client.notifyCompletion(ACCOUNT_TYPE,AuthenticatorTransferCompletionStatus.COMPLETED_FAILURE);
  return;
}
On the target device the ACTION_ACCOUNT_IMPORT_DATA_AVAILABLEbroadcast will received and developer need to handle that broadcast and start a service and call retrieveData()
AccountTransferClient client = AccountTransfer.getAccountTransferClient(this);
Task<Void> exportTask = client.retrieveData(ACCOUNT_TYPE);
try {
  byte[] transferBytes = Tasks.await(transferTask, TIMEOUT_API, TIME_UNIT);
  // Add the transferred account(s) to AccountManager to register it with the framework.
} catch (ExecutionException | InterruptedException | TimeoutException e) {
  client.notifyCompletion(ACCOUNT_TYPE, AuthenticatorTransferCompletionStatus.COMPLETED_FAILURE);
  return;

}
client.notifyCompletion(ACCOUNT_TYPE, AuthenticatorTransferCompletionStatus.COMPLETED_SUCCESS);
It’s not necessary that you will always get the success, but this is an awesome API provided by google for those who hates to re-login even after getting the new phone.
Here’s are some link which might be helpful to get the work done.

Interested for our works and services?
Get more of our update !