Skip to main content

Posts

Audio Recording in Android

Simple State Diagram for Media Recorder... Here Sequence of Method call is as per state diagram of media Recorder .... Otherwise Invalid sate call Error will be Occur........ Steps: 1) Also her two permission add in Android manifest file <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 2) This is java file coding  audiorecording.java package com.example.recording; import java.io.File; import java.io.FileDescriptor; import android.media.MediaRecorder; import android.os.Bundle; import android.os.Environment; import android.provider.MediaStore; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import
Recent posts

How To Make Jar file From .java File

Follow the Below Steps for Make .jar file from Java  Creating a jar File in Command Prompt Start Command Prompt. Navigate to the folder that holds your class files: C:\>cd \mywork Compile your class(es): C:\mywork> javac *.java Create a manifest file: C:\mywork> echo Main-Class: DanceStudio >manifest.txt Create a jar file: C:\mywork> jar cvfm DanceStudio.jar manifest.txt *.class Test your jar: C:\mywork> DanceStudio.jar

Calculator in Java

This is One simple calculator using java swing so.. enjoy it.... her all buttons and textbox are put in panel so every row in calculator its separate on panel. This calculator made by me during 7th semester. Realy java is my favourite Language . so Steps for run Below code:-  1) Copy below code in notepade  2) Save this file as cal.java  3) open cmd and goto path of cal.java  4) Now Firts compile it using below command         javac cal.java  5) and run it using following cammand         java cal.java Code: File : cal.java import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.applet.*; /* <applet code="cal" width=250 height=300> </applet> */ class calc extends JFrame implements ActionListener   {    FlowLayout fl;  GridLayout gr;   JPanel p1,p2,p3,p4,p5,p6,p7,p8,p9;  JButton b[],plus,eql,minus,mul,div,ce;  JTextField t1;  int a,c,r=0;  String s="";

Text To Speech Application in Android

This Application Convert Text into Speech.... Enjoy it..... Download Code (Click Here....) Download .apk File For Android(2.2 upto) Mobile (Click Here...) Show in Bellow Code For TextToSpeech.java here use TextToSpeech Class for Access the functionality of conversion of text to speech... setLanguage(Locale.ENGLISH); method is use for set language like us , uk etc. Also Call shutdown()  method in onDestroy() for release All TextToSpeech Objects. Show in Bellow .java code 1) First Create One XML file in which one TextView ,one EditText and one Button Show in Bellow Code <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent" >     <TextView         android:id="@+id/textView1"         android:layout_width="wrap_content"         android:layout

Animation Demo in Android(Tween Animation)

This Animation Demo..... Download This Code Click Here...... The view animation framework supports both tween and frame by frame animations, which can both be declared in XML. The following sections describe how to use both methods. Tween animation An animation defined in XML that performs transitions such as rotating, fading, moving, and stretching on a graphic. file location: res/anim/ filename .xml The filename will be used as the resource ID. compiled resource datatype: Resource pointer to an  Animation . resource reference: In Java:  R.anim. filename In XML:  @[ package :]anim/ filename syntax: <? xml version = "1.0" encoding = "utf-8" ?> < set xmlns:android = "http://schemas.android.com/apk/res/android" android:interpolator = "@[package:]anim/ interpolator_resource " android:shareInterpolator = ["true" | "false" ] > < alpha android:fromAlpha = " float "

Android Tab Layout Application

Hello This Android Tab Layout Application.............. Enjoy it.............. Download This Code Click here 1)   In this post we need   three separate activities for three tab screens . So let’s get started by creating a simple project by opening eclipse IDE.  Create a new project  File -> New -> Android Project  and give activity name as  MainActivity . 2)  Now open your  activity_main.xml  under  res -> layout  folder and type the following code.   <?xml version="1.0" encoding="utf-8"?> <TabHost         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@android:id/tabhost"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_alignParentLeft="true"         android:layout_alignParentTop="true" >         <LinearLayout             android:layout_width="match_parent"