Browsing all articles in Android
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

Feb
18

What’s new in Android 4.2.2 Jelly Bean

Author saurabh    Category Android, Tips     Tags

android-422_1

Android 4.2.2 isn’t quite official yet, but it’s slow roll out has been bolstered by manual download links and folks are finding a few new things in the latest firmware. Most of it is behind the scenes and will be covered by words like “stability enhancements” and bug fixes, and those are what’s really important. A specific that folks are reporting is a fix to the Bluetooth stack to fix audio stuttering, and that’s something folks have been waiting for. Equally important is that plenty of people are saying their Nexus devices are no longer randomly rebooting, so if you have an issue there hopefully Android 4.2.2 fixes it.

read more

Feb
10

Multi-tasking on Android based devices

Author saurabh    Category Android, Tips     Tags

Cornerstone is an extension to the Android Framework, created by Onskreen, enabling true multi-tasking on Android based devices.

Story behind Cornerstone

As Android exploded and it grew to be used on tablets, the user experience did not evolve to support the richness of the larger screen devices. By default, the user experience designed for 3″ devices were simply blown up to fit on 7 and 10 inch screens. This didn’t take advantage of the larger screen size in any meaningful way, there was just so much more these devices could do.

We created Cornerstone so that Android would truly be optimized for these larger screens and users could multi-task the way they have become used to. Cornerstone was open sourced in Feb 2012.
read more

Oct
14

Samsung ‘ChatON’,Samsung’s Version Of iMessage now Available in Android Market.

Author saurabh    Category Android, Tips     Tags

 

Samsung’s cross-platform messaging application called ChatON has arrived in the Google Android Market this morning.

The service, announced on 29th August 2011, is similar to RIM’s BlackBerry BBM or Apple’s i Message in that it allows for an alternative to SMS or MMS messaging.

At present, ChatON supports Android, bada and Samsung feature phones, butthe company promises support for iOS and BlackBerry soon.

The Android version is available here in the Android Market. It works on Android 2.2 and 2.3. The Samsung (bada, feature phone) version is available in the Samsung App Store.
read more

Oct
12

Backend Service Provider StackMob Comes To Android

Author saurabh    Category Android, Tips     Tags

StackMob, the backend service provider for mobile developers, has big news today: it’s now available on Android. With today’s launch (still in private beta – see below for invites), StackMob will extend full access to its services to Android developers, including an open-sourced Android SDK and support for Android Push Notifications.

The platform, which MG Siegler once dubbed the “Heroku for Mobile” (before StackMob partnered with Heroku!), is a cloud-based system that aims to address all the backend needs of mobile developers, including social integration, storage, messaging, API creation, analytics, monetization and more. It’s a flexible, scalable solution that even allows developers to add complex logic to their app using custom code, if need be.
read more

Oct
9

how can I write applications in C or C++ for Android?

Most of the people know that Development of Android Application is only done in java programming language. But Reality is that Development of Android application can be done in native languages like C & C++.

I have 3 option to do this all.

1> For doing this You need to use   Android NDK

 

read more

Oct
7

Top Selling Best Android phones in India.

1) Samsung Galaxy S II (I9100)

 

 

 

 

   

 

Specifications and Features

  • Android v2.3.3 with TouchWiz 4.0
  • 4.3-inch Super AMOLED Plus display
  • Super-slim body, weighs just 116g
  • 1.2GHz Dual Core Processor
  • 1GB of RAM
  • 8MP Camera with autofocus
  • 1080p video recording@30fps
  • HDMI port
  • USB 2.0 (MHL), USB on-the-go
  • NFC (Near Field Communication) ready

Price: Rs 32,890
read more

Oct
7

LG Optimus One Gingerbread update now available

Author saurabh    Category Android, Tips     Tags

LG has started rolling out of the Android 2.3 Gingerbread update for LG Optimus One in India along with other Asian countries .

To update your LG Optimus One install the LG Software update tool in order to  download the update.

The update also mentioned in LG’s website – CLICK HERE

read more

Oct
7

Cheat code for Android [part-2]

Author saurabh    Category Android, Tips     Tags

1 ) Code:

*#*#273283*255*663282*#*#*

This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.
read more

Oct
6

How To Get Back Older / Original Android Market

Author saurabh    Category Android, Tips     Tags

Some users are not feeling better by the new android market version which they were upgraded earlier.

Manual handling and use is different from the older version so some user feeling uncomforted with the new and missing the older one. Don’t worry they can regain their older version by our below procedure. So follow this way:-

This method is really very simple and fast, so all you need to do
1. Install an app called aTrackDog
2. Uninstall android market
3. And original android market will automatically will come back

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