Search This Blog

Thursday, 2 January 2020

MongoDB search operation - Searching in document and document with nested json objects

As you know MongoDB in no SQL database. MongoDB noSQL makes it faster than relational database. MongoDB based on documents. Document can be any valid json object. This json object can have nested structure. This article illustrates searching mechanism with MongoDB.

Lets have some proper json document 


{
  "name": "testUser",
  "deviceId": "android",
  "type": "contract",
  "address": "D14/150 London"
}
{
  "name": "testUser2",
  "deviceId": "android",
  "type": "contract",
  "address": "D14/150 London"
}
{
  "name": "testUser3",
  "deviceId": "android",
  "type": "contract",
  "address": "D14/150 London"
}

Insert documents like below using MongoDB shell


> db.analytics.insertOne({ "name": "testUser",   "deviceId": "android",   "type": "contract",   "address": "D14/150 London" });
{
        "acknowledged" : true,
        "insertedId" : ObjectId("5e0dc9a3e6ebcea82c40836c")
}


Let's find documents where name is equal to testUser


> db.analytics.find({name:"testUser"}).pretty();
{
        "_id" : ObjectId("5e0dc9a3e6ebcea82c40836c"),
        "name" : "testUser",
        "deviceId" : "android",
        "type" : "contract",
        "address" : "D14/150 London"
}

Lets find documents where name is testUser and type is contract


> db.analytics.find({name:"testUser", type: "contract"}).pretty();
{
        "_id" : ObjectId("5e0dc9a3e6ebcea82c40836c"),
        "name" : "testUser",
        "deviceId" : "android",
        "type" : "contract",
        "address" : "D14/150 London"
}

Search in MongoDB in nested documents. Let's create some nested documents 



{
  "name": "newUser",
  "deviceId": "android",
  "type": "full",
  "address": "D14/150 London",
  "phone": {
    "home": 123404,
    "office": 485
  }
}
{
  "name": "newUser1",
  "deviceId": "android",
  "type": "full",
  "address": "D14/150 London",
  "phone": {
    "home": 000,
    "office": 485
  }
}

Here the result of query 


> db.analytics.find({"phone.home": 000}).pretty();
{
        "_id" : ObjectId("5e0dccaae6ebcea82c408371"),
        "name" : "newUser1",
        "deviceId" : "android",
        "type" : "full",
        "address" : "D14/150 London",
        "phone" : {
                "home" : 0,
                "office" : 485
        }
}

Thursday, 25 October 2018

Why Node.js® - several reasons of nodejs popularity?


Node.js®, known as Node is gaining attention of designer. Node has been proved as good option to write highly scalable network solutions. We recently choose Nodejs as our server language.

Asynchronous event driven JavaScript runtime 


Node is designed to build scalable network applications. Using nodejs many concurrent connection can be handle. On each connection the callback is fired, but if there is no work to be done, Node will sleep. This is opposite to common concurrency model where OS threads are employed. Thread-based networking is relatively inefficient and very difficult to use.

Node are free from worries of dead-locking the process


Users of Node are free from worries of dead-locking the process, since there are no locks. Almost no function in Node directly performs I/O, so the process never blocks.
Because nothing blocks, scalable systems are very reasonable to develop in Node.

Similarity with Ruby's Event machine and Python's twisted 


Node is similar in design and influenced by system like Ruby's Event machine and Python's twisted. Node took the event model a bit further. It presented an event loop as a runtime construct instead of as a library. In other systems there is always a blocking call to start the event-loop. This behavior is defined through callbacks at the beginning of a script and at the end starts a server through a blocking call like EventMachine::run().

In Node there is no such start-the-event-loop call. Node simply enters the event loop after executing the input script. Node exits the event loop when there are no more callbacks to perform. This behavior is like browser JavaScript — the event loop is hidden from the user


HTTP's the most important aspect of Nodejs


HTTP is a first class citizen in Node, designed with streaming and low latency in mind. This makes Node well suited for the foundation of a web library or framework.

Note - Just because Node is designed without threads, that doesn't mean one can't take
advantage of multiple core  in environment. Child processes can be spawned by using our child_process.fork() API, and are designed to be easy to communicate with. Built upon that same interface is the cluster module, which allows you to share sockets between processes
to enable load balancing over your cores. 

Monday, 3 September 2018

Fixing Typescript warning - Parameter 'param' has 'any type'

Use of noImplicitAny and suppressImplicitAnyIndexErrors inside tsconfig.json

TypeScript developers disagree about whether the noImplicitAny flag should be true or false. There is no correct answer and you can change the flag later. But your choice now can make a difference in larger projects, so it merits discussion.

When the noImplicitAny flag is false (the default), and if the compiler cannot infer the variable type based on how it's used, the compiler silently defaults the type to any. That's what is meant by implicit any.

The documentation setup sets the noImplicitAny flag to true. When the noImplicitAny flag is true and the TypeScript compiler cannot infer the type, it still generates the JavaScript files, but it also reports an error. Many seasoned developers prefer this stricter setting because type checking catches more unintentional errors at compile time.

You can set a variable's type to any even when the noImplicitAny flag is true.

When the noImplicitAny flag is true, you may get implicit index errors as well. Most developers feel that this particular error is more annoying than helpful. You can suppress them with the following additional flag:

"suppressImplicitAnyIndexErrors":true
The documentation setup sets this flag to true as well.

Monday, 19 February 2018

Spark tutorial - Understanding and exploring spark core components RDDs

Spark is fast, ease to use data processing engine. Spark is developed as replacement of Hadoop MapReduce and runs over Hadoop. It uses Hadoop Distributed File System of Hadoop. Spark is the open source apache product available since 2014. Spark popularity is growing at rapid speed. Spark doesn't need extra skill set. Knowledge of Core Java and Distributing computing is enough for it.

There are terminology which founds difficults to understand by spark developers. I am going to explain those in my own language.

Spark RDDs 


Spark RDDs is the resilient distributed dataset. RDDs is immutable datasets which can be created from internal source (i.e. Parallelize way) or external source (i.e. Spark streaming, text file, input file format etc). RDD's elements can distributed across spark cluster for processing. RDDs can only be created by reading data from a stable storage such as TCP Streaming, Files or by transformations on existing RDDs.


For example- If as a spark developer you write spark TCP streaming job with interval of 1 seconds. Spark continuously receive data and form a RDD form the data receives in that one seconds.
Look at the image below. RDD consists of elemens E1, E2 .... En which can be json, text, line or any other string. This RDD can be transfom into new RDD but here i am not talking about this.
Elements of RDDs can be processed using foreach  element loop. And then these elements will be distributed across executors in spark clusters.

Spark RDDs


Point (1) -  This explain how RDD is created from the data received on spark tcp socket in 1 seconds. 


Point (2) - This explain that elements of RDD assigned to executors for processing. 


Below is the code of simple spark streaming. Where socket is opend to a IP and port and RDDs are formed every 3s.See clearly where point 1 and 2 lies in the codes.

 SparkConf sparkConf = new SparkConf().setMaster("spark://10.1.0.5:8088").setAppName("App name");  
           JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, new Duration(3000));  
           JavaDStream<String> stream = ssc.socketTextStream("socket IP", 9000, StorageLevels.MEMORY_AND_DISK_SER);  
           stream.foreachRDD(new VoidFunction<JavaRDD<String>>() {  
                private static final long serialVersionUID = 1L;  
                public void call(JavaRDD<String> rdd) throws Exception {  

/** Point (1) **/

rdd.foreach(new VoidFunction<String>() { private static final long serialVersionUID = 1L; public void call(String s) throws Exception {

/** Point (2) **/

System.out.println(s); } }); } }); ssc.start(); ssc.awaitTermination();

Thursday, 8 February 2018

Spark TCP streaming example without Kafka

Spark Streaming is an extension of the core Spark API that enables scalable, high-throughput, fault-tolerant stream processing of live data streams. Data can be ingested from many sources like Kafka, Flume, Kinesis, or TCP sockets. And Finally, processed data can be pushed to filesystems, databases, and live dashboards. On data, you can apply Spark’s machine learning and graph processing algorithms on data streams.

Spark streaming is useful to read data from producer and distribute data over multiple machine in clustor or yarn mode.

Few term related to spark streaming -

RDD stands for resilient data distribution. RDD is created from the data that bring when spark streaming executes in batch interval.

Creating simple example of TCP socket streaming is given below -



 @SuppressWarnings("resource")
 public static void main(String[] args) {
  
  SparkConf sparkConf = new SparkConf().setMaster("spark-master-url").setAppName("xyz")
    .set("spark.executor.memory", "1g").set("spark.cores.max", "5").set("spark.driver.cores", "2")
    .set("spark.driver.memory", "2g");
 
  JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, new Duration(3000));

  JavaDStream<String> JsonReq1 = ssc.socketTextStream("bindIP", bindport, StorageLevels.MEMORY_AND_DISK_SER);
  JavaDStream<String> JsonReq2 = ssc.socketTextStream("bindIP", bindport, StorageLevels.MEMORY_AND_DISK_SER);
  ArrayList<JavaDStream<String>> streamList = new ArrayList<JavaDStream<String>>();
  streamList.add(JsonReq1);
  JavaDStream<String> UnionStream = ssc.union(JsonReq2, streamList);

  UnionStream.foreachRDD(new VoidFunction<JavaRDD<String>>() {

   private static final long serialVersionUID = 1L;

   public void call(JavaRDD<String> rdd) throws Exception {

   
    rdd.foreach(new VoidFunction<String>() {

     private static final long serialVersionUID = 1L;

     public void call(String s) throws Exception {
      System.out.println(s);
     }

    });
   }
  });

  System.out.println(UnionStream.count());
  ssc.start();
  ssc.awaitTermination();
 }


Term like bindIP and bindport will be your specific spark ip/port. To test this application you can create a basic service socket port programm which must listen for clients socket from spark executor.
spark-master-url should be the url of machine where spark master is running . spark master url generally looks like spark://machineip:port

Tuesday, 22 August 2017

Android Oreo 8.0 officially : Android oreo launched, roll out will start soon

After more than a year of development and months of testing by developers and early adopters (thank you!), google android oreo now ready to officially launched. Android 8.0 Oreo will be available to the world soon. Android 8.0 brings a ton of great features such as picture-in-picture, autofill, integrated Instant Apps, Google Play Protect, faster boot time, and much more.

The features of Android O were first showed off at the Google I/O developer conference held in May 2017. 

Google hasn’t made any major changes in the design and layout. The focus in Oreo, like in Nougat, is more on fine-tuning the OS and adding features that would improve the overall experience of using an Android smartphone or tablet.

I will be posting a detail article of new feature for developer very soon. Finger crossed !!!


Wednesday, 16 August 2017

Revival of Nokia : Nokia 6 launch is perfect fly way, Nokia should thanks Android


  

Nokia a Finnish company was of demolish when Microsoft purchased it. Nokia was terribly failed in the race of speedy innovation and competition. There used to be a only Nokia group which were in great number, slowly turn towards Samsung.
In 1998 alone, the company had sales revenue of $20 billion making $2.6 billion profit. By 2000 Nokia employed over 55,000 people.[34]The Nokia 3600/3650 was the first camera phone to hit the North American market in 2003. The company would go on to become a successful and innovative camera phone maker.
But after 2010, in front of competition from Google and Apple, Nokia become outdated and a lethargic market player. 


Nokia stays away from Android since android was launched. First, they try to sale their phone loaded with Symbian O.S, then Microsoft bought Nokia and run their luck with windows O.S. to shun android and iOS. None of the strategy worked for Nokia. Now Nokia have adopted world most popular mobile O.S android to turn their future. Nokia 6, the first Nokia phone with android is already a big hit in India. Nokia 6 is selling by Amazon on bases of pre-booking  

Full specifications

In the box
Your Nokia 6
Charger
Charging/data cable
Headset
Quick guide
SIM door key
Design
Colors Arte Black (limited edition), Matte Black, Tempered Blue, Silver, Copper
Size 154 x 75.8 x 7.85 mm (8.4 with camera bump)
Network and connectivity
Network speed LTE Cat. 4, 150Mbps DL/50Mbps UL
Networks GSM: 850/900/1800/1900; WCDMA: Band 1, 2, 5, 8; LTE: Band 1, 3, 5, 7, 8, 20, 28, 38, 40
Performance
Operating system Android™ 7.1.1 Nougat
RAM Arte Black, 4 GB; all other colors, 3 GB
CPU Qualcomm® Snapdragon™ 430 mobile platform
Storage
Internal memory Arte Black, 64 GB2; all other colors, 32 GB2
MicroSD card slot Support for up to 128 GB
Services Google Drive
Audio
Connector 3.5 mm headphone jack
Speakers Dual speakers
Amplifier Smart amplifier (TFA9891) with Dolby Atmos®
Display
Size and type 5.5” IPS LCD
Resolution Full-HD (1920 x 1080, 16:9)
Material Sculpted Corning® Gorilla® Glass
Pixel density 403 ppi
Brightness 450 nits, laminated
Features Sunlight readability
Camera
Primary camera 16MP PDAF, 1.0um, f/2, dual tone flash
Front-facing camera 8MP AF, 1.12um, f/2, FOV 84 degrees
Connectivity and sensors
Connectivity Micro USB (USB 2.0), USB OTG, Wi-Fi, Bluetooth 4.1
Sensors Accelerometer (G-sensor), ambient light sensor, e-compass, Hall sensor, fingerprint sensor, gyroscope, proximity sensor, NFC (sharing)
Battery life
Battery type Integrated 3000 mAh battery4

Monday, 19 June 2017

Android Kotlin – 7 reason why using Kotlin is better idea over Java

While Java is most popular language for android development. But android application can be written in any language that can compile and run on Java Virtual Machine (JVM).  End user even can’t see the difference.
Kotlin is officially introduced in recent Google IO session. Switching to Kotlin programming language is a nice idea as Kotlin is much stronger language compare to Java in many areas.
There are 10 reason to use kotlin in android development over java –


   Java isn’t a modern language


Even though launching Java 8 was the great effort to make it a modern language but at the time of writing android only support a subset of Java 9 features. Java as a whole also has some pretty well-documented language issues, including endless try-catch blocks, a lack of extend ability, null-unsafety (and that infamous NullPointerException), not to mention a lack of support for functional programming features.

     Interchangeability with Java


Kotlin strength is, it can work all alone and along with java as well. Open source content which are already written in Java can work with Kotlin with any problem

         Kotlin is easy to learn


Being a modern object oriented programming language, Kotlin is very easy to learn. Java developer will find most syntax of Kotlin similar to Java.

   Combination of Best functional and Procedural


So why should you have to choose between functional and procedural? Like many modern programming languages, Kotlin aims to bring you the best of both worlds by combining concepts and elements from both procedural and functional programming.
          

          Nice Android Studio Support


Kotlin is developed by JetBrains, the company behind IntelliJ—the IDE that Android Studio is based on. It’s obvious that Android Studio has excellent support for Kotlin. If you've installed the Kotlin plugin, Android Studio makes configuring Kotlin in your project simple.

Concise code


Class written in Kotlin is more concise compare to code written in Java for same work. Kotlin is particularly good at reducing the amount of boilerplate code you need to write, which should make coding in Kotlin a much more enjoyable experience

 Extra runtime size


 The Kotlin Standard Library and runtime will increase the size of your .apk. While this only equates to around 800KB. But it will put extra 800KB on your apk current size.

Even though Kotlin seems much better than Java but lack of official support from Google can pile up your pain. On internet there is less help available on Kotlin. I would recommend to use Kotlin along with Java. There is no need of immediate transformation of your application to Kotlin as Google didn’t make it compulsory.

Keep learning and Keep commenting …….. Wish you Good luck

Friday, 19 May 2017

Another milestone for android – Reach 2 Billion monthly active android devices



When Google started android in early 2007, it was before Android, before iOS. Mobile was still niche. And while many of us had a sense that mobile was going to be big, we were not sure we really realized just how big it was going to get. Fast forward to today, and there be now 2 billion monthly active Android devices globally. 



This is an extraordinarily humbling milestone—and it’s the largest reach of any computing platform of its kind. Today at Google I/O, Google celebrated that milestone and showcased a number of ways Google working to make Android even more useful, including a beta release of Android O and a new initiative to help bring Android to the next billion users.

Wednesday, 19 April 2017

Samsung Galaxy S8 the best innovative phone in near future

Samsung is the standout performer for android O.S over the years. It’s not wrong to say that Samsung is carrying responsibility of making high end phone for android. Samsung is the only android OEM which compete with Apple on every front.

This time Samsung has again proven itself that why android is nothing without Samsung. Here are some exceptional feature which make Samsung S8, S8+ as best phone in near future



Stunning Infinity Display                              10/10


The Infinity Display sets a new standard for uninterrupted, immersive experiences. It enables an expanded screen size without necessitating a larger phone. So while the view is grander, Galaxy S8 and S8+ feel small in your hand, making them easy to hold and use.
Immerse yourself in a larger than ever screen that still fits comfortably in your hand. Galaxy S8 and S8+ break free from the confines of bezels, offering a smooth, uninterrupted surface that flows seamlessly over the edges. We achieved this by completely redesigning the phone from the inside out. And we have reinvented the home button, by placing it on the screen, where it stays hidden until you need it. So you get a bigger, unobstructed view without making the phone larger

Camera                                                        8/10


Camera comes with lots of great feature like focus on what matters, filtered moment, selfie moment. Night vision of camera is very nice. It have two mode pro and auto mode. In pro mode shutter speed, Exposure and White Balance can be customised to enhance photography experience.

Wireless Charging 


Wireless charging is another exciting feature. Even though it seems that you have to pay extra for this

Rest feature  


I don’t go into the race of upgrading Hardware (i.e. RAM, Internal Memory and processor) until software is not optimised to utilise all its resources. There are lots of phone which hung and turn slow even after having 3 GB or more RAM. Samsung has heating issue with all its previous phone. Heating issue is generally common in all phone because of steal body and compact design.


Samsung S8 is dust and water proof for 30 min which is quite long time.

I would suggest to go for it.

Thursday, 6 October 2016

Pixel android made by Google launch, specification

Pixel ended Google nexus phone. Pixel is very high end phone and supposed to be compete with iPhone 7. It seems very exciting piece of product with best performing camera standard.

Pre order of Pixel two variant Pixel and Pixel XL will be start from 13th October. Pixel and Pixel XL both will be powered by latest android O.S i.e. android Nougat.

User will be interacted with following unique feature of Google Pixel

  • The first phone with the Google Assistant built in.
  • The highest rated smartphone camera. Ever - With a best-ever 89 DxOMark Mobile score, Pixel's camera lets you take brilliant photos in low light, bright light or any light. 
  • Unlimited storage for all your photos and videos.
  • Care by Google – 
will be the greatest feature of this phone. With your Pixel, you can get support no matter where you are. Your Google expert is just a tap away, day or night. Need help? Just open the Settings app and tap the Support tab. 


Thursday, 15 September 2016

Source code of flip front camera mirror flipped video, Reverse flip front camera video

While taking video from front camera, its shows preview like a mirror. Your left ear will be shown as right in camera preview.

If you pick example from snapchat, they simply show video same as like camera preview was showing. And that feature looks good. User want the exact picture which one’s seeing in preview, if it translate it can completely change video look.

Contact me for source code, implementation help and following features

  •  Ready to use code
  • Camera preview rotation fix on most of the device
  • Android flip front camera mirror flipped video
  • Video player and Camera preview full source with ownership
  • Extra support in integrating

Email me your requirement on codeinandroid@gmail.com/abdul.tofeeq@gmail.com.


Stop front facing camera from mirroring (inverting) image programmatically?

While taking picture from front camera, its shows preview like a mirror. Your left ear will be shown as right in camera preview. Referhow to take picture from Camera and SurfaceView for camera basics.

If you pic example from snapchat, they simply show picture same as like camera preview was showing. That feature looks good. User want the exact picture which one’s seeing in preview, if it translate it can completely change image/picture look.
When you capture bitmap from byte array, you can translate it back to what was showing in camera preview. Look at code below –

Matrix matrix = new Matrix();
if (face) { // reverse flipping of image should only need to be handle for front facing camera
    matrix.preScale(1.0f, -1.0f);
}

Apply matrix to bitmap and create a new one –
Bitmap new_bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), 
bitmap.getHeight(), matrix, true); 
// bitmap is old bitmap which we created from byte array of camera stream


See how to reverse flip video taken from front facing camera. 


Wednesday, 27 July 2016

Release of Blackberry DTEK50 powered by android, survival effort

In 2010 Blackberry lost top spot to iPhone and since then only downfall of blackberry continues. There was a time when thumb injury cause by blackberry phone was named blackberry injury.
No hardware can match blackberry in the field of security. Now blackberry has decide to launch their feature combine with android o.s. being a fan of android and blackberry I am very happy to see this news. Blackberry is launching BlackBerry DTEK50.
Blackberry will possibly be lauded will latest android version Nougat.

DTEK50, The World’s Most Secure Android™ Smartphone Keeps the private details of your life safe.



Features:

Fully Android
Access to over a million apps from Google Play
5.2” scratch resistant display
Intelligent Keyboard
Convenience Key
8MP front camera with flash and 13MP auto-focus rear camera
2TB microSD card support
BlackBerry Security that protects the private details of your life from being hacked


Extra Features - BlackBerry MP-12600 Mobile Power Charger, a high capacity portable charger that powers all your mobile devices to maximize your productivity and play time.
Release date
The bundle is expected to start shipping the week of August 8th 2016

Price Estimated Total Incl. VAT: £294.58




Monday, 18 July 2016

Evolving android, points where Google android sucks because of OEM


 I was thinking a lot lately that Google is working hard to provide user a great android experience. Google is launching new fixes on monthly basis, launching a new version almost every year with ton of new features. But if we see distribution of android version over the phone market, we will be stunned by statistics. Many android customer have outdated version of android.

Some OEM believes in concept of loading hardware and software once in a lifetime like Micromax, Chinese mobile maker while most OEM only providing update to their premium phones or say flagships.

This approach is killing Google Android. I admit providing software update to existing hardware takes lot of money which OEMs don’t want to do for cheap phones. Only flagship which meant to bind with their reputation is their priority. Unlike iPhone its very hard to bring OEM and Google at same level while providing update

Look at current android distribution. Almost 70% percent of market is occupied by Kitkat and lower version of android while Google announced a new android nougat to be launch soon. I presume only some phone with Lollipop have possibility to get update of android nougat. So again the gap will only increase over the time





Who is suffering?

Obliviously android and its user are the one who suffer most by this. Android’s team hard work and latest update are not reaching to millions of users, on the hand people are willing to move but they bound by limitations of their OEM. Eventually android suffers in the whole process

Solution!

For current market strategies, competition is so high to sell devices for android manufacture that they are not going to pay attention on hardware which can support some level upgrade for new android version. Their only purpose is to sell android phone. So one solution is customer will have to buy new android phone every year.
Second possible solution is OEM should do minimum changes in android source so that they will prepare new upgrade for their existing customers at minimum cost. But this will wipe out the creativity and diversity in android market

Continue…..


Sunday, 17 July 2016

Android Nougat Developer Preview Multi Window Support in application

Android didn't have support for running multiple activities and application in a single screen. Android phone screen was used only by single App. Even though some OEM like Samsung was supporting this on their level by customising android source code.

But now android officially supported multi window features. On handheld devices, two apps can run side-by-side or one-above-the-other in split-screen mode. On TV devices, apps can use picture-in-picture mode to continue video playback while users are interacting with another app.Lets discuss how developer has to cope with new changes

Types of  Multi-window Support 

  • Split screen Mode - In this mode, the system fills the screen with two apps, showing them either side-by-side or one-above-the-other. The user can drag the dividing line separating the two to make one app larger and the other smaller.
  • Picture in Picture Mode - On Nexus Player running Android N, apps can put themselves in picture-in-picture mode, allowing them to continue showing content while the user browses or interacts with other apps.
  • FreeForm Mode - Manufacturers of larger devices can choose to enable freeform mode, in which the user can freely resize each activity. If the manufacturer enables this feature, the device offers freeform mode in addition to split-screen mode.

Configuring Your App for Multi-Window Mode  Android Multi-window support provide attributes to customise your application 


  • android:resizeableActivity - True or False decide either you want your app to support Multi-Window
  • android:supportsPictureInPicture - Boolean value decide this feature is supported or not. This attribute is ignored ifandroid:resizeableActivity is false.
  • Layout attributes - Layout width, height can  decide how much minimum space your app required to run.You can query either your application  running in picture in picture mode or running in Mult-Window support

Thursday, 14 July 2016

Google Assistance Android Nougat, Ambitious project of google in 2016


Allo, a smart messaging app
 


Allo is a smart messaging app that makes your conversations easier and more expressive. It’s based on your phone number, so you can get in touch with anyone in your phonebook. And with deeply integrated machine learning, Allo has smart features to keep your conversations flowing and help you get things done.

 

 Duo, a video calling app for everyone
 



Duo is a simple, fast one-to-one video calling app for everyone—whether you’re on Android or iOS, a fast or slow connection, in New York or New Delhi. Like Allo, Duo is based on your phone number, allowing you to reach anyone in your phonebook. And its simple interface fades away when you’re in a call, so it’s just the two of you.



Google Home Always on call.

Google Home is a voice-activated home product that allows you and your family to get answers from Google, stream music, and manage everyday tasks.


Note – Image shown in this article are taken from google so we don’t have any right over these image.

Wednesday, 13 April 2016

Meet HTC 10: HTC 10 Launch, Specification, Hardware information

HTC’s new flagship phone HTC 10 is complete transition from HTC previous variant with Ultra Pixel camera, Hi-res audio and full metallic body.

HTC quote
HTC 10. It’s more of what you’re looking for in a flagship phone. Unparalleled performance. Superb 24-bit Hi-Res sound. The world’s first* Optical Image Stabilization in both front and back cameras. And one of the highest smartphone camera rankings ever from DxOMark. All in a beautifully crafted metal unibody.

HTC 10 release date and price


HTC 10 is fully launched and preorders have been started at HTC official site. But HTC 10 will take time to land in stores.


HTC's new flagship smartphone will be out on May 2016 worldwide and it will cost around US$699.99 (it’s very early estimate)

Preorder HTC 10 


Dimensions and Weight1 

145.9 x 71.9 x 3.0 - 9.0 mm, 161g
Platform Android2
Android™ 6 with HTC Sense
Main Camera
12MP (HTC UltraPixel™ 2 with 1.55μm pixel)
Laser Autofocus
BSI sensor
Optical Image Stabilisation (OIS)
Sound
HTC BoomSound™ Hi-Fi Edition
Dolby Audio™
Personal Audio Profile
Hi-Res audio certified
Hi-Res audio earphones
Display
5.2 inch, Quad HD (2560 x 1440 pixels)
Pixel density at 564 ppi (pixel per inch)
Super LCD 5
Curve edge Gorilla Glass
Display colour personalization
SIM Card Type
Nano SIM
Front Camera
5MP (1.34μm pixels)
Autofocus
BSI sensor
Optical Image Stabilisation (OIS)
Battery and Charging Speed5
Capacity: 3000 mAh
Talk time on 3G/4G network: up to 27 hours
Standby time on 3G/4G network: up to 19 days
Power saving mode
Extreme power saving mode
Quick Charge 3.0 with cool charge
Up to 50% charge in 30 min
CPU Speed
Qualcomm® Snapdragon™ 820, Quad Core, 64bit, up to 2.2GHz
Memory3
ROM: 32GB / RAM: 4GB
Available storage for users: about 23GB
Extended memory: microSD™ up to 2TB
Flex Storage supported






Tuesday, 29 March 2016

Bluetooth low energy points : Android BLE (Bluetooth Low energy) works and save power

BLE is a low energy version of Bluetooth specified in the version 4.0 [1]. Two of the lowest layers of BLE stack are Physical (PHY) and the Link Layer (LL). PHY takes care of transmitting and receiving bits. The Link Layer provides medium access, connection establishment, error control, and flow control. The upper layers are Logical Link Control and Adaptation Protocol (L2CAP), Generic Attribute protocol (GATT), and Generic Access Profile (GAP). L2CAP is able to multiplex the data channels from the above layers and provides fragmentation and reassembly for large data packets. Similar to classic Bluetooth (BT), BLE uses adaptive frequency hopping spread spectrum to access the shared channel. However, the number of hops is 43 and the channel width is 2MHz as opposed to 79 hops and 1MHz channel width in classic BT.

How BLE save energy?


BLE device can operate either in master or slave role. A master can manage multiple simultaneous connections with a number of slave devices, but a slave can only be connected to a single master. Therefore, a BLE network topology is a star. Differently from classic BT, discovery is done so that slave advertises on one or several of the three designated advertisement channels. Master scans these channels in order to discover slaves. After discovery, data transmission happens in the form of connection events in which the master and the slave wake up in synchrony to exchange frames. Both devices sleep the rest of time.

Things to know about BLE/ BLE android –


  • BLE operate on GATT/ATT profile
  • Use very less power compare to classic Bluetooth. Used for small burst of data exchange such sensors, Remote controllers
  • BLE doesn’t support streaming
  • BLE have data rate of 1 mbps but is not optimized for data transfer
  • Design for sending small bundle of data exposing state


Monday, 16 November 2015

LG Watch Urbane 2nd Edition LTE - Cellular support comes to Android Wear


Android Wear lets you stay connected, even when your phone isn’t with you. With Bluetooth and Wi-Fi support, for example, you can see who’s calling when your phone is in the next room, or respond to messages at the gym while your phone is at home. Today, we're bringing cellular support to Android Wear, so you can stay connected in even more places. 

No more worrying about Bluetooth or Wi-Fi—your watch will automatically switch to a cellular connection when you’re out of range. As long as your watch and phone are connected to a cellular network, you’ll be able to use your watch to send and receive messages, track fitness, get answers from Google, and run your favorite apps. And yes, you’ll even be able to make and take calls right from your watch, for when your hands are full, or your phone is elsewhere.

The first Android Wear watch with cellular support is the LG Watch Urbane 2nd Edition LTE.

  • ·         W200 Opal Blue
  • ·         First LTE Cellular Android Wear Smartwatch
  • ·         Real Watch Design
  • ·         Quick Access to Shortcut Settings With Three Buttons
  • ·         480 x 480 High Resolution Display / 570mAh Long-Lasting Battery
  • ·         Interactive Watch Faces





Android News and source code