Error on setting app.

by fussene » Sat, 07 Mar 2009 10:54:16 GMT


Sponsored Links
 Hi,

I'm really new to android project, I just downloaded new android src
and also sdk1.1
I made a new android project from existing src from /package/apps/
setting/ directory, but I'm getting bunch of compile errors.
I have few questions regarding that, any comments would be very
appreciated.

- Is android.jar file not enough to compile the default apps that
google provides? Am I suppose to add other libraries manually?
- com.android.internal.telephony.PhoneStateIntentReceiver seems
deprecated, but it seems still many apps in Settings are using this.
I checked the PhoneStateIntentReceiver it says that I should use
TelephonyManager instead. Is there any new app available for this?

Thanks,
Jimin

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



Other Threads

1. Custom Class and File I/O

I understand that Android uses an applicaiton ID for File I/O when
using openFileInput and openFileOutput.

My question is if I create an instance of a class in the Activity
onCreate like the following and do some file IO from the new class,
why does it fail? If I make the MyClass an inner class of the Activity
class this works, so it has to be a context issue. Is there any way to
pass the activity context to the MyClass methods so the openFileInput
and openFileOutput work in the newly created objMyClass object?

public void onCreate(Bundle icicle)
{
     MyClass objMyClass = new MyClass();
     objMyClass.DoFileIO();
}


public class MyClass extends Activity
{
     public void DoFileIO()
     {
          objFileInputStream = openFileInput("SomeFileName");  <--
NullPointerException

          objInputStreamReader = new InputStreamReader
(objFileInputStream);
          objBufferedReader = new BufferedReader
(objInputStreamReader);
     }
}


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

2. Two Stage Camera Key

Hi,

I'm trying to understand how to implement a solution for a two stage
camera key.  There is an "autoFocus()" call in the Java world which
translates down to an "autoFocus()" call CameraHardwareInterface.
This seems to be the proper place to direct the camera key half press
event, but how is the release event of camera key half press
communicated down to the CameraHardwareInterface?

A typical scenario for the camera key half press is that a number of
algorithms are kicked off and at the completion the results are locked
in until either a capture occurs or the user releases the camera key.
The case of a capture occuring is handled by the APIs, but again the
case where the user releases the camera key does not seems to be
considered, or I'm totally missing it :)

One of the more common, and obvious, examples of the use of a camera
key half press release event/call is the focus indication.  On many
cameras, and some mobile devices, when the user half presses the
camera key an indication of the focus state is shown in preview
window.  This indication will often be a small box in the center of
the window.  While the user continues to hold the camera key in the
half pressed state, this indication will stay on the screen.  When the
user releases the camera key, this indication will disappear.  In
order to allow this indication to be drawn within the
CameraHardwareInterface implementation, as well as to unlock the other
less obvious half press features, a half press release event/call is
needed.

Thoughts?

Steve.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Spinner with Editable Text

4. How to customize android button's look and feel

5. Toggle Button example

6. Cannot setup "Setting up Eclipse" before "Installing the Eclipse Plugin (ADT)"

7. wireless tools