September 17, 2013

Android Virtual Device (AVD) Emulator Creation and Installing APK on Emulator Using Command Line

Dear friends,

Every time whenever we are using most of the Android developers are using Eclipse or some other IDE to create and start the AVD.

I was just thought of using it via command line in my Ubuntu because I was very lazy to start and wait for Eclipse to get ready. I just want to try some apk on Emulator.

Ubuntu Procedure


Open terminal
I was hoping that you had already included the Android tools, platform-tools in PATH. If not just do that else navigate to Android SDK directory

Create AVD:

Syntax: 
$ android create avd -n -t --abi

target-ids are based on the installed Android platforms. Its not the Android API Level.

abi(Application Binary Interface): The ABI is used to control which machine code will run on a given hardware device. For example, for an Android application to run on an x86 device, it is necessary to include x86 ABI support when compiling the application.

Example:
$ android avd -n MyJB -t 12 --abi armeabi-v7a

To view the target-ids list and supported ABI for target-id, execute the following command

$ android list targets

You might be getting some output similar to this

Available Android targets:
----------
id: 1 or "android-3"
     Name: Android 1.5
     Type: Platform
     API level: 3
     Revision: 4
     Skins: HVGA-P, QVGA-L, HVGA-L, HVGA (default), QVGA-P
     ABIs : armeabi
----------
id: 2 or "android-4"
     Name: Android 1.6
     Type: Platform
     API level: 4
     Revision: 3
     Skins: HVGA, QVGA, WVGA800 (default), WVGA854
     ABIs : armeabi
----------
id: 3 or "android-7"
     Name: Android 2.1
     Type: Platform
     API level: 7
     Revision: 3
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi
----------
id: 4 or "android-8"
     Name: Android 2.2
     Type: Platform
     API level: 8
     Revision: 3
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi
----------
id: 5 or "android-10"
     Name: Android 2.3.3
     Type: Platform
     API level: 10
     Revision: 2
     Skins: HVGA, QVGA, WQVGA432, WVGA800 (default), WQVGA400, WVGA854
     ABIs : armeabi, x86
----------
id: 6 or "android-11"
     Name: Android 3.0
     Type: Platform
     API level: 11
     Revision: 2
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 7 or "android-12"
     Name: Android 3.1
     Type: Platform
     API level: 12
     Revision: 3
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 8 or "android-13"
     Name: Android 3.2
     Type: Platform
     API level: 13
     Revision: 1
     Skins: WXGA (default)
     ABIs : armeabi
----------
id: 9 or "android-14"
     Name: Android 4.0
     Type: Platform
     API level: 14
     Revision: 3
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WQVGA400, WVGA854
     ABIs : armeabi-v7a
----------
id: 10 or "android-15"
     Name: Android 4.0.3
     Type: Platform
     API level: 15
     Revision: 3
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86
----------
id: 11 or "android-16"
     Name: Android 4.1.2
     Type: Platform
     API level: 16
     Revision: 4
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WXGA800-7in, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86
----------
id: 12 or "android-17"
     Name: Android 4.2.2
     Type: Platform
     API level: 17
     Revision: 2
     Skins: WXGA800, HVGA, QVGA, WQVGA432, WVGA800 (default), WSVGA, WXGA720, WXGA800-7in, WQVGA400, WVGA854
     ABIs : armeabi-v7a, mips, x86

Start AVD

Syntax:
$ emulator -avd

Example:
$ emulator -avd MyJB

It will ask for you to customize, if you are interested and you have knowledge in the options then you can go ahead with custom emulator. Press "enter" to accept default options and your emulator will start within seconds.

Install APK on emulator

Syntax:
$ adb install

Example:
$ adb install MyApp.apk

It will install the apk on your emulator.
Go to apps and click on the installed app to view the installed application.

References:

http://developer.android.com/tools/help/android.html
http://developer.android.com/tools/help/adb.html
http://docs.xamarin.com/guides/android/advanced_thttp://en.wikipedia.org/wiki/Application_binary_interfaceopics/cpu_architecture



September 16, 2013

Convert MS-Access to SQLite Database

If you are familiar with MS-Access database creation and wants to covert your database to SQLite without putting all your efforts again.

If you database already exists in MS-Access and you want to have that in SQLite for mobile development. Its now a cake-walk like conversion

Here is an easy process to do that.

 

  • Download from https://code.google.com/p/mdb-sqlite/downloads/list
  • Extract the file, you will be getting mdb-sqlite folder with below file structure
  • image
  • Open Command Prompt and navigate to mdb-sqlite folder
  • Run “ant dist” command (without quotes")
  • image
  • Once the build successful, it will generate dist\main.jar and dist\mdb-sqlite.jar files
  • You can use these jar files to covert your ms-access database to sqlite database with the following command
  • Syntax :-
    • java -jar dist\mdb-sqlite.jar source.mdb output.sqlite
  • Example :-
    • java –jar dist\mdb-sqlite.jar employee.mdb employee.sqlite

 

References

https://code.google.com/p/mdb-sqlite/

Blogger Labels: Convert,SQLite,Database,creation,efforts,Here,Download,code,Extract,folder,Open,Command,Prompt,quotes,Once,files,Syntax,output,Example,employee,References,google,dist,java

September 06, 2013

Future Programming Languages that will change IT World

Future Programming Languages

It's all about being innovative and keeping a tap of innovative technologies. If you are a developer looking to understand futuristic technologies, this article is a must-read for you. We have presented 10 programming languages that will make a difference in the way IT world works. These languages are set to change the IT landscape.

Dart

This was created by Google to counter the weakness that comes on JavaScript when it works with web applications in large numbers. The Dart language, Google hopes, will become the new vernacular of web programming. It uses uses C-like syntax and keywords. One significant difference, however, is that while JavaScript is a prototype-based language, objects in Dart are defined using classes and interfaces, as in C++ or Java. Dart also allows programmers to optionally declare variables with static types.

Website: https://www.dartlang.org/

Wiki: http://en.wikipedia.org/wiki/Dart_%28programming_language%29

Ceylon

This language is being developed by Gavin King who has denied that the language being developed at Red Hat, is meant to be a "Java killer." Among King's gripes are Java's verbose syntax, its lack of first-class and higher-order functions, and its poor support for meta-programming. In particular, he's frustrated with the absence of a declarative syntax for structured data definition, which he says leaves Java "joined at the hip to XML." Ceylon aims to solve all these problems.

Website: http://ceylon-lang.org/

Wiki: http://en.wikipedia.org/wiki/Ceylon_%28programming_language%29

Go

Google is understood to have created a programming language called Golang, or Go. This, say some tech analysts, might just end up replacing Java altogether. This language is a general-purpose programming code that works on everything from application development to systems programing. While it is still a work in progress, and the language specification may change, developers can actually start working with it today itself.

Website: http://golang.org/?ModPagespeed=noscript

Wiki: http://en.wikipedia.org/wiki/Go_%28programming_language%29

F#

This has been popular for a long time with computer scientists and academia. F# (pronounced "F-sharp"), is a Microsoft language that has been designated to be both functional and practical. Given the fact that it is a first-class language on the .Net Common Language Runtime (CLR), it can access all of the same libraries and features as other CLR languages, such as C# and Visual Basic.

Website: http://www.tryfsharp.org/

Wiki: http://en.wikipedia.org/wiki/F_Sharp_%28programming_language%29

Opa

Web development is too complicated. Even the simplest web app requires countless lines of code in multiple languages: HTML and JavaScript on the client, Java or PHP on the server, SQL in the database, and so on. Opa doesn't replace any of these languages individually. Rather, it seeks to eliminate them all at once, by proposing an entirely new paradigm for Web programming. In an Opa application, the client-side UI, server-side logic, and database I/O are all implemented in a single language, Opa.

Website: http://opalang.org/

Wiki: http://en.wikipedia.org/wiki/Opa_%28programming_language%29

Fantom

Should you develop your applications for Java or .Net? If you code in Fantom, you can take your pick and even switch platforms midstream. That's because Fantom is designed from the ground up for cross-platform portability. The Fantom project includes not just a compiler that can output bytecode for either the JVM or the .Net CLI, but also a set of APIs that abstract away the Java and .Net APIs, creating an additional portability layer.

Website: http://fantom.org/

Wiki: http://en.wikipedia.org/wiki/Fantom_%28programming_language%29

Zimbu

This particular language takes its particles and components from languages across the board and is the brainchild of Bram Moolenaar. He was the creator of the Vim text editor. The language is slated to be fast, concise, portable, and easy-to-read. Its syntax is unique and idiosyncratic, yet feature-rich. It uses C-like expressions and operators, but its own keywords, data types, and block structures. It supports memory management, threads, and pipes. Portability is a key concern. Although Zimbu is a compiled language, the Zimbu compiler outputs ANSI C code, allowing binaries to be built only on platforms with a native C compiler.

Website: http://www.zimbu.org/

Wiki: http://en.wikipedia.org/wiki/Zimbu

X10

This is a parallel processing language that works was once a specialized niche of software development. However, with the increase in multicore CPUs and distributed computing, today's programming languages aren't keeping pace with the trend. This is why IBM Research is developing X10, a language designed specifically for modern parallel architectures, with the goal of increasing developer productivity "times 10." X10 handles concurrency using the partitioned global address space (PGAS) programming model. Code and data are separated into units and distributed across one or more "places," making it easy to scale a program from a single-threaded prototype (a single place) to multiple threads running on one or more multicore processors.

Website: http://x10-lang.org/

Wiki: http://en.wikipedia.org/wiki/X10_%28programming_language%29

haXe

haXe (pronounced "hex") is more than just any random portable language. It is a multi-platform language, which is capable of targeting diverse operating environments, that range from native binaries to interpreters and virtual machines. It can be used by developers and then compiled into object code, JavaScript, PHP, Flash/ActionScript, or NekoVM bytecode today.

Website: http://haxe.org/

Wiki: http://en.wikipedia.org/wiki/Haxe

Chapel

This is a brilliant language to work with in a world characterized by high-performance computing. The language was designed with supercomputing and clustering in mind, and is part of Cray's Cascade Program, an ambitious high-performance computing initiative funded in part by the U.S. Defense Advanced Research Project Agency (DARPA). Chapel's syntax draws from numerous sources. In addition to the usual suspects (C, C++, Java), it borrows concepts from scientific programming languages such as Fortran and Matlab. Its parallel-processing features are influenced by ZPL and High-Performance Fortran, as well as earlier Cray projects.

Website: http://chapel.cray.com/

Wiki: http://en.wikipedia.org/wiki/Chapel_%28programming_language%29

References

http://www.efytimes.com/e1/fullnews.asp?edid=115314

Blogger Labels: Future,World,article,difference,Dart,Google,JavaScript,numbers,language,vernacular,syntax,prototype,objects,classes,Java,Website,Wiki,Dart_,Ceylon,Gavin,killer,Among,gripes,absence,data,definition,problems,Ceylon_,Golang,purpose,code,development,specification,computer,academia,Microsoft,Given,fact,Common,Runtime,features,Visual,Basic,F_Sharp_,HTML,client,server,database,Rather,paradigm,logic,Opa_,Fantom,Should,platform,output,APIs,layer,Fantom_,Zimbu,components,brainchild,Bram,Moolenaar,creator,text,expressions,supports,memory,management,threads,Although,ANSI,niche,CPUs,trend,Research,goal,times,PGAS,places,machines,Flash,ActionScript,NekoVM,Haxe,Chapel,performance,Cray,Cascade,Program,initiative,Defense,Project,Agency,DARPA,addition,Fortran,Matlab,High,Chapel_,Languages,technologies,interfaces,analysts,systems,platforms,particles,operators,outputs,units,environments,concepts,References,developer,keywords,wikipedia,lang,developers,compiler,bytecode,binaries

July 19, 2013

Beam Telecom Internet Connection Auto Login Task in Windows whenever you have connected to your Wireless LAN; Not in startup

Hi friends,
Today me and my roommate were discussing to leave the laptop to download some files using torrent client. Then we thought like, what if power goes off ? Since, we are using Beam Telecom, we need to manually login via a webpage to activate the Internet connection when power comes back.

Then I have searched online and find some useful links which are shown below.

But still, as you know, we weren’t satisfied with the solution like, having as a startup script. Which will run whenever you just login to the system.

What if, we have left the laptop/desktop and power goes (But laptop/desktop running on battery/UPS), the startup script trick won’t solve our problem. Again, someone has to manually open browser and do the web login or start the batch file which was mentioned in the above files. So we have decided to find some easy solution which depends on the network connection.

Our home network setup:

I hope, now a days most of the home networks are like our network which was routed as below
BeamTele –> Wireless Router –> Laptops and Mobiles (Wi-Fi)

Pre-requisites:

  1. Open this link. https://docs.google.com/file/d/0B16cWwxzg0m5X1BPZXQySm5nV28/edit?usp=sharing
  2. Click on "File -> Download" to download the zip file
  3. Those files I have been copied from this link and modified the batch file
  4. Extract the zip file to a safe location, where you accidentally don’t delete the files. Please don’t put it in common download folder, you may accidentally delete it.
  5. You will find an wget.exe and related dlls along with a batch file.
  6. Move those wget.exe and dlls to C:/WINDOWS folder
  7. Let the batch file path be clear without any spaces in folder names (precaution)
  8. Please replace the username and password details with your Beam Tele userid and password in the batch file and don't forgot to save the file.
Note: Please place wget.exe and all the dlls in C:/WINDOWS folder. Because this path is already available in “PATH” environment variable
Out next step would be using this batch file and automatically running it whenever WLAN connected

Solution:

We have got an idea to create a task, which described below. Windows "Task Scheduler" is similar to "Cron Jobs" in Linux. So, lets start created "BeamTeleAutologin" task as described below.
  1. Whenever power goes off, router will be off (mostly, until unless you have connected your router also to an Inverter/UPS)
  2. If your router power goes off i.e. wireless router not connected any Inverter/UPS then blindly follow this method
  3. Create a task scheduler as described below
    • Search for “Task Scheduler” on Windows 7/8
    • Open “Task Scheduler”
    • Click on “Task Scheduler (Local)”
    • On right most (3rd) column, you will find an option like “Create Task”
    • Click on “Create Task”
    • In “General” tab, give a name of task like “Beam Tele Autologin” with some description (optional)
    • In “Security Options”, Choose “Run whether user logged in or not”
    • In “Configure for” dropdown, select “Your OS/Server OS” (Windows 7, Windows Server 2008 R2)
    • You can click on “Hide”, if you want to hide the task from library
    • Go to “Triggers” tab
    • Click on “New” button
    • Select “On an event” option from the “Begin the task” drop down
    • By default, “Basic” option get selected
    • From the “Log” dropdown, choose “Microsoft-Windows-WLAN-AutoConfig/Operational”
    • From “Source” dropdown, choose “WLAN-AutoConfig”
    • Put some delay task for some 1 minute (Optional)
    • Go to “Actions” tab
    • Select the batch file, which you have extracted from the downloaded “BeamTeleAutoLogin.zip
    • Go to “Conditions” tab
    • Uncheck “Power” category options
      • (Deselect) Start the task only if computer is on AC power
      • (Deselect) Stop if computer switches to battery
    • Check “Network” category options
      • (Select) Start only if the following network connection is available
    • Select your “WLAN” name from the list
    • Go to “Settings” tab
    • Check the necessary options like
      • Allow task to be run on demand
      • From the only available drop down, select “Do not start a new instance”
    • Click on “Ok” button
  4. Go to “Task Schedule Library” from the “Task Scheduler”
  5. You can see the task as per the name give above like “Beam Tele Autologin”
  6. Select the corresponding task
  7. Now, on right side you can see options like “Run”, “End”, “Disable”, “Properties”, “Delete” (By right click on the task, you will be getting same options)
  8. If you want to edit the task, click on “Properties”
  9. If your router has power back up i.e. connected to some Inverter or UPS then just add these few lines at the starting in your batch file to make sure that Internet is connected by pinging public DNS
    • ping 8.8.8.8 | find "Reply"
    • if errorlevel 1 goto :eof

Testing the Autologin Task:

  1. To test this task is running or not, do the following
    • Open http://portal.beamtele.com in browser
    • If you have already logged in, you can see a “Logout” option
    • Click on “Logout” button
    • So, by now you are no longer connected to Internet. You need to manually enter the details to login.
    • Disconnect/Disable your WLAN connection. So, router is not connected to laptop/desktop.
    • Now, you run the task if its not running by selecting task, click on “Run”
    • Connect to your WLAN now
    • Do not enter any details for login
    • If everything was properly setup then it should login automatically with your credentials.
If its working fine, then enjoy the hack.
Note: Please send your feedback and comments to psrdotcom@gmail.com

References:



June 20, 2013

Skype Video Message (Max Limit: 3 Minutes)

Hi friends,

Skype added Video message. This new feature let you record your video for maximum of 3 minutes and send to your Skype contact.

Which means, when the recipient is offline, you can send a video message to him/her. When recipient comes to online, they can view your video by clicking on a link.

I have just tried it and its simply superb.

 

Recording your video message:

  1. Select contact which you want to send video message.
  2. Desktop App: Click on “Video Message”
  3. Tablet:  Click on “+” icon to get “Video Message” option. Click on “Video Message”
  4. You will get a message like “Looking Good!! Hit record when you are ready”
  5. Click on record button
  6. Click record button again to stop your video message
  7. You can discard message by clicking on “X”(CANCEL) button
  8. You can playback your video by hitting “Play” button
  9. If you are satisfied with your video message and clarity then hit the “Message” icon to send the video message

 

View your video message sent by your contacts:

  1. My friend recorded his video and sent to my Skype (though I am online), I got a link in my Skype chat like
  2. “You've received a video message. View it at: some random link and some 4 digit pin”
  3. Click on the link and it will ask you enter the PIN
  4. Enter the pin provided along with the Skype video chat link
  5. Now you can view the video which has been recorded and sent by your Skype contact

Hope, you will enjoy this cool feature.

 

Please send your feedback and comments to psrdotcom@gmail.com

Blogger Labels: Skype,Video,Message,Limit,Minutes,friends,recipient,Select,Desktop,Click,Tablet,icon,option,CANCEL,Play,View,contacts,friend,digit,Enter,Hope,feedback,comments,online

June 18, 2013

Unable to Share folders in Ubuntu problem got resolved (Samba)

Hi friends,

I was not able to share my folders within network sometime back.

After searching and modifying configuration file my problem got resolved.

Problem

Unable to share Ubuntu folders

Message:  

net usershare' returned error 255: net usershare add: cannot share path /opt/foldingathome as we are restricted to only sharing directories we own.
Ask the administrator to add the line "usershare owner only = False"
to the [global] section of the smb.conf to allow this.

Resolution:

  1. Type the following in console
    • $ sudo vi /etc/samba/smb.conf
  2. Go to [global] section
  3. Add the following line
    • usershare owner only = False
  4. Save and exit from vi
  5. Restart Samba service
    • sudo service samba restart
Now, you can happily share your folders over network

Please send your feedback and comments to psrdotcom@gmail.com
 

June 10, 2013

Upgrade Samsung Galaxy S Advance to Jelly Bean Latest Version

Hi all,

Do you want to update/upgrade your Android Samsung Smartphone? I have upgraded it with latest firmware.

Please find the procedure below to do it manually.

 

Warning: Do at your own risk. We are not responsible for any bricking of your device. If you are scared to do it then please visit the nearest authorized service center. The experts from the service center will be able to upgrade your device if an upgrade available in your country.

 

Pre-Requisites:

Visit www.samsung-updates.com

Select your device from the drop down list

It will automatically lists the device current firmware version in each supporting country

You can download the firmware of any country of your choice (Mostly the latest release)

After downloading, extract it to a folder

Download ODIN latest version and extract it

Make sure that you had taken backup of your contacts, SMS, Settings and data as well

Make sure that USB Debugging enabled on your device

 

Firmware Upgrade:

Switch off your device

Run Odin{xxxx}.exe as an administrator

Press and hold Volume Down key + Home Key + Power Button until you get a “Downloading..” {Downloading Mode} screen with green robot

Connect your device with USB cable

If device connected properly you will see one of ID:COM boxes as yellow/green

And you can see “Added” message in the message section box

Now, Click on PDA button in the “Files/Download” section

Select the downloaded firmware xxx.tar.md5 file

Click on “Strat” button from the “Control Panel” section

It will take some time to finish the process

On mobile screen you will see “Downloading” progress

On ODIN window, you can see the similar kind of progress

Wait till you get the “PASS” message with green background in the box above progress bar in ODIN window

Your device gets restarted now

Select the language options and continue with other settings

Now you can disconnect the device from the PC/Laptop

Enjoy the upgraded OS features

 

Blogger Labels: Upgrade,Samsung,Galaxy,Advance,Bean,Latest,Version,Android,procedure,Requisites,Visit,Select,folder,Download,ODIN,Make,backup,contacts,data,Firmware,Switch,administrator,Volume,Down,Home,Power,Button,Mode,robot,Connect,cable,message,Click,Files,Strat,Control,Panel,Wait,PASS,background,language,Laptop,Enjoy,features,options

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com