[android-developers] Re: Maximum Size of Libs Can be loaded
Could you please take non-SDK discussion over to one of the platform groups such as android-platform? Thanks. On Wed, Nov 19, 2008 at 9:11 PM, Anonymous Anonymous [EMAIL PROTECTED] wrote: Hi All, I am still on with some experiments with JNI, Now i have an *.so like 200kb in size, but it fails to load, but upto some 15kb its loading. Is there any size limitaions(as of now) for the *.so's ?? Any clues Thanks in Advance Steve -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is it possible to lock phone settings?
Okay, so I'm working with developers to design an app and I am curious if this is possible. No need to tell me how to do it, because I wouldn't understand anyways. I'm just curious if it is in the realm of possibility with the amount of freedom google gives. If you go into the phone settings, there are a bunch of options like sound, display, wireless control, etc that you can change. If my application required that the phone have bluetooth enabled to work for whatever reason, is it possible to enable it when the application is started and remain on (unable to turn it off from the phone settings) for the required duration of however long it is needed within the application? Does google give you the freedom to lock phone settings like that? If not, is it possible to not lock the setting, but at least turn it on when the application requires it and possible send a notification when it is turned off that a certain application requires that setting to be on? Just curious as my developers are learning as well and I dont want to bother them with my wandering mind. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Maximum Size of Libs Can be loaded
Moved and apologies. On Thu, Nov 20, 2008 at 1:53 PM, Dianne Hackborn [EMAIL PROTECTED]wrote: Could you please take non-SDK discussion over to one of the platform groups such as android-platform? Thanks. On Wed, Nov 19, 2008 at 9:11 PM, Anonymous Anonymous [EMAIL PROTECTED] wrote: Hi All, I am still on with some experiments with JNI, Now i have an *.so like 200kb in size, but it fails to load, but upto some 15kb its loading. Is there any size limitaions(as of now) for the *.so's ?? Any clues Thanks in Advance Steve -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About running two different applications with the same code base
Thanks for the info. On Nov 18, 1:43 pm, Dianne Hackbod [EMAIL PROTECTED] wrote: On Tue, Nov 18, 2008 at 12:02 PM, magicpig [EMAIL PROTECTED] wrote: I am wonder whether we can runtwoseparated apps with thesamecodebase. Thesetwoapps aredifferentby a flag. Here are some questions: 1) Where to set the flag? Is it possible for an application read the flag if we set it in AndroidManifest.xml? The only user-defined data you can put in AndroidManifest.xml is through the meta-data tags. This data can be associated with the entire application or an individual component, and retrieved with the package manager APIs. This is currently hard to find in the docs, but look here: http://code.google.com/android/reference/android/R.styleable.html#And... For this , would you mind telling me some example about how to use it? I have tried to find some but fail. Thanks a again. 2) I think I should usedifferentpackage values for thetwo apps, so needtwoseparated AndroidManifest.xml, right? All you really need is a different package name in the first tag (ignoring content providers, discussed below). 3) I think the authorities of the provider should bedifferent, so, we should make themdifferentin Androidmanifest.xml, right? If you expect these two applications to be installed on the same device at the same time, then yes you will need to give their content providers different authority names. This is the main thing that will complicate the code itself. -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can not push files to emulated sdcard
Great !!! One more step further now. It's only the beginning ! lol Good Luck ! Maybe see you all on the next post ! On Nov 20, 6:03 am, Asif k [EMAIL PROTECTED] wrote: Hi All, Finally it works According to Thao's suggestion , I opened emulator using command prompt rather than eclipse,it opened w/o any error and now I can push files tosdcard.Thanks Thao. Thanks to all 4 ur valuable suggestions. regards, Asif. On Nov 19, 7:45 pm, Kenneth Loafman [EMAIL PROTECTED] wrote: If you created yoursdcardafter you created your project, you will need to add it to the Run Configuration/Target and Debug Configuration/Target of the project. Just having it in the Window/Preference won't affect a pre-existing project. ...Ken On Tue, 18 Nov 2008 22:41:33 -0800 (PST), Asif k [EMAIL PROTECTED] wrote: Hi All, I am trying to push the 1.txt file from my desktop C:/ to android / sdcard/ folder using following command. adb push C:\1.txt /sdcard/asif.txt but getting following error : failed to copy 'C:\1.txt' to '/sdcard/asif': Read-only file system. Can anyone please tell me waht is the problem?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Repeating alarm canceled on activity close?
Is the following behavior documented somewhere and I just missed it? When I set a repeating alarm in response to a button click, the alarm triggers the expected event only if the activity is in the foreground. If I close or pause the activity, the alarm seems to disappear. When I set the same repeating alarm in the onPause method, the alarm triggers as expected even after the activity is destroyed/paused. Is it just me, or does this seem like it's not behaving the way it should? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Repeating alarm canceled on activity close?
The alarm manager knows absolutely nothing about activities, so this would not be the normal behavior. It certainly works fine in other places. On Thu, Nov 20, 2008 at 12:46 AM, songs [EMAIL PROTECTED] wrote: Is the following behavior documented somewhere and I just missed it? When I set a repeating alarm in response to a button click, the alarm triggers the expected event only if the activity is in the foreground. If I close or pause the activity, the alarm seems to disappear. When I set the same repeating alarm in the onPause method, the alarm triggers as expected even after the activity is destroyed/paused. Is it just me, or does this seem like it's not behaving the way it should? -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: About running two different applications with the same code base
On Thu, Nov 20, 2008 at 12:38 AM, magicpig [EMAIL PROTECTED] wrote: For this , would you mind telling me some example about how to use it? I have tried to find some but fail. Thanks a again. Look at android.app.AliasActivity. -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
On Wed, Nov 19, 2008 at 8:21 PM, Robert Green [EMAIL PROTECTED] wrote: I motion for a petition for full audio API in the 1.1 SDK. Contributing patches would be a much more effective approach than a petition. -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Please share your knowledge on Content Provider in Android
I would suggest starting with something like the note pad example in the SDK, and modifying its content provider to suite your needs. On Wed, Nov 19, 2008 at 7:48 PM, yasmin afrose [EMAIL PROTECTED]wrote: Hi Casey, Thanks for your reply. I've tried the concept. I got one issue as Source not found. My coding are as follows: == *DataProvider.java* package com.aspire.android.owncontentprovider; import android.content.ContentProvider; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.net.Uri; import android.util.Log; public class DataProvider extends ContentProvider { private static final String DATABASE_NAME=bus.db; private static final int DATABASE_VERSION=2; private static final String STATION_TABLE_NAME=station; private static class DatabaseHelper extends SQLiteOpenHelper{ DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); // TODO Auto-generated constructor stub } @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub db.execSQL(CREATE TABLE +STATION_TABLE_NAME+( + s_id + TEXT, + s_name + TEXT + );); String sql_1=insert into +STATION_TABLE_NAME+(s_id,s_name) values('1','hcz');; String sql_2=insert into +STATION_TABLE_NAME+(s_id,s_name) values('2','lsdx');; String sql_3=insert into +STATION_TABLE_NAME+(s_id,s_name) values('3','xal');; try { db.execSQL(sql_1); db.execSQL(sql_2); db.execSQL(sql_3); } catch (SQLException e) { Log.e(ERROR,e.toString()); } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log.w(Data Provider Application : , Upgrading database from version + oldVersion + to + newVersion + , which will destroy all old data); db.execSQL(DROP TABLE IF EXISTS notes); onCreate(db); } } private DatabaseHelper mOpenHelper; @Override public int delete(Uri uri, String selection, String[] selectionArgs) { // TODO Auto-generated method stub return 0; } @Override public String getType(Uri uri) { // TODO Auto-generated method stub return null; } @Override public Uri insert(Uri uri, ContentValues values) { // TODO Auto-generated method stub return uri; } @Override public boolean onCreate() { // TODO Auto-generated method stub mOpenHelper = new DatabaseHelper(getContext()); return true; } @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { // Get the database and run the query SQLiteDatabase db = mOpenHelper.getReadableDatabase(); Cursor c = db.query(STATION_TABLE_NAME,projection, null,null,null,null,null); return c; } @Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { // TODO Auto-generated method stub return 0; } } *Data.java* === * package * com.aspire.android.owncontentprovider; * import * java.util.ArrayList;* import * java.util.HashMap;* import * java.util.Map; * import * android.app.ListActivity;* import * android.content.Intent;* import * android.database.Cursor;* import * android.net.Uri;* import * android.os.Bundle;* import * android.view.View;* import * android.widget.ListView;* import * android.widget.SimpleAdapter; * public * *class* Data *extends* ListActivity { *public* *static* *final* String *AUTHORITY*= com.aspire.android.owncontentprovider.dataprovider; *public* *static* *final* Uri *CONTENT_URI*=Uri.*parse*(content://+* AUTHORITY*+/station); *private* *static* *final* String [] *PROJECTION*=*new* String []{ s_id,s_name}; // private static final String [] PROJECTION=new String []{title,body}; @Override *protected* *void* onCreate(Bundle savedInstanceState) { *super*.onCreate(savedInstanceState); //Return the intent that started this activity. Intent intent=getIntent(); *if*(intent.getData()==*null*) intent.setData( *CONTENT_URI*); Cursor cur=getContentResolver().query(getIntent().getData(), *PROJECTION*,*null*,*null*,*null*); //int rows = cur.getCount(); // Log.i(No of Rows : , );
[android-developers] Re: Please share your knowledge on Content Provider in Android
Hi Dianne Hackborn, Thanks for your reply Fine.. I'll follow your inputs. Will you please tell the procedure to create Content Provider.. ie, 1. Extent ContentProvider 2. Add Provider tag 3. How can I assign the CONTENT_URI for my own content provider like that.. Since, I've tried to creating Content Provider step by step. But I can't get the output. :( If you've some samples or procedure in detailed manner surely it will help me lot ... Thanks for your time.. Yasmin On Nov 20, 2:09 pm, Dianne Hackborn [EMAIL PROTECTED] wrote: I would suggest starting with something like the note pad example in the SDK, and modifying its content provider to suite your needs. On Wed, Nov 19, 2008 at 7:48 PM, yasmin afrose [EMAIL PROTECTED]wrote: Hi Casey, Thanks for your reply. I've tried the concept. I got one issue as Source not found. My coding are as follows: == *DataProvider.java* package com.aspire.android.owncontentprovider; import android.content.ContentProvider; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.net.Uri; import android.util.Log; public class DataProvider extends ContentProvider { private static final String DATABASE_NAME=bus.db; private static final int DATABASE_VERSION=2; private static final String STATION_TABLE_NAME=station; private static class DatabaseHelper extends SQLiteOpenHelper{ DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); // TODO Auto-generated constructor stub } @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub db.execSQL(CREATE TABLE +STATION_TABLE_NAME+( + s_id + TEXT, + s_name + TEXT + );); String sql_1=insert into +STATION_TABLE_NAME+(s_id,s_name) values('1','hcz');; String sql_2=insert into +STATION_TABLE_NAME+(s_id,s_name) values('2','lsdx');; String sql_3=insert into +STATION_TABLE_NAME+(s_id,s_name) values('3','xal');; try { db.execSQL(sql_1); db.execSQL(sql_2); db.execSQL(sql_3); } catch (SQLException e) { Log.e(ERROR,e.toString()); } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log.w(Data Provider Application : , Upgrading database from version + oldVersion + to + newVersion + , which will destroy all old data); db.execSQL(DROP TABLE IF EXISTS notes); onCreate(db); } } private DatabaseHelper mOpenHelper; [EMAIL PROTECTED] public int delete(Uri uri, String selection, String[] selectionArgs) { // TODO Auto-generated method stub return 0; } [EMAIL PROTECTED] public String getType(Uri uri) { // TODO Auto-generated method stub return null; } [EMAIL PROTECTED] public Uri insert(Uri uri, ContentValues values) { // TODO Auto-generated method stub return uri; } [EMAIL PROTECTED] public boolean onCreate() { // TODO Auto-generated method stub mOpenHelper = new DatabaseHelper(getContext()); return true; } [EMAIL PROTECTED] public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { // Get the database and run the query SQLiteDatabase db = mOpenHelper.getReadableDatabase(); Cursor c = db.query(STATION_TABLE_NAME,projection, null,null,null,null,null); return c; } [EMAIL PROTECTED] public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { // TODO Auto-generated method stub return 0; } } *Data.java* === * package * com.aspire.android.owncontentprovider; * import * java.util.ArrayList;* import * java.util.HashMap;* import * java.util.Map; * import * android.app.ListActivity;* import * android.content.Intent;* import * android.database.Cursor;* import * android.net.Uri;* import * android.os.Bundle;* import * android.view.View;* import * android.widget.ListView;* import * android.widget.SimpleAdapter; * public * *class* Data *extends* ListActivity { *public* *static* *final* String
[android-developers] Re: Adding self to menus on other applications
Regarding menu icons not being displayed, a workaround has been posted in this thread: http://groups.google.com/group/android-developers/browse_frm/thread/3fed25cdda765b02 I agree that it makes sense to present an Activity chooser for well- defined actions (like Send), but I guess there are also cases where it makes more sense for an application to appear like an extension to a specific application and be embedded in their menu (like adding voice memo to a note in notepad). At least, I hope you will not drop this functionality in the future, as we already make use of it :-) I have a related question, regarding the example above: voice memo would have to be notified if notes are deleted, so that the recordings that are linked to a note URI can also be deleted. We were thinking of sending a broadcast action in the notepad provider ACTION_DELETED with the note URI that all interested extensions could listen to. Could there be anything wrong with this approach? We thought that this would be better and more efficient than registering a ContentObserver that would have to listen in a background service all the time, and then scan for the change. Peli On Nov 19, 9:02 pm, Dianne Hackbod [EMAIL PROTECTED] wrote: Having an arbitrarily large number of items added by other applications, mixed together with unrelated items from the main application, is really tough to provide a decent UI for. I think it is better to have a single top-level menu item that goes to a chooser dialog of the actions to be performed (and the choose can show the normal app icons, instead of there needing to be some additional extra special icon associated with the activity for display in the menu, which we don't really support right now anyway). 2008/11/19 Peli [EMAIL PROTECTED] What are the specific problems here regarding to managing the UI? Aren't menu items beyond six items shown as a scrollable list, anyway? Peli On Nov 18, 10:36 pm, Dianne Hackbod [EMAIL PROTECTED] wrote: Note that this only works with applications that want to participate in the mechanism, and pretty much none of the built-in applications do this. We moved away from this approach because managing the UI for an arbitrary number of additional items is a challenge. Our preference these days is for the application to start a chooser activity from which the user can select what they want to do; see the Intent docs for info on this. 2008/11/18 Adrian A [EMAIL PROTECTED] Hi Michael, Have you had any luck with this? What was the problem you had? Many thanks in advance, Adrian On Oct 21, 4:31 am, Shade [EMAIL PROTECTED] wrote: Hello! If you mean Android Howto document: Adding yourself to menus on other applications You can also advertise your Activity's services so that otherActivitiescan add your activity to their own optionmenu. For example, suppose you implement a new image handling tool that shrinks an image to a smaller size and you would like to offer this as amenu option to any other Activity that handles pictures. To do this, you would exposes your capabilities inside an intent filter in your manifest. If another application that handles photos asks Android for anyActivitiesthat can perform actions on pictures, Android will perform intent resolution, find your Activity, and add it to the other Activity's optionsmenu. The offering application The application offering the service must include an intent-filter element in the manifest, inside the activity tag of the offering Activity. The intent filter includes all the details describing what it can do, such as a type element that describes the MIME type of data that it can handle, a custom action value that describes what your handling application can do (this is so that when it receives the Intent on opening it knows what it is expected to do), and most important, include a category filter with the value android.intent.category.ALTERNATIVEand/or android.intent.category.SELECTED_ALTERNATIVE (SELECTED_ALTERNATIVE is used to handle only the currently selected element on the screen, rather than the whole Activity intent. Here's an example of a snip of a manifest that advertises picture shrinking technology for both selected items and the whole screen. activity class=PictureShrink !-- Handling class -- intent-filter label=Shrink picture !--Menulabel to display -- action android:name=com.example.sampleapp.SHRINK_IT / data android:name=image/* / !-- MIME type for generic images -- category android:name=android.intent.category.ALTERNATIVE / category android:name=android.intent.category.SELECTED_ALTERNATIVE / /intent-filter /activity I've tried it.
[android-developers] javax.net.ssl.SSLException: Not trusted server certificate
Hi, While I am trying to post a web page using DefaultHttpClient httpclient = new DefaultHttpClient(); CookieStore cookies = httpclient.getCookieStore(); HttpPost Postmethod = new HttpPost(https://url to post);// Submiting I agree page ArrayListBasicNameValuePair nvpairs = new ArrayList(); vpairs.add(new BasicNameValuePair(name1, value1)); nvpairs.add(new BasicNameValuePair(name2, value2)); nvpairs.add(new BasicNameValuePair(name3, value3)); httpclient.setCookieStore(cookies); UrlEncodedFormEntity p_entityIAgree = new UrlEncodedFormEntity (nvpairs); Postmethod .setEntity(new UrlEncodedFormEntity(nvpairs, HTTP.UTF_8)); Postmethod .setEntity(p_entityIAgree); ResponseHandlerString IAgreeresponseHandler = new BasicResponseHandler(); String IAgreeSubmitresponseBody = httpclient.execute(Postmethod , IAgreeresponseHandler); I am getting an error 11-20 12:36:22.589: WARN/System.err(366): javax.net.ssl.SSLException: Not trusted server certificate. why is it caused ? how Can i solve it? _ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to disable the security/permission check?
We need to target as more markets as we can. So we need to work on those phones already out from the carriers. Could you please pass this information to other people in Google. We do need a way to turn off security for this kind of enterprise software scenario. So more phones will be sold, everybody makes more money... On Nov 19, 6:51 pm, Dianne Hackborn [EMAIL PROTECTED] wrote: Provided that our security works, you can't write a regular app to do this. You would need to make your own version of the system that either allows it (blowing security out of the water) or incorporates select features you want in safe way. On Wed, Nov 19, 2008 at 5:00 PM, blues [EMAIL PROTECTED] wrote: My goal is to call those RIL methods in the internal RIL.java. Since I don't have access to it on the phone, I endup with copying the RIL.java and several other internal java files into my project. Now the problem is I am not able to connect to the local socket since it needs uid radio. On Nov 19, 11:28 am, Mark Murphy [EMAIL PROTECTED] wrote: blues wrote: The thing is I need to share with those. If you're referring to built-in Android applications, in theory you should be using whatever sort of public APIs those packages are supporting (e.g., ContentProvider, a service's AIDL, Intents). What else are you looking to share with these applications? Perhaps there is a way of achieving your business goals without having to try to use somebody's else's private key to sign your apps. I hope I don't need to build the whole Andorid source and take the risk of brick the device. Since you can't presently deploy a modified firmware image on the T-Mobile G1, bricking it is the least of your worries. You will need to use hardware that supports flashing new firmware -- hopefully some of the next wave of Android devices will support this. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml -- Dianne Hackborn [EMAIL PROTECTED] Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AudioHardwareRecordLoop - How to run on G1 phone
Hi Is there a way to run the AudioHardwareRecordLoop application on the google G1 phone? The application was available as a part of the android source. I was able to run the application on the emulator. But the executable's execute permission is being removed when i store the executable on phone. I used adb push to store the exe on the phone. Is there any other way to push the executable onto the phone so that I can run in from there? Thanks and Regards GnuHash --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Quality of audio recording from MediaRecorder
wrt the native interface: is it AudioSetInputFormat,AudioOpen, AudioRead etc? -GnuHash On Nov 20, 12:14 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It is the only supported method in SDK 1.0. There is a native interface to audio input, but it will be changing in a future release and I strongly advise against using it. On Nov 19, 8:26 am, dorn [EMAIL PROTECTED] wrote: Is theMediaRecorderthe only method available to acquire audio from the microphone, or is there a lower level method available? On Nov 14, 4:59 pm, Dave Sparks [EMAIL PROTECTED] wrote: TheMediaRecorderis currently hardcoded for AMR-NB and is intended for MMS messages. You can expect improvements toaudiorecording in a future SDK. On Nov 14, 12:26 pm, ste [EMAIL PROTECTED] wrote: I'm testing out theMediaRecorder'saudiorecording capability, and the quality of theaudiowas less then I was expecting. It was significantly lower then the quality you get while speaking on the phone, and sounded very digitized. I've tested both the 3gpp and MPEG_4 encoding options, and noticed the same quality. Has anyone else noticed this, and is this an issue with the phone's hardware or theMediaRecorder'scapabilities? If it's the latter, is the quality of recording something which is planned to be improved? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: problem with buttonListener
Hey all, when i start application with buttonlistener enabled and any line of code written in onClick(View v),,it shows messageApplication needs to closed forcefully. On Thu, Nov 20, 2008 at 12:24 PM, 心蓝 [EMAIL PROTECTED] wrote: Usually i do like this: Intent i = new Intent(); i.setClassName(getApplicationContext(), Other.class); startActivity(i); finish(); 2008/11/20 suchita bhardwaj [EMAIL PROTECTED] Hii, I am just trying to switch to next activity.Infact,anything written in onClick() is giving error on call to setOnClickListener. Here is code: button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(Login.this, ForgetPassword.class); startActivity(intent); } }); On Thu, Nov 20, 2008 at 2:59 AM, Sunit Katkar [EMAIL PROTECTED]wrote: Can you post more code. The code you posted is standard event listener code for a button in android. - Sunit On Wed, Nov 19, 2008 at 2:37 AM, suchita bhardwaj [EMAIL PROTECTED] wrote: Hi all,In my code button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform any action on click } }); I am not able to use listener in sdk1.0.Its giving error at run time.Please tell reason.Is there any change in method for implementing listener.Please reply asap. -- - Sunit Katkar http://sunitkatkar.blogspot.com/ - Android OS Tutorials -- Welcome to my site about GPhone: http://51gphone.cn I am a GFans!!欢迎你来到我的GPhone网站!!http://51gphone.cn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Listening for dynamic buttons created by an adapter
alexdonnini wrote: Hello, I think I may have solved the problem. As I suspected (if I am right), the solution was pretty simple. All I had to do is change: kill2 = (Button) findViewById(R.id.kill2); to kill2 = (Button) convertView.findViewById(R.id.kill2); Ah, yes. findViewById(R.id.kill2) searches the root view of your Activity for the item identified as kill2. convertView.findViewById(R.id.kill2) searches your list row for the item identified as kill2. The latter is definitely what you want. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: problem with buttonListener
In the next activity u may be doing somthing thats throwing the xception. Go to Eclipse -Window-ShowView-LogCat..and see the log trace there. On Thu, Nov 20, 2008 at 6:10 PM, suchita bhardwaj [EMAIL PROTECTED]wrote: Hey all, when i start application with buttonlistener enabled and any line of code written in onClick(View v),,it shows messageApplication needs to closed forcefully. On Thu, Nov 20, 2008 at 12:24 PM, 心蓝 [EMAIL PROTECTED] wrote: Usually i do like this: Intent i = new Intent(); i.setClassName(getApplicationContext(), Other.class); startActivity(i); finish(); 2008/11/20 suchita bhardwaj [EMAIL PROTECTED] Hii, I am just trying to switch to next activity.Infact,anything written in onClick() is giving error on call to setOnClickListener. Here is code: button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(Login.this, ForgetPassword.class); startActivity(intent); } }); On Thu, Nov 20, 2008 at 2:59 AM, Sunit Katkar [EMAIL PROTECTED]wrote: Can you post more code. The code you posted is standard event listener code for a button in android. - Sunit On Wed, Nov 19, 2008 at 2:37 AM, suchita bhardwaj [EMAIL PROTECTED] wrote: Hi all,In my code button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform any action on click } }); I am not able to use listener in sdk1.0.Its giving error at run time.Please tell reason.Is there any change in method for implementing listener.Please reply asap. -- - Sunit Katkar http://sunitkatkar.blogspot.com/ - Android OS Tutorials -- Welcome to my site about GPhone: http://51gphone.cn I am a GFans!!欢迎你来到我的GPhone网站!!http://51gphone.cn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Extract some information from an APK file
Hello, is there a way to extract the following data directly from a compiled and signed APK file: 1) name of the package (e.g. 'com.example.android.app') 2) versionCode (e.g. '1') 3) versionName (e.g. '1.0.0') 4) path to the application icon (e.g. '/res/drawable/icon.png') Thank you in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] 2D over 3D
Hi I am porting an application based on the sdk 3.0, and I am having countless problems... now, I am struggling trying to put 2D graphics on top of a 3D scene... After a lot of headache, I managed to create a opengl context, which now works, but when I try to put 2D graphics on top of it, this is what happens: public void drawFrame(GL10 gl) { //view is a SurfaceView, and the value is not null ! mySurfaceHolder=view.getSurfaceHolder(); Canvas c=mySurfaceHolder.lockCanvas(); //this is where I wanted to place my 2D drawing, but after the above line, this is //what I got in the Log: //11-20 12:52:02.508: ERROR/SurfaceComposerClient(490): eLocked set when entering lock_layer(), //layer=1 (lcblk=0x410420a0), state=0020 //11-20 12:52:02.598: ERROR/SurfaceHolder(490): Exception locking surface mySurfaceHolder.unlockCanvasAndPost(c); } Any help would be very appreciated Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: error in opening file in fileexplorer application
I am not familiar with that particular application, but it looks like you need the Intent and IntentFilter setup correctly for the action action=android.intent.action.VIEW data=file:///sdcard/1.txt. Sorry if that's obvious, but does your manifest have a filter for that action, which specifies the activity to handle that? On Nov 20, 12:19 am, Asif k [EMAIL PROTECTED] wrote: Hi All, I am working on file explorer application in which I cannot open any file.I am using following code to open the file which I got from anddev.org. OnClickListener okButtonListener = new OnClickListener(){ // @Override public void onClick(DialogInterface arg0, int arg1) { // Lets start an intent to View the file, that was clicked... Intent myIntent = new Intent (android.content.Intent.ACTION_VIEW,Uri.parse(file:// + aDirectory.getAbsolutePath())); startActivity(myIntent); } }; OnClickListener cancelButtonListener = new OnClickListener (){ // @Override public void onClick(DialogInterface arg0, int arg1) { // Do nothing } }; new AlertDialog.Builder(this) .setTitle(Question) .setMessage(Do you want to open that file?\n+ aDirectory.getName()) .setPositiveButton(OK, okButtonListener) .setNegativeButton(Cancel, cancelButtonListener) .show(); But I am getting following exception after clicking on any file. 11-20 10:26:51.290: INFO/ActivityManager(50): Starting activity: Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt } 11-20 10:26:51.299: WARN/System.err(218): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt } 11-20 10:26:51.369: WARN/System.err(218): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1472) 11-20 10:26:51.369: WARN/System.err(218): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1442) 11-20 10:26:51.380: WARN/System.err(218): at android.app.Activity.startActivityForResult(Activity.java:2528) 11-20 10:26:51.388: WARN/System.err(218): at android.app.Activity.startActivity(Activity.java:2572) 11-20 10:26:51.409: WARN/System.err(218): at android.file.FileExplorer.onListItemClick(FileExplorer.java:171) 11-20 10:26:51.409: WARN/System.err(218): at android.app.ListActivity$2.onItemClick(ListActivity.java:312) 11-20 10:26:51.409: WARN/System.err(218): at android.widget.AdapterView.performItemClick(AdapterView.java:283) 11-20 10:26:51.409: WARN/System.err(218): at android.widget.ListView.performItemClick(ListView.java:3049) 11-20 10:26:51.420: WARN/System.err(218): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1415) Is there any permission is needed to open any file or any resources are required?? Plese give ur suggestions as soon as possible. Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Notification details Activity never receives Intent used to fire it
Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Location-based Service APIs
I am not sure I follow the question here, in terms of Mock vs actual (are you using the emulator, or an actual device, and if you are using the emulator remember you have to send a location to it before it will have a location set, if you just start it up, it won't know where it is - use the DDMS tool or such). Location location = this.locationManager.getLastKnownLocation (locationProvider); Where locationManager is a LocationManager: locationManager = (LocationManager) this.getSystemService (Context.LOCATION_SERVICE); And locationProvider is a LocationProvider that represents gps: locationProvider = this.locationManager.getProvider(gps); A Location object has lat/long and more (depending on the provider): http://code.google.com/android/reference/android/location/Location.html. You can also register to get location updates using a LocationListener, or a BroadcastReceiver (and MyLocationOverlay, though it's a bit more coarse grained). On Nov 19, 8:55 am, salman.geek [EMAIL PROTECTED] wrote: Hi to all. Im facing some problems in getting the actual coordinates through the GPS.Using the LocationBasedService API i have got the coordinates provided by the Mock location as mentioned in the Api but please Help me in making DIrect communication with the GPS. How can i get the Coordinates from the GPS? The samples which i have got from internet was all from the old sdks. Im using the latest Android SDK version 1.0. Please Help me as soon as possible i will be really grateful to all of u. Regards, Salman Khursheed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Files : Absolute and relative path
Hi, I use the method ctxt.openFileOutput(path_file, Context.MODE_PRIVATE). I can't open a file when I add a folder. For example, when I do this : ctxt.openFileOutput(dir/file, Context.MODE_PRIVATE). It generates an IllegalArgumentException. How can I open a file in a specific directory ? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Files : Absolute and relative path
[EMAIL PROTECTED] wrote: Hi, I use the method ctxt.openFileOutput(path_file, Context.MODE_PRIVATE). I can't open a file when I add a folder. For example, when I do this : ctxt.openFileOutput(dir/file, Context.MODE_PRIVATE). It generates an IllegalArgumentException. How can I open a file in a specific directory ? Does the directory exist? If not, you'll probably need to create it. getDir() should lazy-create the directory for you. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Netbeans
Does anyone know what the current state is for development with the netbeans ide? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
That's very unfortunate. iPhone has one up on the android in this arena. On Nov 20, 12:26 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: We have no plans to support the Javax multimedia classes at this time. On Nov 19, 8:21 pm, Robert Green [EMAIL PROTECTED] wrote: I motion for a petition for full audio API in the 1.1 SDK. On Nov 19, 8:43 pm, E [EMAIL PROTECTED] wrote: Hello, Some months ago I began a project that involved some basic signal processing. I used the Java Sound API, including AudioInputStream to get linear bytes from a recording to do some simple analysis. With the release of the 1.0 toolkit I picked the project up again, but the Javax audio classes are missing. Is there a replacement for these classes? What's the plan? Apparently there are other API's that got pulled? I was able to get my code to compile by pulling them out of a full java distro and adding them to my project, but as noted elsewhere, this won't actually run on the device. Thanks, -Ethan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Location-based Service APIs
Well thanks for your reply but ma dear friends i have mentioned that i m getting data through MockLocation e.g using DDMS view by Hardcoding the Longitude and Latitude. If i want to communicate with GPS and get ma location from there.How can that happen? Please help me. On Nov 20, 6:22 pm, Charlie Collins [EMAIL PROTECTED] wrote: I am not sure I follow the question here, in terms of Mock vs actual (are you using the emulator, or an actual device, and if you are using the emulator remember you have to send a location to it before it will have a location set, if you just start it up, it won't know where it is - use the DDMS tool or such). Location location = this.locationManager.getLastKnownLocation (locationProvider); Where locationManager is a LocationManager: locationManager = (LocationManager) this.getSystemService (Context.LOCATION_SERVICE); And locationProvider is a LocationProvider that represents gps: locationProvider = this.locationManager.getProvider(gps); A Location object has lat/long and more (depending on the provider):http://code.google.com/android/reference/android/location/Location.html. You can also register to get location updates using a LocationListener, or a BroadcastReceiver (and MyLocationOverlay, though it's a bit more coarse grained). On Nov 19, 8:55 am, salman.geek [EMAIL PROTECTED] wrote: Hi to all. Im facing some problems in getting the actual coordinates through the GPS.Using the LocationBasedService API i have got the coordinates provided by the Mock location as mentioned in the Api but please Help me in making DIrect communication with the GPS. How can i get the Coordinates from the GPS? The samples which i have got from internet was all from the old sdks. Im using the latest Android SDK version 1.0. Please Help me as soon as possible i will be really grateful to all of u. Regards, Salman Khursheed- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Files : Absolute and relative path
The directory exists. I even do this to be sure : this.getApplicationContext().getDir(dir, this.getApplicationContext().MODE_PRIVATE); What is the problem ? On Nov 20, 2:45 pm, Mark Murphy [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I use the method ctxt.openFileOutput(path_file, Context.MODE_PRIVATE). I can't open a file when I add a folder. For example, when I do this : ctxt.openFileOutput(dir/file, Context.MODE_PRIVATE). It generates an IllegalArgumentException. How can I open a file in a specific directory ? Does the directory exist? If not, you'll probably need to create it. getDir() should lazy-create the directory for you. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Go from one Screen to another screen
Personally I find intents and activities very limiting. Not everything needs to be an activity sometimes new screen is just an alternative view of the same activity or extends your activity. Look into ViewFlipper and related classes. You need to decide what new screen represents On Oct 28, 5:55 am, Rahul [EMAIL PROTECTED] wrote: I am Begginer for the Android and I want to Go from One Screen to Another Screen But i dont undestand How it is possible plz give me a code for that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Netbeans
I've not tried it yet... http://kenai.com/projects/nbandroid/pages/Install On 20 Nov, 14:08, moa [EMAIL PROTECTED] wrote: Does anyone know what the current state is for development with the netbeans ide? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Notification details Activity never receives Intent used to fire it
I think this may be a bug in Android. I also tried following the instructions from the docs under section Launch Modes and Launch Flags with no success. That section suggested to declare any Activity launched from NotificationManager to set the taskAffinitity to and finishOnTaskLaunch to true, so that the Activity does a clean start everytime it is called. Even though the Activity is completely restarted now (onStart() is called), getIntent() always yields the same intent, the one it was started with for the very first time... On 20 Nov., 14:17, Matthias [EMAIL PROTECTED] wrote: Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Licensing question pertaining to the dex compilation process
I have a requirement that any 3rd party libraries that I use in my Android project should be dynamically linked from our source. I have put third party jars into a lib directory and use those jars on the classpath for my project. However, with the dex compilation process, all of the classes are compiled into a single dex file that then gets wrapped into the apk. Does this now constitute a statically linked 3rd party library. Thanks, Nik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Notification details Activity never receives Intent used to fire it
This gets weirder every minute. Just out of curiosity I just called setIntent(null) in onPause() to make sure the Intent the Activity was started with is always reset. As soon as I start the Activity again though, getIntent() will AGAIN return the Intent I supposedly set to null before.. this Intent it returns even exists across re-deployments of the whole application (not across emulator reboots tho)! Am I the only one having these problems? ^^ This whole thing looks completely broken to me. None of the functionalities I used exposed the behavior that was documented. On 20 Nov., 17:03, Matthias [EMAIL PROTECTED] wrote: I think this may be a bug in Android. I also tried following the instructions from the docs under section Launch Modes and Launch Flags with no success. That section suggested to declare any Activity launched from NotificationManager to set the taskAffinitity to and finishOnTaskLaunch to true, so that the Activity does a clean start everytime it is called. Even though the Activity is completely restarted now (onStart() is called), getIntent() always yields the same intent, the one it was started with for the very first time... On 20 Nov., 14:17, Matthias [EMAIL PROTECTED] wrote: Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Permission READ_LOGS
I've seen that there is a permission READ_LOGS: http://code.google.com/android/reference/android/Manifest.permission.html#READ_LOGS Does this mean there is a possibility for applications to read the content of the Log.d(), Log.w(),... output? Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Setting Use by default for this action option crashes when attempting to replace a standard application
Hi All, I try to replace the standard contact application by my custom application. Now that I click on the android contact icon, it prompts me with launching the standard contact app AND my custom app...That's cool... If I launched my custom app from this, it work very well. But when I select the Use by default for this action option so I don't have to choose next time, then launch my app, the emulator crashes with the following message : The process android.process.acore has stopped unexpectely. Please try again This is the log I have from logcat : I/ActivityManager( 65): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1000 comp= {com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} } D/dalvikvm( 3098): GC freed 1116 objects / 61840 bytes in 60ms I/ActivityManager( 65): Displayed activity com.android.contacts/.DialtactsContactsEntryActivity: 718 ms D/AndroidRuntime( 3098): Shutting down VM W/dalvikvm( 3098): threadid=3: thread exiting with uncaught exception (group=0x40010e28) E/AndroidRuntime( 3098): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 3098): java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1234) E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1222) E/AndroidRuntime( 3098):at android.content.pm.IPackageManager $Stub$Proxy.addPreferredActivity(IPackageManager.java:1701) E/AndroidRuntime( 3098):at android.app.ApplicationContext $ApplicationPackageManager.addPreferredActivity (ApplicationContext.java:2259) E/AndroidRuntime( 3098):at com.android.internal.app.ResolverActivity.onClick (ResolverActivity.java:177) E/AndroidRuntime( 3098):at com.android.internal.app.AlertController$AlertParams$3.onItemClick (AlertController.java:828) E/AndroidRuntime( 3098):at android.widget.AdapterView.performItemClick(AdapterView.java:283) E/AndroidRuntime( 3098):at android.widget.ListView.performItemClick(ListView.java:3049) E/AndroidRuntime( 3098):at android.widget.AbsListView $PerformClick.run(AbsListView.java:1415) E/AndroidRuntime( 3098):at android.os.Handler.handleCallback (Handler.java:542) E/AndroidRuntime( 3098):at android.os.Handler.dispatchMessage (Handler.java:86) E/AndroidRuntime( 3098):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 3098):at android.app.ActivityThread.main (ActivityThread.java:3742) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invoke (Method.java:515) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) E/AndroidRuntime( 3098):at dalvik.system.NativeStart.main (Native Method) I/Process ( 65): Sending signal. PID: 3098 SIG: 3 I/dalvikvm( 3098): threadid=7: reacting to signal 3 I/dalvikvm( 3098): Wrote stack trace to '/data/anr/traces.txt' V/DumpStateReceiver( 65): Running: /system/bin/dumpcrash I/DumpStateReceiver( 65): Finished: 1788 bytes read; status 0 I/DumpStateReceiver( 65): Added state dump to 1 crashes I/Process ( 3098): Sending signal. PID: 3098 SIG: 9 I/ActivityManager( 65): Process android.process.acore (pid 3098) has died. I/WindowManager( 65): WIN DEATH: Window{433d46d0 com.android.launcher/com.android.launcher.Launcher} I/WindowManager( 65): WIN DEATH: Window{433e78d8 com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} I/ActivityManager( 65): Start proc android.process.acore for activity com.android.launcher/.Launcher: pid=3136 uid=10002 gids= {3003} - What I can see in those logs, it that the default contact activity starts first ( after that its shows me the drop list with the choice...) . It seems that this activity raises an exception. Is it normal that it start first then prompt with the choice ? - Seeing this : java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. So I tried to set the permission in my manifest : uses-permission android:name=android.permission.SET_PREFERRED_APPLICATIONS / But it still raising the same error message... Can someone help please ? Or have a track to move on ? I really have no idea of what is happening ... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at
[android-developers] Setting Use by default for this action option crashes when attempting to replace a standard application
Hi All, I try to replace the standard contact application by my custom application. Now that I click on the android contact icon, it prompts me with launching the standard contact app AND my custom app...That's cool... If I launched my custom app from this, it work very well. But when I select the Use by default for this action option so I don't have to choose next time, then launch my app, the emulator crashes with the following message : The process android.process.acore has stopped unexpectely. Please try again This is the log I have from logcat : I/ActivityManager( 65): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1000 comp= {com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} } D/dalvikvm( 3098): GC freed 1116 objects / 61840 bytes in 60ms I/ActivityManager( 65): Displayed activity com.android.contacts/.DialtactsContactsEntryActivity: 718 ms D/AndroidRuntime( 3098): Shutting down VM W/dalvikvm( 3098): threadid=3: thread exiting with uncaught exception (group=0x40010e28) E/AndroidRuntime( 3098): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 3098): java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1234) E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1222) E/AndroidRuntime( 3098):at android.content.pm.IPackageManager $Stub$Proxy.addPreferredActivity(IPackageManager.java:1701) E/AndroidRuntime( 3098):at android.app.ApplicationContext $ApplicationPackageManager.addPreferredActivity (ApplicationContext.java:2259) E/AndroidRuntime( 3098):at com.android.internal.app.ResolverActivity.onClick (ResolverActivity.java:177) E/AndroidRuntime( 3098):at com.android.internal.app.AlertController$AlertParams$3.onItemClick (AlertController.java:828) E/AndroidRuntime( 3098):at android.widget.AdapterView.performItemClick(AdapterView.java:283) E/AndroidRuntime( 3098):at android.widget.ListView.performItemClick(ListView.java:3049) E/AndroidRuntime( 3098):at android.widget.AbsListView $PerformClick.run(AbsListView.java:1415) E/AndroidRuntime( 3098):at android.os.Handler.handleCallback (Handler.java:542) E/AndroidRuntime( 3098):at android.os.Handler.dispatchMessage (Handler.java:86) E/AndroidRuntime( 3098):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 3098):at android.app.ActivityThread.main (ActivityThread.java:3742) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invoke (Method.java:515) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) E/AndroidRuntime( 3098):at dalvik.system.NativeStart.main (Native Method) I/Process ( 65): Sending signal. PID: 3098 SIG: 3 I/dalvikvm( 3098): threadid=7: reacting to signal 3 I/dalvikvm( 3098): Wrote stack trace to '/data/anr/traces.txt' V/DumpStateReceiver( 65): Running: /system/bin/dumpcrash I/DumpStateReceiver( 65): Finished: 1788 bytes read; status 0 I/DumpStateReceiver( 65): Added state dump to 1 crashes I/Process ( 3098): Sending signal. PID: 3098 SIG: 9 I/ActivityManager( 65): Process android.process.acore (pid 3098) has died. I/WindowManager( 65): WIN DEATH: Window{433d46d0 com.android.launcher/com.android.launcher.Launcher} I/WindowManager( 65): WIN DEATH: Window{433e78d8 com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} I/ActivityManager( 65): Start proc android.process.acore for activity com.android.launcher/.Launcher: pid=3136 uid=10002 gids= {3003} - What I can see in those logs, it that the default contact activity starts first ( after that its shows me the drop list with the choice...) . It seems that this activity raises an exception. Is it normal that it start first then prompt with the choice ? - Seeing this : java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. So I tried to set the permission in my manifest : uses-permission android:name=android.permission.SET_PREFERRED_APPLICATIONS / But it still raising the same error message... Can someone help please ? Or have a track to move on ? I really have no idea of what is happening ... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at
[android-developers] Help screen dialog
Does anybody have sample code for a help/about dialog box to display a lengthy detailed description of the application.? What's the easiest way to do that? Bernhard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Notification details Activity never receives Intent used to fire it
I have this bug too, It works better when I put a requestCode in the PendingIntent, but according to the documentation, this parameter is not used... Strange... Even by doing that it sometimes fail, but without that, it surely fails as you both noticed. Here is the way I post my notification: Notification notification = new Notification (R.drawable.public_post_icon, text, post.getPublishedDate().getTime()); notification.flags = Notification.FLAG_AUTO_CANCEL; notification.setLatestEventInfo(mContext, authorDisplayName + + PUBLISHED_A_POST, text, PendingIntent.getActivity(mContext, mRequestCodeIncrementor++, postIntent, 0)); I already filed a bug some months ago but no one at google read it... http://code.google.com/p/android/issues/detail?id=863 On Nov 20, 5:38 pm, Matthias [EMAIL PROTECTED] wrote: This gets weirder every minute. Just out of curiosity I just called setIntent(null) in onPause() to make sure the Intent the Activity was started with is always reset. As soon as I start the Activity again though, getIntent() will AGAIN return the Intent I supposedly set to null before.. this Intent it returns even exists across re-deployments of the whole application (not across emulator reboots tho)! Am I the only one having these problems? ^^ This whole thing looks completely broken to me. None of the functionalities I used exposed the behavior that was documented. On 20 Nov., 17:03, Matthias [EMAIL PROTECTED] wrote: I think this may be a bug in Android. I also tried following the instructions from the docs under section Launch Modes and Launch Flags with no success. That section suggested to declare any Activity launched from NotificationManager to set the taskAffinitity to and finishOnTaskLaunch to true, so that the Activity does a clean start everytime it is called. Even though the Activity is completely restarted now (onStart() is called), getIntent() always yields the same intent, the one it was started with for the very first time... On 20 Nov., 14:17, Matthias [EMAIL PROTECTED] wrote: Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Quality of audio recording from MediaRecorder
No, the native interface is found in include/media/AudioRecord.h. On Nov 20, 4:18 am, GnuHash [EMAIL PROTECTED] wrote: wrt the native interface: is it AudioSetInputFormat,AudioOpen, AudioRead etc? -GnuHash On Nov 20, 12:14 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It is the only supported method in SDK 1.0. There is a native interface to audio input, but it will be changing in a future release and I strongly advise against using it. On Nov 19, 8:26 am, dorn [EMAIL PROTECTED] wrote: Is theMediaRecorderthe only method available to acquire audio from the microphone, or is there a lower level method available? On Nov 14, 4:59 pm, Dave Sparks [EMAIL PROTECTED] wrote: TheMediaRecorderis currently hardcoded for AMR-NB and is intended for MMS messages. You can expect improvements toaudiorecording in a future SDK. On Nov 14, 12:26 pm, ste [EMAIL PROTECTED] wrote: I'm testing out theMediaRecorder'saudiorecording capability, and the quality of theaudiowas less then I was expecting. It was significantly lower then the quality you get while speaking on the phone, and sounded very digitized. I've tested both the 3gpp and MPEG_4 encoding options, and noticed the same quality. Has anyone else noticed this, and is this an issue with the phone's hardware or theMediaRecorder'scapabilities? If it's the latter, is the quality of recording something which is planned to be improved? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Unable to resolve superclass of Overlay and MapPoint
I am running into a problem with just trying to instantiate a subclass to Overlay. I started with the Snake demo applicaiont and added a new class. When I try and run the application I get the error: W/dalvikvm( 2748): Unable to resolve superclass of Lcom/example/ android/snake/SnakeOverlay; (36) W/dalvikvm( 2748): Link of class 'Lcom/example/android/snake/ SnakeOverlay;' failed W/dalvikvm( 2748): VFY: unable to resolve new-instance 30 (Lcom/ example/android/snake/SnakeOverlay;) in Lcom/example/android/snake/ Snake; W/dalvikvm( 2748): VFY: rejecting opcode 0x22 at 0x0004 W/dalvikvm( 2748): VFY: rejected Lcom/example/android/snake/ Snake;.onCreate (Landroid/os/Bundle;)V I get the same problems for MapPoint classes as well. The problem occurs if I add a line like: SnakeOverlay so = new SnakeOverlay(); SnakeOverlay Class -- package com.example.android.snake; import com.google.android.maps.Overlay; public class SnakeOverlay extends Overlay { } Any thoughts? Thanks, John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] RSS Normalizing Crashes App
I'm writing a script that takes a RSS and phrases items.. but it is crashing on part of the code. I'm using the code from: http://www.devx.com/wireless/Article/39810/1954 private void DownloadRSS(String URL) { InputStream in = null; try { in = OpenHttpConnection(URL); Document doc = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db; try { db = dbf.newDocumentBuilder(); doc = db.parse(in); } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } doc.getDocumentElement().normalize(); //---retrieve all the item nodes--- NodeList itemNodes = doc.getElementsByTagName(item); String strTitle = ; for (int i = 0; i itemNodes.getLength(); i++) { Node itemNode = itemNodes.item(i); if (itemNode.getNodeType() == Node.ELEMENT_NODE) { //---convert the Node into an Element--- Element itemElement = (Element) itemNode; //---get all the title element under the item // element--- NodeList titleNodes = (itemElement).getElementsByTagName(title); //---convert a Node into an Element--- Element titleElement = (Element) titleNodes.item (0); //---get all the child nodes under the title element--- NodeList textNodes = ((Node) titleElement).getChildNodes(); //---retrieve the text of the title element--- strTitle = ((Node) textNodes.item(0)).getNodeValue (); //---display the title--- Toast.makeText(getBaseContext(),strTitle, Toast.LENGTH_SHORT).show(); } } } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } It is crashing the app when it gets to: doc.getDocumentElement ().normalize(); (And it won't work without it.. Some work.. some RSS files do not.) Is this the best way to do it? I want to load the fields title and link into an array.. and then list them and make it clickable. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Saving Reading Webview
Hello Every One , I am working on the WebView and i want to save the webView object and then read it , Now i able to save webview object successfully but my ObjectinputStream cannot able to read the object. Here is my source code : public class myCustomWebView extends WebView implements Serializable{ static final long serialVersionUID = 7523967970034938905L; public myCustomWebView (Context c){ super(c); } } public boolean saveObject(String fileName,Object data_TO_BE_SAVED) { boolean result = false; File myFile=null; myFile = getFileStreamPath(X).getParentFile(); System.out.println(PATH WE GOT IS ...+ myFile.getPath()); myFile = new File(myFile,fileName); System.out.println(AFTER CONSTRUCTOR WE GOT IS ...+ myFile.getPath()); try{ FileOutputStream fos = openFileOutput(fileName, Context.MODE_WORLD_READABLE); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(data_TO_BE_SAVED); fos.flush(); fos.close(); System.out.println(Object Saved.); result = true; }catch(Exception ex){ ex.printStackTrace(); } return result; } public void getSavedObject(String fileName){ System.out.println(fileName is + fileName); try{ FileInputStream fis = this.openFileInput(fileName); ObjectInputStream ois = new ObjectInputStream(fis); Object obj = (Object) ois.readObject(); System.out.println(WebView Object is \n\n + obj); ois.close(); fis.close(); }catch(Exception ex){ ex.printStackTrace(); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How do I transfer my .adk to the \system\app directory?
I built a simple hello world application and I have the .adk file. i transfered the .adk file onto my g1 phone. I see it in the top- level directory, but how can I execute it now? I think I need to copy it to the system\app directory on the phone (where I see the rest of the .adk files)... However, I dont know how to copy it there. My android file manager wont copy/paste it there. How do I get my app to fireup on the g1 phone? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Blue Screen of Death when debugging againstactual phone
I had this exact same issue running Windows XP sp3 and Eclipse 3.3. It went away all on it's own when I un-installed and re-installed the Android USB drivers. Don't really know what the deal was. On Oct 31, 11:04 pm, Greg [EMAIL PROTECTED] wrote: I'm not using the command line to do anything. I only ran 'adb devices' to verify that adb is actually seeing the phone. That's irrelevant to the actual problem which is choosing from Eclipse to run a program on the G1. As soon as I choose the phone it explodes. Just to make sure I shut down the emulator just now so the phone was the only device. Hit Run on Eclipse and instant *Boom* I saw the BSOD error this time as BUGCODE_USB_DRIVER before it auto-rebooted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Serialization of WebView Object
I m trying to serialize the webView object but could not able to do so , i successfully saved it , but cannot able DeSerialized it , any suggestions ? Thanks In Advance ... here is the code , BEGIN CODE *** public class MyWebView extends WebView implements Serializable { static final long serialVersionUID = 7523967970034938905L; public MyWebView (Context c){ super(c); } } public boolean saveObject(String fileName,MyWebView data_TO_BE_SAVED){ boolean result = false; File myFile=null; myFile = getFileStreamPath(X).getParentFile(); myFile = new File(myFile,fileName); try{ FileOutputStream fos = openFileOutput(path, Context.MODE_WORLD_READABLE); // also i checked MODE_APPEND ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(data_TO_BE_SAVED); oos.flush(); oos.close(); fos.flush(); fos.close(); System.out.println(Object Saved.); result = true; }catch(Exception ex){ ex.printStackTrace(); } return result; } public void getSavedObject(String fileName){ try{ FileInputStream fis = this.openFileInput(path); ObjectInputStream ois = new ObjectInputStream(fis); Object obj = ois.readObject(); // Here Comes the error ois.close(); fis.close(); }catch(Exception ex){ ex.printStackTrace(); } } *** END CODE *** --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Can anyone make an android app for our web application ?
We are an automotive portal called AllTheRides.com Would any developer/developers be interested in making the first automotive android app ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] FTP Client
Is anyone out there working on a FTP client for Android or does anyone know if one is already available? I have been looking for awhile and haven't found anything. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] image to text conversion
I have some camera shots which contains mainly text. I want to convert them to a string format. Can anybody suggest a solution for it? Is there any external library available for android? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse Plug-in Site down?
Although the browser says 404, eclipse can update plugin from the http address. On Nov 16, 1:49 pm, Sohail Mirza [EMAIL PROTECTED] wrote: Actually, I can confirm that the http site isn't working either. Both appear to be down. Navigating to either in your browser gets you the following HTTP 404 message: The requested URL /android/eclipse/ was not found on this server. Google may be moving the plugin to a new location but have perhaps not updated the developer documentation. On Nov 15, 11:02 pm, Matt Schmulen [EMAIL PROTECTED] wrote: Just remove the s and get it http// instead of https// On Nov 15, 2008 3:57 PM, Hong Ji [EMAIL PROTECTED] wrote: Same problem. The Eclipse says No repository found athttps://dl-ssl.google.com/android/eclipse/.; On Nov 14, 1:25 pm, Steve918 [EMAIL PROTECTED] wrote: I'm getting a 404 when I try to i... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Quality of audio recording from MediaRecorder
I would really love a clue here as well, MediaRecorder is completely unworkable for my application, so it's either use the native interface or wait for another release, which I would rather not do... On Thu, Nov 20, 2008 at 7:18 AM, GnuHash [EMAIL PROTECTED] wrote: wrt the native interface: is it AudioSetInputFormat,AudioOpen, AudioRead etc? -GnuHash On Nov 20, 12:14 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It is the only supported method in SDK 1.0. There is a native interface to audio input, but it will be changing in a future release and I strongly advise against using it. On Nov 19, 8:26 am, dorn [EMAIL PROTECTED] wrote: Is theMediaRecorderthe only method available to acquire audio from the microphone, or is there a lower level method available? On Nov 14, 4:59 pm, Dave Sparks [EMAIL PROTECTED] wrote: TheMediaRecorderis currently hardcoded for AMR-NB and is intended for MMS messages. You can expect improvements toaudiorecording in a future SDK. On Nov 14, 12:26 pm, ste [EMAIL PROTECTED] wrote: I'm testing out theMediaRecorder'saudiorecording capability, and the quality of theaudiowas less then I was expecting. It was significantly lower then the quality you get while speaking on the phone, and sounded very digitized. I've tested both the 3gpp and MPEG_4 encoding options, and noticed the same quality. Has anyone else noticed this, and is this an issue with the phone's hardware or theMediaRecorder'scapabilities? If it's the latter, is the quality of recording something which is planned to be improved? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ListView set default checked state
I achieved this by creating a custom Adapter. All you need to do is to create a new class that extends the BaseAdapter abstract class, then for the implementation you can take a look at the following sample from the API demos: http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/List14.html that example will show you how to set view elements in a custom list item. For this to work with the layout you're using you need to modify the getView method. I'll copy mine so you can get the idea. public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate( android.R.layout.simple_list_item_multiple_choice, null); holder = new ViewHolder(); holder.checkbox = (CheckedTextView) convertView.findViewById (android.R.id.text1); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.checkbox.setText(tasks.get(position).getName()); holder.checkbox.setChecked(tasks.get(position).isCompleted()); return convertView; } static class ViewHolder { CheckedTextView checkbox; } Hope this helps Armando On Nov 9, 5:30 am, songs [EMAIL PROTECTED] wrote: Hi, I've got a multi-choice checkbox list being populated from a database using the code below, but I can't figure out how to set the initial checked state based on one of other columns. Anyone know how to do this? == startManagingCursor(c); setListAdapter(new SimpleCursorAdapter(this, android.R.layout.simple_list_item_multiple_choice, c, new String[] {title}, new int[] {android.R.id.text1})); == Thanks, Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
What mic-memory and memory-speaker method(s) *do* you plan to support? Not to complain, android is wonderful, but mic-file and file-speaker just won't work for many applications. On Thu, Nov 20, 2008 at 1:26 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: We have no plans to support the Javax multimedia classes at this time. On Nov 19, 8:21 pm, Robert Green [EMAIL PROTECTED] wrote: I motion for a petition for full audio API in the 1.1 SDK. On Nov 19, 8:43 pm, E [EMAIL PROTECTED] wrote: Hello, Some months ago I began a project that involved some basic signal processing. I used the Java Sound API, including AudioInputStream to get linear bytes from a recording to do some simple analysis. With the release of the 1.0 toolkit I picked the project up again, but the Javax audio classes are missing. Is there a replacement for these classes? What's the plan? Apparently there are other API's that got pulled? I was able to get my code to compile by pulling them out of a full java distro and adding them to my project, but as noted elsewhere, this won't actually run on the device. Thanks, -Ethan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ViewFlipper onFlipListener
Hi everyone, I am using the ViewFlipper class with automatic flipping through views. Is there a way to get notified or register a listener to be called each time just before a new child view is displayed. (i.e with automatic flipping ). So far I have not seen any listeners in the documentation for this purpose. I would also like to use this to check, each time a view is loaded, if it is the last and return to the calling activity instead wrapping around to start from the beginning of the ViewFlipper child views. If someone has any bright ideas please share. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] can not create Surface and ISurface successfully
hi, I try to use SurfaceComposerClient and SurfaceFlinger to create a Surface, but all failed, the point = null, can you help how to create a surface? when I try to spSurface mysurface = client-createSurface(getpid(), 0, info.w , info.h, info.pixelFormatInfo.format , 0); and spISurface myISurface = FlingerClient-createSurface (param ,getpid(), 0, info.w , info.h, info.pixelFormatInfo.format,0); all failed, the pointer return null my code spSurfaceComposerClient client; DisplayInfo info; uint32_t flags = 0x; client = new SurfaceComposerClient; spIBinder mybinder = client-connection(); client-openTransaction(); client-openGlobalTransaction(); ssize_t number = client-getNumberOfDisplays(); printf(number =%d \n, number); client-getDisplayInfo(0,info); printf(w =%d h=%d format =%d \n, info.w,info.h, info.pixelFormatInfo.format); w=100; h=100; spSurface mysurface = client-createSurface(getpid(), 0, info.w , info.h, info.pixelFormatInfo.format , 0); if(mysurface == NULL){ printf( create surface failed ! \n); } spISurfaceComposer SurfaceFlinger = _get_surface_manager(); if(SurfaceFlinger == NULL) printf(SurfaceFlinger == null\n); spISurfaceFlingerClient FlingerClient = SurfaceFlinger- createConnection(); if(FlingerClient == NULL) printf(SurfaceFlingerclient == null\n); ISurfaceFlingerClient::surface_data_t param; spISurface myISurface = FlingerClient-createSurface (param ,getpid(), 0, info.w , info.h, info.pixelFormatInfo.format,0); if( myISurface == NULL) printf( myISurface == null\n); /my output// ./myclient Running in emulation - fallback to software codecs number =1 w =320 h=480 format =4 create surface failed ! myISurface == null myclient quit --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Custom ImageButton Shape
I plan to create an imagebutton which I would like to make a nonstandard shape (e.g. a circle). Any general ideas on how I would go about this? Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
Dianne, Give even a general description of what patches would help get this lack of audio functionality dealt with in a way that would be accepted for inclusion in the base, and I bet someone will take up the challenge... Regards, Dorn Hetzel On Thu, Nov 20, 2008 at 4:08 AM, Dianne Hackborn [EMAIL PROTECTED] wrote: On Wed, Nov 19, 2008 at 8:21 PM, Robert Green [EMAIL PROTECTED] wrote: I motion for a petition for full audio API in the 1.1 SDK. Contributing patches would be a much more effective approach than a petition. -- Dianne Hackborn [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to force portrait mode?
Hello, I need to force the portrait layout on our app at all times, meaning when the phone is rotated to landscape orientation the view should appear sideways, whether or not the keyboard is out. How to I enforce this? BTW - I understand why this is undesirable but I'm not the UI designer nor the person that approved the layout. I'm a humble coder so if you feel the urge to ignore the above question and address the bad design please move along. I already know. Thank you! Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there a hook to run code on device shutdown (power off)?
Hello. Part of the app I'm writing is a Service that does some work. If it hasn't finished when the user switches the device off I'd like to be able to save my state to a file and then restart the Service when the device starts up again. I can see how to start it up again (receive the ACTION_BOOT_COMPLETED Intent), but I can't figure out a way to run the saving code on shutdown. I was expecting my Service's onDestroy() to be called, but this doesn't seem to be the case. Thanks. -- Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Text-To-Speech
I am not able to even see this app on the Market. Can someone help me find it or something plz. Oh and what's been up w/ Aim, am I the only person still having issues w/ that as well? I mean I love this phone but it has a lot of issues. Lol No Video camera, u can't add videos other then ones recorede from a previous device, you can't save pictures w/ out emailing them to your self 1st. I mean come on now.!. This phone was the biggest thing and now nothing works really. Its still kool though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ADB blue-screen when installing my app
The signed, release build .apk works on the emulator just fine. On a 32-bit Windows XP/Pro SP3 box I can get ADB to see the physical phone, e.g. adb devices lists the device. But every attempt to install (adb install .apk) blue-screens the box. Any ideas? tia, mike collins --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADB via USB
I have a signed release build of a test app, the .apk can be loaded into the emulator and works just fine. When I attempt to load it into a real G1 the box blue-screens immediately and reboot before I can see anything. Details 32-bit Windows XP SP3 Pro ADB can see the device when connected via USB adb install xxx.apk blue screen Any ideas? TIA, mike collins --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] battery level
Is there a way for an application to get access to the current percentage estimate of the battery charge level? Basically the number which is displayed in Settings-About phone-Status. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Setting Use by default for this action option crashes when attempting to replace a standard application
Hi All, I try to replace the standard contact application by my custom application. Now that I click on the android contact icon, it prompts me with launching the standard contact app AND my custom app...That's cool... If I launched my custom app from this, it work very well. But when I select the Use by default for this action option so I don't have to choose next time, then launch my app, the emulator crashes with the following message : The process android.process.acore has stopped unexpectely. Please try again This is the log I have from logcat : I/ActivityManager( 65): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1000 comp= {com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} } D/dalvikvm( 3098): GC freed 1116 objects / 61840 bytes in 60ms I/ActivityManager( 65): Displayed activity com.android.contacts/.DialtactsContactsEntryActivity: 718 ms D/AndroidRuntime( 3098): Shutting down VM W/dalvikvm( 3098): threadid=3: thread exiting with uncaught exception (group=0x40010e28) E/AndroidRuntime( 3098): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 3098): java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1234) E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1222) E/AndroidRuntime( 3098):at android.content.pm.IPackageManager $Stub$Proxy.addPreferredActivity(IPackageManager.java:1701) E/AndroidRuntime( 3098):at android.app.ApplicationContext $ApplicationPackageManager.addPreferredActivity (ApplicationContext.java:2259) E/AndroidRuntime( 3098):at com.android.internal.app.ResolverActivity.onClick (ResolverActivity.java:177) E/AndroidRuntime( 3098):at com.android.internal.app.AlertController$AlertParams$3.onItemClick (AlertController.java:828) E/AndroidRuntime( 3098):at android.widget.AdapterView.performItemClick(AdapterView.java:283) E/AndroidRuntime( 3098):at android.widget.ListView.performItemClick(ListView.java:3049) E/AndroidRuntime( 3098):at android.widget.AbsListView $PerformClick.run(AbsListView.java:1415) E/AndroidRuntime( 3098):at android.os.Handler.handleCallback (Handler.java:542) E/AndroidRuntime( 3098):at android.os.Handler.dispatchMessage (Handler.java:86) E/AndroidRuntime( 3098):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 3098):at android.app.ActivityThread.main (ActivityThread.java:3742) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invoke (Method.java:515) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) E/AndroidRuntime( 3098):at dalvik.system.NativeStart.main (Native Method) I/Process ( 65): Sending signal. PID: 3098 SIG: 3 I/dalvikvm( 3098): threadid=7: reacting to signal 3 I/dalvikvm( 3098): Wrote stack trace to '/data/anr/traces.txt' V/DumpStateReceiver( 65): Running: /system/bin/dumpcrash I/DumpStateReceiver( 65): Finished: 1788 bytes read; status 0 I/DumpStateReceiver( 65): Added state dump to 1 crashes I/Process ( 3098): Sending signal. PID: 3098 SIG: 9 I/ActivityManager( 65): Process android.process.acore (pid 3098) has died. I/WindowManager( 65): WIN DEATH: Window{433d46d0 com.android.launcher/com.android.launcher.Launcher} I/WindowManager( 65): WIN DEATH: Window{433e78d8 com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} I/ActivityManager( 65): Start proc android.process.acore for activity com.android.launcher/.Launcher: pid=3136 uid=10002 gids= {3003} - What I can see in those logs, it that the default contact activity starts first ( after that its shows me the drop list with the choice...) . It seems that this activity raises an exception. Is it normal that it start first then prompt with the choice ? - Seeing this : java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. So I tried to set the permission in my manifest : uses-permission android:name=android.permission.SET_PREFERRED_APPLICATIONS / But it still raising the same error message... Can someone help please ? Or have a track to move on ? I really have no idea of what is happening ... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at
[android-developers] Setting Use by default for this action option crashes when attempting to replace a standard application
Hi All, I try to replace the standard contact application by my custom application. Now that I click on the android contact icon, it prompts me with launching the standard contact app AND my custom app...That's cool... If I launched my custom app from this, it work very well. But when I select the Use by default for this action option so I don't have to choose next time, then launch my app, the emulator crashes with the following message : The process android.process.acore has stopped unexpectely. Please try again This is the log I have from logcat : I/ActivityManager( 65): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x1000 comp= {com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} } D/dalvikvm( 3098): GC freed 1116 objects / 61840 bytes in 60ms I/ActivityManager( 65): Displayed activity com.android.contacts/.DialtactsContactsEntryActivity: 718 ms D/AndroidRuntime( 3098): Shutting down VM W/dalvikvm( 3098): threadid=3: thread exiting with uncaught exception (group=0x40010e28) E/AndroidRuntime( 3098): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 3098): java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1234) E/AndroidRuntime( 3098):at android.os.Parcel.readException (Parcel.java:1222) E/AndroidRuntime( 3098):at android.content.pm.IPackageManager $Stub$Proxy.addPreferredActivity(IPackageManager.java:1701) E/AndroidRuntime( 3098):at android.app.ApplicationContext $ApplicationPackageManager.addPreferredActivity (ApplicationContext.java:2259) E/AndroidRuntime( 3098):at com.android.internal.app.ResolverActivity.onClick (ResolverActivity.java:177) E/AndroidRuntime( 3098):at com.android.internal.app.AlertController$AlertParams$3.onItemClick (AlertController.java:828) E/AndroidRuntime( 3098):at android.widget.AdapterView.performItemClick(AdapterView.java:283) E/AndroidRuntime( 3098):at android.widget.ListView.performItemClick(ListView.java:3049) E/AndroidRuntime( 3098):at android.widget.AbsListView $PerformClick.run(AbsListView.java:1415) E/AndroidRuntime( 3098):at android.os.Handler.handleCallback (Handler.java:542) E/AndroidRuntime( 3098):at android.os.Handler.dispatchMessage (Handler.java:86) E/AndroidRuntime( 3098):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 3098):at android.app.ActivityThread.main (ActivityThread.java:3742) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3098):at java.lang.reflect.Method.invoke (Method.java:515) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) E/AndroidRuntime( 3098):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) E/AndroidRuntime( 3098):at dalvik.system.NativeStart.main (Native Method) I/Process ( 65): Sending signal. PID: 3098 SIG: 3 I/dalvikvm( 3098): threadid=7: reacting to signal 3 I/dalvikvm( 3098): Wrote stack trace to '/data/anr/traces.txt' V/DumpStateReceiver( 65): Running: /system/bin/dumpcrash I/DumpStateReceiver( 65): Finished: 1788 bytes read; status 0 I/DumpStateReceiver( 65): Added state dump to 1 crashes I/Process ( 3098): Sending signal. PID: 3098 SIG: 9 I/ActivityManager( 65): Process android.process.acore (pid 3098) has died. I/WindowManager( 65): WIN DEATH: Window{433d46d0 com.android.launcher/com.android.launcher.Launcher} I/WindowManager( 65): WIN DEATH: Window{433e78d8 com.android.contacts/ com.android.contacts.DialtactsContactsEntryActivity} I/ActivityManager( 65): Start proc android.process.acore for activity com.android.launcher/.Launcher: pid=3136 uid=10002 gids= {3003} - What I can see in those logs, it that the default contact activity starts first ( after that its shows me the drop list with the choice...) . It seems that this activity raises an exception. Is it normal that it start first then prompt with the choice ? - Seeing this : java.lang.SecurityException: Neither user 10002 nor current process has android.permission.SET_PREFERRED_APPLICATIONS. So I tried to set the permission in my manifest : uses-permission android:name=android.permission.SET_PREFERRED_APPLICATIONS / But it still raising the same error message... Can someone help please ? Or have a track to move on ? I really have no idea of what is happening ... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at
[android-developers] Re: missing javax audio?
Agreed. The API really needs input and output streams. It's tough to make any creative audio application the way it is right now. On Nov 20, 8:11 am, Dorn Hetzel [EMAIL PROTECTED] wrote: What mic-memory and memory-speaker method(s) *do* you plan to support? Not to complain, android is wonderful, but mic-file and file-speaker just won't work for many applications. On Thu, Nov 20, 2008 at 1:26 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: We have no plans to support the Javax multimedia classes at this time. On Nov 19, 8:21 pm, Robert Green [EMAIL PROTECTED] wrote: I motion for a petition for full audio API in the 1.1 SDK. On Nov 19, 8:43 pm, E [EMAIL PROTECTED] wrote: Hello, Some months ago I began a project that involved some basic signal processing. I used the Java Sound API, including AudioInputStream to get linear bytes from a recording to do some simple analysis. With the release of the 1.0 toolkit I picked the project up again, but the Javax audio classes are missing. Is there a replacement for these classes? What's the plan? Apparently there are other API's that got pulled? I was able to get my code to compile by pulling them out of a full java distro and adding them to my project, but as noted elsewhere, this won't actually run on the device. Thanks, -Ethan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Location-based Service APIs
It's the same as if you were doing it with real GPS. You're simulating GPS communication. It isn't a separate interface/method/ setup at all. On Nov 20, 6:27 am, salman.geek [EMAIL PROTECTED] wrote: Well thanks for your reply but ma dear friends i have mentioned that i m getting data through MockLocation e.g using DDMS view by Hardcoding the Longitude and Latitude. If i want to communicate with GPS and get ma location from there.How can that happen? Please help me. On Nov 20, 6:22 pm, Charlie Collins [EMAIL PROTECTED] wrote: I am not sure I follow the question here, in terms of Mock vs actual (are you using the emulator, or an actual device, and if you are using the emulator remember you have to send a location to it before it will have a location set, if you just start it up, it won't know where it is - use the DDMS tool or such). Location location = this.locationManager.getLastKnownLocation (locationProvider); Where locationManager is a LocationManager: locationManager = (LocationManager) this.getSystemService (Context.LOCATION_SERVICE); And locationProvider is a LocationProvider that represents gps: locationProvider = this.locationManager.getProvider(gps); A Location object has lat/long and more (depending on the provider):http://code.google.com/android/reference/android/location/Location.html. You can also register to get location updates using a LocationListener, or a BroadcastReceiver (and MyLocationOverlay, though it's a bit more coarse grained). On Nov 19, 8:55 am, salman.geek [EMAIL PROTECTED] wrote: Hi to all. Im facing some problems in getting the actual coordinates through the GPS.Using the LocationBasedService API i have got the coordinates provided by the Mock location as mentioned in the Api but please Help me in making DIrect communication with the GPS. How can i get the Coordinates from the GPS? The samples which i have got from internet was all from the old sdks. Im using the latest Android SDK version 1.0. Please Help me as soon as possible i will be really grateful to all of u. Regards, Salman Khursheed- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Notification details Activity never receives Intent used to fire it
Guillaume, you're my hero. Thanks! Works like a champ now. Curse Google and their terrible documentation, I spent the whole day hunting down a bug that ain't there... great. Now I'll go home and bang my head at the wall for the rest of the day. On 20 Nov., 17:59, Guillaume Perrot [EMAIL PROTECTED] wrote: I have this bug too, It works better when I put a requestCode in the PendingIntent, but according to the documentation, this parameter is not used... Strange... Even by doing that it sometimes fail, but without that, it surely fails as you both noticed. Here is the way I post my notification: Notification notification = new Notification (R.drawable.public_post_icon, text, post.getPublishedDate().getTime()); notification.flags = Notification.FLAG_AUTO_CANCEL; notification.setLatestEventInfo(mContext, authorDisplayName + + PUBLISHED_A_POST, text, PendingIntent.getActivity(mContext, mRequestCodeIncrementor++, postIntent, 0)); I already filed a bug some months ago but no one at google read it...http://code.google.com/p/android/issues/detail?id=863 On Nov 20, 5:38 pm, Matthias [EMAIL PROTECTED] wrote: This gets weirder every minute. Just out of curiosity I just called setIntent(null) in onPause() to make sure the Intent the Activity was started with is always reset. As soon as I start the Activity again though, getIntent() will AGAIN return the Intent I supposedly set to null before.. this Intent it returns even exists across re-deployments of the whole application (not across emulator reboots tho)! Am I the only one having these problems? ^^ This whole thing looks completely broken to me. None of the functionalities I used exposed the behavior that was documented. On 20 Nov., 17:03, Matthias [EMAIL PROTECTED] wrote: I think this may be a bug in Android. I also tried following the instructions from the docs under section Launch Modes and Launch Flags with no success. That section suggested to declare any Activity launched from NotificationManager to set the taskAffinitity to and finishOnTaskLaunch to true, so that the Activity does a clean start everytime it is called. Even though the Activity is completely restarted now (onStart() is called), getIntent() always yields the same intent, the one it was started with for the very first time... On 20 Nov., 14:17, Matthias [EMAIL PROTECTED] wrote: Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need help using hat to track down memory usage
If the output is not compatible with a standard hprof format, could somebody at Google point out the differences and the motivations for them? With such advice we could try to adapt a tool or make the format compatible with the existing ones... We are suffering from memory leak problems and we are unable to determine the cause with the current tools :( Best regards, Jose Luis. On Nov 7, 1:24 am, fadden [EMAIL PROTECTED] wrote: On Nov 5, 11:12 am, Disco Stu 010 [EMAIL PROTECTED] wrote: java.io.IOException: Version string not recognized at byte 17 at hat.parser.HprofReader.readVersionHeader(HprofReader.java:325) at hat.parser.HprofReader.read(HprofReader.java:169) at hat.parser.Reader.readFile(Reader.java:90) at hat.Main.main(Main.java:149) The output isn't compatible. Unfortunately we were not able to include the modified hat tool in the 1.0 source release. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text-To-Speech
Is this actually working in emulator ?? which sdk does it support ?? On Thu, Nov 20, 2008 at 11:14 PM, Alvaro Rivas [EMAIL PROTECTED]wrote: May be you can use the freeTTS-Android interface. It's only for presentation purposes in the emulator. I Dont know if it is the best solution to resolver TTS problem, but may be it will be useful. http://sourceforge.net/projects/freettsandroidi/ 2008/11/19, Peach [EMAIL PROTECTED]: I am not able to even see this app on the Market. Can someone help me find it or something plz. Oh and what's been up w/ Aim, am I the only person still having issues w/ that as well? I mean I love this phone but it has a lot of issues. Lol No Video camera, u can't add videos other then ones recorede from a previous device, you can't save pictures w/ out emailing them to your self 1st. I mean come on now.!. This phone was the biggest thing and now nothing works really. Its still kool though. -- Pulkit Arora --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text-To-Speech
I Tested it on 1.0. It works! READ carefully the howto document. 2008/11/20, Pulkit Arora [EMAIL PROTECTED]: Is this actually working in emulator ?? which sdk does it support ?? On Thu, Nov 20, 2008 at 11:14 PM, Alvaro Rivas [EMAIL PROTECTED]wrote: May be you can use the freeTTS-Android interface. It's only for presentation purposes in the emulator. I Dont know if it is the best solution to resolver TTS problem, but may be it will be useful. http://sourceforge.net/projects/freettsandroidi/ 2008/11/19, Peach [EMAIL PROTECTED]: I am not able to even see this app on the Market. Can someone help me find it or something plz. Oh and what's been up w/ Aim, am I the only person still having issues w/ that as well? I mean I love this phone but it has a lot of issues. Lol No Video camera, u can't add videos other then ones recorede from a previous device, you can't save pictures w/ out emailing them to your self 1st. I mean come on now.!. This phone was the biggest thing and now nothing works really. Its still kool though. -- Pulkit Arora --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: FTP Client
hi if what you need is upload/download files to and from a server, I recommend you jakarta: http://jakarta.apache.org/commons On Nov 19, 10:03 pm, Phubeone [EMAIL PROTECTED] wrote: Is anyone out there working on a FTP client for Android or does anyone know if one is already available? I have been looking for awhile and haven't found anything. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] NUMBER_KEY not updated when phone number in Contacts is changed by user
There is a bug (first reported in January 2008, see http://markmail.org/message/33mcd6w7zgs76suy) that still exists on RC30, where if you Edit an existing contact and change its phone number (I tried it on mobile number, probably occurs for all numbers), the the internal representation of the number (stored in Phones Column NUMBER_KEY in reversed, stripped format) is not updated, and the contact is no longer searchable for that number_type. Is this considered a bug or is the number_key not changed to maintain some internal foreign key relationship? Google, is there a plan or ETA to fix this? thanks Jay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Notification details Activity never receives Intent used to fire it
Note that your pending intents still may collide with this mysterious request codes. Since we have the source code now, it may be good to check if this is really used or not, and how. 2008/11/20 Matthias [EMAIL PROTECTED] Guillaume, you're my hero. Thanks! Works like a champ now. Curse Google and their terrible documentation, I spent the whole day hunting down a bug that ain't there... great. Now I'll go home and bang my head at the wall for the rest of the day. On 20 Nov., 17:59, Guillaume Perrot [EMAIL PROTECTED] wrote: I have this bug too, It works better when I put a requestCode in the PendingIntent, but according to the documentation, this parameter is not used... Strange... Even by doing that it sometimes fail, but without that, it surely fails as you both noticed. Here is the way I post my notification: Notification notification = new Notification (R.drawable.public_post_icon, text, post.getPublishedDate().getTime()); notification.flags = Notification.FLAG_AUTO_CANCEL; notification.setLatestEventInfo(mContext, authorDisplayName + + PUBLISHED_A_POST, text, PendingIntent.getActivity(mContext, mRequestCodeIncrementor++, postIntent, 0)); I already filed a bug some months ago but no one at google read it... http://code.google.com/p/android/issues/detail?id=863 On Nov 20, 5:38 pm, Matthias [EMAIL PROTECTED] wrote: This gets weirder every minute. Just out of curiosity I just called setIntent(null) in onPause() to make sure the Intent the Activity was started with is always reset. As soon as I start the Activity again though, getIntent() will AGAIN return the Intent I supposedly set to null before.. this Intent it returns even exists across re-deployments of the whole application (not across emulator reboots tho)! Am I the only one having these problems? ^^ This whole thing looks completely broken to me. None of the functionalities I used exposed the behavior that was documented. On 20 Nov., 17:03, Matthias [EMAIL PROTECTED] wrote: I think this may be a bug in Android. I also tried following the instructions from the docs under section Launch Modes and Launch Flags with no success. That section suggested to declare any Activity launched from NotificationManager to set the taskAffinitity to and finishOnTaskLaunch to true, so that the Activity does a clean start everytime it is called. Even though the Activity is completely restarted now (onStart() is called), getIntent() always yields the same intent, the one it was started with for the very first time... On 20 Nov., 14:17, Matthias [EMAIL PROTECTED] wrote: Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Changing Google image server
I am looking for a way to change which Google server our Android app will look too when pulling in imagery. We have an Enterprise Google server purchased from Google that will serve up imagery. Does anyone know of anyway to get Android pointing to that server instead of the public Google server? Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ViewFlipper onFlipListener
I don't understand it - you tell ViewFlipper to flip views, it doesn't flip anything on it's own. So why can't you keep track of your views in the event handler that initiates your flips? On Nov 20, 4:38 am, Ngewi [EMAIL PROTECTED] wrote: Hi everyone, I am using the ViewFlipper class with automatic flipping through views. Is there a way to get notified or register a listener to be called each time just before a new child view is displayed. (i.e with automatic flipping ). So far I have not seen any listeners in the documentation for this purpose. I would also like to use this to check, each time a view is loaded, if it is the last and return to the calling activity instead wrapping around to start from the beginning of the ViewFlipper child views. If someone has any bright ideas please share. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Need help using hat to track down memory usage
On Nov 20, 9:48 am, qvark [EMAIL PROTECTED] wrote: If the output is not compatible with a standard hprof format, could somebody at Google point out the differences and the motivations for them? With such advice we could try to adapt a tool or make the format compatible with the existing ones... In the git sources, see dalvik/vm/hprof/Hprof.h and the list of tags commented Android. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
Agreed, it's very hard to do something innovative when I can't even do simple things like fire off a few sounds on demand and have it work in any kind of synchronous manner. I hope MediaPlayer is getting a lot of attention, I have two apps on hold right now for this very reason. On Nov 20, 11:24 am, blindfold [EMAIL PROTECTED] wrote: Absolutely. The reference point for me is Java ME, where this works fine. This was also part of the discussion with issue 739http://code.google.com/p/android/issues/detail?id=739 I have no idea what patches Android needs, given its design where - as far as I understand - MediaPlayer is more or less a stand-alone and closed-source native application that communicates with Android? Linux pipes? Does that cover circular audio buffers? On Nov 20, 6:24 pm, Robert Green [EMAIL PROTECTED] wrote: Agreed. The API really needs input and output streams. It's tough to make any creative audio application the way it is right now.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text-To-Speech
Thanks for the reference Alvaro.. On Thu, Nov 20, 2008 at 11:26 PM, Alvaro Rivas [EMAIL PROTECTED]wrote: I Tested it on 1.0. It works! READ carefully the howto document. 2008/11/20, Pulkit Arora [EMAIL PROTECTED]: Is this actually working in emulator ?? which sdk does it support ?? On Thu, Nov 20, 2008 at 11:14 PM, Alvaro Rivas [EMAIL PROTECTED]wrote: May be you can use the freeTTS-Android interface. It's only for presentation purposes in the emulator. I Dont know if it is the best solution to resolver TTS problem, but may be it will be useful. http://sourceforge.net/projects/freettsandroidi/ 2008/11/19, Peach [EMAIL PROTECTED]: I am not able to even see this app on the Market. Can someone help me find it or something plz. Oh and what's been up w/ Aim, am I the only person still having issues w/ that as well? I mean I love this phone but it has a lot of issues. Lol No Video camera, u can't add videos other then ones recorede from a previous device, you can't save pictures w/ out emailing them to your self 1st. I mean come on now.!. This phone was the biggest thing and now nothing works really. Its still kool though. -- Pulkit Arora -- Pulkit Arora --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Linkify addresses
Does anyone have any idea what MAP_ADDRESSES pattern supposed to match? I added Linkify ALL to my EditText and it properly matches all URLs and phone numbers but does nothing for addresses. Also Linkify thinks that any number is a phone number which is insane - what were google dudes smoking and more to the point where can I get the same good stuff :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
And I'm using SoundPool which is an unsupported API, but it still doesn't offer streaming from memory capabilities. On Nov 20, 12:37 pm, Sundog [EMAIL PROTECTED] wrote: Agreed, it's very hard to do something innovative when I can't even do simple things like fire off a few sounds on demand and have it work in any kind of synchronous manner. I hope MediaPlayer is getting a lot of attention, I have two apps on hold right now for this very reason. On Nov 20, 11:24 am, blindfold [EMAIL PROTECTED] wrote: Absolutely. The reference point for me is Java ME, where this works fine. This was also part of the discussion with issue 739http://code.google.com/p/android/issues/detail?id=739 I have no idea what patches Android needs, given its design where - as far as I understand - MediaPlayer is more or less a stand-alone and closed-source native application that communicates with Android? Linux pipes? Does that cover circular audio buffers? On Nov 20, 6:24 pm, Robert Green [EMAIL PROTECTED] wrote: Agreed. The API really needs input and output streams. It's tough to make any creative audio application the way it is right now.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
On Thu, Nov 20, 2008 at 11:24 AM, Dorn Hetzel [EMAIL PROTECTED] wrote: There already are Android-specific classes and methods for a lot of audio-related functionality... At least for my applications, which would be new code for the android platform, not ports from somewhere else, I don't care if it's javax.sound or whatever, as long as I can move bits from mic--memory and memory-speaker. Even with caveats about having to rewrite stuff later when things change, I would still like to use any capabilities available today on the G1 through the 1.0 SDK. Can you provide any additional clues or even documentation or examples of such interfaces to they extent they exist in any useable form? The Android API for such stuff is in the android.media package. Find online docs for it here: http://code.google.com/android/reference/android/media/package-summary.html Warm regards, -dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
Dan, There already are Android-specific classes and methods for a lot of audio-related functionality... At least for my applications, which would be new code for the android platform, not ports from somewhere else, I don't care if it's javax.sound or whatever, as long as I can move bits from mic--memory and memory-speaker. Even with caveats about having to rewrite stuff later when things change, I would still like to use any capabilities available today on the G1 through the 1.0 SDK. Can you provide any additional clues or even documentation or examples of such interfaces to they extent they exist in any useable form? Regards, Dorn Hetzel On Thu, Nov 20, 2008 at 2:07 PM, Dan Bornstein [EMAIL PROTECTED] wrote: On Thu, Nov 20, 2008 at 6:10 AM, Robert Green [EMAIL PROTECTED] wrote: That's very unfortunate. iPhone has one up on the android in this arena. There are two separate questions here, I think. One is about improved audio support. The other is about whether that support will come in the form of an implementation of the javax sampled sound API. We are absolutely committed to improving audio support. There already are Android-specific classes and methods for a lot of audio-related functionality, but we know full well that there is much more that could be done. You can safely expect to see us continue to improve the Android-specific API. We did have a go at implementing javax.sound for 1.0, but effectively due to time constraints, we were not able to bring that code up to production quality. So, rather than ship an attractive nuisance that would have caused developers pain, agony, and suffering, we decided instead that the platform API would be better off without it, for now. There is nothing that you could have done using the javax API, as implemented, that you couldn't have also done using the Android-specific API; the difference is more that porting pre-existing code would have been easier if the more standard API were in place (and if it worked as expected). You can find the javax.sound code, as it currently exists, in the open source tree at /platform/dalvik/libcore-disabled/. When Dianne said... Contributing patches would be a much more effective approach than a petition. ...the specific patches she presumably meant would be patches to make this as-yet incomplete code into a stable, usable, library. -dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
Dan, I must be overlooking something? The only audio input method that I can find documented there is MediaRecorder, and it seems to only know how to send audio to a file. Can you point a little more closely at whatever method will allow collecting audio input to a memory buffer and sending audio from a buffer to output? Thanks! -Dorn On Thu, Nov 20, 2008 at 2:29 PM, Dan Bornstein [EMAIL PROTECTED] wrote: On Thu, Nov 20, 2008 at 11:24 AM, Dorn Hetzel [EMAIL PROTECTED] wrote: There already are Android-specific classes and methods for a lot of audio-related functionality... At least for my applications, which would be new code for the android platform, not ports from somewhere else, I don't care if it's javax.sound or whatever, as long as I can move bits from mic--memory and memory-speaker. Even with caveats about having to rewrite stuff later when things change, I would still like to use any capabilities available today on the G1 through the 1.0 SDK. Can you provide any additional clues or even documentation or examples of such interfaces to they extent they exist in any useable form? The Android API for such stuff is in the android.media package. Find online docs for it here: http://code.google.com/android/reference/android/media/package-summary.html Warm regards, -dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text-To-Speech
hopefully! I'm european citizen, so no G1 available. Did you get latency problems with the emulator? 2008/11/20 blindfold [EMAIL PROTECTED] Did anyone try it on the T-Mobile G1? Is TTS latency acceptable there? Thanks On Nov 20, 6:56 pm, Alvaro Rivas [EMAIL PROTECTED] wrote: I Tested it on 1.0. It works! READ carefully the howto document. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Scrolling with Multiple ListViews
Hello all, I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling. Does anyone have any suggestions, or will I need to programmatically add the list items to some layout and hope for the best? -- Andrew Burgess --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Scrolling with Multiple ListViews
Hi, ListView is a virtualized component, it displays only as many items as it needs, which is why you cannot put it in inside a ScrollView. The only way to make it work is to give a fixed height to the ListView yourself. This is however a very bad idea to put a scrollable widget inside a scrollable widget. If you do this, touch scroll will become very weird: when the user tries to scroll the ListView inside the ScrollView, what should scroll? The ListView or the ScrollView? It also makes keyboard navigation incredibly difficult for the user: to scroll the ScrollView he would have to scroll through the entire ListView first. You should really NOT do this, this will not work correctly. On Thu, Nov 20, 2008 at 11:52 AM, Andrew Burgess [EMAIL PROTECTED] wrote: Hello all, I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling. Does anyone have any suggestions, or will I need to programmatically add the list items to some layout and hope for the best? -- Andrew Burgess -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Scrolling with Multiple ListViews
So essentially multiple ListViews on a single screen are a pretty big no-no. Fair enough, I'll try something else. Thanks for the response. On Thu, Nov 20, 2008 at 3:01 PM, Romain Guy [EMAIL PROTECTED] wrote: Hi, ListView is a virtualized component, it displays only as many items as it needs, which is why you cannot put it in inside a ScrollView. The only way to make it work is to give a fixed height to the ListView yourself. This is however a very bad idea to put a scrollable widget inside a scrollable widget. If you do this, touch scroll will become very weird: when the user tries to scroll the ListView inside the ScrollView, what should scroll? The ListView or the ScrollView? It also makes keyboard navigation incredibly difficult for the user: to scroll the ScrollView he would have to scroll through the entire ListView first. You should really NOT do this, this will not work correctly. On Thu, Nov 20, 2008 at 11:52 AM, Andrew Burgess [EMAIL PROTECTED] wrote: Hello all, I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling. Does anyone have any suggestions, or will I need to programmatically add the list items to some layout and hope for the best? -- Andrew Burgess -- Romain Guy www.curious-creature.org -- Andrew Burgess --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Scrolling with Multiple ListViews
You can put multiple ListView on the same screen if they all fit together on screen. But I would find that UI design questionable :) On Thu, Nov 20, 2008 at 12:05 PM, Andrew Burgess [EMAIL PROTECTED] wrote: So essentially multiple ListViews on a single screen are a pretty big no-no. Fair enough, I'll try something else. Thanks for the response. On Thu, Nov 20, 2008 at 3:01 PM, Romain Guy [EMAIL PROTECTED] wrote: Hi, ListView is a virtualized component, it displays only as many items as it needs, which is why you cannot put it in inside a ScrollView. The only way to make it work is to give a fixed height to the ListView yourself. This is however a very bad idea to put a scrollable widget inside a scrollable widget. If you do this, touch scroll will become very weird: when the user tries to scroll the ListView inside the ScrollView, what should scroll? The ListView or the ScrollView? It also makes keyboard navigation incredibly difficult for the user: to scroll the ScrollView he would have to scroll through the entire ListView first. You should really NOT do this, this will not work correctly. On Thu, Nov 20, 2008 at 11:52 AM, Andrew Burgess [EMAIL PROTECTED] wrote: Hello all, I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling. I've tried using a ScrollView with a LinearLayout child, and putting my ListViews in the LinearView, but all of the ListViews lock to a fixed height with scroll bars. Using other kinds of Layouts means no scrolling. Does anyone have any suggestions, or will I need to programmatically add the list items to some layout and hope for the best? -- Andrew Burgess -- Romain Guy www.curious-creature.org -- Andrew Burgess -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
Thanks Dan, that is quite informative! We are absolutely committed to improving audio support. Great to hear that! You can find the javax.sound code, as it currently exists, in the open source tree at /platform/dalvik/libcore-disabled/. OK, at http://android.git.kernel.org/?p=platform/dalvik.git;a=tree;f=libcore-disabled When Dianne said... Contributing patches would be a much more effective approach than a petition. ...the specific patches she presumably meant would be patches to make this as-yet incomplete code into a stable, usable, library. My concern is that at its lowest level javax.sound too is mostly hampered by Android MediaPlayer being a more or less stand-alone and closed-source native application that communicates with Android through a too limited set of methods and data structures (e.g., files). In that case even a perfect javax.sound implementation at Java level still does not help to solve our current problems. BTW, I'm not too fond of javax.sound myself because of its rather complexity/ functionality ratio, so I personally do not push for its implementation and support anyway. There is nothing that you could have done using the javax API, as implemented, that you couldn't have also done using the Android-specific API Or I suppose also vice versa, what cannot be done with the Android- specific API (in terms of in-memory work) could also not be done in javax.sound, because the implementation bottleneck is mostly in the low-level interface with the native MediaPlayer engine, which lacks shared memory features (e.g., for direct access to audio buffers) for concern about possible security issues? For me a major step forward would already be when the Android-specific MediaPlayer API for setDataSource() gets extended with methods that accept a byte array (or stream, or other in-memory data structure) as its argument - plus of course the low level implementation to make it interface with the native MediaPlayer engine. I cannot see in media/ jni/android_media_MediaPlayer.cpp what degrees of freedom process_media_player_call() offers through its arguments, and none of this seems described in public documents? This may cripple third-party development of those proposed patches. Maybe I see things too gloomy? I stand corrected! Thanks On Nov 20, 8:07 pm, Dan Bornstein [EMAIL PROTECTED] wrote: On Thu, Nov 20, 2008 at 6:10 AM, Robert Green [EMAIL PROTECTED] wrote: That's very unfortunate. iPhone has one up on the android in this arena. There are two separate questions here, I think. One is about improved audio support. The other is about whether that support will come in the form of an implementation of the javax sampled sound API. We are absolutely committed to improving audio support. There already are Android-specific classes and methods for a lot of audio-related functionality, but we know full well that there is much more that could be done. You can safely expect to see us continue to improve the Android-specific API. We did have a go at implementing javax.sound for 1.0, but effectively due to time constraints, we were not able to bring that code up to production quality. So, rather than ship an attractive nuisance that would have caused developers pain, agony, and suffering, we decided instead that the platform API would be better off without it, for now. There is nothing that you could have done using the javax API, as implemented, that you couldn't have also done using the Android-specific API; the difference is more that porting pre-existing code would have been easier if the more standard API were in place (and if it worked as expected). You can find the javax.sound code, as it currently exists, in the open source tree at /platform/dalvik/libcore-disabled/. When Dianne said... Contributing patches would be a much more effective approach than a petition. ...the specific patches she presumably meant would be patches to make this as-yet incomplete code into a stable, usable, library. -dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
On Thu, Nov 20, 2008 at 12:16 PM, blindfold [EMAIL PROTECTED] wrote: You can find the javax.sound code, as it currently exists, in the open source tree at /platform/dalvik/libcore-disabled/. [...] ...the specific patches she presumably meant would be patches to make this as-yet incomplete code into a stable, usable, library. My concern is that at its lowest level javax.sound too is mostly hampered by Android MediaPlayer being a more or less stand-alone and closed-source native application that communicates with Android through a too limited set of methods and data structures (e.g., files). In that case even a perfect javax.sound implementation at Java level still does not help to solve our current problems. The original request was (and the subject line still is) specifically about functionality in javax.sound. I responded in that context. My later remarks were meant to frame the larger picture. Briefly put, we agree. -dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Text-To-Speech
Hi Alvaro, I haven't tried (your) TTS, but with my own app, which writes audio to flash in order to play it through MediaPlayer, I got a user report that it takes four or five seconds for a sound update on the G1 while it runs fairly smoothly on the emulator (less than one second latency there). That is unacceptably slow, much slower than what I find with regular Nokia phones running my MIDlet counterpart which is programmed in Java ME and which does not need access to flash memory for its main functionality. For my app the Android emulator (which emulates flash but uses the hard-disk and maybe some in-memory caching) appears significantly faster than the physical Android phone, but I do not know if the bottleneck is access to flash or something else. Hence my question how the TTS runs on the G1 as compared to the emulator. I'm a European (non-UK) citizen too, so I have no G1 either to experiment with. On Nov 20, 8:48 pm, Alvaro Rivas [EMAIL PROTECTED] wrote: hopefully! I'm european citizen, so no G1 available. Did you get latency problems with the emulator? 2008/11/20 blindfold [EMAIL PROTECTED] Did anyone try it on the T-Mobile G1? Is TTS latency acceptable there? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: javax.net.ssl.SSLException: Not trusted server certificate
Are you using a commercial SSL cert vendor like VeriSign. If not you need to either disable certficate validation or install the trust anchor of the SSL cert. I don't have the G1 som I only know how to do it on the emulator. It wasn't easy BTW since Android does not use the standard SUN format but a BouncyCastle variant. I did a converter since I have so many stores in SUN format: http://groups.google.com/group/android-developers/browse_thread/thread/1afdf215aa539ca9/6e3ec00d92eb5e32#6e3ec00d92eb5e32 Anders On Nov 20, 11:13 am, AnuR [EMAIL PROTECTED] wrote: Hi, While I am trying to post a web page using DefaultHttpClient httpclient = new DefaultHttpClient(); CookieStore cookies = httpclient.getCookieStore(); HttpPost Postmethod = new HttpPost(https://urlto post);// Submiting I agree page ArrayListBasicNameValuePair nvpairs = new ArrayList(); vpairs.add(new BasicNameValuePair(name1, value1)); nvpairs.add(new BasicNameValuePair(name2, value2)); nvpairs.add(new BasicNameValuePair(name3, value3)); httpclient.setCookieStore(cookies); UrlEncodedFormEntity p_entityIAgree = new UrlEncodedFormEntity (nvpairs); Postmethod .setEntity(new UrlEncodedFormEntity(nvpairs, HTTP.UTF_8)); Postmethod .setEntity(p_entityIAgree); ResponseHandlerString IAgreeresponseHandler = new BasicResponseHandler(); String IAgreeSubmitresponseBody = httpclient.execute(Postmethod , IAgreeresponseHandler); I am getting an error 11-20 12:36:22.589: WARN/System.err(366): javax.net.ssl.SSLException: Not trusted server certificate. why is it caused ? how Can i solve it? _ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: missing javax audio?
Fair enough. Sorry (also to Ethan) for perhaps distracting a bit from javax.sound even though Java ME supports much the same javax.sound AudioInputStream functionality that Ethan was specifically inquiring about. Glad to hear that our ideas match. It should help in getting the actual work done. Thanks On Nov 20, 9:23 pm, Dan Bornstein [EMAIL PROTECTED] wrote: The original request was (and the subject line still is) specifically about functionality in javax.sound. I responded in that context. My later remarks were meant to frame the larger picture. Briefly put, we agree. -dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: battery level
yes, u need to listen to the battery intents. I just put an app out in the marketplace (Power Manager)that does this On Nov 20, 12:14 pm, brs [EMAIL PROTECTED] wrote: Is there a way for an application to get access to the current percentage estimate of the battery charge level? Basically the number which is displayed in Settings-About phone-Status. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Fwd: Send DTMF
Yes Rimma's method works if the program wishes to play DTMF tones when the call connects. It also works if you replaced ; with ,. My further question is: How can an Android program play outgoing DTMF tones in the middle of a phone conversation? Is that possible? On Nov 9, 11:56 pm, Rimma Sukhovsky [EMAIL PROTECTED] wrote: Intent mIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: + phoneNumber + ; + dtmfSequence)); On Thu, Nov 6, 2008 at 12:09 PM, [EMAIL PROTECTED] [EMAIL PROTECTED]wrote: Hi, How do you do this ? (adding the DTMF sequence to the dialed number) Thanks. On Oct 23, 4:13 pm, legerb [EMAIL PROTECTED] wrote: I'm adding the DTMF sequence to the dialed number. This seems to work, but when the call is established I'm getting a confirmation dialog asking Send the following tones?. Is it possible to prevent this dialog from being shown? May be some additional permissions? Though I didn't find any relevant... Or is there a way to detect the dialog on screen in order to simulate a key stroke? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Market's Publish Button does nothing
Any error message? This process has been working for lots of other people, including myself --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Notification details Activity never receives Intent used to fire it
I am really not clear on exactly what you are doing or expecting, but one thing to watch out for -- when you get a PendingIntent, if there is already a PendingIntent matching the Intent you have been given (NOT including the extras), then you get that PendingIntent, NOT a new one. So if you want to change the extras you will either need to cancel the existing one, or modify something in the action, type, data, or category so that it doesn't match the existing one. This is covered (not very well) in the last paragraph of the PendingIntent documentation: http://code.google.com/android/reference/android/app/PendingIntent.html On Thu, Nov 20, 2008 at 8:38 AM, Matthias [EMAIL PROTECTED] wrote: This gets weirder every minute. Just out of curiosity I just called setIntent(null) in onPause() to make sure the Intent the Activity was started with is always reset. As soon as I start the Activity again though, getIntent() will AGAIN return the Intent I supposedly set to null before.. this Intent it returns even exists across re-deployments of the whole application (not across emulator reboots tho)! Am I the only one having these problems? ^^ This whole thing looks completely broken to me. None of the functionalities I used exposed the behavior that was documented. On 20 Nov., 17:03, Matthias [EMAIL PROTECTED] wrote: I think this may be a bug in Android. I also tried following the instructions from the docs under section Launch Modes and Launch Flags with no success. That section suggested to declare any Activity launched from NotificationManager to set the taskAffinitity to and finishOnTaskLaunch to true, so that the Activity does a clean start everytime it is called. Even though the Activity is completely restarted now (onStart() is called), getIntent() always yields the same intent, the one it was started with for the very first time... On 20 Nov., 14:17, Matthias [EMAIL PROTECTED] wrote: Hi, I have the following problem: When posting a new Notification, I pass along a PendingIntent used to fire up an Activity that shows details about this Notification. These details are passed as a Serializable Extra. However, the Intent holding the Extra is only updated once, when the Activity was started for the first time. If a new Notification arrives however, although I instantiate a new Intent, neither getIntent() nor onNewIntent() of said Activity deliver this new intent, instead they always deliver the Intent that was active when the Activity was started for the first time. I tried combining many of the flags that can be passed to Intents and PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is said to do exactly what I need, namely calling onNewIntent() with the new intent, but that's not the case), but no luck. So, how can I update my Activity with the Intent used to fire it, whenever the Activity is already running? Thanks, Matthias -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there a hook to run code on device shutdown (power off)?
Sorry, there is nothing available to find out when the device is being turned off. On Thu, Nov 20, 2008 at 5:37 AM, Jon Colverson [EMAIL PROTECTED] wrote: Hello. Part of the app I'm writing is a Service that does some work. If it hasn't finished when the user switches the device off I'd like to be able to save my state to a file and then restart the Service when the device starts up again. I can see how to start it up again (receive the ACTION_BOOT_COMPLETED Intent), but I can't figure out a way to run the saving code on shutdown. I was expecting my Service's onDestroy() to be called, but this doesn't seem to be the case. Thanks. -- Jon -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---