I am very confused because I am getting a permission problem when I
have clearly included:
uses-permission android:name=android.permission.WAKE_LOCK/uses-
permission
in the manifest.
01-21 15:43:44.318: ERROR/AndroidRuntime(806):
java.lang.SecurityException: Neither user 10019 nor
I have included a uses-permission to WAKE_LOCK statement in the
Android manifest file.
if(checkCallingOrSelfPermission(permission.WAKE_LOCK) ==
PackageManager.PERMISSION_GRANTED)
{
Log.i(tag, WAKE_LOCK permission granted);
}
else
{
Log.i(tag,
This code:
PowerManager pm = (PowerManager)
ftaContext.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock
(PowerManager.PARTIAL_WAKE_LOCK, My Tag);
wl.acquire();
with this permission:
uses-permission
The only thing that seems to work is the telnet technique:
telnet localhost 5554
gsm accept 1234567
On Dec 11, 5:06 pm, dreamerBoy paul.hube...@gmail.com wrote:
code:
try
{
// answer the phone
Intent myIntent = new Intent(Intent.ACTION_ANSWER
I've reverted back to my telnet technique which does work in answering
a call. The command is: gsm accept thePhoneNumber.
On Dec 11, 2:56 pm, dreamerBoy paul.hube...@gmail.com wrote:
I tried to add the incoming number, just like it works for outgoing
calls. The result is that it crashes
ringing?
On 12/10/2008, dreamerBoy paul.hube...@gmail.com wrote:
Of course, now, ACTION_ANSWER Activity doesn't do anything. It
doesn't pick up the phone. The phone state is still RINGING - sigh...
Any thoughts are appreciated.
On Dec 10, 3:53 pm, dreamerBoy paul.hube...@gmail.com wrote
code:
try
{
// answer the phone
Intent myIntent = new Intent(Intent.ACTION_ANSWER);
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP //
| Intent.FLAG_DEBUG_LOG_RESOLUTION //
| Intent.FLAG_FROM_BACKGROUND //
|
You should be able to define your own constructor or setter that takes
the context as a parameter, no? Does that not work?
MyPhoneStateListener(Context ctx)
{
sthustfo wrote:
Hi,
I would like to know how I can start a new activity from within the
PhoneStateListener method, say
You should be able to define your own constructor or setter that takes
the context as a parameter, no? Does that not work?
MyPhoneStateListener(Context ctx)
{
sthustfo wrote:
Hi,
I would like to know how I can start a new activity from within the
PhoneStateListener method, say
You should be able to define your own constructor or setter that takes
the context as a parameter, no? Does that not work?
MyPhoneStateListener(Context ctx)
{
this.ctx = ctx;
}
or something -
sthustfo wrote:
Hi,
I would like to know how I can start a new activity from within the
/
/intent-filter
appears to fix the crash.
On Dec 9, 6:04 pm, dreamerBoy [EMAIL PROTECTED] wrote:
code:
try
{
// answer the phone
Intent myIntent = new Intent(Intent.ACTION_ANSWER);
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
Of course, now, ACTION_ANSWER Activity doesn't do anything. It
doesn't pick up the phone. The phone state is still RINGING - sigh...
Any thoughts are appreciated.
On Dec 10, 3:53 pm, dreamerBoy [EMAIL PROTECTED] wrote:
I did an upgrade to SDK r2 but it appears to be a Manifest file
problem
code:
try
{
// answer the phone
Intent myIntent = new Intent(Intent.ACTION_ANSWER);
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP //
| Intent.FLAG_DEBUG_LOG_RESOLUTION //
| Intent.FLAG_FROM_BACKGROUND //
|
Yes, I know about this URL and have downloaded much of the source
code. The delicate problem is how to build in access to the internal
classes that I need and have them be invoked correctly by Android.
Question is, how to do this without in effect rolling your own version
of Android i.e., doing
The goal of this little test program is to launch initiate a call and
then generate a press to the ENDCALL button.
1. It appears that I am incapable of unlocking the keyguard:
11-21 14:40:58.445: INFO/InstTest(209): after
inKeyguardRestrictedInputMode() ? true
2. Then, Android tells me I
by the system and never
delivered to the focused window). But if the user is in the in-call
screen, then that has focus, and you can't inject a key event since
you don't have focus.
On Nov 13, 4:13 pm,dreamerBoy[EMAIL PROTECTED] wrote:
I'm building a test application and I have to be able to hang up
Hi -
I am wondering what the correct invocation of adb shell input is -
It could be potentially very useful for me if I could inject key
events into a running app.
I've tried:
adb shell input keyevent KEYCODE_0
or
adb shell input keyevent KEYCODE_CALL
etc. with an emulator running. I
Hi -
I'm having a problem with my PhoneStateListener not being called until
after the Phone Activity is finished. Here is what I am doing:
step 1: Install a PhoneStateListener. The listener is supposed to
call notify() (synchronized on the lock object) when it detects a
change in the phone
in the documentation - yo Google.
On Nov 17, 1:57 pm, dreamerBoy [EMAIL PROTECTED] wrote:
Hi -
I'm having a problem with my PhoneStateListener not being called until
after the Phone Activity is finished. Here is what I am doing:
step 1: Install a PhoneStateListener. The listener
,
PhoneStateListener.LISTEN_CALL_STATE);
of course -
one still uses TelephoneManager.CALL_STATE_IDLE in
onCallStateChangedChanged so it's a bit tricky. Hey Google, Java has
enums yes?
On Nov 13, 4:24 pm, dreamerBoy [EMAIL PROTECTED] wrote:
I didn't forget:
uses-permission android:name
Hi Mark -
Yes, thank you for that - ~so~ much better. Call starts, screen
changes.. ooh aah.
However, still some issues -
Right off, PhoneStateListener callback isn't being invoked for one.
Still analyzing the logCat...
Frustrating for me that the API is so coy about what is a Thread, what
OK -
I invoked ACTION_CALL using startActivityForResult(Intent, MY_ID).
I then called finishActivity(MY_ID) - that should have killed the
ACTION_CALL Activity created by the system. However, I can confirm
that it does not.
My next brainwave was to generate a keypress on the hang-up button -
New Approach ...
I have a Hello, World-type program. Basically all I do is say
Hello, World, install a useless button with a button-handler (to
forestall ANR a little), and then I attempt to make a call with the
ACTION_CALL Intent.
I am no longer attempting to start the ACTION_CALL Activity
initiateCall is just an Activity. Activity initiateCall = new
Activity(); (actually a derived class of Activity with nothing added
but debug statements to signal when each lifecycle/callback method is
called).
On Nov 10, 5:37 pm, dreamerBoy [EMAIL PROTECTED] wrote:
Hi - thank you for your
the mInstrumentation field is set.
Note that calling into an activity from a Service like this is pretty
sketchy -- you will need to be very very careful about activity
lifecycle and updating the service as the activity changes.
On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote:
Thanks
is set.
Note that calling into an activity from a Service like this is pretty
sketchy -- you will need to be very very careful about activity
lifecycle and updating the service as the activity changes.
On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote:
Thanks for your reply - ha ha
On Nov 10, 6:12 pm, Mark Murphy [EMAIL PROTECTED] wrote:
dreamerBoywrote:
Thanks for the reply, Mark (I recognize the name - I read your book.)
In the ACTION_CALL documentation, it states:
Note: there will be restrictions on which applications can initiate a
call; most applications
the service as the activity changes.
On Nov 10, 2:22 pm,dreamerBoy[EMAIL PROTECTED] wrote:
Thanks for your reply - ha ha, wouldn't that be nice if it were that
simple. Nope, I checked the return from the Uri.parse - not null.
I got a hold of the Android source code. It is crashing here
Battle of the quotes, from:
http://code.google.com/android/reference/android/app/Service.html
Other application components running in the same process as the
service (such as an Activity) can, of course, increase the importance
of the overall process beyond just the importance of the service
, 6:10 pm, Chris [EMAIL PROTECTED] wrote:
You don't check if Uri.parse returns null, do you?
On Fri, Nov 7, 2008 at 3:53 PM, dreamerBoy [EMAIL PROTECTED] wrote:
Hi,
I'm attempting to initiate an outgoing call from inside a Service.
In onStart(), I create an ACTION_CALL Intent
=android.permission.RUN_INSTRUMENTATION/uses-
permission
to the manifest.
However, same error.
On Nov 10, 2:22 pm, dreamerBoy [EMAIL PROTECTED] wrote:
Thanks for your reply - ha ha, wouldn't that be nice if it were that
simple. Nope, I checked the return from the Uri.parse - not null.
I got a hold
of PhoneTestService, if
that's a class you wrote.
On Nov 11, 1:20 am,dreamerBoy[EMAIL PROTECTED] wrote:
Taking a hint from the source code, I tried to implement an
Instrumentation class in the hopes that that was what Android was
looking for -
Added:
instrumentation
Hi,
I'm attempting to initiate an outgoing call from inside a Service.
In onStart(), I create an ACTION_CALL Intent, then attempt to start an
Activity
myIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: +
phoneNumber));
initiateCall.startActivityForResult(myIntent,
bash-3.2$ /cygdrive/c/myRepo/repo init -u git://android.git.kernel.org/platform
/manifest.git
Traceback (most recent call last):
File /cygdrive/c/myRepo/repo, line 587, in module
main(sys.argv[1:])
File /cygdrive/c/myRepo/repo, line 554, in main
_Init(args)
File
bash-3.2$ ../myRepo/repo init -u git://android.git.kernel.org/platform/manifest
.git
Traceback (most recent call last):
File ../myRepo/repo, line 587, in module
main(sys.argv[1:])
File ../myRepo/repo, line 554, in main
_Init(args)
File ../myRepo/repo, line 173, in _Init
or
is answered by the g-phone.
Paul
On Oct 29, 1:42 am, legerb [EMAIL PROTECTED] wrote:
You can use a BroadcastReceiver to catch the Intent, and terminate it
with abortBroadcast().
On Oct 27, 8:50 pm, dreamerBoy [EMAIL PROTECTED] wrote:
Hi -
I am looking for a way to terminate a call
Hi -
I am looking for a way to terminate a call in an automated fashion.
(I realize it can be done manually - the application requires that it
have control over the call so that it can hang up automatically.)
To initiate a call, one starts an Activity with the ACTION_CALL
Intent.
However,
Second question is how to hang up an ~incoming~ call after it has been
answered
On Oct 27, 11:50 am, dreamerBoy [EMAIL PROTECTED] wrote:
Hi -
I am looking for a way to terminate a call in an automated fashion.
(I realize it can be done manually - the application requires that it
have
the picture?
Thanks -
Paul
On Oct 22, 7:20 pm, hackbod [EMAIL PROTECTED] wrote:
These are not public APIs. The telephony APIs are here:
http://code.google.com/android/reference/android/telephony/package-su...
On Oct 22, 1:38 pm, dreamerBoy [EMAIL PROTECTED] wrote:
Hi -
I need
Hi -
I need to be able to place outgoing calls and interact with IPhone.
This apparently, ~was~ the way to get it:
private static IPhone getPhoneInterface() throws DeadObjectException {
IServiceManager sm = ServiceManagerNative.getDefault();
IPhone phoneService =
40 matches
Mail list logo