[android-developers] Re: AlarmManager woes
Basically, the more I think about it, unless I am missing something, I came to the conclusion that non-exact repeating alarams cannot be made to work reliably. They are fine for cases when you need to do somtheing somewhat frequently, like every hour, but for a long period repeat you have no way of knowing when to start the alarm. You MUST start the alarm when the app starts, so it can recover from Force Closes or for whatever reason the system decides to terminate it, but once you do that, you can get yourself into a cycle where you end up never firing the alarm if its period is long enough. I changed my app to use one-shot timers, and it seems to work for all cases I can think of, but I hate to lose the power saving feature of the inexact alarm. (Unless passing 0 as the interal for setInexactRepeating() would stop it from repeating, but that's not documented so.) On Apr 22, 1:47 pm, Zsolt Vasvari zvasv...@gmail.com wrote: Store a SharedPreference value that indicates the time you last set the alarm for, defaulting to 0. How would that work? If the alarm is killed by the system for whatever reason, how would the preference let me know if I need to restart the alarm or not? I think the only way to do this reliably is NOT to use repeating alarms, but just to use one-shot alarms. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Background service interaction - Activity paused
Hi all.. I am trying to make the interaction with a background service work. As I think it often happens, I need to call some method of the service from my main activity, and I need to be notified about some state changes from my service. What I have done is to bind the background service from the activity, and to pass it a callback interface to be called from the service. Now my question: let's suppose that the callback updates some view (ie a textview) with the state of the service. What should I do when the activity gets paused? Should I unregister the interface (and check if the interface to be called is not null in the service), like a basic observer pattern? And again: what would happen if I do not unregister the interface, and the service tries to update some gui element while the activity is not visible? I know this would be solved using the intents - broadcast receiver to notify the activity, but in my case the output given from the service is supposed to vary often, and I feel binding the service is a more suitable option in my case. Hope I was clear enough, Thanks a lot in advance Federico -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AlarmManager woes
On Fri, Apr 22, 2011 at 12:47 AM, Zsolt Vasvari zvasv...@gmail.com wrote: How would that work? If the alarm is killed by the system for whatever reason, how would the preference let me know if I need to restart the alarm or not? The preference would tell you the next time for which you had scheduled your alarm. When your app is run, instead of setting it for +24 hours, you set it based on the stored preference. If the time in the preference is in the past, then something went wrong, your alarm was killed and never fired so maybe your execute whatever it is you do on the alarm trigger at that very moment. However, If the time in preference is for the future, you're still on track and you set the alarm again *for that specified time* instead of +24, under the assumption that it may have been killed. When your alarm goes off, one of the actions you take is to reset the alarm for the next run. Yeah, I wouldn't use repeating alarms for what you cited - it's unreliable. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AlarmManager woes
On Fri, Apr 22, 2011 at 1:09 AM, TreKing treking...@gmail.com wrote: When your alarm goes off, one of the actions you take is to reset the alarm for the next run. And update the shared preference to indicate what time the next run is supposed to go off. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: AlarmManager woes
If I want to set an exact time, I can do that, of course. But the whole point of using inexact timers is that the system decides when it's the most efficient time to fire the alarm, which was perfect for my app.I cannot do this reliably without being able to query the AlarmManager. On Apr 22, 2:10 pm, TreKing treking...@gmail.com wrote: On Fri, Apr 22, 2011 at 1:09 AM, TreKing treking...@gmail.com wrote: When your alarm goes off, one of the actions you take is to reset the alarm for the next run. And update the shared preference to indicate what time the next run is supposed to go off. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Source for aOS 3 compatibility library
I'm having trouble with the android.support.v4.widget.SimpleCursorAdapter class. Is the source available so I can properly debug whats going on? The problem is that I'm using the loader model and have 5 rows returned with my cursor, however i only get one row drawn in the list despite the fact that the viewbinder is showing iteration through all columns of all rows (position is always 0 in the viewbinder). I've used similar code (almost exactly) for another project that was not using the compatibility library's SimpleCursorAdapter (Or loader api) and it was working fine, so I am assuming there is an issue with the compatibility library version, or that that what I'm doing only worked because of a bug in an older lib. Anyway, I kind of need the source in order to be able to see whats being called inside the class and why the position is not being advanced. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Scan for wifi networks when connected to 3G
My guess is that you cannot do this and for good reason. I would be pretty pissed, as a user, if some app pervented me to connect to my WIFI network at home. On Apr 22, 2:18 pm, seema seema22...@gmail.com wrote: Hi, I am developing an app where I would like to know the available Wi-Fi networks when connected to 3G. When I enable Wi-Fi, it automatically connects to a wifi network and disconnects from 3G. I want wifi to be enabled, but not connected to any wifi networks instead remain in 3G. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Source for aOS 3 compatibility library
Wow, no sooner did I send this than I find the source! sigh... I've left this here in case anyone else is looking for the source. It's in extras/android/compatibility for those that come across this post wondering the same thing. - Brill -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Source for aOS 3 compatibility library
No, I wouldn't wonder. That would be the very first place I'd look for it. I was just about to post a reply. On Apr 22, 2:34 pm, Brill Pappin bpap...@sixgreen.com wrote: Wow, no sooner did I send this than I find the source! sigh... I've left this here in case anyone else is looking for the source. It's in extras/android/compatibility for those that come across this post wondering the same thing. - Brill -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] new sdk and backwards compatibility
I have an app which uses mediametadataretriever to generate thumbnails for videos. In the older system, I always use the media_jni library and define my own mediametadataretriever class and it worked fine. With API level 10 or later, mediametadataretriever is an built-in API now. So, I am not sure what I should do. If I still build my project using earlier version of the SDk, then because media_jni library doesn't exist in the new sdk, so, my call will not work. If I import the new media.mediametadataretriever, then I have to use new sdk to build the project and use the new API to do it. It works on the new system, But my old code will not work anymore. So, what should I do now? Is splitting the project into 2, one for old system and use older sdk to build, and one for new system and use the latest sdk to build, the only option? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New to Android Need Help
No not offended, thank you very much for the input.. it really helped, but now i need to figure out how to make the images swap on their own when the system is playing (I am trying to do simon says) for my son :) Here is the improved code public class GameActivity extends Activity { /** Called when the activity is first created. */ ImageView imageView1; ImageView imageView2; ImageView imageView3; ImageView imageView4; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.myviewlay); imageView1= (ImageView)findViewById(R.id.ImageView01); imageView2= (ImageView)findViewById(R.id.ImageView02); imageView3= (ImageView)findViewById(R.id.ImageView03); imageView4= (ImageView)findViewById(R.id.ImageView04); imageView1.setOnTouchListener(mTouchListener); imageView2.setOnTouchListener(mTouchListener); imageView3.setOnTouchListener(mTouchListener); imageView4.setOnTouchListener(mTouchListener); } private OnTouchListener mTouchListener = new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { v.setVisibility(View.INVISIBLE); try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { try { Thread.sleep(100); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } v.setVisibility(View.VISIBLE); } return true; } }; } On Apr 22, 1:56 am, TreKing treking...@gmail.com wrote: On Fri, Apr 22, 2011 at 12:30 AM, edprog edwin...@gmail.com wrote: public class myView extends View implements OnTouchListener{} Sure. Or a member in the Activity that you then set on the ImageViews. private mTouchListener = new OnTouchListener() { /* CODE */ } ... imageView1.setOnTouchListener(mTouchListener); imageView2.setOnTouchListener(mTouchListener); imageView3.setOnTouchListener(mTouchListener); imageView4.setOnTouchListener(mTouchListener); Then you're still within the scope of the Activity which is usually handy. I think,... and yes it is a mess because in the main Activity is where at least I was able to make the user click on the images and swap them with another one while I tried the same from the view it did not work... it just shows a black screen, and I tried to look it up in the LogCat but did not tell me something that i would pick up right away. Yeah, graphics stuff is always a pain to debug and there's not much anyone can do to help with graphical issues like that. Just on the side note.., I am new to android, at least give me that,... Given :-) you might be an expert.. Hardly. I know what I need to know to do what I need to do. And I know where to look when I have to learn something new. ;-) Again, no offense, just going off what you said and the code you posted. Anyways, good luck. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: SQLite and DB query
David, I *think* your ListView is obscured by other views in playerlist.xml, or just has zero width/height. There is a bunch of views with fill_parent/fill_parent width and height... In fact it seems that the LinearLayout which is the parent of your ListView is pushed off the screen by the second (in the order of occurrence) LinearLayout, which is the header layout. I would recommend removing everything from the layout except for ListView, sizing it fill_parent / fill_parent, verifying that this works, and then adding other views one step at a time. -- Kostya 22.04.2011 1:43, David Williams пишет: Well, I did do a check on the cursor.getCount() and it did return a value of 1, which is what I was expecting. So, the issue must be with displaying the data. Here is my code for populating the data and displaying it, which I've taken from the notepad tutorial. Would appreciate any help. private void getAllPlayers() { // Get all of the notes from the database and create the item list //playerCursor = dbHelper.queryTable(PLAYERS_TABLE, ALL_PLAYER_COLS, null, null, null, null, null); playerCursor = dbHelper.rawQuery(SELECT * FROM players;); int pCount = playerCursor.getCount(); startManagingCursor(playerCursor); String[] plyData = new String[] { PLAYERS_SEX, PLAYERS_NAME, PLAYERS_HANDICAP }; int[] plyCols = new int[] { R.id.plyIcon ,R.id.plyName, R.id.plyHandicap }; // Now create an array adapter and set it to display using our row ListAdapter plyAdapter = new SimpleCursorAdapter(this, R.layout.players_rows, playerCursor, plyData, plyCols); setListAdapter(plyAdapter); } My 2 layouts for this are as follows: *playerslist.xml* ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent LinearLayout android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=0 android:gravity=left / TextView android:layout_width=wrap_content android:layout_height=wrap_content android:text=Name android:textSize=20sp android:layout_weight=1 android:textColor=#00 android:gravity=center / TextView android:textSize=20sp android:id=@+id/textView1 android:layout_height=wrap_content android:textColor=#00 android:text=Handicap android:layout_weight=0 android:gravity=right android:layout_width=wrap_content / /LinearLayout LinearLayout android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent ListView android:id=@android:id/list android:paddingBottom=10px android:layout_width=wrap_content android:layout_height=wrap_content/ TextView android:id=@android:id/empty android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center android:text=@string/no_players/ /LinearLayout /LinearLayout *players_rows.xml* ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=wrap_content android:orientation=vertical ImageView android:id=@+id/plyIcon android:layout_width=match_parent android:layout_height=wrap_content android:layout_weight=0 android:gravity=left / TextView android:id=@+id/plyName android:layout_width=match_parent android:layout_height=wrap_content android:textSize=14sp android:textColor=#FF android:gravity=left /TextView TextView android:id=@+id/plyHandicap android:layout_width=match_parent android:layout_height=wrap_content android:textSize=14sp android:textColor=#FF android:gravity=right /TextView /LinearLayout David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi: http://www.dtw-consulting.com/GolfCaddie Golf Caddie http://www.dtw-consulting.com/GolfCaddie | Golf Caddie Forum http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc. -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more
[android-developers] Re: new sdk and backwards compatibility
http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html On Apr 22, 2:39 pm, yves...@gmail.com yves...@gmail.com wrote: I have an app which uses mediametadataretriever to generate thumbnails for videos. In the older system, I always use the media_jni library and define my own mediametadataretriever class and it worked fine. With API level 10 or later, mediametadataretriever is an built-in API now. So, I am not sure what I should do. If I still build my project using earlier version of the SDk, then because media_jni library doesn't exist in the new sdk, so, my call will not work. If I import the new media.mediametadataretriever, then I have to use new sdk to build the project and use the new API to do it. It works on the new system, But my old code will not work anymore. So, what should I do now? Is splitting the project into 2, one for old system and use older sdk to build, and one for new system and use the latest sdk to build, the only option? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Source for aOS 3 compatibility library
Yah, I'd been trying to sort out that bug for long enough that anything else just wasn't part of my universal view :) Turned out the problem I was having was related to a ListView inside a ScrollView, which causes the position of the cursor to always be zero on every iteration. Note sure if its a bug, but essentially the list is built from ListVIew's onMeasure which arbitrarily sets a hard coded 0 position if onMeasure detects a measureSpec it doesn't like (or if the cursor is null, which is reasonable). Anyway, I didn't find it until I gave up and release my brain from its loop :) -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] about creating tables
How can i create two tables in single database successfully. plz suggest any easiest way to create 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] creating two tables
hii am trying to create two tables in single database.. but it is giving an error while inserting data in second table error is = there is no such table Atten .. that means 2nd table Atten is not created.. I have searched a lot for this.. but i am not getting any good solution.. .. I am posting my code below.. whether i am missing something.. or any error plz any suggestions are welcome.. public class helper { public static final String KEY_ROW_ID = _id; public static final String KEY_DESG_ID = desig_id; public static final String KEY_RB_ID = rb_id; public static String KEY_NAME = empname; public static final String KEY_PASSWD = passwd; public static final String KEY_GENDER = gender; public static final String KEY_DESIGNATION = designation; private static final String TAG = DBAdapter; private static final String DATABASE_NAME = emp_info; private static final String DATABASE_TABLE = emp; private static final int DATABASE_VERSION = 1; private static final String DB_NEW_TABLE = Atten; public static final String KEY_ID = _id; public static final String KEY_LG_ID = LG_id; public static final String KEY_ENAME=ename; public static final String KEY_DATE=date; public static final String KEY_DAYCOUNT = daycount; private static final String DATABASE_CREATE = create table emp ( _id integer primary key autoincrement,desig_id integer not null,rb_id integer not null,empname text not null,passwd text not null,gender text not null,designation text not null);; private static final String DB_CREATE = create table Atten( _id integer primary key autoincrement,FOREIGN KEY(LG_id) REFERENCES emp(_id) ,ename text not null, Date date , integer daycount not null);; private final Context context; private DatabaseHelper DBHelper; public SQLiteDatabase db; public helper(Context ctx) { this.context=ctx; DBHelper =new DatabaseHelper(context); } private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { try { db.execSQL(DB_CREATE); db.execSQL(DATABASE_CREATE); } catch(SQLiteException e) { Log.e(TAG,+e.getMessage()); } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log.w(TAG, Upgrading database from version + oldVersion + to + newVersion + , which will destroy all old data); db.execSQL(DROP TABLE IF EXISTS emp); db.execSQL(DROP TABLE IF EXISTS Atten); onCreate(db); } } //---opens the database--- public helper open() throws SQLException { // Log.e(TAG,in open...); db = DBHelper.getWritableDatabase(); return this; } //---closes the data--- public void close() { DBHelper.close(); } //---insert a employee into the data--- public boolean insertEmployee(int desig_id,int rb_id ,String uname, String pwd, String gender,String desig) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_DESG_ID,desig_id); initialValues.put(KEY_RB_ID, rb_id); initialValues.put(KEY_NAME, uname); initialValues.put(KEY_PASSWD, pwd); initialValues.put(KEY_GENDER, gender); initialValues.put(KEY_DESIGNATION , desig); db.insert(DATABASE_TABLE, null, initialValues); return true; } public boolean insertAtten(int Empid,String Name, java.sql.Date dt , int daycnt) { ContentValues cv = new ContentValues(); cv.put(KEY_LG_ID,Empid); cv.put(KEY_ENAME, Name); cv.put(KEY_DATE, String.valueOf(dt)); cv.put(KEY_DAYCOUNT,daycnt); db.insert( DB_NEW_TABLE, null,cv); return true; } } -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Ant and Android
$your_sdk_dir$/Android/platforms/android-8/ant On Apr 14, 6:58 am, luiX_ lui...@gmail.com wrote: please, can you provide a link? thx :D 2011/4/14 Paul Turchenko paul.turche...@gmail.com see sdk. They have all ant scripts implemented there. On Apr 12, 9:14 pm, Sam samira_hi...@hotmail.com wrote: Hi, I'm setting up an automated build system using Ant, for our Android project. As a starting point, I've simply exported the required build.xml through Eclipse. If I clean the project, and run ant in the command line at the root of the our Android project, I receive the following compile error: package R does not exist On the other hand, if I build the project through Eclipse, then the R.java is generated for me. How can I have my Ant build generate R.java for me? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Search dialog and searching within the same activity
Hi Spiral, with search dialog I mean the search bar that came up at the top of the current activity if it is searchable when the user hits the device search button. The user hits this button then onSearchRequested() of my map activity will be called. I use startSearch(). Don't forget, the map activity is searchable so it is instantiated new and onCreate() will be called. But this is not the same activity where the search was requestet, its a new instance. When the user goes back using the device back button for example, the second map activity (opened for display the search results) will be closed and the first is shown again - this is not really nice and I don't want to use a lit view to display the search result, I want to mark the first found result within the map and ste the center to it and when the user wants to return he should come back to the very first activity that opened the map activity. Yesterday, late night, I thought about this... should I finish() the search result activity within the onCreate() and give back the results to the first one? But how can I do this, I not called it using startActivityForResult(). Thank you very much! -Danny On Apr 22, 12:46 am, Spiral123 cumis...@gmail.com wrote: hi danny. If you have a dialog where the user can search for an address, then show the results of that search within the dialog - then the back button will quit the dialog with the search results and return to the original map activity - which is what I think you want to achieve. It does make the search dialog more complex though. On Apr 21, 6:13 pm, Danny S. danny.schi...@googlemail.com wrote: Hi, i have a map activity and added a search dialog where the user can search for an address. The map activity is searchable. The search works very well, but when the search is started the activity startet a new instance of map activity. Is there a way to show search results in the same activity where the search was executed? Because when the user uses the back button the same (map) view is shown again, but he should go to the activity where the map activity was called from. Hope you can help! Thanks a lot! -Danny Schimke -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Monkey Exception BAD TOKEN
Hi, I ran monkey on my device and getting exception #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x1000;component=com.android.camera/.VideoCamera;end // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.android.camera/.VideoCamera } in package com.android.camera :Sending Pointer ACTION_DOWN x=684.0 y=467.0 :Sending Pointer ACTION_UP x=684.0 y=467.0 // Allowing start of Intent { act=android.intent.action.SEARCH cmp=com.android.browser/.BrowserActivity } in package com.android.browser :Sending Pointer ACTION_MOVE x=-4.0 y=-1.0 // Allowing start of Intent { act=android.intent.action.WEB_SEARCH cat=[android.intent.category.DEFAULT] cmp=com.google.android.googlequicksearchbox/.google.GoogleSearch } in package com.google.android.googlequicksearchbox // Allowing start of Intent { act=android.intent.action.VIEW dat=http://www.google.com/m?hl=engl=usclient=ms-android- dellsource=android-browser-typeq=s cmp=com.android.browser/.BrowserActivity } in package com.android.browser // activityResuming(com.android.browser) :Sending Pointer ACTION_MOVE x=-5.0 y=-5.0 :Sending Pointer ACTION_DOWN x=608.0 y=11.0 :Sending Pointer ACTION_UP x=608.0 y=11.0 :Sending Pointer ACTION_DOWN x=683.0 y=261.0 :Sending Pointer ACTION_UP x=683.0 y=261.0 // CRASH: com.android.camera (pid 1407) // Short Msg: android.view.WindowManager$BadTokenException // Long Msg: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? // Build Label: dell/streak/streak:2.3.3/GINGERBREAD/eng.root. 20110421.224959:eng/release-keys // Build Changelist: 0 // Build Time: 1303407187000 // android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? // at android.view.ViewRoot.setView(ViewRoot.java:528) // at android.view.WindowManagerImpl.addView(WindowManagerImpl.java: 177) // at android.view.WindowManagerImpl.addView(WindowManagerImpl.java: 91) // at android.view.Window$LocalWindowManager.addView(Window.java:424) // at com.android.camera.OnScreenHint.handleShow(OnScreenHint.java: 162) // at com.android.camera.OnScreenHint.access$000(OnScreenHint.java: 42) // at com.android.camera.OnScreenHint$1.run(OnScreenHint.java:180) // at android.os.Handler.handleCallback(Handler.java:587) // at android.os.Handler.dispatchMessage(Handler.java:92) // at android.os.Looper.loop(Looper.java:123) // at android.app.ActivityThread.main(ActivityThread.java:3683) // at java.lang.reflect.Method.invokeNative(Native Method) // at java.lang.reflect.Method.invoke(Method.java:507) // at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:864) // at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) // at dalvik.system.NativeStart.main(Native Method) // ** Monkey aborted due to error Any idea about this? What is the significance of this message? It seems it generated from camera. How to debug this?? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Search dialog and searching within the same activity
On Fri, Apr 22, 2011 at 5:14 PM, Danny S. danny.schi...@googlemail.com wrote: Hi Spiral, with search dialog I mean the search bar that came up at the top of the current activity if it is searchable when the user hits the device search button. The user hits this button then onSearchRequested() of my map activity will be called. I use startSearch(). Don't forget, the map activity is searchable so it is instantiated new and onCreate() will be called. But this is not the same activity where the search was requestet, its a new instance. Make your map activity singleTop. http://developer.android.com/guide/topics/search/search-dialog.html#LifeCycle -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Mouse events on table layout
Intercept onTouch event On Apr 21, 8:18 am, swetha akkina.swe...@gmail.com wrote: Hi, I am developing a sample application, in which I need to handle mouse events on table layout. Could you please let me know how to proceed further. Thanks in advance. Regards, Swetha -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Monkey Exception BAD TOKEN
Hi, I ran monkey on my device and getting exception #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x1000;component=com.android.camera/.VideoCamera;end // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.android.camera/.VideoCamera } in package com.android.camera :Sending Pointer ACTION_DOWN x=684.0 y=467.0 :Sending Pointer ACTION_UP x=684.0 y=467.0 // Allowing start of Intent { act=android.intent.action.SEARCH cmp=com.android.browser/.BrowserActivity } in package com.android.browser :Sending Pointer ACTION_MOVE x=-4.0 y=-1.0 // Allowing start of Intent { act=android.intent.action.WEB_SEARCH cat=[android.intent.category.DEFAULT] cmp=com.google.android.googlequicksearchbox/.google.GoogleSearch } in package com.google.android.googlequicksearchbox // Allowing start of Intent { act=android.intent.action.VIEW dat=http://www.google.com/m?hl=engl=usclient=ms-android- dellsource=android-browser-typeq=s cmp=com.android.browser/.BrowserActivity } in package com.android.browser // activityResuming(com.android.browser) :Sending Pointer ACTION_MOVE x=-5.0 y=-5.0 :Sending Pointer ACTION_DOWN x=608.0 y=11.0 :Sending Pointer ACTION_UP x=608.0 y=11.0 :Sending Pointer ACTION_DOWN x=683.0 y=261.0 :Sending Pointer ACTION_UP x=683.0 y=261.0 // CRASH: com.android.camera (pid 1407) // Short Msg: android.view.WindowManager$BadTokenException // Long Msg: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? // Build Label: dell/streak/streak:2.3.3/GINGERBREAD/eng.root. 20110421.224959:eng/release-keys // Build Changelist: 0 // Build Time: 1303407187000 // android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? // at android.view.ViewRoot.setView(ViewRoot.java:528) // at android.view.WindowManagerImpl.addView(WindowManagerImpl.java: 177) // at android.view.WindowManagerImpl.addView(WindowManagerImpl.java: 91) // at android.view.Window$LocalWindowManager.addView(Window.java:424) // at com.android.camera.OnScreenHint.handleShow(OnScreenHint.java: 162) // at com.android.camera.OnScreenHint.access$000(OnScreenHint.java: 42) // at com.android.camera.OnScreenHint$1.run(OnScreenHint.java:180) // at android.os.Handler.handleCallback(Handler.java:587) // at android.os.Handler.dispatchMessage(Handler.java:92) // at android.os.Looper.loop(Looper.java:123) // at android.app.ActivityThread.main(ActivityThread.java:3683) // at java.lang.reflect.Method.invokeNative(Native Method) // at java.lang.reflect.Method.invoke(Method.java:507) // at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:864) // at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) // at dalvik.system.NativeStart.main(Native Method) // ** Monkey aborted due to error Any idea about this? What is the significance of this message? It seems it generated from camera. How to debug this?? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Search dialog and searching within the same activity
Perfect, I read most parts of the search dialog documentation but I have not seen this very important part for me. Now it works like I wanted. Thanks a lot! Now I am really happy! -Danny Schimke 2011/4/22 Nikolay Elenkov nikolay.elen...@gmail.com On Fri, Apr 22, 2011 at 5:14 PM, Danny S. danny.schi...@googlemail.com wrote: Hi Spiral, with search dialog I mean the search bar that came up at the top of the current activity if it is searchable when the user hits the device search button. The user hits this button then onSearchRequested() of my map activity will be called. I use startSearch(). Don't forget, the map activity is searchable so it is instantiated new and onCreate() will be called. But this is not the same activity where the search was requestet, its a new instance. Make your map activity singleTop. http://developer.android.com/guide/topics/search/search-dialog.html#LifeCycle -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Use of files
Thank you both for your answer! The thing is, in my company we already have working libraries and that is the reason why I have to use jni. So most of the work is done in native code, most of time I use Java for GUI part.. So I think i would be a performance issue (applications is constantly managing with changes..I few times in a second) if I were calling from native java methods if we write something to a file.. So I will send getFilesDir() to my native library and also change the write permission for the file - MODE_WORLD_WRITEABLE (if it really has a different ID, then it will be visible for others). I will also post this to the NDK group..but thanks again! -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Built-in camera problem deleting files
Hi! I answer myself: maybe is not the best solution but after deleting the file, this is what I do: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse(file:// + Environment.getExternalStorageDirectory(; we need to add this to the manifest: intent-filter action android:name=android.intent.action.MEDIA_MOUNTED / data android:scheme=file / /intent-filter (I found the solution here: http://stackoverflow.com/questions/4430888/android-file-delete-leaves-empty-placeholder-in-gallery) On Apr 21, 11:32 am, Fina Perez fina.pere...@gmail.com wrote: Hi all! I'm using the built-in camera in my app to take a picture and to save it in a database. So, from my activity, I launch the camera, take a picture and go back to the activity (thanks to onActivityResult method). Here, I store the picture in the database and I delete it from the phone. Seems to be working properly: the picture is being deleted from the sdcard but if you go to the gallery app that comes with the device, the picture is being displayed but as a wrong file, so you can see that there is/was a picture there but you can't open it or even see the preview. But I can delete it from the gallery app manually (selecting them and then deleting). How can i do this programatically? Thanks a lot! I really need help with this -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] service status
How to set service status like status:visible background... please help me how to do 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to disable key press events!!
Dear all, I need to disable the key events (any key pressed) for some predefined time. How the key pressed events be disabled? Regards, Pratik -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Back Trace in Android
Hi, How to get back trace in 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Back Trace in Android
Hi, How to get back trace in 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Back Trace in Android
WHat's a Back Trace? Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] getting gps status events
*IIRC *If you have a mapView and you enable the MyLocationOverlay you get the same effect. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] service status
1. RTFM 2. there's nothing like service visibility Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * On 22 April 2011 11:55, rakshith raj matrix...@gmail.com wrote: How to set service status like status:visible background... please help me how to do 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to disable key press events!!
Use own listener and eat all releated events. But anyway, this does not sound as good idea though. What for you need this (especially most devices got nothing like keys available all the time) for? Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * On 22 April 2011 12:08, Pratik pratik.prajap...@gmail.com wrote: Dear all, I need to disable the key events (any key pressed) for some predefined time. How the key pressed events be disabled? Regards, Pratik -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Use of files
Do not make the file MODE_WORLD_WRITEABLE unless you don't mind when people hack your files. On Fri, Apr 22, 2011 at 4:41 AM, Jernej K. jernej.klan...@gmail.com wrote: Thank you both for your answer! The thing is, in my company we already have working libraries and that is the reason why I have to use jni. So most of the work is done in native code, most of time I use Java for GUI part.. So I think i would be a performance issue (applications is constantly managing with changes..I few times in a second) if I were calling from native java methods if we write something to a file.. So I will send getFilesDir() to my native library and also change the write permission for the file - MODE_WORLD_WRITEABLE (if it really has a different ID, then it will be visible for others). I will also post this to the NDK group..but thanks again! -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Source for aOS 3 compatibility library
On Fri, Apr 22, 2011 at 3:41 AM, Brill Pappin bpap...@sixgreen.com wrote: Turned out the problem I was having was related to a ListView inside a ScrollView, which causes the position of the cursor to always be zero on every iteration. You cannot reliably put scrollable things inside other scrollable things in Android. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AlarmManager woes
And moments after I pressed [Send], I notice Ms. Hackborn indicating on another thread that Force Stop from the Settings app will get rid of scheduled alarms as well. Given that, I'll agree with your general assessment -- inexact repeating alarms are practical for relatively short periods (e.g., an hour), but become progressively impractical with longer periods (e.g., a day). On Fri, Apr 22, 2011 at 7:24 AM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Apr 22, 2011 at 2:02 AM, Zsolt Vasvari zvasv...@gmail.com wrote: You MUST start the alarm when the app starts, so it can recover from Force Closes or for whatever reason the system decides to terminate it, but once you do that, you can get yourself into a cycle where you end up never firing the alarm if its period is long enough. The only scenarios that get rid of scheduled alarms that I am aware of are: -- Pre-2.2 task killers -- reboots -- upgrades of your app I have seen no evidence that a crash in your app, or Android shutting down an everlasting service, has any impact on scheduled alarms. If you have evidence to the contrary, I'd love to see it. The pre-2.2 task killers is still a big-time annoyance today, and definitely could cause problems in your scenario. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AlarmManager woes
On Fri, Apr 22, 2011 at 2:02 AM, Zsolt Vasvari zvasv...@gmail.com wrote: You MUST start the alarm when the app starts, so it can recover from Force Closes or for whatever reason the system decides to terminate it, but once you do that, you can get yourself into a cycle where you end up never firing the alarm if its period is long enough. The only scenarios that get rid of scheduled alarms that I am aware of are: -- Pre-2.2 task killers -- reboots -- upgrades of your app I have seen no evidence that a crash in your app, or Android shutting down an everlasting service, has any impact on scheduled alarms. If you have evidence to the contrary, I'd love to see it. The pre-2.2 task killers is still a big-time annoyance today, and definitely could cause problems in your scenario. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SAXParser throws exception for bad character in CDATA block, bug???
Unfortunately it appears he's parsing a vBulletin RSS feed, i.e. its most likely something he has little or no control over - and if the host he is scraping ever upgrades to a version that fixes this odd behavior (i.e. mixing character encodings) his app should not break if he supplies a Reader to the emergency fix that actually uses the character set declared by the server. Fortunately it appears he's parsing a vBulleting RSS feed - i.e. transient events that hopefully aren't super important in anything but the near scope. On 22 Apr, 02:46, Bob Kerns r...@acm.org wrote: Oh, one other model that may help put all this in context -- and make it plain that there really is no other way for it to be. The confusion here stems from confusing bytes and characters. XML works with characters. The encoding (UTF-8, ISO-8859-1) of an XML document refers to how a stream of characters is encoded into a stream of bytes -- and, on input, bytes into characters. XML is then defined in terms of a series of characters. CDATA then says how those characters are treated. The failure here, happens at the level of interpreting the bytes. The bytes that your byte stream is presenting, cannot be converted into ISO-8859-1 characters. FAIL. It hasn't even gotten to the XML parser. Depending on the buffering going on, in fact, the XML parser may not yet even have seen the start of the CDATA section. The failure here is simply that a supposed ISO-8859-1 stream -- is not. It really has nothing to do with CDATA or XML at all. Jens' approach operates at this level -- it turns a byte stream that is not a valid ISO-8859-1-encoded byte stream, into one that at least *appears* to be an ISO-8859-1-encoded byte stream. If it happens to be a UTF-8 byte stream (ISO-10646 encoded via UTF-8), it will be gibberish -- even many valid ISO-8859-1 characters will become gibberish bytes mis-interpreted, rather than the ISO-8859-1 characters they started out life as. That's why I don't like Jens' solution. (I doubt Jens likes it either -- this is a hold your nose sort of situation). It really has the potential to make things much worse. I hope that makes it a bit more clear. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Back Trace in Android
You can use strace compiled to arm. I tried and it works. 2011/4/22 Pandi pandiwelco...@gmail.com It is function trace/stack trace. Which will give who is calling what? On Apr 22, 3:51 pm, Kumar Bibek coomar@gmail.com wrote: WHat's a Back Trace? Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.com http://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Back Trace in Android
It is function trace/stack trace. Which will give who is calling what? On Apr 22, 3:51 pm, Kumar Bibek coomar@gmail.com wrote: WHat's a Back Trace? Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Back Trace in Android
strace is for native code. For Java code, there are useful functions in java.lang.Thread: http://developer.android.com/reference/java/lang/Thread.html static void dumpStack() static MapThread, StackTraceElement[] getAllStackTraces() StackTraceElement[] getStackTrace() -- Kostya 22.04.2011 15:49, Oscar Marques ?: You can use strace compiled to arm. I tried and it works. 2011/4/22 Pandi pandiwelco...@gmail.com mailto:pandiwelco...@gmail.com It is function trace/stack trace. Which will give who is calling what? On Apr 22, 3:51 pm, Kumar Bibek coomar@gmail.com mailto:coomar@gmail.com wrote: WHat's a Back Trace? Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com http://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com mailto:pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.com mailto:osca...@gmail.com http://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] seeking with av_seek_frame or url_seek
Hi, I try to save the keyframes. I found which frames are keyframes. I wrote two function to seek where the keyframes are. One of them is with av_seek_frame and the other is with url_seek ..but none of them work. Here in this function pFormatCtx-pb-pos values of frames are in keyFrames array.. but my function doesn't work. for(i=0;i=0){ pFormatCtx-pb-pos=packet.pos; if(pFormatCtx-pb-pos == keyFrames[i]){ int64_t byteposition = pFormatCtx-pb-pos; url_seek(pFormatCtx-pb,byteposition,SEEK_SET); avcodec_decode_video2(pCodecCtx, pFrame, frameFinished, packet); SaveFrame(pFrame, pCodecCtx-width, pCodecCtx-height,i++); break; } av_free_packet(packet); } Here in this function, keyframes array hold the number of which frames are keyframe..In this function framefinished is 0 and avcodec_decode_video returns -1. I think maybe I calculate timestamp wrong but I couldn't find why?! (index is length of the keyframe array..) for(i=0;iindex+1;i++){ int64_t timeStamp = (int64_t)((pFormatCtx-duration) / framecount)*keyFrames[i]/1000; av_seek_frame(pFormatCtx,-1,timeStamp,AVSEEK_FLAG_ANY); while(av_read_frame(pFormatCtx, packet)=0){ if (packet.pts = timeStamp){ int t=avcodec_decode_video2(pCodecCtx, pFrame, frameFinished,packet); if (frameFinished){ SaveFrame(pFrame, pCodecCtx-width, pCodecCtx- height,keyFrames[i]); break; } } av_free_packet(packet); } } Can you help me with one of these functions?? Thank you.. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SAXParser throws exception for bad character in CDATA block, bug???
It is in most cases, far better to instantly, irrevocably, fail. Don't let that bad data get any further. Very well written post, and I totally agree with in an ideal world. Unfortunately, we don't live in an ideal world, but in a world where if the app doesn't do as our users want, we end up with a bunch of 1- stars and our sales will suffer. So sometime, you have to do something reasonable with bad data. My app has to deal with this ALL the time. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: SAXParser throws exception for bad character in CDATA block, bug???
Agreed. Apps are often expected to deal with existing data even if it's malformed. From the user's point of view, it's but it worked in that other program(s), which unfortunately keeps supporting a particular bad data set further. A possible fix would be to let the user choose a character set for the data in question, or make a reasonable guess, perhaps both - combined with contacting the creators of such malformed data set, describing the issue and asking to fix it. This is not limited to XML either: browsers and email clients also offer ways for the user to specify the character set for the case when the data is malformed. For an internal project, this can be different - we will not accept your data unless you fix it is clearly the better choice. -- Kostya 22.04.2011 16:30, Zsolt Vasvari пишет: It is in most cases, far better to instantly, irrevocably, fail. Don't let that bad data get any further. Very well written post, and I totally agree with in an ideal world. Unfortunately, we don't live in an ideal world, but in a world where if the app doesn't do as our users want, we end up with a bunch of 1- stars and our sales will suffer. So sometime, you have to do something reasonable with bad data. My app has to deal with this ALL the time. -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Back Trace in Android
Thanks Kostya and Oscar Marques. I want to get stack trace at run time from the code. I want to use strace in my code. How? any samples??? On Apr 22, 4:57 pm, Kostya Vasilyev kmans...@gmail.com wrote: strace is for native code. For Java code, there are useful functions in java.lang.Thread: http://developer.android.com/reference/java/lang/Thread.html static void dumpStack() static MapThread, StackTraceElement[] getAllStackTraces() StackTraceElement[] getStackTrace() -- Kostya 22.04.2011 15:49, Oscar Marques ?: You can use strace compiled to arm. I tried and it works. 2011/4/22 Pandi pandiwelco...@gmail.com mailto:pandiwelco...@gmail.com It is function trace/stack trace. Which will give who is calling what? On Apr 22, 3:51 pm, Kumar Bibek coomar@gmail.com mailto:coomar@gmail.com wrote: WHat's a Back Trace? Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com http://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com mailto:pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.com mailto:osca...@gmail.com http://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev --http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Back Trace in Android
Try logcat, loginfo. 2011/4/22 Pandi pandiwelco...@gmail.com Thanks Kostya and Oscar Marques. I want to get stack trace at run time from the code. I want to use strace in my code. How? any samples??? On Apr 22, 4:57 pm, Kostya Vasilyev kmans...@gmail.com wrote: strace is for native code. For Java code, there are useful functions in java.lang.Thread: http://developer.android.com/reference/java/lang/Thread.html static void dumpStack() static MapThread, StackTraceElement[] getAllStackTraces() StackTraceElement[] getStackTrace() -- Kostya 22.04.2011 15:49, Oscar Marques ?: You can use strace compiled to arm. I tried and it works. 2011/4/22 Pandi pandiwelco...@gmail.com mailto: pandiwelco...@gmail.com It is function trace/stack trace. Which will give who is calling what? On Apr 22, 3:51 pm, Kumar Bibek coomar@gmail.com mailto:coomar@gmail.com wrote: WHat's a Back Trace? Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com http://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com mailto:pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.com mailto:osca...@gmail.com http://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev --http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.com http://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Scan for wifi networks when connected to 3G
Short answer: yes, you can do this. First you start scanning WiFi using intent filter WifiManager.SCAN_RESULTS_AVAILABLE_ACTION, then get results, analyse them and only then select which network to connect to. However, as you have found already, if you enabled WiFi and there is a remembered network then the WiFi manager will connect automatically. I guess the solution is in using WiFiLock with WIFI_MODE_SCAN_ONLYhttp://developer.android.com/reference/android/net/wifi/WifiManager.html#WIFI_MODE_SCAN_ONLY key - this is exactly what you are looking for: http://developer.android.com/reference/android/net/wifi/WifiManager.html#WIFI_MODE_SCAN_ONLY -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What does this mean: Failure [INSTALL_FAILED_CONTAINER_ERROR] ?
Turns out I need to mount the sdcard and remove the file ~/.android_secure/smdl2tmp1.asec via pc, then it works again. On Apr 21, 11:14 pm, Mathias Lin m...@mathiaslin.com wrote: I can avoid the error when not allowing the app to be installed on sdcard, setting android:installLocation=internalOnly in the manifest. It's ok for development, but for production, it's not really what I want - since my app is quite large with 17mb; therefore I prefer it to be on sdcard. How to ever be able to install it on the external memory without rooting the device (since this is the only way I could delete /mnt/ secure/asec/smdl2tmp1.asec afaik, which seems to be one solution as well as mentioned in some forums). On Apr 21, 8:41 pm, Mathias Lin m...@mathiaslin.com wrote: I try to deploy my app and sometimes get this error: Failure [INSTALL_FAILED_CONTAINER_ERROR] I tried to google it but don't find what the error means or what it's caused by. I deploy via IDE (IntelliJ) the file gets copied to the device to the /data/local/tmp (unrooted Huawei Ideos, running 2.2), but the package manager doesn't seem to like it. Before installing the apk, I already removed the app from the device beforehand. I also made sure there was no old file under /data/local/tmp on the device. Still I'm getting this error now. The package should be signed with the debug key, since I deploy via IDE by 'running' the app. $ pwd /data/local/tmp $ ls -l -rw-rw-rw- shell shell 17257686 2011-04-21 20:31 com.company.shop $ pm install -r com.company.shop pkg: com.company.shop Failure [INSTALL_FAILED_CONTAINER_ERROR] -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] PhoneGap Camera app
Hi All, I'm new to phonegap application.I was making an app using example given on docs.phonegap for CAMERA for android, I can see the activity being loaded properly on emulator but when i press the buttons say CAPTURE PHOTO or From PHOTO ALBUM, i could access further options. I think may be its emulator so i cannot use device camera but device photo gallery should open. Please can anyone guide me What do further. here is the source code of index.html file. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head titleCapture Photo/title script type=text/javascript charset=utf-8 src=phonegap.js/ script script type=text/javascript charset=utf-8 var pictureSource; // picture source var destinationType; // sets the format of returned value // Wait for PhoneGap to connect with the device // function onLoad() { document.addEventListener(deviceready,onDeviceReady(),false); } // PhoneGap is ready to be used! // function onDeviceReady() { pictureSource=navigator.camera.PictureSourceType; destinationType=navigator.camera.DestinationType; } // Called when a photo is successfully retrieved // function onPhotoDataSuccess(imageData) { // Uncomment to view the base64 encoded image data // console.log(imageData); // Get image handle // var smallImage = document.getElementById('smallImage'); // Unhide image elements // smallImage.style.display = 'block'; // Show the captured photo // The inline CSS rules are used to resize the image // smallImage.src = data:image/jpeg;base64, + imageData; } // Called when a photo is successfully retrieved // function onPhotoURISuccess(imageURI) { // Uncomment to view the image file URI // console.log(imageURI); // Get image handle // var largeImage = document.getElementById('largeImage'); // Unhide image elements // largeImage.style.display = 'block'; // Show the captured photo // The inline CSS rules are used to resize the image // largeImage.src = imageURI; } // A button will call this function // function capturePhoto() { // Take picture using device camera and retrieve image as base64- encoded string navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50 }); } // A button will call this function // function capturePhotoEdit() { // Take picture using device camera, allow edit, and retrieve image as base64-encoded string navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, allowEdit: true }); } // A button will call this function // function getPhoto(source) { // Retrieve image file location from specified source navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, destinationType: destinationType.FILE_URI, sourceType: source }); } // Called if something bad happens. // function onFail(mesage) { alert('Failed because: ' + message); } /script /head body onload=onLoad() button onclick=capturePhoto();Capture Photo/button br button onclick=capturePhotoEdit();Capture Editable Photo/ button br button onclick=getPhoto(pictureSource.PHOTOLIBRARY);From Photo Library/buttonbr button onclick=getPhoto(pictureSource.SAVEDPHOTOALBUM);From Photo Album/buttonbr img style=display:none;width:60px;height:60px; id=smallImage src= / img style=display:none; id=largeImage src= / /body /html -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] PhoneGap Camera app
I recommend that you visit: http://groups.google.com/group/phonegap and try asking your question there, since it is specifically for PhoneGap. On Fri, Apr 22, 2011 at 10:38 AM, anik rebellion.a...@gmail.com wrote: Hi All, I'm new to phonegap application.I was making an app using example given on docs.phonegap for CAMERA for android, I can see the activity being loaded properly on emulator but when i press the buttons say CAPTURE PHOTO or From PHOTO ALBUM, i could access further options. I think may be its emulator so i cannot use device camera but device photo gallery should open. Please can anyone guide me What do further. here is the source code of index.html file. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head titleCapture Photo/title script type=text/javascript charset=utf-8 src=phonegap.js/ script script type=text/javascript charset=utf-8 var pictureSource; // picture source var destinationType; // sets the format of returned value // Wait for PhoneGap to connect with the device // function onLoad() { document.addEventListener(deviceready,onDeviceReady(),false); } // PhoneGap is ready to be used! // function onDeviceReady() { pictureSource=navigator.camera.PictureSourceType; destinationType=navigator.camera.DestinationType; } // Called when a photo is successfully retrieved // function onPhotoDataSuccess(imageData) { // Uncomment to view the base64 encoded image data // console.log(imageData); // Get image handle // var smallImage = document.getElementById('smallImage'); // Unhide image elements // smallImage.style.display = 'block'; // Show the captured photo // The inline CSS rules are used to resize the image // smallImage.src = data:image/jpeg;base64, + imageData; } // Called when a photo is successfully retrieved // function onPhotoURISuccess(imageURI) { // Uncomment to view the image file URI // console.log(imageURI); // Get image handle // var largeImage = document.getElementById('largeImage'); // Unhide image elements // largeImage.style.display = 'block'; // Show the captured photo // The inline CSS rules are used to resize the image // largeImage.src = imageURI; } // A button will call this function // function capturePhoto() { // Take picture using device camera and retrieve image as base64- encoded string navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50 }); } // A button will call this function // function capturePhotoEdit() { // Take picture using device camera, allow edit, and retrieve image as base64-encoded string navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, allowEdit: true }); } // A button will call this function // function getPhoto(source) { // Retrieve image file location from specified source navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, destinationType: destinationType.FILE_URI, sourceType: source }); } // Called if something bad happens. // function onFail(mesage) { alert('Failed because: ' + message); } /script /head body onload=onLoad() button onclick=capturePhoto();Capture Photo/button br button onclick=capturePhotoEdit();Capture Editable Photo/ button br button onclick=getPhoto(pictureSource.PHOTOLIBRARY);From Photo Library/buttonbr button onclick=getPhoto(pictureSource.SAVEDPHOTOALBUM);From Photo Album/buttonbr img style=display:none;width:60px;height:60px; id=smallImage src= / img style=display:none; id=largeImage src= / /body /html -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Image Displayed Two Times
Hi, I am facing an issue with Gallery applicaion. After taking snapshot, If I open image from thumbnail view of camera, the image getting displayed two times. Some refresh is happening when I do this. This is coming only time. After that if we do the same, It will be displayed only one time. If I take new snapshot, two time display(Refresh) is happening at first time. After that it is working fine. I am using 2.3.3 version of android. Is this an issue or expected behavior in GB? What could be reason for this ? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] about creating tables
On Fri, Apr 22, 2011 at 2:01 AM, amey bura ameybur...@gmail.com wrote: How can i create two tables in single database successfully. plz suggest any easiest way to create it. Have you tried reading the documentation or reviewing the samples? Are you aware the word is spelled please? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] java
hi i want start develop android app can i develop android app if i dont know java? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] java
Possibly. What languages and environments have you worked in before? On Fri, Apr 22, 2011 at 11:09 AM, hoss7 hoss...@gmail.com wrote: hi i want start develop android app can i develop android app if i dont know java? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: I am developing android application and I have to take my photo using browse button.
If you're looking for a way to use the gallery applications image picker in your form to allow the user to select an image you should refer to ACTION_PICK in the Intent class. Or, lmgtfy: http://stackoverflow.com/questions/550905/access-pictures-from-pictures-app-in-my-android-app This will start the image pic On 21 Apr, 07:36, rekha yadav ydre...@gmail.com wrote: I am devloping android application. I have created a form. On the form I have to browse my stored images in the mobile. Please help me how to do the same task. I am new to android development. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Game Development in Android
You don't know English well at all. So better not to response. Kris On Fri, Apr 22, 2011 at 1:11 AM, Mohammed Hossain Doula hossaindo...@gmail.com wrote: droi...@gmail.com... you are underestimating yourself man by wasting your time... I know how to search and better than you... so better not to response... you don't know how to develop game then shut the hell out of this thread... I know lots of things regarding game development... but I want to know more than what I know... You such a loser... On Fri, Apr 22, 2011 at 3:05 AM, Tommy droi...@gmail.com wrote: Here you go http://tinyurl.com/6gxuv9e *From:* android-developers@googlegroups.com [mailto: android-developers@googlegroups.com] *On Behalf Of *Miguel Morales *Sent:* Thursday, April 21, 2011 4:53 PM *To:* android-developers@googlegroups.com *Subject:* Re: [android-developers] Game Development in Android He did answer your question. If you want better help, you'll have to ask better questions. On Thu, Apr 21, 2011 at 9:49 AM, Mohammed Hossain Doula hossaindo...@gmail.com wrote: Man.. You are underestimating yourself... Not me... I am asking to those who know the answer... Not you... I know searching and better stay away... On Thu, Apr 21, 2011 at 9:42 PM, TreKing treking...@gmail.com wrote: On Mon, Apr 18, 2011 at 3:44 AM, Mohammed Hossain Doula hossaindo...@gmail.com wrote: Is there any tutorial available for the beginners of android platform in Game Development? Yes there is. You can ask Google to find where they is. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *-- Mohammed Hossain Doula Software Engineer desme INC.* *www: http://www.hossaindoula.com @: ron...@desme.com hossaindo...@nibssolutionslimited.com* *facebook: http://www.facebook.com/ROnyWorld* *twitter: http://www.twitter.com/hossaindoula* *blogspot: hossaindoul.blogspot.com GSM: 00880-167-4347101* -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *-- Mohammed Hossain Doula Software Engineer desme INC.* *www: http://www.hossaindoula.com @: ron...@desme.com hossaindo...@nibssolutionslimited.com* *facebook: http://www.facebook.com/ROnyWorld* *twitter: http://www.twitter.com/hossaindoula* *blogspot: hossaindoul.blogspot.com GSM: 00880-167-4347101* -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: New to Android Need Help
On Fri, Apr 22, 2011 at 2:10 AM, edprog edwin...@gmail.com wrote: but now i need to figure out how to make the images swap on their own when the system is playing Did you need help on that or are you just typing out loud? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How do I archive bug report output
I am trying to submit a bug report via this link [http:// code.google.com/p/android/issues/entry?template=Developer%20bug %20report] to the New Issue reporting form. The instructions conclude with the request to run the adb bugreport and archive the output - which, I presume, is to be included as an attached file to the submission. Can anyone instruct me how I archive the output from the adb program to some accessible folder. [I know how to run the program.] Thanks, gssi -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Back Trace in Android
No...logcat will display only available logs in the code. I want to track function call in android native code(.cpp,.c) For Java, we can get from code which was mentioned by Kostya. On Apr 22, 5:59 pm, Oscar Marques osca...@gmail.com wrote: Try logcat, loginfo. 2011/4/22 Pandi pandiwelco...@gmail.com Thanks Kostya and Oscar Marques. I want to get stack trace at run time from the code. I want to use strace in my code. How? any samples??? On Apr 22, 4:57 pm, Kostya Vasilyev kmans...@gmail.com wrote: strace is for native code. For Java code, there are useful functions in java.lang.Thread: http://developer.android.com/reference/java/lang/Thread.html static void dumpStack() static MapThread, StackTraceElement[] getAllStackTraces() StackTraceElement[] getStackTrace() -- Kostya 22.04.2011 15:49, Oscar Marques ?: You can use strace compiled to arm. I tried and it works. 2011/4/22 Pandi pandiwelco...@gmail.com mailto: pandiwelco...@gmail.com It is function trace/stack trace. Which will give who is calling what? On Apr 22, 3:51 pm, Kumar Bibek coomar@gmail.com mailto:coomar@gmail.com wrote: WHat's a Back Trace? Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com http://www.kbeanie.com On Fri, Apr 22, 2011 at 4:12 PM, Pandi pandiwelco...@gmail.com mailto:pandiwelco...@gmail.com wrote: Hi, How to get back trace in 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.com mailto:osca...@gmail.com http://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev --http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Oscar Marques osca...@gmail.comhttp://www.dunkelheit.com.br Twitter: @f117usbr +55 21 9293-9343 Participe do I Hack'n Rio http://hacknrio.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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How do I archive bug report output
On Linux: adb bugreport /tmp/foo Same thing for Windows or OS X, just substitute in an appropriate path to wherever you want to save it, in place of where I have /tmp/foo On Fri, Apr 22, 2011 at 11:33 AM, gssi ewch...@gmail.com wrote: I am trying to submit a bug report via this link [http:// code.google.com/p/android/issues/entry?template=Developer%20bug %20report] to the New Issue reporting form. The instructions conclude with the request to run the adb bugreport and archive the output - which, I presume, is to be included as an attached file to the submission. Can anyone instruct me how I archive the output from the adb program to some accessible folder. [I know how to run the program.] -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Back Trace in Android
On Fri, Apr 22, 2011 at 11:33 AM, Pandi pandiwelco...@gmail.com wrote: No...logcat will display only available logs in the code. I want to track function call in android native code(.cpp,.c) Questions regarding the NDK are best asked here: http://groups.google.com/group/android-ndk (after searching that list for answers, of course) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] NPE in java.util.Calendar
I have been getting ACRA crash reports with the following stacktrace: java.lang.NullPointerException at java.util.Calendar.setTime(Calendar.java:1284) at java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:730) at java.text.SimpleDateFormat.format(SimpleDateFormat.java:1011) at java.text.DateFormat.format(DateFormat.java:384) at com.jnc.zmanminder.ZMUpdateService.buildUpdate(ZMUpdateService.java:117) The code that triggers this crash is as follows: ZmanimCalendar c = new ZmanimCalendar(l); Date SunsetTime = c.getSunset(); String SunsetTimeString = DateFormat.getTimeInstance(DateFormat.SHORT).format(SunsetTime); What could possibly trigger an NPE in this code? Is there something I should be checking about SunsetTime before passing it in to be formatted? -- Jake Colman -- Android Tinkerer -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to install the .apt in emulator in ubuntu
Hi All, I have .apk, that is working fine in Window (I install the .apt in windows through adb install myApk.apk), but how to install the .apk in ubuntu emulator. when I'm trying to use adb install or /.adb install my.apk . and adb shell ... etc getting error as hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ adb shell No command 'adb' found, did you mean: Command 'cdb' from package 'tinycdb' (main) Command 'gdb' from package 'gdb' (main) Command 'aub' from package 'aub' (universe) Command 'dab' from package 'bsdgames' (universe) Command 'zdb' from package 'zfs-fuse' (universe) Command 'mdb' from package 'mono-debugger' (universe) Command 'tdb' from package 'tads2-dev' (multiverse) Command 'pdb' from package 'python' (main) Command 'jdb' from package 'openjdk-6-jdk' (main) Command 'ab' from package 'apache2-utils' (main) adb: command not found hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ adb install RestaurantPOS.apk No command 'adb' found, did you mean: Command 'cdb' from package 'tinycdb' (main) Command 'gdb' from package 'gdb' (main) Command 'aub' from package 'aub' (universe) Command 'dab' from package 'bsdgames' (universe) Command 'zdb' from package 'zfs-fuse' (universe) Command 'mdb' from package 'mono-debugger' (universe) Command 'tdb' from package 'tads2-dev' (multiverse) Command 'pdb' from package 'python' (main) Command 'jdb' from package 'openjdk-6-jdk' (main) Command 'ab' from package 'apache2-utils' (main) adb: command not found hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ ^C I'm getting error, please help me.. -- Thanks Regards Rakesh Kumar Jha -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] NPE in java.util.Calendar
Your Date object is null. The implementation of setTime() is: public final void setTime(Date date) { setTimeInMillis(date.getTime()); } Since it is crashing with a NullPointerException in this method, date must be null. On Fri, Apr 22, 2011 at 11:41 AM, Jake Colman col...@ppllc.com wrote: I have been getting ACRA crash reports with the following stacktrace: java.lang.NullPointerException at java.util.Calendar.setTime(Calendar.java:1284) at java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:730) at java.text.SimpleDateFormat.format(SimpleDateFormat.java:1011) at java.text.DateFormat.format(DateFormat.java:384) at com.jnc.zmanminder.ZMUpdateService.buildUpdate(ZMUpdateService.java:117) The code that triggers this crash is as follows: ZmanimCalendar c = new ZmanimCalendar(l); Date SunsetTime = c.getSunset(); String SunsetTimeString = DateFormat.getTimeInstance(DateFormat.SHORT).format(SunsetTime); What could possibly trigger an NPE in this code? Is there something I should be checking about SunsetTime before passing it in to be formatted? -- Jake Colman -- Android Tinkerer -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to install the .apt in emulator in ubuntu
You need to add $ANDROID_SDK/tools and $ANDROID_SDK/platform-tools to your PATH, where $ANDROID_SDK is wherever you installed the Android SDK. See How to Update Your PATH here: http://developer.android.com/sdk/installing.html On Fri, Apr 22, 2011 at 11:46 AM, Rocky rkjhaw1...@gmail.com wrote: Hi All, I have .apk, that is working fine in Window (I install the .apt in windows through adb install myApk.apk), but how to install the .apk in ubuntu emulator. when I'm trying to use adb install or /.adb install my.apk . and adb shell ... etc getting error as hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ adb shell No command 'adb' found, did you mean: Command 'cdb' from package 'tinycdb' (main) Command 'gdb' from package 'gdb' (main) Command 'aub' from package 'aub' (universe) Command 'dab' from package 'bsdgames' (universe) Command 'zdb' from package 'zfs-fuse' (universe) Command 'mdb' from package 'mono-debugger' (universe) Command 'tdb' from package 'tads2-dev' (multiverse) Command 'pdb' from package 'python' (main) Command 'jdb' from package 'openjdk-6-jdk' (main) Command 'ab' from package 'apache2-utils' (main) adb: command not found hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ adb install RestaurantPOS.apk No command 'adb' found, did you mean: Command 'cdb' from package 'tinycdb' (main) Command 'gdb' from package 'gdb' (main) Command 'aub' from package 'aub' (universe) Command 'dab' from package 'bsdgames' (universe) Command 'zdb' from package 'zfs-fuse' (universe) Command 'mdb' from package 'mono-debugger' (universe) Command 'tdb' from package 'tads2-dev' (multiverse) Command 'pdb' from package 'python' (main) Command 'jdb' from package 'openjdk-6-jdk' (main) Command 'ab' from package 'apache2-utils' (main) adb: command not found hima@hima-laptop:~/Desktop/Rakesh/android-sdk-linux_x86/tools$ ^C I'm getting error, please help me.. -- Thanks Regards Rakesh Kumar Jha -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do I archive bug report output
Thanks, Mark. I figured it had to be something simple. On Apr 22, 11:36 am, Mark Murphy mmur...@commonsware.com wrote: On Linux: adb bugreport /tmp/foo Same thing for Windows or OS X, just substitute in an appropriate path to wherever you want to save it, in place of where I have /tmp/foo On Fri, Apr 22, 2011 at 11:33 AM, gssi ewch...@gmail.com wrote: I am trying to submit a bug report via this link [http:// code.google.com/p/android/issues/entry?template=Developer%20bug %20report] to the New Issue reporting form. The instructions conclude with the request to run the adb bugreport and archive the output - which, I presume, is to be included as an attached file to the submission. Can anyone instruct me how I archive the output from the adb program to some accessible folder. [I know how to run the program.] -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in NYC:http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SAXParser throws exception for bad character in CDATA block, bug???
I quite agree, and I did try to acknowledge that need in my reply. The point of my message is to balance the real world, make it work, with the consequences and drawbacks of that approach, so people can make better decisions about when to compromise, what they risk by doing so, and perhaps make better choices about exactly how they handle such cases. For example, blindly applying Jens' workaround to a broken UTF-8 stream isn't going to work well, as it's written for a broken ISO-8859-1 stream; the workaround there is similar but much more complex. And Kostya points out that sometimes asking the user to identify the correct encoding is a good choice. The problem with that here is that we have a mixed encoding, and I don't believe I've ever seen a UI that gives the end-user the ability to correct a partial encoding mismatch. (It would be a lot of development and user learning for what should be a rare situation). And also: to lean on the people foisting such things on them to fix them, and to be better equipped to educate them. I have no desire to blame the victims here! I just hope to help the victims understand the nature of their situation, and perhaps deal with it a little more effectively. There's also a larger meta-issue here. Working around such problems reduces the pressure to fix them. We've seen where that can lead us, in email formats, SMTP, IP, and most notably, HTML, where browsers that would accept some idiosyncratic notion of anything they could guess at resulted in a web filled with garbage pages that wouldn't parse consistently from browser to browser. (Not to mention browsers not following standards themselves -- a separate problem with similar results, as pages deliberately introduced bogosity to work around browser bugs). So I would encourage anyone finding themselves in this position to put pressure on the source of the problem. I'd even go so far as to suggest considering informing the user of the problem with the source, prior to offering a workaround. It would not always be possible or appropriate, but it may enlist the user in informing bad sites that they're broken, and it may also be important to alert the user to the corrupted data they will be viewing. But in the end, our responsibility is to our end users, and we have to consider what's best for them -- in both the short run and the long run. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NPE in java.util.Calendar
Test Date SunsetTime = c.getSunset(); to see if it is returning NULL, before using it in the next line. On Apr 22, 10:41 am, Jake Colman col...@ppllc.com wrote: The code that triggers this crash is as follows: ZmanimCalendar c = new ZmanimCalendar(l); Date SunsetTime = c.getSunset(); String SunsetTimeString = DateFormat.getTimeInstance(DateFormat.SHORT).format(SunsetTime); What could possibly trigger an NPE in this code? Is there something I should be checking about SunsetTime before passing it in to be formatted? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Background service interaction - Activity paused
You can change your UI state while your activity is hidden. That isn't going to break anything. Typically in this state the window's surface has been destroyed so the view hierarchy won't do any draw or layout (until attached again), but that is not a problem. On the other hand, generally when one is in the background it is nice to use a little resources as possible, so usually people stop watching for changes at that point and refresh their state when next being resumed. Or sometimes continue watching for changes but just note something has changed so when the user returns the UI can be refreshed only if something interesting has happened. On Thu, Apr 21, 2011 at 11:07 PM, Federico Paolinelli fedep...@gmail.comwrote: Hi all.. I am trying to make the interaction with a background service work. As I think it often happens, I need to call some method of the service from my main activity, and I need to be notified about some state changes from my service. What I have done is to bind the background service from the activity, and to pass it a callback interface to be called from the service. Now my question: let's suppose that the callback updates some view (ie a textview) with the state of the service. What should I do when the activity gets paused? Should I unregister the interface (and check if the interface to be called is not null in the service), like a basic observer pattern? And again: what would happen if I do not unregister the interface, and the service tries to update some gui element while the activity is not visible? I know this would be solved using the intents - broadcast receiver to notify the activity, but in my case the output given from the service is supposed to vary often, and I feel binding the service is a more suitable option in my case. Hope I was clear enough, Thanks a lot in advance Federico -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: license fees / royalties for players using audio video codecs offered by Android or device manufactures
Hi Dianne, Thanks it's good to know the A/V codec patent holders won't have a reason to come after us when our A/V players or games might become the next big hit ;-) - Benny -- Van: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] Namens Dianne Hackborn Verzonden: donderdag 21 april 2011 22:47 A third party developer doesn't need to pay money to use a platform API. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Removing .jar file from project.
On 04/21/2011 01:34 PM, Kostya Vasilyev wrote: Have you tried refreshing the project? Right click - Refresh or F5 in the Package Explorer panel. Thanks. I am new enough to Eclipse to not know this, but it did not change anything. In the Problems windows I still have: Error generating final archive: Failed to add /home/toby/android/exposmart/lib/biggu_scanner-1.1.0.jar I don't reference it anywhere in my code anymore, and the project compiles fine from the command line. I just can't find the place where I can tell Eclipse not to bother about the file anymore. I even tried grepping around in the Eclipse and project directories for occurrences of the file's name, but I didn't see any. Thanks, Tobiah -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Removing .jar file from project.
On Fri, Apr 22, 2011 at 11:56 AM, Tobiah t...@tobiah.org wrote: Thanks. I am new enough to Eclipse to not know this, but it did not change anything. In the Problems windows I still have: Error generating final archive: Failed to add /home/toby/android/exposmart/lib/biggu_scanner-1.1.0.jar First hit on Google for that error: http://stackoverflow.com/questions/4369869/how-to-fix-errorerror-generating-final-archive-failed-to-add-folder http://stackoverflow.com/questions/4369869/how-to-fix-errorerror-generating-final-archive-failed-to-add-folderWhich suggests removing and re-importing the project. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: NPE in java.util.Calendar
Thanks Mark and Andrew. The Date variable should never, ever be NULL in the first place so that didn't occur to me. I assumed I was using the API somehow incorrectly. Thanks for the help. ae == andrew esh andrew_esh writes: ae Test Date SunsetTime = c.getSunset(); to see if it is returning ae NULL, before using it in the next line. ae On Apr 22, 10:41 am, Jake Colman col...@ppllc.com wrote: The code that triggers this crash is as follows: ZmanimCalendar c = new ZmanimCalendar(l); Date SunsetTime = c.getSunset(); String SunsetTimeString = DateFormat.getTimeInstance(DateFormat.SHORT).format(SunsetTime); What could possibly trigger an NPE in this code? Is there something I should be checking about SunsetTime before passing it in to be formatted? ae -- ae You received this message because you are subscribed to the Google ae Groups Android Developers group. ae To post to this group, send email to android-developers@googlegroups.com ae To unsubscribe from this group, send email to ae android-developers+unsubscr...@googlegroups.com ae For more options, visit this group at ae http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to export the project as a JAR file.
I already use a prefix for the resource, like com.example.R.raw.somefile to access the resource that I really want, but at runtime it looks like it is pulling some other file instead of the one that I want. I will try reflection.. Rohit On Apr 21, 4:46 pm, Mark Murphy mmur...@commonsware.com wrote: Add a prefix. As I wrote on this thread earlier: You may also want to use some sort of unique prefix on your resource files and names, so that you do not accidentally collide with a project that is using your library. Also, for any resources you refer to in the binary-only library this way, you will need to use reflection or getIdentifier() to get the ID value. Any pre-compiled R.* constants will be wrong. This limitation is only for binary-only libraries -- traditional source-based Android library projects will have their R values work properly. On Thu, Apr 21, 2011 at 7:36 PM, Rohit mord...@gmail.com wrote: I have the same problem. I want to package in the res folder as well - which I can in the jar file. However, when I run the code the wrong R file is referenced and as a result the wrong resource is referenced which causes all sorts of problems. Is there a way to mark my R files with a namespace so that there is no confusion about which resource file I am referring to? Rohit On Apr 15, 4:06 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Apr 15, 2011 at 3:03 AM, Dan dan.schm...@gmail.com wrote: I have a nice .apk with a service and 4 activities, a shared native library with some jni goodness, some drawable files in the res directory and some other data in the assets directory. Another company would like to package the functionality of my .apk along with their .apk so the user only has to make one download. I would like to take their money with as small amount of work for myself and their engineers as possible. How are you with a gun? You'll get free wallets along with the money that way. :-) My current solution is to send them a .zip file with all my classes, the assets, the resources, and the native .so library, and the manifest, and my .mk files and have them copy bits of the manifest into theirs, put the resources and assets next to theirs, do the build process so the new R.java is generated and then compile all my classes. I would prefer not to give them the source code to my classes, but the resources in R.java make that rough. I do my builds through ant on the command line, they use eclipse so there tends to be some finger pointing when some functionality doesn't work. Is there a better solution than what I am currently doing and where would I look for the details of what sort of things will bite me when trying to pack files in a jar for someone else to reuse? (E.g. is there a workaround for providing a drawable ID for a notification?) Well, the best answer would be an Android library project: http://developer.android.com/guide/developing/projects/projects-eclip.. I do not know how well that handles NDK stuff, and my memory is fuzzy on assets. The rest would be no problem. Initially, you will wind up with stuff that will look like that you need to ship Java code. However, there are workarounds for that. Quoting myself from one of my books: Android library projects are designed for distributing source code. That may or may not be palatable in all cases. You can create a binary-only library project via the following steps: -- Create an Android library project, with your source code and such — this is your master project, from which you will create a version of the library project for distribution -- Compile the Java source (e.g., ant compile) and turn it into a JAR file -- Create a distribution Android library project, with the same resources as the master library project, but no source code -- Put the JAR file in the distribution Android library project's libs/ directory The resulting distribution Android library project will have everything a main project will need, just without the source code. You may also want to use some sort of unique prefix on your resource files and names, so that you do not accidentally collide with a project that is using your library. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons
Re: [android-developers] Re: new sdk and backwards compatibility
Thanks, that is exactly what I am looking for. On Fri, Apr 22, 2011 at 12:01 AM, Zsolt Vasvari zvasv...@gmail.com wrote: http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html On Apr 22, 2:39 pm, yves...@gmail.com yves...@gmail.com wrote: I have an app which uses mediametadataretriever to generate thumbnails for videos. In the older system, I always use the media_jni library and define my own mediametadataretriever class and it worked fine. With API level 10 or later, mediametadataretriever is an built-in API now. So, I am not sure what I should do. If I still build my project using earlier version of the SDk, then because media_jni library doesn't exist in the new sdk, so, my call will not work. If I import the new media.mediametadataretriever, then I have to use new sdk to build the project and use the new API to do it. It works on the new system, But my old code will not work anymore. So, what should I do now? Is splitting the project into 2, one for old system and use older sdk to build, and one for new system and use the latest sdk to build, the only option? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Dashboard - GirdView or LinearLayout
Following the dashboard interface from the Google I/O 2010 conferencehttp://code.google.com/p/iosched/, I see that they use a LinearLayout to make the dashboard. Other examples also use this style. I was wondering why wouldn't you use a GridView instead, seeing that it's mostly organized for you already? You can also more easily set a listener for the entire GridView, as oppose to individually writing a line of code for setting a listener for each button. Does it really matter or is there any difference? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to export the project as a JAR file.
The other problem I have is that I have multiple jar files that I import into my project and all of them have resources (e.g. strings.xml). Eclipse / Android tools complains about duplicate strings.xml files while building the apk - Is there a way to overcome this? Rohit On Apr 21, 4:46 pm, Mark Murphy mmur...@commonsware.com wrote: Add a prefix. As I wrote on this thread earlier: You may also want to use some sort of unique prefix on your resource files and names, so that you do not accidentally collide with a project that is using your library. Also, for any resources you refer to in the binary-only library this way, you will need to use reflection or getIdentifier() to get the ID value. Any pre-compiled R.* constants will be wrong. This limitation is only for binary-only libraries -- traditional source-based Android library projects will have their R values work properly. On Thu, Apr 21, 2011 at 7:36 PM, Rohit mord...@gmail.com wrote: I have the same problem. I want to package in the res folder as well - which I can in the jar file. However, when I run the code the wrong R file is referenced and as a result the wrong resource is referenced which causes all sorts of problems. Is there a way to mark my R files with a namespace so that there is no confusion about which resource file I am referring to? Rohit On Apr 15, 4:06 am, Mark Murphy mmur...@commonsware.com wrote: On Fri, Apr 15, 2011 at 3:03 AM, Dan dan.schm...@gmail.com wrote: I have a nice .apk with a service and 4 activities, a shared native library with some jni goodness, some drawable files in the res directory and some other data in the assets directory. Another company would like to package the functionality of my .apk along with their .apk so the user only has to make one download. I would like to take their money with as small amount of work for myself and their engineers as possible. How are you with a gun? You'll get free wallets along with the money that way. :-) My current solution is to send them a .zip file with all my classes, the assets, the resources, and the native .so library, and the manifest, and my .mk files and have them copy bits of the manifest into theirs, put the resources and assets next to theirs, do the build process so the new R.java is generated and then compile all my classes. I would prefer not to give them the source code to my classes, but the resources in R.java make that rough. I do my builds through ant on the command line, they use eclipse so there tends to be some finger pointing when some functionality doesn't work. Is there a better solution than what I am currently doing and where would I look for the details of what sort of things will bite me when trying to pack files in a jar for someone else to reuse? (E.g. is there a workaround for providing a drawable ID for a notification?) Well, the best answer would be an Android library project: http://developer.android.com/guide/developing/projects/projects-eclip.. I do not know how well that handles NDK stuff, and my memory is fuzzy on assets. The rest would be no problem. Initially, you will wind up with stuff that will look like that you need to ship Java code. However, there are workarounds for that. Quoting myself from one of my books: Android library projects are designed for distributing source code. That may or may not be palatable in all cases. You can create a binary-only library project via the following steps: -- Create an Android library project, with your source code and such — this is your master project, from which you will create a version of the library project for distribution -- Compile the Java source (e.g., ant compile) and turn it into a JAR file -- Create a distribution Android library project, with the same resources as the master library project, but no source code -- Put the JAR file in the distribution Android library project's libs/ directory The resulting distribution Android library project will have everything a main project will need, just without the source code. You may also want to use some sort of unique prefix on your resource files and names, so that you do not accidentally collide with a project that is using your library. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons
Re: [android-developers] Re: NPE in java.util.Calendar
On Fri, Apr 22, 2011 at 1:52 PM, Jake Colman col...@ppllc.com wrote: Thanks Mark and Andrew. The Date variable should never, ever be NULL in the first place so that didn't occur to me. I assumed I was using the API somehow incorrectly. Perhaps your app is being used on a planet with multiple suns, keeping the planet constantly illuminated, where there isn't a sunset. You gotta *plan* for these edge cases! :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Web based Emulator
Strictly speaking you can launch an emulator from a remote machine using some remote display protocol. For example, you can 'ssh -CX user@server emulator' and if X11 forwarding is supported and your network connection has low latency there's no noticeable difference from a local emulator. I use it on a regular basis and works. Any other remote application protocol (RDP, Citrix, 2X, SPICE, etc.) would do and in some cases it would be easier to launch from the browser. On Apr 21, 4:38 pm, Igor Prilepov iprile...@gmail.com wrote: This is not an emulator but a marketing demo. Emulator should accurately represent the real device, for example you should be able to add a new record to the contacts list, open some page in the browser, etc. This is a development tool. The page you mentioned has different purpose - give some initial experience to a potential user (sort of try before buy). This is marketing tool. Different goals - different requirements - different implementations. If your original question was about such demo then this is a wrong place. -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to center aligned multiline text
Hi All, In my application, I am displaying some text in textview on tabs. I have customized tabs view. because of the text length it is wrapping in two line which is fine with me. But this text is getting aligned with the left and no more in center of the tab view. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:background=@layout/mailbox_tab_bg_state android:gravity=center TextView android:id=@+id/tabTxt android:text=list view android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=@layout/tab_text_color_selector /TextView /LinearLayout I tried to set text view's gravity property as center then text in two line get in center but it wasn't left aligned with respect to each other. I wish that lines should be in center of the tab view and left aligned with themselves. Thanks Regards, Manish Garg -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Removing .jar file from project.
On 04/22/2011 10:09 AM, TreKing wrote: On Fri, Apr 22, 2011 at 11:56 AM, Tobiah t...@tobiah.org mailto:t...@tobiah.org wrote: Thanks. I am new enough to Eclipse to not know this, but it did not change anything. In the Problems windows I still have: Error generating final archive: Failed to add /home/toby/android/exposmart/lib/biggu_scanner-1.1.0.jar Actually, I had read that while googleing, but I rejected it as a possible workaround that would circumvent my learning the proper method of going about this. In the meantime, out of frustration, I did puff the project and re-import the source, and it worked fine. I'm still left feeling as though there is a more direct way of doing this, or that Eclipse is strongly lacking in this respect. Thanks, Tobiah -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to center aligned multiline text
Manish, As far as I can tell, when TextView breaks text into multiple lines, it always takes as much width from the parent view as it can. One possible workaround is to include explicit linesbreaks, \n, into the string. -- Kostya 22.04.2011 22:53, Manish Garg пишет: Hi All, In my application, I am displaying some text in textview on tabs. I have customized tabs view. because of the text length it is wrapping in two line which is fine with me. But this text is getting aligned with the left and no more in center of the tab view. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:background=@layout/mailbox_tab_bg_state android:gravity=center TextView android:id=@+id/tabTxt android:text=list view android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=@layout/tab_text_color_selector /TextView /LinearLayout I tried to set text view's gravity property as center then text in two line get in center but it wasn't left aligned with respect to each other. I wish that lines should be in center of the tab view and left aligned with themselves. Thanks Regards, Manish Garg -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: seeking with av_seek_frame or url_seek
I guess new position must be expressed in stream time units: // iNewPosition is in seconds int64_t timeStamp = iNewPosition * pFormatCtx-streams[iStreamIndex]- time_base.den; av_seek_frame(pFormatCtx, iStreamIndex, timeStamp, AVSEEK_FLAG_ANY); -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: New to Android Need Help
I think eventually i will need help hehe, as of now I will try to do it see if I can figure it out. Now just one question do you recommend to create the Thread in the main Activity or do it in a separate class? On Apr 22, 11:32 am, TreKing treking...@gmail.com wrote: On Fri, Apr 22, 2011 at 2:10 AM, edprog edwin...@gmail.com wrote: but now i need to figure out how to make the images swap on their own when the system is playing Did you need help on that or are you just typing out loud? ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Timezone Question
My app needs to know the timezone in which is executing. To do this, I have the following code: import java.util.TimeZone; TimeZone tz = TimeZone.getDefault(); One of my users says he has configured his phone to not switch timezones even though he may have flown across the country. He says the phone displays the correct local time but his calendars remain in his native timezone or his calendars get messed up. I didn't know there was such a problem nor did I know that you can change your phone's idea of where it is. He says that my app, which calculates sunset time, is off by an hour. He is from Chicago but is currently in Florida and my app is showing Chicago time for sunset instead of the time in Florida. What API should I be using to get the timezone of the current location as opposed to the timezone that he has forced the phone to use? Thanks. -- Jake Colman -- Android Tinkerer -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Running Instrumentation Test on multiple emulator on desktop.
Use spawn=true in your ant script to run as background commands. On Apr 21, 4:46 am, Isha Dalwadi isha.j.dalw...@gmail.com wrote: Hi, I have two emulators running on my machine. now with adb am instrument command i can run the instrumentation test on single emulator at a time. So, two run the instrumentation test on both the emulator i need to fire two commands separately like below: command prompt 1: adb -s emulator-5554 shell am instrument -w test_package_name/runner_class command prompt 2: adb -s emulator-5556 shell am instrument -w test_package_name/runner_class Is there any way to start the instrumentation test on both the emulators simultaneous with ONLY one command? Note that, I am using ANT to run the instrumentation test. Also, please suggest any other ways of doing so... Thanks, Isha -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Batch Creation in Monkeyrunner
You can create any kind of script you want in monkeyrunner as it is a python compiler. On Apr 21, 7:53 am, Gaytri gaytri.ba...@gmail.com wrote: Hello All, I want to create a batch(sequence of multiple scripts) in monkeyrunner. I have used this concept in other automation tools like QTP. Can anyone please suggest me how to create and then execute batches in monkeyrunner. Any kind of help will be highly appreciated. Thanks Regards, Gayatri -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Background service interaction - Activity paused
Thanks a lot. I was really curious about what happens behind, and I was afraid that trying to update a view while it wasn't displayed would have broken something. However, I choose the solution of unregistering the callback when my activity is paused, and to ask the new status back to the service when the activity is resumed again. Thanks again for your help, Federico On Fri, Apr 22, 2011 at 6:42 PM, Dianne Hackborn hack...@android.com wrote: You can change your UI state while your activity is hidden. That isn't going to break anything. Typically in this state the window's surface has been destroyed so the view hierarchy won't do any draw or layout (until attached again), but that is not a problem. On the other hand, generally when one is in the background it is nice to use a little resources as possible, so usually people stop watching for changes at that point and refresh their state when next being resumed. Or sometimes continue watching for changes but just note something has changed so when the user returns the UI can be refreshed only if something interesting has happened. On Thu, Apr 21, 2011 at 11:07 PM, Federico Paolinelli fedep...@gmail.com wrote: Hi all.. I am trying to make the interaction with a background service work. As I think it often happens, I need to call some method of the service from my main activity, and I need to be notified about some state changes from my service. What I have done is to bind the background service from the activity, and to pass it a callback interface to be called from the service. Now my question: let's suppose that the callback updates some view (ie a textview) with the state of the service. What should I do when the activity gets paused? Should I unregister the interface (and check if the interface to be called is not null in the service), like a basic observer pattern? And again: what would happen if I do not unregister the interface, and the service tries to update some gui element while the activity is not visible? I know this would be solved using the intents - broadcast receiver to notify the activity, but in my case the output given from the service is supposed to vary often, and I feel binding the service is a more suitable option in my case. Hope I was clear enough, Thanks a lot in advance Federico -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Federico -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: seeking with av_seek_frame or url_seek
How can I get the iNewPosition variable?? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: New to Android Need Help
On Fri, Apr 22, 2011 at 2:42 PM, edprog edwin...@gmail.com wrote: Now just one question do you recommend to create the Thread in the main Activity or do it in a separate class? Actually, neither. Don't use raw Threads unless you really have to. I don't think you really have to here. See this article: http://developer.android.com/resources/articles/timed-ui-updates.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: facebook integration
Try easy facebook android sdkit's more simple to use! more detail and support on www.easyfacebookandroidsdk.com On Apr 17, 1:27 pm, DanH danhi...@ieee.org wrote: There's no real need for Android support for Facebook, since the interface is so simple:http://developers.facebook.com/docs/guides/mobile/#android On Apr 16, 5:16 pm, Kristopher Micinski krismicin...@gmail.com wrote: No. You can try to look for a facebook library, but there's no built in Android support for it. Type in facebook android in google:https://developers.facebook.com/blog/post/385/ Kris On Sat, Apr 16, 2011 at 6:05 PM, bob b...@coolgroups.com wrote: Does Android support any kind of facebook integration such as posting to someone's wall? 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Timezone Question
On Fri, Apr 22, 2011 at 2:47 PM, Jake Colman col...@ppllc.com wrote: What API should I be using to get the timezone of the current location as opposed to the timezone that he has forced the phone to use? http://groups.google.com/group/android-developers/browse_thread/thread/8fa8dd46bb316a7c Seems like it would be tricky. An alternative is to give the user the option to set it for themselves. By default it's based on the phone's location, but you could let the user pick from a preference. I'm pretty sure the Java apis have a function somewhere to get all available timezone options, so you could populate a preference and let the user pick the one they wanted to use. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Removing .jar file from project.
On Fri, Apr 22, 2011 at 1:58 PM, Tobiah t...@tobiah.org wrote: I'm still left feeling as though there is a more direct way of doing this, or that Eclipse is strongly lacking in this respect. In my relatively limited time with Eclipse, I've learned that it does things seemingly of its own accord, regardless if what it's doing is actually logical. If you find a way to make it stop doing what it's doing incorrectly, don't question it - smile, nod, and move on with your project until the next unexplainable issue comes up :-) - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: seeking with av_seek_frame or url_seek
I think this is what you told ?? but when programm starts, first timestamp =0 , keyframes[i]=1 (keyframe value is right), avseekframe returns 0 , avcodec_decode_video2 returns 7854, framefinished=216.. THey don't make any sense :S (index is 275) for(i=0;iindex+1;i++){ //int64_t timeStamp = (int64_t)((pFormatCtx-duration) / framecount)*keyFrames[i]/1000; int64_t timeStamp = packet.pts * pFormatCtx- streams[keyFrames[i]]-time_base.den; int t=av_seek_frame(pFormatCtx,keyFrames[i],timeStamp,AVSEEK_FLAG_ANY); while(av_read_frame(pFormatCtx, packet)=0){ if (packet.pts = timeStamp){ int t=avcodec_decode_video2(pCodecCtx, pFrame, frameFinished,packet); if (frameFinished){ SaveFrame(pFrame, pCodecCtx-width, pCodecCtx- height,keyFrames[i]); break; } } av_free_packet(packet); } } -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Two listviews scrolling in lockstep
I have two narrow, equally sized listviews side by side. I chose that design specifically because it's not a lot of information and I can show most of the contents in one screen full (together both lists have 22 items) As it is now, each list is scrolling independently. It's ok-ish but I would like to scroll them at the same time, no matter which of the two lists I touch. Telling a list to scroll to a particular pixel (or dp?) position is easy - smoothScrollTo(x,y). http://developer.android.com/reference/android/widget/ScrollView.html#smoothScrollTo%28int,%20int%29 However I have a hard time to find out the current scroll position of a list view (in particular the y value). Can you please suggest where to look? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Timezone Question
I don't believe that there is one. The platform only knows about one current time zone, and that's whatever the user has configured in Settings Date time. I've never seen a way to access the automatic zone if the user has overridden it. Your only other option would be to use a web service to look up the time zone by lat/lon, as discussed earlier in this thread, and that's a whole 'nother ball of worms. IMHO, this isn't something you should be expected to fix as a developer. The user has set their device to the wrong time zone, and that's going to affect every app on the device. Not really your problem. Incidentally, the calendar problem that prompted the user to do this is probably this one: http://code.google.com/p/android/issues/detail?id=1095 String -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Two listviews scrolling in lockstep
Any reason you can't use a single ListView with appropriate item layouts, split in two halves? Other than that, the scroll position is accessible via the base class, View. It has getScrollX() and getScrollY() methods. You could also override the following in both ListViews (subclassing them): http://developer.android.com/reference/android/view/View.html#onScrollChanged(int, int, int, int) -- Kostya 23.04.2011 0:55, lbendlin пишет: I have two narrow, equally sized listviews side by side. I chose that design specifically because it's not a lot of information and I can show most of the contents in one screen full (together both lists have 22 items) As it is now, each list is scrolling independently. It's ok-ish but I would like to scroll them at the same time, no matter which of the two lists I touch. Telling a list to scroll to a particular pixel (or dp?) position is easy - smoothScrollTo(x,y). http://developer.android.com/reference/android/widget/ScrollView.html#smoothScrollTo%28int,%20int%29 However I have a hard time to find out the current scroll position of a list view (in particular the y value). Can you please suggest where to look? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Dashboard - GirdView or LinearLayout
My guess is that you would want to use a LinearLayout if the dashboard will be static (you know before hand where everything goes) and prefer a GridView if you have a dynamic dashboard - maybe you will even want it to scroll (like places in Google Maps) Now I have actually used a ListView in my app's dashboard - is just slightly different as I got a profile section that takes the full width: https://ssl.gstatic.com/android/market/com.alportela.tracker.view/ss-0-320-480-160-0-bfe11461b144d969f0242f525bf500f21057cfe8 cant see how I can get that using a gridview. - Alberto On Apr 22, 7:13 pm, Robert rloude...@gmail.com wrote: Following the dashboard interface from the Google I/O 2010 conferencehttp://code.google.com/p/iosched/, I see that they use a LinearLayout to make the dashboard. Other examples also use this style. I was wondering why wouldn't you use a GridView instead, seeing that it's mostly organized for you already? You can also more easily set a listener for the entire GridView, as oppose to individually writing a line of code for setting a listener for each button. Does it really matter or is there any difference? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Two listviews scrolling in lockstep
I actually tried getScrollY() but it doesn't seems to register anything - always shows 0. firstVisibleItem shows correctly, and I could use that but it's not granular enough. left_speeds.setOnScrollListener(new OnScrollListener(){ @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { Log.i(TAG, scrolling to + view.getScrollY()); } @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if(scrollState == OnScrollListener.SCROLL_STATE_IDLE) Log.i(TAG, scrolling stopped for + view.toString()); } }); Am I looking at the wrong view? -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Two listviews scrolling in lockstep
I think I found the answer http://stackoverflow.com/questions/3014089/scroll-to-a-position-in-a-listview Listview scrolling is (of course!) not standard. grrr -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en