Android :: Can A Telephony.Phone Object Be Instantiated Through The Sdk

Jan 27, 2010

I am trying to get a phone object so that I can call and conference two numbers from within my application.

I have tried using the static PhoneFactory.makeDefaultPhones((Context)this) but have not had any luck.

CODE:.......

Error - Caused by java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from Looper thread

Android :: Can a telephony.Phone object be instantiated through the sdk


Android :: Telephony Manager & Phone State Listener

Sep 7, 2010

I would like to know what are the main differences between TelephonyManager and PhoneStateListener, because you can do (more or less) the same things with both. For example, you could create an incoming calls register implementing a broadcastreceiver and using TelephonyManger API or extending PhoneStateListener class and registering this new listener throughTelephonyManager . Case 1 - BroadcastReceiver (TelephonyManager)

View 13 Replies View Related

Android :: List Of All Instantiated Activities

Jun 2, 2010

Anybody know an easy way for an app to find all the instances of all the Activities currently alive in the current process?

Yes, I could register each one into a static List<> someplace from the constructor of each Activity, but that requires developers to remember to put that code into every Activity constructor, which is going to eventually miss one or two (not to mention keep the Activity alive longer than it should be, though that could be fixed by holding WeakReferences instead of strong ones, but that still misses the point), and that's going to mean one or two escape the list. I'd prefer to have a way to see all of them from Android's/Dalvik's point of view.

View 9 Replies View Related

Android :: Service Gets Instantiated Multiple Times

Sep 27, 2010

IIUC, there should only be one instance of a given service, it is a singleton. However, my (audio engine) service gets instantiated multiple times, although I do nothing for it. When the service crashes (for example when I uninstall the app through adb), it gets scheduled for restart ("Scheduling restart of crashed service.. "). I understand this is an effect of the service being sticky. After that, when my app starts, it calls startService() and bindService(), and the service gets appropriately started and bound. But the service is then reinstantiated and onCreate() is called repeatedly, as many times it was scheduled for restart.

Each instance then wait for clients to bind and register, but onBind() is only called in the "main" service instance. The additional instances wait a bit for client to bind, and since that doesn't happen, they call stopSelf(). But stopSelf() has absolutely no effect in these "dead" instances, onDestroy() is never called.
The "main" service instance does work as expected, and when it decides to call stopSelf(), onDestroy() is indeed called. Worse, all these dead instances accumulate, they never gets destroyed. Therefore, their only possible end is a crash (which happen every time I launch/install through adb), and thus scheduled restart.
So that in the end I get many of these dead instances, which are restarted progressively once by minute approximately.

View 3 Replies View Related

Android :: Application Component Not Instantiated Before Launching Activity

Dec 17, 2009

I got a null pointer exception in an Activity onCreate() while trying to access my Application object (extended from android.app.Application).This exception occurred very rarely and i have no way to reproduce this again.My App starts a service on BOOT_COMPLETED intent and the null pointer exception seems to have occurred during boot up. Can somebody please throw some light on this issue? Application should have been created before creating any activities.

View 2 Replies View Related

Android :: How To Keep OnItemSelected From Firing Off On A Newly Instantiated Spinner

Apr 1, 2010

I've thought of some less than elegant ways to solve this, but I know I must be missing something.

My onItemSelected fires off immediately without any interaction with the user, and this is undesired behavior. I wish for the UI to wait until the user selects something before it does anything.

I even tried setting up the listener in the onResume, hoping that would help, but it doesn't. How can I stop this from firing off before the user can touch the control?

CODE:...........................

View 2 Replies View Related

Android :: How Can I Get Current Activity Object In Instrumentation Object?

Sep 9, 2009

I want to do some automated testcase with Instrumentation . Suggest that my AUT has 2 Activity. After clicking the button in ther first Activity, the second one will be shown with new content base on what we enter in the first Activity.) Instrumentation provides us the function called startActivitySync() and return the Activity object for processing. My question is how we can get the pointer of the second Activity after the it is shown by clicking the button on the first activity.?

View 2 Replies View Related

Android :: Cast Picture Object To Bitmap Object

Jun 8, 2009

I would like to convert a Picture object to Bitmap object in memory, without writing data to disk.

View 2 Replies View Related

Android : Get Activity Object From Intent Object

Sep 21, 2009

I have an Activity that running on system. I can get the Intent that is used to start the activity. But i don't know how to get the Activity object from the Intent object or something else. Can anyone tell me how to do this??? Note that, I don't use Instrumentation object.

View 11 Replies View Related

Android :: Telephony / Need To Inject DTMF

Nov 16, 2010

I have researched extensively and am pretty sure this is not possible. I want to make a call and then inject DTMF when the far end answers. So 2 questions Is it possible ?
If not, how do I work to get it on the list of upcoming features to be provided on Android. I can say that this is possible on BlackBerry and Symbian, so Android is falling behind in this regard.

View 2 Replies View Related

Android :: Get Sms Message From Intent With New Implementation Of Telephony?

Feb 11, 2009

I am using the Telephony class to get messages ( Telephony.Sms.Intents.getMessageFromIntent(Intent intent)). But I can't find the class Telephony from its package(android.provider), there is an error named "The import android.provider.Telephony cannot be resolved" when import android.provider.Telephony.Sms.Intents, the sdk version I'm using is android-sdk-windows-1.0_r2, how can I use this with the new implementation of Telephony?

View 2 Replies View Related

Android :: Telephony Manager Functions Don't Work / What To Do?

May 29, 2009

I have low expectations that this message will get any response as it seems that Google developers do not like to address issues too close to the Android core and to strategic mobility applications. However, as they say, hope is the last to die.

I am really puzzled by the lack of response to queries about issues with some TelephonyManager functions.

Specifically, there have been a number of requests in the past, including mine, about

getNeighboringCellInfo()

As per the link below, getNeighboringCellInfo() is a documented TelephonyManager function available to application developers.

http://developer.android.com/reference/android/telephony/TelephonyMan...()

Yet, getNeighboringCellInfo() does not work. Any attempt to call it in an application results in application failure.

What is the problem here? If Google does not want application developers to use this function (I cannot fathom why that would be the case), then please remove it from TelephonyManager, and save all of us time and frustration.

It's really puzzling that for such an open platform Android has so many secrets and rules.

View 8 Replies View Related

Android :: Relative Speeds Of Telephony Managers Types?

Nov 2, 2010

There are a number of network types defined in TelephonyManager:
NETWORK_TYPE_GPRS
NETWORK_TYPE_EDGE
NETWORK_TYPE_UMTS
NETWORK_TYPE_CDMA
NETWORK_TYPE_EVDO_0
NETWORK_TYPE_EVDO_A
NETWORK_TYPE_1xRTT
NETWORK_TYPE_HSDPA
NETWORK_TYPE_HSUPA
NETWORK_TYPE_HSPA
Is there any info out there that describes what range of speeds you can expect on each of these? If that isn't available, it would be nice to be able to order them based on speed.

View 1 Replies View Related

Android :: Testing Telephony Signal Strength Changes In Emulator?

Mar 29, 2010

I was wondering if there is a way to manipulate the emulator to simulate telephony signal strength changes.

I would like to test code that uses TelephonyManager.listen() with LISTEN_SIGNAL_STRENGTHS.

View 2 Replies View Related

Android :: Can A Native Application Use Java Methods In Telephony Manager?

Sep 17, 2009

I am currently working on porting a application written in C in android platform. I need to know that can i invoke/call the getSystemService from the C application using invocation interface by JNI. Meaning using a .java file which will interact with the interace provided by the android.telephony.TelephonyManager.java for using getCallState() and other mehthods.

View 2 Replies View Related

Android :: Ways To User Number When Telephony Manager Returns Null?

Apr 10, 2009

Is there a way to look up the user phone number other than TelephonyManager? In my G1, this returns null: // get your phone number TelephonyManager telephonyManager = (TelephonyManager) getSystem Service (Context. TELEPHONY_SERVICE); String tel = telephonyManager.getLine1Number(); Log.i("Telephone Number ==> ", tel+" <=="); Is there any other way of getting user's own phone number? take care, Muthu Ramadoss. http://linkedin.com /in/tellibitz http://androidrocks.googlecode.com - Android Consulting. Emo Philips <http://www.brainyquote.com /quotes/authors/e/emo_philips.html> - "A computer once beat me at chess, but it was no match for me at kick boxing."

View 7 Replies View Related

Android :: Telephony Returned Constant Values In Bearer Speed Order?

Mar 8, 2010

TelephonyManager.getNetworkType() returns one of the constant values.It appears that the constant values have an integer order, by possible bearer link speed.I know using constant values used in the following manner is generally bad,however could one use this to determine a basic cutoff for application functionality and have it work between API levels? (in API-v1 there was nothing above 0x03)if( telephonyManager.getNetworkType() > TelephonyManager.NETWORK_TYPE_EDGE ) return "3G! party on!";else if( telephonyManager.getNetworkType() > TelephonyManager.NETWORK_TYPE_UNKNOWN )}

View 1 Replies View Related

Android :: Store Object In Sqlite Database From Phone?

Aug 7, 2009

Is it possible to store user defined objects in a SQLite database from Android? For example: I am creating one class and I want to store that class object in the database. Is it possible? If it is, how to proceed? On the Blackberry platform, I am able to store objects directly in persistent objects. Is it possible to do this with SQLite and Android?

View 2 Replies View Related

Android :: Sending A Java Object From Phone To Computer

May 23, 2010

I was wondering what the simplest program for sending an object from my Android phone to my computer wirelessly (via LAN) would be. I have created Java RMI programs with a server and multiple clients, so I have a grasp of the concept. However with android I'm just not sure where to start.

What I am aiming to do is send some sort of information (could simply be text) to my computer and my computer will do an action. I have the GUI interface's and the actions to be carried out all worked out, just the sending of some sort of information is getting me.

View 1 Replies View Related

Android :: Telephony Manager Event Off_hook / Not Giving Calling Number In Emulator

Nov 9, 2010

I am not getting call in number in off_hook state when it is only coming in dialing state. According to documentation it should provide call in number for off_hook state as well. Is it a bug?

View 2 Replies View Related

Android : Convert Android.net.Uri Object To Java.net.URI Object

Feb 18, 2009

I am trying to get a FileInputStream object on an image that the user selects from the picture gallery.

This is the android URI returned by android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI content://media/external/images/media/3

When I try to construct a java URI object from this object, I get an IllegalArgumentException with the exception description Expected file scheme in URI: content://media/external/images/media/3 whereas the android URI shows the scheme as content

Never found a solution for the original question. But if you want the byte stream of an image in the pictures gallery, this piece of code will do that.

CODE:...................

View 4 Replies View Related

Android :: ClassCastException: Com.android.internal.telephony.PhoneProxy

Apr 8, 2010

I'm programing Instrumentation Tests for SIM ToolKit (STK)

I need to use CommandsInterface which is available only in PhoneBase Interface. Once I have a Phone i'd like to use the following line:

CODE:.......

It compiled successfully, however gives uncaught exception (group=0x4001b188)

View 2 Replies View Related

Android : Possible To Use Com.android.internal.telephony.* API In Application?

Oct 16, 2009

Is it possible to use com.android.internal.telephony.* API in application? I would really need to use some classes from there, since there is no other way I can make my app answer incoming call, send dtmf and etc.

View 2 Replies View Related

Android :: Telephony.SmsManager.s­endTextMessage Throw Exception When Destination Addr Is Email Addr

Feb 3, 2010

This worked in 1.5 but throw an exception in apk 2.0.

CODE:...............

Any one else experience the same? What should I use to send a SMS to an email address?

View 4 Replies View Related

Android :: How To Use Com.android.internal.telephony

Feb 4, 2010

I need to use com.android.internal.telephony package for my development. but i am in a doubt whether i would use android.internal.telephony package or how?

View 3 Replies View Related

Android :: Get URL From Cursor Object

Jun 16, 2009

I have a Cursor points to a Contact. How can I get an url built from that Cursor?

I need to know that because from here: http://developer.android.com/guide/topics/providers/content-providers.html

I need to have an url so that I can build a phone uri, like this: phoneUri = Uri.withAppendedPath(uri, People.Phones.CONTENT_DIRECTORY);

and I can query all the phone numbers for that contact.

View 1 Replies View Related

Android :: Does An App Only Have One Context Object

Jul 19, 2010

I'm confused about the concept of the Context class. I see that it's a base class of Activity, but the Android docs also mentions the Context storing global information about the app environment. So in my app which has 3 activities, does that mean I have 3 distinct Context objects, or do they actually refer to 1 entity? Also, what is the lifetime of a Context object- does it live until the last component of this activity's process is garbage collected?

View 1 Replies View Related

Android :: Not Dragging Of Object

Feb 5, 2009

I want to get drag event(s) when user holds finger on screen and drags it in any direction. The event need to repeatedly provide new touch position until finger is released in the form of callbacks. This is not related to dragging objects.I could see this drag feature working on home screen of the phone to move the home screen left and right. But couldn't figure out how it works. Please provide information on which class and methods to be referred for this.

View 2 Replies View Related

Android :: Get Object From Webview

May 19, 2010

I want to get the object from the webview how to do it ?

View 3 Replies View Related

Android :: Saving An Object For Use Later

Jun 12, 2010

As part of my widget, I use an instance of the Camera object.

This is what I want to do. The user will click on my widget, I get an instance of the Camera(if it's not already stored), use it, then store it. If they click the widget again, I want to use that same instance that I used previously.

I can't release the Camera(android.hardware.Camera) until the user clicks on the widget the second time. So the user clicks on the widget the first time, I get the camera and hold on to it until they click the widget again.

The problem I am running into is on the second click, I am trying to get the Camera again, which I can't because I currently have it in use.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved