Browsing all articles by jigar patel
Jan
22

Review of WhatsApp Web client

WhatsApp has recently launched it web interface,

 

To use WhatsApp web client you need to perform below steps:

1) Update WhatsApp application from android play store

2) Open google’s chrome browser and type https://web.whatsapp.com/

3) Open WhatsApp application -> Menu -> WhatsApp Web -> keep your mobile and scan the QR code displayed in browser tab.

If internet conection is good then with in 2 seconds all your contacts and chat information will be there on Web interface. Its Ultra fast in this login and sync.

 

Limitation of WhatsApp web interface/client:

1) You can not use it from other browser. So you need to install chrome only

2) WhatsApp ‘s update is not released yet for IOS

3) You can not change your display picture and status from this Web interface,

4) After login in web interface you need to keep continue internet connection in your smart phone also to use this web interface.   [This is big limitation]  Because now it will use your PC’s internet and your mobile internet both.

5) There is no any indication in mobile app that you are logged in any WhatsApp web. So if you forget to logout from WhatsApp web ui then there is no indication for that.

Good points about WhatsApp web interface/Client:

1) Login and sync are ultra fast.

2) UI is much simple and great. You just love it

3) In PC if you are in any other window then also whatsapp notification comes like Gmail’s mail notification.

4) Mobile’s battery low notification is displayed in web client

Jan
3

Cross Compile C/C++ based programs and Run them on Android Smart-Phones

How to write android application in c programming?

1. Introduction:

Learn how to cross compile pure C / C++ based native programs using different methods and
execute it on your ARM based Android Smart-Phone’s ADB terminal. By the end of this tutorial, you will be able to port any C / C++ based Native project in your Android smartphone.

2. Prerequisite Experience:

Before we get started,Let’s make sure you are quite aware about following things.
1) You are experienced with C or C++ programming language.
2) You know how to compile any small C program using gcc
3) You are quite comfortable using the command line in Linux/Windows.
4) You are quite comfortable with Android Development tools like ADB
5) You understand the terms like “cross compilation”, “Host machine”
6) You are quite comfortable with git and repo commands

3. When you need to cross compile C/C++ programs:

All Android’s GUI based applications are JAVA based so if you want to process something in native code(C/C++) then you need to use JNI interface and call any c methods using JAVA interface and use it. But if you want to do something in pure native code or You want to port any existing programs/libraries available for Linux/Windows to Android smart-phones then you need to simply cross compile it.
Here we will shows you 3 different methods to cross compile this simple hello word program.
==== test.c =====

#include<stdio.h>
int main()
{
printf("Hello world \n");
printf("It is cross compiled on Linux/Windows \n");
printf("It is running on your Android Smart-Phone \n");
return 0;
}

=============

Method 1: Static compilation using standalone toolchain

Here your program will cross compile against standard libc instead of Android’s bionic library.
Generated binary will have copy of all required functions. It will not use any library installed on
android device so its binary size will be larger.
Supported Host OS: Linux only
Here you can download and install standalone toolchain by below command in Linux terminal

sudo apt-get install gcc-arm-linux-gnueabi

Now lets set some environment variable for cross compilation.

export CROSS_COMPILE=arm-linux-gnueabi-gcc

Now lets cross compile test.c file

arm-linux-gnueabi-gcc -static -o HelloWorldInAndroid test.c

HelloWorldInAndroid is the final binary compiled for ARM based Android device.

read more

Mar
4

Motorola’s Moto G does not boot up due to fully dischared battey issue

 

Hi Friends after a long time i am back ….

Just few days ago My wife has gifted me brand new Motorola’s smart phone Moto G (Black, with 16 GB) on our first anniversary. I was very much happy but just 2 days latter due to my bad habit of charging phones i laid down to my moto G  fully discharged.  And next morning when i connected Motorola’s charger with mobile nothing happen. No indication on mobile. no blinking of  notification LED nor on screen. I kept couple of minutes charging but nothing happen.

I have used nokia since last 10 years and i did not face any such issue with those mobiles when they get fully discharged. Nokia’s phone used to boot on in couple of minutes charging.

Anyway i have googled and find out that this issue is well known in Moto G.

  • Some people said They keep Moto G in charging over night and still Moto G did not boot up.
  • Some people have tried different charger but did not boot up.
  • Some says they left the phone for one day [24 hours] without any further charging, and it magically came back to life and started charging after trying it again. 
  • Some says If the battery runs out and refuses to recharge, don’t panic! Let  the phone rest (not plugged in to charger) for a few hours or overnight, then it will respond to the charger.

read more

Apr
27

Difference between c and c++ and java programming languages

Author JIGAR PATEL    Category c++, tips     Tags

In last 2 yeas i have worked a lot on C Programming But now days i need to work on C++ and Java programming language. I have not time to take book of C++ or java programming and start to read that…In any programming language most of the stuff are common. So you know one language very well then by keeping that in mind you can learn other language very well.

Some days ago i found this article and it helped me a lot. i  hope this will also help you….

C++ Style Languages: C++, Objective C, Java, C#

  • it shows the hello world program , version checks,used libraries,
  • primitive  data types,
  • arithmetic and logical operation
  • arrays and strings,
  • regular expressions,
  • dates and time,
  • functions declaration ,
  • execution control flow,
  • files operatins,
  • processes and environment,
  • libraries and namespaces
  • concept of objects

read more

Apr
20

Little endian and Big endian in C programming

This is the most complex concept…. i have read enough on net and some books but   still i was not getting this concept. i was not understanding how this will effect my c code. But i have did some  experiments with some example code and tried to understand things. and here now i am going to share those examples.

In computing, the term endian or endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item as stored in external memory (or, sometimes, as sent on a serial connection)

You can understand basic things about at 

Little endian and Big endian

Big-endian

Mar
5

How to access/unblock songs.pk in india?

 

                        Due to the pirated supply of music kolkata high court have banned songs.pk and now it can’t be accessed in india.

All isp’s have been asked to put an injection so that songs.pk can’t be accessed.
Following are several Indian ISP names included which have to block Songs.pk in India.

 

 

Sify Technologies Ltd
Dishnet Wireless Ltd
Wipro Ltd
Hathway Cable & Datacom Pvt Ltd
Tata Teleservices (Maharashtra) Ltd
Hughes Communications Ltd India
Reliance Communications Infrastructure Ltd
Reliance Wimax Ltd
Bharti Airtel Ltd
Vodafone India Ltd
BG Broadband India Pvt Ltd

 Now to access such blocked sites you need proxy to these blocked sites.

read more

Feb
27

C programming interview questions and answers for freshers

i have seen that in c programming based  interview most of the question are based on some concept clear question and answer.

i have been posting that all tips on this ShareProgrammingTips but here i am just going to List down some good question on C programming.

1>

How will you set, clear ,toggle and check a single bit in C?

2>

Do you know the Concept of Octal literal in C

3>

Do you know the difference between all standard version of c language

4>

How will you detect memory leakage in C program?

5>

Do you know about Implementation limitation of c programming language

read more

Feb
26

What’s the need of using encapsulation { do..while(0) block } in define a macro in C programming?

While reading many codes in c programming based open source project i came to know one interesting things. Let me explain you by some sample code.

#define Assert(v)   if(!(v)) printf("Error occurred at: %s, in %s at %i",  #v, __FILE__, __LINE__);

At most of the experienced people used to write such macro in following style

 #define Assert(v)   do { if(!(v)) printf("Error occurred at: %s, in %s at %i",  #v, __FILE__, __LINE__); } while(0)

This method is called as making encapsulating our macro.

Now let me explain you whats the need of this….

read more

Feb
22

Short-circuiting in C Programming Expressions………….!!!

Author JIGAR PATEL    Category c, Tips     Tags

One Superb thing i learn today is  Short-circuiting in C Programming Expressions. 

Let me explain you by code

#include <stdio .h>
int main() {
   int a = 0;
   int b = 1;
   int c = 2;
   int d = 3;
   a = ++b && ++c || ++d;
   printf ("b = %d,  c = %d, d = %d, a = %d", b, c, d, a);
   return 0;
}</stdio>

if you think output of this program will be

b = 2, c = 3, d = 4, a = 1

then you need to read this whole post..!
read more

Feb
19

In embedded domain, Copying of structure is why avoided in c programming?

 

 

Generally  In embedded software domain for copying structure of same type people dont prefer to use direct assignment and do that by memcpy function or by doing assignment of each element of structure.

Look at Example

struct student {
int roll_no;
int age;
};
struct student exmple1 = {32,15};
struct student exmple2;

for copying exmple1 into exmple2.. instead of writing direct

exmple2=exmple1;

people like to use

memcpy(exmple2,exmple1,sizeof(struct student));

or

exmple2.roll_no=exmple1.roll_no;
exmple2.age=exmple1.age;
Why?

read more

Follow us on Twitter! Follow us on Twitter!

Search in this website

our sponsors

Find us on Facebook

Find us on stackoverflow

Polls

Tell us who you are

View Results

Loading ... Loading ...

My Bookmarks

Sponsers Link