Changing the outgoing call number

by Seer » Sun, 12 Apr 2009 08:38:22 GMT


Sponsored Links
 Hi,
I have been using a receiver listening to NEW_OUTGOING_CALL and i can
capture the outgoing call broadcast but every time i manipulate the
intent that is broadcast it is ignored.

What is the best way to change the outgoing call number.  ideally i
would like to record the call as going to the original number , dial a
completely different number and if possible change the number shown
the the user to something else to show it is using a different number
but still show the number they are trying to dial as well.

Can anyone help me or point me in the right direction with this?

Chris
--~--~---------~--~----~------------~-------~--~----~



Changing the outgoing call number

by Seer » Sun, 12 Apr 2009 13:50:18 GMT


 well i can change the outgoing number now but i still have not worked
out a way to update the call log to use the original number or a way
to display the original number as the number been called or a modified
one install of the one actually been used. I am using something like a
calling card and don't want all the other numbers you need to put in
front of a dialed number in the call log etc or on the screen as i
still want to display the persons contact details and maybe mention a
calling card is been used.

Chris



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Changing the outgoing call number

by TAKEphONE » Sun, 12 Apr 2009 17:29:26 GMT


 Hi,

Can you post the code you're using to change the dialed number ?

When you change it - what do you see in the "current call" screen ?





--~--~---------~--~----~------------~-------~--~----~



Changing the outgoing call number

by Seer » Sun, 12 Apr 2009 18:34:29 GMT


 n the manifest you need the following
<uses-permission
android:name="android.permission.PROCESS_OUTGOING_CALLS" />

and you need to add a receiver as well
<receiver android:name=".OutgoingNumber">
<intent-filter android:priority="1">
<action
android:name="android.intent.action.NEW_OUTGOING_CALL"></action>
</intent-filter>
</receiver>

then my receiver calls is something like this


import java.util.Iterator;
import java.util.Set;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;

public class OutgoingNumber extends BroadcastReceiver
{

@Override
public void onReceive(Context context, Intent intent)
{
Log.d("OutGoingNum", "Action is " + intent.getAction());

if(intent.getAction().equalsIgnoreCase
(Intent.ACTION_NEW_OUTGOING_CALL))
{
String phonenbr =
intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
Log.d("OutGoingNum", "phonenbr is " + phonenbr);

if(phonenbr.equals("666"))
{
String data1 = this.getResultData();
Log.d("OutGoingNum", "data1=" + data1);

this.setResultData("999");
String data2 = this.getResultData();
Log.d("OutGoingNum", "data12=" + data2);
}
}
}
}


as to what is displayed on the call screen it changes between the
emulator and the actual phone. The emulator looks liek it is dialing
the original number but te call log shows you called the other number
but on a G1 it shows the new number you are dialing and this is also
in the call log.

That is why i need to find out how to change the call log to fix the
number that gets recorded. I would love to change the number shown to
the user as well but i am not sure if that is possible.

Chris







On Apr 12, 7:29pm, TAKEphONE <shimo...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Changing the outgoing call number

by Jeepston » Mon, 13 Apr 2009 12:12:47 GMT


 Could, please, give a snippet of your code, where you change outgoing
call number?





--~--~---------~--~----~------------~-------~--~----~



Changing the outgoing call number

by TAKEphONE » Tue, 14 Apr 2009 17:34:02 GMT


 i,

Did you check to see if there are any other "extras" that may be
related ?


On Apr 12, 1:34pm, Seer <gilligan.ch...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Money Making Opportunity

Money Making Opportunity
Learn how I make over $6,000 daily online from home without a website.
http://freemoneymakingsite.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~

2. How to successfully embed a ListView in a Dialog?

Hi all,

I have been trying this thing for  about 16 hours now ...

my code:

public MyDialog (Context context)           //Dialog constructor
{

                super(context);
                this.setTitle(R.string.track_choose);
                //this.setContentView(R.layout.trackmode_);

                                participants = new String [2];
                                participants[1] = "cucu";
                                participants[2] =
"ffffffffffffffffffffffffgggggggggggggggggggggggggggggggggggg";

                ArrayList<String> arr = new ArrayList<String> (2);
                arr.add("cucu");
                arr.add("mirabelafdfjsfgyugfyubjcwfnewhf7387ft38fg");
                //listAdapter = new ArrayAdapter<String>(context,
android.R.layout.simple_list_item_1, participants);
                        listAdapter = new
ArrayAdapter<String>(getContext(), R.layout.trackmode, participants);
                //listAdapter = new ArrayAdapter<String>(context,
R.layout.trackmode, arr);

                //ListView participantList = (ListView)
this.findViewById(R.id.listParticipants);
                                participantList = new ListView
(getContext());
                LinearLayout.LayoutParams params = new 
LinearLayout.LayoutParams (1,
0x77);
                //participantList.setLayoutParams(params);

                                participantList.setAdapter(listAdapter);
                participantList.setOnItemSelectedListener(this);

                                //this.setContentView
(participantList);

                this.addContentView (participantList, params);
                participantList.setEnabled(true);
                //participantList.setItemsCanFocus(true);
                participantList.setVisibility(View.VISIBLE);
        }

I have also tried to move this / part of this code in places such as
onPreparePanel(int featureId, View view, Menu menu)        and
onCreatePanelView(featureId) overridables with no success. Comments
were left there intentionally just to point out what I have already
tried.



R.layout.trackmode's XML is like this (and it makes no difference if I
use my own layout or android.R.layout.simple_list_item_1 resource):

<?xml version="1.0" encoding="UTF-8"?>

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
                  id="textview" android:textStyle="bold" 
android:singleLine="false"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content" />


The result I am able to get right now is a neat looking transparent
dialog, with a title and a ListView object in it. However, the
ListView object only shws a veeeery thin orange vertical line on the
left side. And one can  actually see how that thin line shifts colours
as I press the arrowkeys to select Items in the ListView. Only thing
is that there are not 2 items as I intented to be, but some 5-6 items.
After the 5th or 6th, if  pressed 'down arrow' again, a
nullpointerexception is thrown.

heeeeeeeeeeeeeelp
thank you,
kellogs
--~--~---------~--~----~------------~-------~--~----~

3. EARN DOLLARS AT HOME BASED BUSINESS

4. Hey!

5. Free Dating Tips!!!

6. Free Phone Call Worldwide

7. Liver Cancer Concerns?