Android :: How To Call A Function As Soon As Sound Is Complete?
May 9, 2009I have a media player that plays a sound. I want to call a function as soon as the sound is complete but i cant figure out how to do it.
View 4 RepliesI have a media player that plays a sound. I want to call a function as soon as the sound is complete but i cant figure out how to do it.
View 4 Repliessay for example I have this code in my activity:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Thread cThread = new Thread(new Runner());
cThread.start();
}
private NotifyMe(){
//do something here
}
and this is my Runner class:
public class TCPClient implements Runnable {
public void run(){
//call NotifyMe() [THIS IS MY QUESTION]
}
}
I have a thread on my activity that runs the Runner Class. Once the thread start, I would like to call the NotifyMe() function that is located at the activity. Is this possible?
I create a javascript function to generate the graph using RGraph.Now i want to send the data for the graph parameters from android java file.For that i want to access the script function in the android java file.Could anyone tell how to do that in android.
View 1 Replies View RelatedI have an Activity (A) and a Service (S) which gets started by A like this:
Intent i = new Intent();
i.putExtra("updateInterval", 10);
i.setClassName("com.blah", "com.blah.S");
startService(i);
A have a function like this one in A: public void someInfoArrived(Info i) Now I want to call A.someInfoArrived(i) from within S. Intent.putExtra has no version where I could pass an Object reference etc.
I would like to compile a list of Android phones that either
1) Comes with native call recording functionality.
2) Support call recording with 3rd party applications.
It would be great if you can lend a hand.Please note that phone/apps that require using speakerphone to record the calls do *not* count. That's a ugly hack I consider marginally useful.Please don't bring legality discussions here as well.Models that have this function built-in.Samsung Galaxy S (South Korean version SHW-M110S, with firmware DH09 or newer).Models that don't have this function built-in but can use 3rd party app to record calls in both ways without turning on speakerphone.HTC Magic (a.k.a. G2); requires root and custom kernel; with rViox
Does anybody know how can I get the build-in function call trace on Android phone?
View 7 Replies View RelatedI have two questions:
1) Before the update, there was a sound that indicated when the call was ended. Anyway to get that back?
2) Has anyone figured out a way to change the end button behavior that was previously controlled by the Spare Parts app? I would like to end button to go home and then go to sleep but Spare Parts can't do it under the new software. Any ideas?
can u tell me how to call a java script method from android activity...
View 3 Replies View RelatedI am trying to pass 2 parameters to a javascript function.This code webview.loadUrl("javascript: function_to_call();"); works fine without parameters but i couldn't use it with parameters. code...
And this is how i call it from java . code...
Is it possible to show any animation when i call a function in same class in android?
In my application, i called a function "doAddition" so many times.And i want whenever i call this function, it shows some animation.
Suppose i have one simple function in my program. Whenever i call that function does a new thread or process is spawned to execute the function or it is executed under the main thread memory space only.
View 4 Replies View RelatedThere is a HTML page that has a javascript function in it.This function returns a frame with a random picture. Is there a way to call this function and get the HTML code that is hidding? (So i get the image)
Exactly i want to get a html stream from GoogleServices.js
by calling:
GS_googleAddAdSenseService("ca-pub-YOU
RPUBIDHERE");
GS_googleEnableAllServices();
GA_googleAddSlot("ca-pub-YOURPUBIDHERE", "ADSLOT_NAME_HERE");
GA_googleFetchAds();
GA_googleFillSlot("ADSLOT_NAME_HERE");
My activity bind a service. I want to call the service's function in activity's onStart/onCreate function, but it doesn't work. The service started sunless but the connection is null. When I just call the service's function in other function (onClick for example),
View 4 Replies View RelatedIt's possible to specify a particular function to be called when button is clicked by setting its onClick attribute in xml:
android:onClick="function_name"
I want to do something similar for FocusChange of buttons, is this possible?
Specifically, I wish to increase my button's size when it has focus and make it normal sized when not focussed. To apply this to all my buttons, I hoped to call a specific function which does this and then specify this function name in my style.xml. But there is no onFocusChange attribute in android.
It works when I add overriden onSetFocusChangeListener for each of my buttons separately in the code. But is there any other solution?
I have various activitys on my app. I have a configuration Activity, and i want to put a cancel button, that, when user press this button, the configuration window get's closed and turn back into the previous activity.i search in google and i find something about calling cancel or dismiss functions, but i can't call them cause this is not a dialog, it's an activity
View 1 Replies View RelatedWhich ROM is best for using the actual call function of the phone? I'm looking to root but want to make sure that the ROM I use has a functional dialer.
View 18 Replies View RelatedMy point is to be able to call a 2.1 API if it exists, while the application should be able to run in 1.5
Specifically, I am making a GPS application which would like to call android.location.LocationManager.addNmeaListener if available. My problem is that this call takes as parameter an abstract class (GpsStatus.NmeaListener) which I cannot pass directly to Class.GetMethod (or my application won't work in 1.5). What I am currently trying is a) to create a wrapper class for GpsStatus.NmeaListener:......................
I've noticed with my T-Mobile G2 that there is no call waiting alert with the default settings, so I'm never aware of someone trying to ring me from within another call - a function that's been standard on every other mobile I've used.
I'm sure it must be possible to set this up, but can't seem to find out how to do it. Very annoying, as I invariably get calls on top of one another and people are starting to tell me they're sick of being put through to my voicemail.
I am trying to call the setSearch function from UrlBuilder Class, but for some reason I get an error asking me to set my class as static. That's not what I want to do with this class.
[HIGH]package com.KarneeKarnay.gamefinder;
import android.os.Bundle;
import android.app.Activity;
import android.view.KeyEvent;[code]....
I have several modules within a single native library, each module is intended to be the compliment to a Java class within the application. How can I call the native functions without having to perform a System. load Library within each Java class? If I load the library in a common class (not through inheritance) the app fails with a link exception.
View 1 Replies View RelatedI'm having trouble using this feature when I run or I walk down the street. I would like to disable it. Is there a way to mod the call screen to disable the function "reject call with message". I tried applications like Ultimate Caller ID or Big Caller ID but I am not satisfied with the result...
I want to keep the ICS screen ans just remove the function... I'm rooted and modify apk don't afraid me.
I'm picking up a Droid tomorrow. How is the call vibrate? I constantly missed just about every call on my Eris.
View 15 Replies View RelatedI've been told that Android OS stores all function calls in a stack. This can lead to many problems and cause the 'hiccups' during runtime, even if a program is functionalized properly, correct?
So the question is, how can we prevent this from happening? The obvious solution is to functionalize less, along with other sensible acts such as refraining from excessively/needlessly creating objects, performing static calls to functions that don't access fields, etc...
Is there another way though? Or can this only be done through careful code writing on the programmers' part? Does the JVM/JIT automatically optimize the bytecode during compile time to account for this?
I've looked up and down the SDK for this, but I can't find anything. I'm wondering if there's a way to transmit a sound, such as a WAV or OGG, during a call such that the person on the other end can hear it. (This sound should be heard in addition to, not in place of, the normal voice transmission.) Is there a possibility I may have overlooked?
View 1 Replies View RelatedI am playing one audio file when call arrives so the caller can receive it at other side but the issue is yet the opposite caller is not able to listen it what could be wrong in it. Can some one tell me what can be the issue in it ?
View 2 Replies View RelatedI have my G1 connected to a FM transmitter in my car with my bluetooth headset connected. Music has no problem going out the G1. A call comes in and I connect it. After I disconnect the call, the sound does not go out the adapter on the G1, but out the phone's speaker. Is there any setting to make sure the sound goes out the bottom adapter and not the phone's speaker?
View 2 Replies View RelatedCould it be possible now, which we can develop an Android application having the following requirement for its working steps Automatic receive the call, then Play some sound out to the caller, wait for DTMF response, then Record the caller sound (in the case that they permit, by pressing 1 as DTMF response)Callee can play back the recoreded sound later.
View 1 Replies View RelatedAny way to disable the notification sounds from going off while in a call?
View 9 Replies View RelatedOk so me and my girlfriend both got evo's and the first couple times i used qik it worked fine. but now for some reason if she calls me (via qik video chat) i cant hear any sound from her but she hears me fine. but if i call her she doesn't get sound and i hear her fine!?! wtf? also while on the video chat one phone will have the microphone icon being displayed on bottom corner and other phone wont. is there something i can do to fix? is it an issue with phone or the qik app itself? just in case, it IS the version that is for the EVO on both phones
View 2 Replies View RelatedI Can't Play a sound when a call Out.
View 5 Replies View Related