Total members 10261 | Gratitudes |It is currently Wed May 23, 2012 7:50 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 2 posts ] 
Author Question
 Question subject: Can i track calls from mobile phones
PostPosted: Tue Jun 14, 2011 10:29 am 
Offline
Newbie
User avatar

Joined: Tue Jun 14, 2011 10:25 am
Posts: 3
Has thanked: 1 time
Have thanks: 0 time

I need to develop a pgm to monitor calls from a cell phone connected to the pc and I need to hear the sound using haed phone....


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Can i track calls from mobile phones
PostPosted: Tue Jun 14, 2011 12:56 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
It is the software on mobile is J2me . If you are connecting using Bluetooth you can sheet this java/connecting-to-pc-from-mobile-using-bluetooth-in-java-t711.html

Anyway you should do Analysis for the data sent from phone. You will need to use the java Sound API
here is an example read wave files should help you
Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sound;
import java.io.File;
import java.io.IOException;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException;

public class 
SoundExample extends Thread {

    private 
String soundFile;

    private 
Position postion;

    private final 
int EXTERNAL_BUFFER_SIZE 524288// 128Kb

    
enum Position {
        
LEFTRIGHTNORMAL
    
};

    public 
SoundExample(String wavfile) {
        
soundFile wavfile;
        
postion Position.NORMAL;
    }

    public 
SoundExample(String wavfilePosition p) {
        
soundFile wavfile;
        
postion p;
    }

    public 
void run() {

        
// here read sound from external file .
        
File fileObject = new File(this.soundFile);
        if (!
fileObject.exists()) {
            
System.err.println("Wave file not found: " this.soundFile);
            return;
        }

        
AudioInputStream audioStream null;
        try {
            
audioStream AudioSystem.getAudioInputStream(fileObject);
        } catch (
UnsupportedAudioFileException e1) {
            
e1.printStackTrace();
            return;
        } catch (
IOException e1) {
            
e1.printStackTrace();
            return;
        }

        
AudioFormat format audioStream.getFormat();
        
SourceDataLine srcDataLine null;
        
DataLine.Info infoObject = new DataLine.Info(SourceDataLine.class, format);

        try {
            
srcDataLine = (SourceDataLineAudioSystem.getLine(infoObject);
            
srcDataLine.open(format);
        } catch (
LineUnavailableException e) {
            
e.printStackTrace();
            return;
        } catch (
Exception e) {
            
e.printStackTrace();
            return;
        }

        if (
srcDataLine.isControlSupported(FloatControl.Type.PAN)) {
            
FloatControl pan = (FloatControlsrcDataLine
                    
.getControl(FloatControl.Type.PAN);
            if (
postion == Position.RIGHT)
                
pan.setValue(1.0f);
            else if (
postion == Position.LEFT)
                
pan.setValue(-1.0f);
        }

        
srcDataLine.start();
        
int nBytesRead 0;
        
byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];

        try {
            while (
nBytesRead != -1) {
                
nBytesRead audioStream.read(abData0abData.length);
                if (
nBytesRead >= 0)
                    
srcDataLine.write(abData0nBytesRead);
            }
        } catch (
IOException e) {
            
e.printStackTrace();
            return;
        } 
finally {
            
srcDataLine.drain();
            
srcDataLine.close();
        }

    }

 

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )



For this message the author msi_333 has received gratitude : sreeraj1237
TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 2 posts ] 
Quick reply


  

 Similar topics
 java mobile apps
 Help in C# sample, SDP in VoIP SIP calls
 connecting PC with mobile using bluetooth code in java
 i want code for connecting mobile and pc can u send me code
 Connecting to PC from mobile using bluetooth in java
 Call of duty 4 Mobile Game Free Download
 Java Program for communicate PC and Mobile
 how to develop a mobile application for nokia help of java
 mobile
 Java Mobile Apl

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: Google Adsense [Bot] and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team