[android-developers] Create native typeface in 2.31
Code: final Typeface font2 = Typeface.createFromAsset(getAssets(), fonts/ CHOPS___.TTF); App works fine in 1.6 but when I run 2.3 I get this error: 02-28 11:48:33.751: ERROR/AndroidRuntime(539): FATAL EXCEPTION: main 02-28 11:48:33.751: ERROR/AndroidRuntime(539): java.lang.RuntimeException: native typeface cannot be made 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.graphics.Typeface.init(Typeface.java:147) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.graphics.Typeface.createFromAsset(Typeface.java:121) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at org.example.mlb.openMLB$selectionAdapter.getView(openMLB.java:67) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.AbsListView.obtainView(AbsListView.java:1418) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.ListView.measureHeightOfChildren(ListView.java:1216) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.ListView.onMeasure(ListView.java:1127) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.View.measure(View.java:8313) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java: 1017) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:701) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.LinearLayout.onMeasure(LinearLayout.java:311) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.View.measure(View.java:8313) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java: 581) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:365) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.View.measure(View.java:8313) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.View.measure(View.java:8313) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.LinearLayout.measureVertical(LinearLayout.java:531) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.View.measure(View.java:8313) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.View.measure(View.java:8313) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.ViewRoot.performTraversals(ViewRoot.java:839) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.os.Handler.dispatchMessage(Handler.java:99) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.os.Looper.loop(Looper.java:123) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at android.app.ActivityThread.main(ActivityThread.java:3647) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at java.lang.reflect.Method.invokeNative(Native Method) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at java.lang.reflect.Method.invoke(Method.java:507) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 02-28 11:48:33.751: ERROR/AndroidRuntime(539): at dalvik.system.NativeStart.main(Native Method) -- 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] Using ListView in AlertDialog
I am trying to add 2 listviews to an alertdialog to select 2 separate items. I am getting the following error 11-04 18:52:29.094: WARN/WindowManager(584): Attempted to add window with non-application token WindowToken{436ad8b0 token=null}. Aborting. 11-04 18:52:29.113: DEBUG/AndroidRuntime(896): Shutting down VM 11-04 18:52:29.125: WARN/dalvikvm(896): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 11-04 18:52:29.153: ERROR/AndroidRuntime(896): Uncaught handler: thread main exiting due to uncaught exception 11-04 18:52:29.263: ERROR/AndroidRuntime(896): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application Code to generate Dialog is below: protected Dialog onCreateDialog(int id) { switch(id){ case ROOT_SELECT: /* AlertDialog.Builder builder = new AlertDialog.Builder(Scales.this); builder.setTitle(Select Key); builder.setItems(rootNote, new DialogInterface.OnClickListener() {public void onClick(DialogInterface dialog, int item) { tv.setText(Root Note: +rootNote[item]); Note = rootNote[item]; } }); AlertDialog alertDialog = builder.create(); */ AlertDialog.Builder builder; AlertDialog alertDialog; Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.select_dialog, (ViewGroup) findViewById(R.id.selnoteacc)); builder = new AlertDialog.Builder(mContext); builder.setView(layout); ListView noteList = (ListView) layout.findViewById(R.id.notesel); ListView accList = (ListView) layout.findViewById(R.id.accsel); ArrayAdapter adapter1 = new ArrayAdapter(this, R.layout.list_item, rootNote); noteList.setAdapter(adapter1); ArrayAdapter adapter2 = new ArrayAdapter(this, R.layout.list_item, accs); accList.setAdapter(adapter2); noteList.setOnItemClickListener(new ListView.OnItemClickListener(){ @Override public void onItemClick(AdapterView? arg0, View arg1,int position, long arg3) { NoteSelected = rootNote[position]; } }); accList.setOnItemClickListener(new ListView.OnItemClickListener(){ @Override public void onItemClick(AdapterView? arg0, View arg1,int position, long arg3) { AccSelected = accs[position]; } }); alertDialog = builder.create(); return alertDialog; Code crashes on return of alertDialog. Any ideas as to what the adding window with non-application token means? intbt -- 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: Using ListView in AlertDialog
That was it, thanks and sorry I had never run into this problem before. I appreciate the assistance. intbt On Nov 4, 12:49 pm, TreKing treking...@gmail.com wrote: On Thu, Nov 4, 2010 at 2:00 PM, intbt in...@tacberry.com wrote: Any ideas as to what the adding window with non-application token means? Here we go again ... This most likely means that you're using getApplicationContext() instead of an Activity to show a Dialog. Don't use that function - like ever. Just use *this* or whatever your most local Context (that is an Activity) is. I can't believe this is STILL not fixed in the documentation ... - 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: Three ListViews side by side
You can set the layout_width in the xml file to x pixels to control the width, use a TableLayout to add adjacent listviews, but it is a small screen so it gets crowded in a hurry. ListView android:id=@+id/listvw01 android:layout_width=45px android:layout_height=250px android:typeface=serif android:textSize=32px android:paddingLeft=10px android:paddingRight=20px android:layout_marginTop=38px android:divider=#FFCC00 / intbt On Nov 3, 1:47 pm, Kostya Vasilyev kmans...@gmail.com wrote: Mat, Not sure what kind of content a ListView uses for wrap_content width - maybe that's the root of this problem. Perhaps you can try, as a test, specifying fixed width for each of the list views, using dp units. If that works, take a look at layout_weight to automatically resize each list to 1/3 of the available width. -- Kostya 03.11.2010 2:06, Mat пишет: Hi, I'm looking for a way to put three ListViews side by side. Documentation specify that ListView displays a scrolling single column list. As I'm a bit stubborn, I've done some tests but I only manage to display one ListView which fill all the screen even if I use wrap_content or if I put each ListView in a LinearLayout. The final goal is to connect these ListViews together, clicking on an item from the first will update the content of the second, and so on. Should I user ScrollView instead ? For those who will say that three ListViews won't fit in a mobile screen, I trying to make an application for a tablet :) Thanks in advance. -- Kostya Vasilyev -- WiFi Manager + pretty widget --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] mediaplayer.create causes null pointer exception
Anybody give me an idea as to what is going on - I have used this same code in another app and it works fine. It seems like it can't find the enter_dvd.mp3 file in the raw folder but it is there. The error occurs at the create line. public class playScales extends Activity implements OnCompletionListener{ //Other methods, 1 of which calls playNote(); public void playNote(Context ctx) { /* * mediaplayer solution * / System.out.println(mp-reset); mp = new MediaPlayer(); mp = MediaPlayer.create(playScales.this, R.raw.enter_dvd); /*Crashes program!!! - Errors: 10-15 01:32:57.284: WARN/dalvikvm(4630): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 10-15 01:32:57.307: ERROR/AndroidRuntime(4630): Uncaught handler: thread main exiting due to uncaught exception 10-15 01:32:57.374: ERROR/AndroidRuntime(4630): java.lang.NullPointerException */ System.out.println(mp-set); mp.setOnCompletionListener(playScales.this); try { mp.prepare(); } catch (IllegalStateException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } mp.seekTo(0); mp.start(); } } -- 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: layout issue
Perhaps you guys can also assist me with my custom listview problem. The listview is part of a relativelayout that I am building on a page. I want to use a custom font, when I try to attach the font to the textview (called out by the listview) the program crashes apparently because it can't find the textview inside the listview. How can I use this special font? setListAdapter(new ArrayAdapterString(this, R.layout.selection, R.id.type, scs)); View v = this.getLayoutInflater().inflate(R.layout.sclist, null); RelativeLayout.LayoutParams params2 = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); params2.addRule(RelativeLayout.ALIGN_PARENT_LEFT); params2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); v.setLayoutParams(params2); Type =(TextView) v.findViewById(R.id.type); Type.setTypeface(font1);//This causes a crash in the program!! Can't find the textview. sclist.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:background=# android:cacheColorHint=# android:layout_height=fill_parent android:layout_width=fill_parent android:orientation=horizontal ListView android:id=@+id/android:list android:layout_width=fill_parent android:layout_height=fill_parent android:paddingLeft=10px android:layout_marginTop=28px android:textColor=@color/black / /LinearLayout selection.xml: ?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:orientation=vertical TextView android:id=@+id/type android:layout_width=260px android:layout_height=wrap_content android:textSize=22px android:textColor=@color/black / /LinearLayout Thanks, intbt On Sep 23, 9:28 am, dashman erjdri...@gmail.com wrote: worked like a charm. 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: layout issue
Yeah I think I am doing both of those suggestions. I left a few lines of code out of my original message. This code sits before the TextView declaration and v is the listview layout myLayout.addView(vt); myLayout.addView(v); setContentView(myLayout); So I thought this instruction: Type =(TextView) v.findViewById(R.id.type); Type.setTypeface(font1);//This causes a crash in the program!! would call the specific findViewById for the view v? Am I missing something else? Appreciate the suggestions, intbt On Sep 23, 12:19 pm, Kostya Vasilyev kmans...@gmail.com wrote: Item views don't exist until created by the getView method of your list view adapter. Move the code that sets attributes of views in the list item layout into there. Also call findViewById on the list item view, not on the main layout or the main view - this will make sure you get the text view in that particular item's layout, of which there are many (one for each list item). -- Kostya Vasilyev --http://kmansoft.wordpress.com 23.09.2010 23:08 пользователь intbt in...@tacberry.com написал: Perhaps you guys can also assist me with my custom listview problem. The listview is part of a relativelayout that I am building on a page. I want to use a custom font, when I try to attach the font to the textview (called out by the listview) the program crashes apparently because it can't find the textview inside the listview. How can I use this special font? setListAdapter(new ArrayAdapterString(this, R.layout.selection, R.id.type, scs)); View v = this.getLayoutInflater().inflate(R.layout.sclist, null); RelativeLayout.LayoutParams params2 = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); params2.addRule(RelativeLayout.ALIGN_PARENT_LEFT); params2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); v.setLayoutParams(params2); Type =(TextView) v.findViewById(R.id.type); Type.setTypeface(font1);//This causes a crash in the program!! Can't find the textview. sclist.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:background=# android:cacheColorHint=# android:layout_height=fill_parent android:layout_width=fill_parent android:orientation=horizontal ListView android:id=@+id/android:list android:layout_width=fill_parent android:layout_height=fill_parent android:paddingLeft=10px android:layout_marginTop=28px android:textColor=@color/black / /LinearLayout selection.xml: ?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:orientation=vertical TextView android:id=@+id/type android:layout_width=260px android:layout_height=wrap_content android:textSize=22px android:textColor=@color/black / /LinearLayout Thanks, intbt On Sep 23, 9:28 am, dashman erjdri...@gmail.com wrote: worked like a charm. 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: finding spinner widgets
When I set the spinner adapter to be: android.R.layout.simple_spinner_dropdown_item I am assuming there are variations on the android.R.layout 'types' that I could use, is there such a list? In terms of Dialog ID - what I am looking for is a picker dialog that I can add the data, is that possible? Thanks, intbt On Sep 10, 3:11 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 10, 2010 at 6:06 PM,intbtin...@tacberry.com wrote: Where can I find a complete list of the spinner types available for use? What do you mean by spinner types? Also how about a list of DIALOG IDs? What do you mean by DIALOG IDs? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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: finding spinner widgets
Thanks for the help. I will take a look at modifying the existing spinner layout. What I am trying to do is to get a smaller (width) spinner so it does not take up the whole page when selected. The picker I want to design just provides a list of items and the user selects one. I have a design that uses a listview in a dialog (and one that uses a spinner)for now but I would prefer having the picker format. I think the iPhone has a picker type widget that is usable and customizable. On Sep 19, 11:59 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Sep 19, 2010 at 2:10 PM,intbtin...@tacberry.com wrote: When I set the spinner adapter to be: android.R.layout.simple_spinner_dropdown_item I am assuming there are variations on the android.R.layout 'types' that I could use, is there such a list? Not really. You can find the XML source to that layout in your SDK installation: $ANDROID_HOME/platforms/$VERSION/data/res/layout where $ANDROID_HOME is wherever you unpacked your SDK and $VERSION is some Android version. From there, you can copy it into your project and customize to suit. In terms of Dialog ID - what I am looking for is a picker dialog that I can add the data, is that possible? What is the data? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- 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: zapfino
Actually some one suggested Scriptina and it looks pretty good for free ($40) On Sep 18, 3:00 pm, DanH danhi...@ieee.org wrote: Sure. You can get it from Linotype for $39. On Sep 18, 3:59 pm, intbt in...@tacberry.com wrote: Anyone know where I can find zapfino for Android CHEAP!! ($40) intbt -- 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] zapfino
Anyone know where I can find zapfino for Android CHEAP!! ($40) intbt -- 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] finding spinner widgets
Where can I find a complete list of the spinner types available for use? Also how about a list of DIALOG IDs? intbt -- 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] Spinner added to onDraw view
I have a view (scalesView.java) that I create with onDraw and I need to add a spinner selector to the lower left of the screen. The code (below) runs and places a spinner where I need it but when I enable the setAdapter, the app crashes. When I remove the spinner code the view works fine, when I add a listview (instead of a spinner) it works fine. Although I can't get the listview small enough to work in the corner of my app. What am I missing about using setAdapter? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mView = new scalesView(this); scaleSpin = (Spinner)this.findViewById(R.id.scalespinner); ArrayAdapterString adapter = new ArrayAdapterString(this,android.R.layout.simple_spinner_item, res); System.out.println(first); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); System.out.println(second); //This line crashes the app //scaleSpin.setAdapter(adapter); final RelativeLayout myLayout = new RelativeLayout(this); myLayout.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); View v = this.getLayoutInflater().inflate(R.layout.scalelist, null); RelativeLayout.LayoutParams params2 = new RelativeLayout.LayoutParams(100, LayoutParams.WRAP_CONTENT); params2.addRule(RelativeLayout.ALIGN_PARENT_LEFT); params2.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); v.setLayoutParams(params2); myLayout.addView(mView); myLayout.addView(v); setContentView(myLayout); -- 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: Hi, anyone knows how to install python on android?
Go to this blog for ASE, it worked on my Eclipse running 2.0 http://www.akeric.com/blog/?p=879 On Jun 19, 8:39 pm, asicwizard asicwiz...@gmail.com wrote: Read: Command your shiny Android inPythonhttp://indefinitestudies.org/2009/06/20/command-your-shiny-android-in... Have fun. On Jun 16, 8:24 pm, J之道 hbyw...@gmail.com wrote: And ,there's any tool that I can use to operate remotely by linux command line on my lap top through usb or WIFI ? Or can I get some app running on mobile side can using linux commands? -- 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] soft keyboard
I have an app that takes a series of letters (EditText) and uses an Enter button to save the letters and move to the next action. I would like to have the 'soft' Enter key do the same thing but am having problems sorting it out. 1/ How do I call the keyboard with the Enter key? (Not CR) 2/ My onKeyDown ignores the keystrokes (I guess because they are within the edittext view(?)) - how do I make the program recognize an Enter Key push within an EditText key view? I have also tried to use imeOptions and importType and Eclipse gives me an error saying they don't exist in android. I have the latest version of Eclipse and am calling sdk = 3, so if you can also explain what I am doing wrong there it is appreciated. intbt -- 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: eclipse upgrade now will not run emulator
I have completely re-installed eclipse and I still get the errors. It seems as if the emulator can't find the Android Virtual Devices even though when I go to the AVD Manager all of the devices are shown as available. A second error message (in addition to the jface message) is: An error has occurred. See error log for more details. java.lang.NullPointerException If I just use RUN (instead of Run Configuration) it will run an emulation. Any help from eclipse experts or suggestions as to a better user group to try? intbt On May 20, 3:50 pm, intbt in...@tacberry.com wrote: Just allowed eclipse to uprade the emulator. Re-booted (eclipse and the PC) and now I get this error whenever I try to run any android configuration Error Thu May 20 15:32:45 PDT 2010 Problems occurred when invoking code from plug-in: org.eclipse.jface. I have a copy of the error log if that is of help. Any ideas as to what I did wrong? intbt -- 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 athttp://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] eclipse upgrade now will not run emulator
Just allowed eclipse to uprade the emulator. Re-booted (eclipse and the PC) and now I get this error whenever I try to run any android configuration Error Thu May 20 15:32:45 PDT 2010 Problems occurred when invoking code from plug-in: org.eclipse.jface. I have a copy of the error log if that is of help. Any ideas as to what I did wrong? intbt -- 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: Debug Certificate Expired
Had the same problem when the certificates on Eclipse expired after 365 days. I had to remove debug.keystore but also Eclipse required me to uninstall any project file (adb uninstall org.example.'projectname') before it would restart the project. This means, among other issues, that you lose any data in earlier versions. Also see this earlier discussion: http://groups.google.com/group/android-developers/browse_thread/thread/e4953167088d200/ca5a0ca88e7e49b5?lnk=gstq=debug+certificate#ca5a0ca88e7e49b5 On May 3, 1:28 pm, TreKing treking...@gmail.com wrote: On Mon, May 3, 2010 at 2:59 PM, Nmix nepean...@gmail.com wrote: Anyone know what's going on here? http://lmgtfy.com/?q=Debug+Certificate+expired - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- 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 athttp://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] setting button images in drawable/xml
I am getting an error from Eclipse when I use this xml file (res/ drawable/btnswitch.xml) to designate different button conditions ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/btn_st_rd / !-- pressed -- item android:state_focused=true android:drawable=@drawable/btn_st_gr / !-- focused -- item android:drawable=@drawable/btn_st_gr / !-- default -- /selector I call it in my layout file with this code: Button android:id=@+id/startTimer_btn android:src=@drawable/btnswitch android:layout_width=wrap_content android:layout_height=fill_parent / Eclipse says it can't run the configuration because I have errors but does not show any errors. And when I remove the xml code (to go back to my original code which just sets a background image for the Button) it says that now has errors. I have to restart Eclipse to get the original code to run again. Any ideas as to what I am missing? -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Re: setting button images in drawable/xml
That did it, thanks. intbt On Mar 25, 9:08 am, timo prill timo.pr...@googlemail.com wrote: you should go menu-Project-clean and let eclipse clean your project. the android R files are then rebuilt so everything should be fine afterwards. cheers Wayne Wenthin schrieb: I'll toss out what works for me. The first thing I see is that I use ImageButton instead of just Button ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_window_focused=false android:state_enabled=true android:drawable=@drawable/about_btn_normal / item android:state_window_focused=false android:state_enabled=false android:drawable=@drawable/about_btn_normal / item android:state_pressed=true android:drawable=@drawable/about_btn_pressed / item android:state_focused=true android:state_enabled=true android:drawable=@drawable/about_btn_pressed / item android:state_enabled=true android:drawable=@drawable/about_btn_normal / item android:state_focused=true android:drawable=@drawable/about_btn_normal / item android:drawable=@drawable/about_btn_normal / /selector * *ImageButton android:layout_gravity=center android:id=@+id/continue_button android:layout_width=wrap_content android:layout_height=wrap_content android:adjustViewBounds=true android:background=#0c3d97 android:src=@drawable/start_btn android:onClick=startGame / On Thu, Mar 25, 2010 at 8:56 AM, intbt in...@tacberry.com mailto:in...@tacberry.com wrote: I am getting an error from Eclipse when I use this xml file (res/ drawable/btnswitch.xml) to designate different button conditions ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/btn_st_rd / !-- pressed -- item android:state_focused=true android:drawable=@drawable/btn_st_gr / !-- focused -- item android:drawable=@drawable/btn_st_gr / !-- default -- /selector I call it in my layout file with this code: Button android:id=@+id/startTimer_btn android:src=@drawable/btnswitch android:layout_width=wrap_content android:layout_height=fill_parent / Eclipse says it can't run the configuration because I have errors but does not show any errors. And when I remove the xml code (to go back to my original code which just sets a background image for the Button) it says that now has errors. I have to restart Eclipse to get the original code to run again. Any ideas as to what I am missing? -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com http://unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- Writing code is one of few things that teaches me I don't know everything. Make Call Girl Manager great! Join the forums. http://www.fuligin.com/forums -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] Re: How to close an activity when the user clicks on home button
it may be as simple as adding android:clearTaskOnLaunch=true in your Manifest under the main activity tag to re-initialize after returning to Home screen. intbt On Feb 20, 4:54 am, Mark Murphy mmur...@commonsware.com wrote: Achanta wrote: But since I started trying to log everything to see the activity life cycle, what I observed is that onStop method is not actually being called when I click on home button. :: blink, blink :: Its being called as soon as i open my app again, which is not how I wanted it to do. The locationUpdates should stop the moment the user hits home button. I just tried it on an app I'm working on (Android 2.1), and onStop() was called at the point I pressed the HOME button. Are you doing anything unusual in your manifest vis a via android:launchMode or similar settings? The other thing is that I expected my stack to be as it is and as soon as I open my app after hitting on home button, the activity which I was previously in will be opened. But it restarted the app itself. This is what I observed in my app. Say I have a main activity A and another Activity B. I come to Activity B from Activity A. Then I click on home button. It closes the app but does not yet call onStop on B. Now I open my app and it now calls onStop on Activity B. It starts Activity A again. Now only when I click on button for activity B, it calls onRestart method on Activity B. I just tried it with this same scenario (Activity A - Activity B - HOME), and again, onStop() was called at the point I pressed HOME. So am I doing something wrong or is it supposed to work in that way or is it a bug? Well, there appears to be something afoot either with your app or with your environment. onStop(), at least as of Android 2.1, seems to behave as documented for fairly ordinary stuff. Mind you that my test code does not mess with android:launchMode or flags on activity starting or whatever, so if you are, that's something to experiment with. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Development Wiki:http://wiki.andmob.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: System.out.println(...) statements within the onCreate
You can use System.out - The output also appears on Logcat (not console) with a system.out tag. On Feb 9, 9:56 pm, Sandeep Phansekar sandeep.phanse...@gmail.com wrote: Instant of System.out.println(...) use Log.e( class/method name ,Error message); And view the output in Logcat in Eclipse by the menus: Window - Show View - Other - Android - Logcat On Tue, Feb 9, 2010 at 9:07 AM, eehksar eehk...@gmail.com wrote: Hi All, Am a newbie... could anyone explain why my System.out.println(...) statements within the onCreate of an activity are not showing up in my console ? pointers would be appreciated... regards, ps - using adt with eclipse for 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards Sandeep +91 9869736672 -- 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] Androi ASE
ASE will not install on my G1, I assume it is because I am running 1.5 and it requires 2.0. I can get ASE to run on the Eclipse emulator when it is running 2.0 (not 1.5 or 1.6). Is this correct and where is this described as a requirement for ASE? (As an aside, the G1 downloads for 1.6 at HTC/developers are not working - not sure what the problem there is...) -- 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] create drawable from image stored on sd card
I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj] = context.getResources().getDrawable(dwID); --~--~-~--~~~---~--~~ 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: create drawable from image stored on sd card
Sorry, got posted too soon I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj.createFromPath(newGame.sdShapes [xOFy.returnOrder(jj)]); In both instances newGame.sdShapes [xOFy.returnOrder(jj)] provides path to file (/sdcard/filename) On Jul 20, 8:35 am, intbt in...@tacberry.com wrote: I am trying to draw a group i fimages stored on teh sd card instead on internal storage. I can draw the internal images with my code but get no images whem I try to download from the card. I have tried 2 versions (dw[] is Drawable array) 1/ using getIdentifier int dwID = getResources().getIdentifier(newGame.sdShapes [xOFy.returnOrder(jj)], null, org.example.lookagain); dw[jj] = context.getResources().getDrawable(dwID); the error is 'no package identifier' and 2/ createFromPath dw[jj] = context.getResources().getDrawable(dwID); --~--~-~--~~~---~--~~ 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] logcat behavior
I have found that if I am trying to run Eclipse with the G1 connected (vis USB), logcat will only output info from programs running on the phone - not when I run code on the emulator. If I disconnect the phone and then run the emulator version, logcat provides the desired output. I also have now discovered that if I connect the G1, the SD Card on the emulator shows the contents of the G1 SD Card, whether I am running code on the emulator or the phone. This was a little confusing as I expected the AVD to control the SD Card when I run a virtual version, not the attached 'real' phone. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 can I give my paid app away for free to some users?
Coupons or some method of offering free or discounted versions. If you have a customer that might want to use apps as a giveaway for selected customers, it is difficult with the present Google Market set-up. On Jun 18, 11:01 am, Jason Van Anden jason.van.an...@gmail.com wrote: +1 On Thu, Jun 18, 2009 at 1:52 PM, Anna PSannapowellsm...@googlemail.com wrote: Ah - that's a shame. Discount coupons would definitely be a nice feature to have on the Market... On Jun 18, 12:06 am, Yuri Ammosov - Sadko Mobile y...@sadko.mobi wrote: DO NOT REFUND. Refund UNINSTALLS the program. YA On Jun 17, 2:17 pm, Anna PS annapowellsm...@googlemail.com wrote: Hi all So I'm about to put a paid app on the Market, but I'd like to give it free to a few users who helped to test it. Is there any way that I can give them a token or something else so that they can get it free? Or can I refund them once they've paid if I know their details? I guess the alternative would be to give them a direct download, but then they won't get updates through the Market. It'd be nice to know how to do this, and how to give discount codes as well. Any ideas anyone? Thanks! Anna --~--~-~--~~~---~--~~ 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: Getting my app in the featured section
As an aside - when I searched Apps with 'scan' your app did not appear, when I searched 'pdf' it was on the list. Good luck with your application and with Google. intbt On Jun 12, 12:39 pm, guruk ilovesi...@gmail.com wrote: just make your app so successfull that it reach 50.000 installations than from my own experience google contacts you. maybe you are not featured, but its already nice to see your app in the top app section .. chris My Days --~--~-~--~~~---~--~~ 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: Publishing Paid Apps on Android Market Can Cost You Money
I don't entirely agree with Google needs to make a profit to handle these situations. They take 30% to handle e-commerce, advertise, distribute, display, etc. If you sold a game to Game Crazy (or similar game vendor) they pay you a wholesale price and then re-sell the game. 30% is probably less than their mark-up, but on-line marketing has less expenses as well. If their customer uses a bad credit card they do not come back to you as the manufacturer and say you owe us our money back (or even worse, you have to cover our expenses.) The whole idea of Android/Google/T-Mobile offering apps is to increase their sales/reputation/stock price, they are willing to do that for 30% but they have also agreed to take the e-commerce responsibility to make it easier for poor programmers to sell product. (Google stock +31% since paid apps???) If this becomes a major issue for them, then I think their first response should be 'what is wrong with our credit card handling?' not 'let the supplier foot the bill.' intbt On Jun 5, 8:30 am, Marco Nelissen marc...@android.com wrote: On Fri, Jun 5, 2009 at 8:04 AM, Disconnect dc.disconn...@gmail.com wrote: Generally you have a method of fighting back (or at least investigating). And a contact somewhere. If I go to a broker and say Good luck getting anyone to investigate the shoplifting of 50 cents worth of bubblegum. I couldn't even get anyone to investigate the theft of my bicycle... :) 'I have a product here, please sell it for me' it is not my fault if the broker takes a bad card - that is on them, and the worst I lose is one of my product. This situation is almost identical, except the duplication cost of my product is near zero. The difference is that such a broker makes a profit selling your goods, whereas Google is not making a profit from app sales. Hypothetically speaking, if you want Google to absorb these costs, you would have to be willing to let Google make a profit on app sales, which means receiving less than the 70% you're currently getting. In essence you'd be buying insurance, from Google. This, literally, says hey, we screwed up and took a bad card. So we're charging you the fees. Sorry, we can't tell you anything about the card or help you do anything to prevent it happening again. You don't know that this was about a bad (i.e. stolen) card. It could just as well have been someone being petty and wanting their dollar back, even though they waited too long to get a refund through regular means. --~--~-~--~~~---~--~~ 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: audio codec
I am having a problem retrieving codec output and listing the bytes. Following the Breno/Sparks thread I was able to get past the errors with initializing Audio Record and my code seems to run but I get all 0's as output. I assume I am missing something in AudioRecord.read? I am trying to look at the contents of the byte array (saveBytes) after recording has stopped. my code looks like this * // tune class (main display) RecordTone.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { // init code recorder ar_test = new AudioRecord (MediaRecorder.AudioSource.MIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 15); int status = ar_test.getState(); } catch (IllegalArgumentException e) { e.printStackTrace(); } ar_test.startRecording(); while(bytesRead 4){ bytesRead = ar_test.read(saveBytes, 0, 4); } ar_test.stop(); } } * //display list of codec output arTest = new tune(); String[] arResults = new String[arTest.saveBytes.length]; System.out.println(lgth++arTest.saveBytes.length); arResults[0] = List; for(int ii=1; iiarTest.saveBytes.length-1; ii++){ arResults[ii] = Byte.toString(arTest.saveBytes [ii]); } setListAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_1, arResults)); final ListView listView = getListView(); --~--~-~--~~~---~--~~ 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: Audio record and ply the recorded audio..
This may help as well http://www.benmccann.com/dev-blog/android-audio-recording-tutorial/ I am having difficulties in using audio record - trying to save the codec byte output in an array/buffer. Any help? On Jun 3, 4:26 am, guna gunaz...@gmail.com wrote: http://android.git.kernel.org/?p=platform/packages/apps/SoundRecorder... Check this link.. On Wed, Jun 3, 2009 at 4:48 PM, vineeth Desai vineeth.desa...@gmail.comwrote: Hi I have tried with AudioRecord API's also. Warm regards, Vineeth On Tue, Jun 2, 2009 at 9:22 PM, Keith Wiley kbwi...@gmail.com wrote: Don't forget to look at AudioRecord too. It's another interface for accessing audio. On Jun 2, 4:25 am, vineeth Desai vineeth.desa...@gmail.com wrote: Hi All, Could you please let me know how to do the audio record in android emulator and play the same recorded audio. Could you please help me in proceeding in development. I tried with MediaPlayer API's also. Its not working. Warm Regards, Vineeth. -- Guna --~--~-~--~~~---~--~~ 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] Trying to retrieve codec output from Audio Record
I am having a problem retrieving codec output and listing the bytes. Following the Breno/Sparks thread I was able to get past the errors with initializing Audio Record and my code seems to run but I get all 0's as output. I assume I am missing something in AudioRecord.read? I am trying to look at the contents of the byte array (saveBytes) after recording has stopped. my code looks like this * // tune class (main display) RecordTone.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { // init code recorder ar_test = new AudioRecord (MediaRecorder.AudioSource.MIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 15); int status = ar_test.getState(); } catch (IllegalArgumentException e) { e.printStackTrace(); } ar_test.startRecording(); while(bytesRead 4){ bytesRead = ar_test.read(saveBytes, 0, 4); } ar_test.stop(); } } * //display list of codec output arTest = new tune(); String[] arResults = new String[arTest.saveBytes.length]; System.out.println(lgth++arTest.saveBytes.length); arResults[0] = List; for(int ii=1; iiarTest.saveBytes.length-1; ii++){ arResults[ii] = Byte.toString(arTest.saveBytes [ii]); } setListAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_1, arResults)); final ListView listView = getListView(); --~--~-~--~~~---~--~~ 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: device not detected in eclipse
I had a similar problem with Windows-Eclipse after I added a second AVD. I had selected one of the AVDs instead of setting the target on Automatic. Under Run - Configuration - Target, only select Automatic On Jun 1, 12:17 am, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: hi all, i have a very simple but vital problem. the android device is not detected in my eclipse. is there any way to rectify the same. i am usin ubuntu 8.04, Eclipse Platform Version: 3.4.2, adp 1, android sdk 1.5... --~--~-~--~~~---~--~~ 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: audio recorder
I think I found my problem. First - the AudioRecord only seems to work for this combination of parameters: ar_test = new AudioRecord(MediaRecorder.AudioSource.MIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 10); (buffer size must be 4096 apparently) and Second - you must have permission for RECORD_AUDIO set in manifest Onward and upward... On May 28, 6:45 pm, intbt in...@tacberry.com wrote: With version 1.5, I keep getting this error 05-29 01:36:39.440: ERROR/AudioRecord-JNI(1280): Error creating AudioRecord instance: initialization check failed. 05-29 01:36:39.450: ERROR/AudioRecord-Java(1280): [ android.media.AudioRecord ] Error code -20 when initializing native AudioRecord object. and then: 05-29 01:36:39.630: ERROR/AndroidRuntime(1280): java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord. My code: ar_test = new AudioRecord(MediaRecorder.AudioSource.MIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, 20); ar_test.read(ar_buffer, 0, 15); ar_test.startRecording(); toneTimer.setTimer(1); toneTimer.countdownTimer(); ar_test.stop(); Can some one explain what I am missing? --~--~-~--~~~---~--~~ 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] audio recorder
With version 1.5, I keep getting this error 05-29 01:36:39.440: ERROR/AudioRecord-JNI(1280): Error creating AudioRecord instance: initialization check failed. 05-29 01:36:39.450: ERROR/AudioRecord-Java(1280): [ android.media.AudioRecord ] Error code -20 when initializing native AudioRecord object. and then: 05-29 01:36:39.630: ERROR/AndroidRuntime(1280): java.lang.IllegalStateException: startRecording() called on an uninitialized AudioRecord. My code: ar_test = new AudioRecord(MediaRecorder.AudioSource.MIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, 20); ar_test.read(ar_buffer, 0, 15); ar_test.startRecording(); toneTimer.setTimer(1); toneTimer.countdownTimer(); ar_test.stop(); Can some one explain what I am missing? --~--~-~--~~~---~--~~ 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: audio codec
Thanks, I think AudioTrack may be what I am looking for to read the codec output??? http://developer.android.com/reference/android/media/AudioTrack.html On Apr 27, 6:11 pm, benmccann benjamin.j.mcc...@gmail.com wrote: The 1.5 SDK includes Raw audio recording and playback APIs. I think I'd take a look athttp://developer.android.com/reference/android/media/AudioRecord.html I'm not real sure how AudioRecord and MediaRecorder work together, if at all. It looks like maybe AudioRecord is closer to the native calls while MediaRecorder wraps AudioRecord to provide a slightly friendlier interface and additonal encoding. It's hard to tell from the JavaDocs alone. Here's a post talking about AudioRecord instantiation:http://groups.google.com/group/android-developers/browse_thread/threa... On Apr 27, 5:23 pm, intbt tacbe...@gmail.com wrote: Is there a method to access the digital output of the audio codec without first storing it into a file, a streaming output? intbt --~--~-~--~~~---~--~~ 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] audio codec
Is there a method to access the digital output of the audio codec without first storing it into a file, a streaming output? intbt --~--~-~--~~~---~--~~ 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] checking version of app
When adding a url file containing the most recent version, what format does the file need to be (text, php, html?) to be accessible from the meta-data android:name=org.openintents.updatechecker.UPDATE_URL android:value=url to version file / also can the user force a check of version from a menu item? --~--~-~--~~~---~--~~ 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: Visibility of ImageButton
Thanks for the information. Not sure how I could get out of the onclicklistener so I fixed the problem but changing the image source (image with arrow, image no arrow) within the listener (based on list position value). So it works as I wanted. On Apr 8, 12:47 pm, Mark Murphy mmur...@commonsware.com wrote: intbt wrote: I am trying to change visibility of a button (Image). However this code does not affect the image - any ideas? Prevword_btn = (ImageButton) this.findViewById(R.id.prev_btn); Prevword_btn.setVisibility(View.INVISIBLE); Nextword_btn = (ImageButton) this.findViewById(R.id.next_btn); Nextword_btn.setVisibility(View.INVISIBLE); Those should work. However, they will not take effect until you leave whatever callback you are in (e.g., onCreate() in the activity, onClick() in a button OnClickListener). Also when I try to set visibility of the Image Button in the xml layout file (main.xml) I get an error message from this code android:visibility=1 saying integers are not accepted? Correct. In XML, the values are visible, invisible, and gone. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ 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] Visibility of ImageButton
I am trying to change visibility of a button (Image). However this code does not affect the image - any ideas? Prevword_btn = (ImageButton) this.findViewById(R.id.prev_btn); Prevword_btn.setVisibility(View.INVISIBLE); Nextword_btn = (ImageButton) this.findViewById(R.id.next_btn); Nextword_btn.setVisibility(View.INVISIBLE); Also when I try to set visibility of the Image Button in the xml layout file (main.xml) I get an error message from this code android:visibility=1 saying integers are not accepted? --~--~-~--~~~---~--~~ 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] Vista does not access G1 memory card
I am trying to access the memory card but Vista says please insert a disk into removable disk H: and will not permit me to load files into the card. Any ideas as to what is wrong? --~--~-~--~~~---~--~~ 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] Database installation - Android
I am using a database for storage, I specifically do not want to use the Internet connectivity for data download. I write and install the database from a XML file on first application call. I set a flag within the code to prohibit install during app usage. However, once the user leaves the app, this flag is re-set. How do I make sure that as long as the on the app is installed on the phone, the database does NOT re-load when the app is called from the Main phone menu? Can I install on application loading from the app site as opposed to user activity? Thanks, intbt --~--~-~--~~~---~--~~ 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] multiple tables in sqlite
Hopefully some one will nmotice my 'obvious' mistake. I have created 2 tables in the database (below). When I access table c, no problem. But when I attempt to access table s I get an error message that column name x (all names give the same error) does not exist. How can 1 table get created but not the other? public class updateDB extends SQLiteOpenHelper { private static final String CREATE_TABLE_S = create table +DICT_TAB_1+ (_ID integer primary key autoincrement, COURSE_NAME text not null, SCORE number not null, PUTTS number not null, GIR number not null, FWY number not null);; private static final String CREATE_TABLE_C = create table +DICT_TAB_2+ (_ID integer primary key autoincrement, COURSE_NAME text not null, TEES text not null, SLOPE number not null, PAR number not null);; public updateDB(Context ctx){ super(ctx, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db){ db.execSQL(CREATE_TABLE_COURSE); db.execSQL(CREATE_TABLE_SCORE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){ db.execSQL(DROP TABLE IF EXISTS + DICT_TAB_1); db.execSQL(DROP TABLE IF EXISTS + DICT_TAB_2); onCreate(db); } } --~--~-~--~~~---~--~~ 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] AlertDialog.Buillder
I need to setItems from a generated ArrayList. Eclipse gives me an error that the setItems must be a int source. I have made it work with a stored Array from R.array.. How do I change my arraylist to a format accepted by the AlertDialog.Builder setItems command? This code works with a pre-defined array in arrays.xml ('test'): new AlertDialog.Builder(this) .setTitle(R.string.new_defn) .setItems(R.array.test, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialoginterface, int i) { showDefn(i); } }) .show(); } But I want to replace 'R.array.test' with 'results' - a code generated arraylist --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---