diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7947c8f..3517349 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -33,12 +33,13 @@
+ android:targetSdkVersion="19" />
+
diff --git a/app/src/main/java/com/ericsson/uecontrol/core/behaviour/UeBehaviourSpeechCall.java b/app/src/main/java/com/ericsson/uecontrol/core/behaviour/UeBehaviourSpeechCall.java
index 6217174..c0e0e9b 100755
--- a/app/src/main/java/com/ericsson/uecontrol/core/behaviour/UeBehaviourSpeechCall.java
+++ b/app/src/main/java/com/ericsson/uecontrol/core/behaviour/UeBehaviourSpeechCall.java
@@ -9,6 +9,8 @@ import com.ericsson.uecontrol.core.UeBehaviour;
import com.ericsson.uecontrol.gui.MainActivity;
import com.ericsson.uecontrol.gui.util.Configurator.Configurable;
+import org.apache.log4j.Logger;
+
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -18,6 +20,7 @@ import java.lang.reflect.Method;
* Created by ezivkoc on 2014-07-15.
*/
public class UeBehaviourSpeechCall extends UeBehaviour{
+ private static final Logger log = Logger.getLogger(UeBehaviourSpeechCall.class);
public static final int SLEEP_PERIOD = 100;
@Configurable("Phone Number")
@@ -35,7 +38,9 @@ public class UeBehaviourSpeechCall extends UeBehaviour{
@Override
- protected void execute() throws InterruptedException {
+ protected void execute() throws InterruptedException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ startCall();
+
int elapsedTime = 0;
while(elapsedTime < length){
super.setProgress((float)elapsedTime/length);
@@ -43,17 +48,24 @@ public class UeBehaviourSpeechCall extends UeBehaviour{
Thread.sleep(SLEEP_PERIOD);
elapsedTime += SLEEP_PERIOD;
}
+ endCall();
}
private void startCall(){
+ log.debug("Starting Speech Call");
Context context = MainActivity.getContext();
Uri number = Uri.parse("tel:" + phoneNumber);
- Intent intent = new Intent(Intent.ACTION_DIAL, number);
+
+ Intent intent = new Intent();
+ //intent.setAction(Intent.ACTION_DIAL);
+ intent.setAction(Intent.ACTION_CALL);
+ intent.setData(number);
context.startActivity(intent);
}
private void endCall() throws ClassNotFoundException, InvocationTargetException, IllegalAccessException, NoSuchMethodException {
+ log.debug("Ending Speech Call");
Context context = MainActivity.getContext();
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 013660b..23363f6 100755
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -6,6 +6,7 @@
- com.ericsson.uecontrol.core.behaviour.UeBehaviourFtpUpload
- com.ericsson.uecontrol.core.behaviour.UeBehaviourSendSMS
- com.ericsson.uecontrol.core.behaviour.UeBehaviourSleep
+ - com.ericsson.uecontrol.core.behaviour.UeBehaviourSpeechCall
- com.ericsson.uecontrol.core.behaviour.UeBehaviourSurfing
- com.ericsson.uecontrol.core.behaviour.UeBehaviourVideoStreaming