[android-developers] Re: Video with MediaRecorder
Hi all, I am also getting same error as mentioned above by coolislandsurf1981. Can any one please help me to solve this. Thanks, Manoj. On Jun 4, 5:27 am, coolislandsurf1981 wrote: > Hi everyone, > > I used the code above but the CameraView activity dies (see log > below). > > Does the emulator support video recording for sdk1.5 on Windows Vista > + Eclipse Ganymeade? > If yes, how did you get it to work? > > Note: > - I did mount an sdcard image > - I also added permission in manifest: android:name="android.permission.CAMERA"/> > - Interestingly, I do get a file created under /sdcard/test.mp4 but > the size is 0. > > Thanks again in advance! > > - > Log: > 06-03 23:44:36.151: INFO/ActivityManager(584): Starting activity: > Intent { action=android.intent.action.MAIN categories= > {android.intent.category.LAUNCHER} flags=0x1020 comp={com.nb/ > com.nb.CameraView} } > 06-03 23:44:36.261: INFO/ActivityManager(584): Start proc com.nb for > activity com.nb/.CameraView: pid=723 uid=10019 gids={1006} > 06-03 23:44:36.411: INFO/jdwp(723): received file descriptor 10 from > ADB > 06-03 23:44:36.841: INFO/WindowManager(584): Setting rotation to 1, > animFlags=0 > 06-03 23:44:36.861: INFO/WindowManager(584): Config changed: > { scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1/2 nav=3 orien=2 } > 06-03 23:44:36.911: INFO/ARMAssembler(584): generated > scanline__0077:03010104_0004_ [ 22 ipp] (41 ins) at > [0x252960:0x252a04] in 1307079 ns > 06-03 23:44:36.991: INFO/ARMAssembler(584): generated > scanline__0077:03545404_0004_ [ 47 ipp] (67 ins) at > [0x252a08:0x252b14] in 534356 ns > 06-03 23:44:37.091: INFO/DEBUG(551): *** *** *** *** *** *** *** *** > *** *** *** *** *** *** *** *** > 06-03 23:44:37.121: INFO/DEBUG(551): Build fingerprint: 'generic/sdk/ > generic/:1.5/CUPCAKE/148875:eng/test-keys' > 06-03 23:44:37.121: INFO/DEBUG(551): pid: 723, tid: 723 >>> com.nb > <<< > 06-03 23:44:37.121: INFO/DEBUG(551): signal 11 (SIGSEGV), fault addr > 0018 > 06-03 23:44:37.121: INFO/DEBUG(551): r0 ef40 r1 ece8 r2 > 41095b28 r3 > 06-03 23:44:37.121: INFO/DEBUG(551): r4 435a0ae0 r5 ab308358 r6 > a9d0 r7 bef67530 > 06-03 23:44:37.121: INFO/DEBUG(551): r8 bef67550 r9 41049cf0 10 > 41049cdc fp > 06-03 23:44:37.121: INFO/DEBUG(551): ip ad083e50 sp bef67528 lr > ad03dcf5 pc ab305408 cpsr 8030 > 06-03 23:44:37.221: DEBUG/StatusBar(584): updateResources > 06-03 23:44:37.391: INFO/DEBUG(551): #00 pc 5408 / > system/lib/libmedia_jni.so > 06-03 23:44:37.401: INFO/DEBUG(551): #01 pc e3b4 / > system/lib/libdvm.so > 06-03 23:44:37.411: INFO/DEBUG(551): #02 pc 00040a8a / > system/lib/libdvm.so > 06-03 23:44:37.411: INFO/DEBUG(551): #03 pc 00013118 / > system/lib/libdvm.so > 06-03 23:44:37.411: INFO/DEBUG(551): #04 pc 00017b1c / > system/lib/libdvm.so > 06-03 23:44:37.441: INFO/DEBUG(551): #05 pc 00017560 / > system/lib/libdvm.so > 06-03 23:44:37.452: INFO/DEBUG(551): #06 pc 00052268 / > system/lib/libdvm.so > 06-03 23:44:37.471: INFO/DEBUG(551): #07 pc 000596ee / > system/lib/libdvm.so > 06-03 23:44:37.471: INFO/DEBUG(551): #08 pc 00013118 / > system/lib/libdvm.so > 06-03 23:44:37.481: INFO/DEBUG(551): #09 pc 00017b1c / > system/lib/libdvm.so > 06-03 23:44:37.481: INFO/DEBUG(551): #10 pc 00017560 / > system/lib/libdvm.so > 06-03 23:44:37.521: INFO/DEBUG(551): #11 pc 000520ec / > system/lib/libdvm.so > 06-03 23:44:37.531: INFO/DEBUG(551): #12 pc 0003f0f8 / > system/lib/libdvm.so > 06-03 23:44:37.551: INFO/DEBUG(551): #13 pc 00031ac2 / > system/lib/libdvm.so > 06-03 23:44:37.561: INFO/DEBUG(551): #14 pc 00028280 / > system/lib/libandroid_runtime.so > 06-03 23:44:37.581: INFO/DEBUG(551): #15 pc 00028d7e / > system/lib/libandroid_runtime.so > 06-03 23:44:37.591: INFO/DEBUG(551): #16 pc 8bf2 / > system/bin/app_process > 06-03 23:44:37.621: INFO/DEBUG(551): #17 pc 0001fd1a / > system/lib/libc.so > 06-03 23:44:37.641: INFO/DEBUG(551): #18 pc bcb2 / > system/lib/libc.so > 06-03 23:44:37.641: INFO/DEBUG(551): #19 pc b000157e / > system/bin/linker > 06-03 23:44:37.651: INFO/DEBUG(551): stack: > 06-03 23:44:37.651: INFO/DEBUG(551): bef674e8 435a0ae0 > 06-03 23:44:37.651: INFO/DEBUG(551): bef674ec ad03edab /system/ > lib/libdvm.so > 06-03 23:44:37.651: INFO/DEBUG(551): bef674f0 ad082c50 > 06-03 23:44:37.651: INFO/DEBUG(551): bef674f4 41095b28 > 06-03 23:44:37.671: INFO/DEBUG(551): bef674f8 a9d0 [heap] > 06-03 23:44:37.671: INFO/DEBUG(551): bef674fc ab308828 > 06-03 23:44:37.681: INFO/DEBUG(551): bef67500 ad082888 > 06-03 23:44:37.693: INFO/DEBUG(551): bef67504 435a06f0 > 06-03 23:44:37.693: INFO/DEBUG(551): bef67508 bef67530 [stack] > 06-03 23:44:37
[android-developers] Re: Webview Broken in 1.5 SDK?
You're welcome, MIND GAME. - Bill On Jun 10, 5:02 am, MIND GAME wrote: > hii > thanks this woks for me. > > On May 12, 6:56 am, Bill Zimmerly wrote: > > > I was successful in fixing the problem (above) and this details it... > > > This line in the Webapp.java file had to be changed from this ... > > > > webview= (WebView) findViewById(R.id.webview); > > > To this... > > > > webview= (WebView) findViewById(R.id.webkit); > > > And, in the main.xml file these two lines had to be replaced... > > > > android:layout_width="wrap_content" > > > android:layout_height="wrap_content" > > > By these two... > > > > android:layout_width="fill_parent" > > > android:layout_height="fill_parent" > > > - Bill --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Clickable ListView element?
Hi, bump again. On Jul 8, 7:52 pm, eags wrote: > Bump. > > Hi someone please? I think this is probably something pretty simple > that I'm just missing. > > Thanks. > > On Jul 8, 1:20 pm, eags wrote: > > > I created a custom layout and adapter for a list view but now I cannot > > make it clickable? Is there anything to look out for here? My list > > item looks almost exactly like the alarms in the Alarm Clock app that > > comes installed with Android. Everything seems to work fine but now > > clicking on the list item does nothing. > > > I tried setting android:clickable=true and android:focusable=true > > (which already works because I can select using the trackball but I > > was just trying random things. > > > I can post code here if anyone needs more details. Thanks in advance > > for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Can't install usb driver because Windows do not pop "New hardware wizard"
Did you enable the usb debug option on your HTC magic? I ever encountered same problem. After XP find a new hardware, you maybe encounter the failed installation problem. Then you have to re-install again. Good luck.. 2009/7/9 Victor Lin > > Hi, > > I want to install usb driver on my windws xp to debug on my HTC Magic > phone, I follow steps here: > > http://developer.android.com/guide/developing/device.html > > But I find that when I plugin the connecting cable to my phone, > windows xp just treat it as a storage device. There is no "New > hardware wizard" pops up. How can I do to install usb driver? Any > idea? > > Thanks. > Victor Lin. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Getting Blank while adding Table rows dynamically
Hi, I am trying to add table row dynamically in to a table lay out, But its showing bank.my code is TableLayout tl = (TableLayout) findViewById(R.id.maintable); TableRow tableRow=new TableRow (this); // tableRow.setLayoutParams(new LayoutParams (LayoutParams.WRAP_CONTENT, // LayoutParams.WRAP_CONTENT)); // // textView=new TextView(this); // textView.setLayoutParams(new LayoutParams(75,35)); // textView.setText(exhibitData.getExhibitName()); // textView.setTextColor(Color.BLACK); // textView.setBackgroundColor(Color.CYAN); // checkBox= new CheckBox(this); // checkBox.setLayoutParams(new LayoutParams(75,35)); // checkBox.setId(exhibitData.getCheckBoxID()); // tableRow.setOrientation(1); // tableRow.setBackgroundColor(Color.YELLOW); // tableRow.addView(textView,new TableLayout.LayoutParams( // LayoutParams.WRAP_CONTENT, // LayoutParams.WRAP_CONTENT)); // tableRow.addView(checkBox,new TableLayout.LayoutParams( // LayoutParams.WRAP_CONTENT, // LayoutParams.WRAP_CONTENT)); // layout.addView(tableRow,new TableLayout.LayoutParams( // LayoutParams.WRAP_CONTENT, // LayoutParams.WRAP_CONTENT)); list.add(exhibitData.getExhibitName()); list.add("CHECKBOX"); idList.add(exhibitData.getCheckBoxID()); // System.out.println(idList.size()+""+list.size()); // System.out.println(exhibitData.getExhibitName()); // System.out.println(exhibitData.getCheckBoxID()); // Create a TableRow and give it an ID // TableLayout tr = new TableLayout(this); // tr.setId(100); // tr.setLayoutParams(new LayoutParams( // LayoutParams.FILL_PARENT, // LayoutParams.WRAP_CONTENT)); // tr.setBackgroundColor(Color.GRAY); // // Create a TextView to house the name of the province // TextView labelTV = new TextView(this); // // labelTV.setId(200+current); // labelTV.setText(exhibitData.getExhibitName()); // labelTV.setTextColor(Color.BLACK); // labelTV.setLayoutParams(new LayoutParams( // LayoutParams.FILL_PARENT, // LayoutParams.WRAP_CONTENT)); // tr.addView(labelTV); // // // Create a TextView to house the value of the after- tax income // TextView valueTV = new TextView(this); // // valueTV.setId(current); // valueTV.setText("exhibitData.getCheckBoxID()"); // valueTV.setTextColor(Color.BLACK); // valueTV.setLayoutParams(new LayoutParams( // LayoutParams.FILL_PARENT, // LayoutParams.WRAP_CONTENT)); // tr.addView(valueTV); // // // Add the TableRow to the TableLayout // tl.addView(tr, new TableLayout.LayoutParams( // LayoutParams.FILL_PARENT, // LayoutParams.WRAP_CONTENT)); lay out xml http://schemas.android.com/apk/res/ android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchColumns="0,1" android:id="@+id/maintable" > I am not getting what i am missing, Please any one help me to solve this 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: Widget not working properly when changing orientation
I mean I am able to create widget on the home screen successfully. When I will click on the widget, it will work fine in the below cases. 1) When widget is created newly in portrait mode. 2) When widget is created newly in Landscape mode But once I will switch to Landscape from Portrait mode the widget which was created in Portrait will not work, I mean when I clicked on the widget it is not responding. Similarly when I will switch to Portrait from Landscape mode the widget which was created in Landscape is not responding. Below is my code. import java.util.LinkedList; import java.util.Queue; import android.app.Service; import android.appwidget.AppWidgetManager; import android.content.Intent; import android.os.IBinder; import android.widget.RemoteViews; public class UpdateService extends Service { private static final String TAG = "UpdateService"; private static Queue sAppWidgetIds = new LinkedList (); public static final String ACTION_UPDATE_ALL = "com.lge.android.memo.UPDATE_ALL"; public static void requestUpdate(int[] appWidgetIds) { for (int appWidgetId : appWidgetIds) { sAppWidgetIds.add(appWidgetId); } } private static boolean hasMoreUpdates() { boolean hasMore = !sAppWidgetIds.isEmpty(); if (!hasMore) { } return hasMore; } private static int getNextUpdate() { if (sAppWidgetIds.peek() == null) { return AppWidgetManager.INVALID_APPWIDGET_ID; } else { return sAppWidgetIds.poll(); } } @Override public void onStart(Intent intent, int startId) { AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this); while (hasMoreUpdates()) { int appWidgetId = getNextUpdate(); RemoteViews updateViews = null; updateViews = MemoAppWidgetProvider.buildUpdate(this, appWidgetId); if (updateViews != null) { appWidgetManager.updateAppWidget(appWidgetId, updateViews); } } stopSelf(); } @Override public IBinder onBind(Intent intent) { return null; } } import java.io.File; import com.lge.android.memo.Memo.Memos; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.widget.RemoteViews; // Need the following import to get access to the app resources, since this // class is in a sub-package. public class MemoAppWidgetProvider extends AppWidgetProvider { // log tag private static final String TAG = "MemoAppWidgetProvider"; public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.d(TAG, "onUpdate"); if (appWidgetIds == null) { appWidgetIds = appWidgetManager.getAppWidgetIds( new ComponentName(context, MemoAppWidgetProvider.class)); } // Request update for these widgets and launch updater service UpdateService.requestUpdate(appWidgetIds); context.startService(new Intent(context, UpdateService.class)); } public void onDeleted(Context context, int[] appWidgetIds) { Log.d(TAG, "onDeleted"); // When the user deletes the widget, delete the preference associated with it. final int N = appWidgetIds.length; Cursor widgetID = null; File fileDir = null; String memoTitle = ""; for (int i=0; i=6? 6 : len_text); } PendingIntent pending = PendingIntent.getActivity(context, id , detailIntent ,0); RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget_provider); views.setOnClickPendingIntent(R.id.memo_full, pending); views.setTextViewText(R.id.appwidget_text, title); return views; } } Thanks in advance On Jul 8, 9:05 pm, Jack Ha wrote: > What do you mean the widget is not able to launch? Please post your > source code here if possible. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > On Jul 8, 1:49 am, sunita
[android-developers] Can't install usb driver because Windows do not pop "New hardware wizard"
Hi, I want to install usb driver on my windws xp to debug on my HTC Magic phone, I follow steps here: http://developer.android.com/guide/developing/device.html But I find that when I plugin the connecting cable to my phone, windows xp just treat it as a storage device. There is no "New hardware wizard" pops up. How can I do to install usb driver? Any idea? Thanks. Victor Lin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Sent email via intent removing newline characters
This comment is not going to help you but maybe you could help me... Are you using the emulator or a device? We are trying to get an intent.send to work on the emulator but keep getting the No applications can perform this action. Gmail is working on the emulator with IMAP but we do not have access to a real device yet. On Jul 7, 11:07 pm, Hayden wrote: > No ideas what may be causing this? > > On Jul 7, 12:36 pm, Hayden wrote: > > > The quick summary of my problem is after creating an email with an > > intent, when Gmail actually sends it all newline characters are > > removed. > > > In my app, there is an option to send text via email to friends using > > an intent. The text has newline characters to space out the > > paragraphs, and when the Gmail app is opened I can see all separations > > are in place, but after actually sending the email, the recipient's > > email does not contain any newline char's so all the text is squished > > together. If the email draft is saved instead of sending the email, > > the newline characters are kept in place and the paragraph's are > > spaced correctly (though again, once you actually send it the newline > > char's are removed). > > > Does Gmail not like newline char's? If that's the case, is there > > another way I should go about spacing paragraphs when sending emails > > with an intent? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 could I customize the launcher without modify the SDK?
It will pop-up a dialog to let me select my application or original Home to start with. Could I set any attribute to bypass this dialog force to use my app as launcher? Thank you very much On Jul 9, 10:34 am, Siu Man Yu wrote: > Thank you for your fast response. > > However, it reports error on startup again and selected the "Home > Sample" options. > As I need to restart my emulator to run the launcher, is there any > method I could debug for that? > > On Jul 9, 12:35 am, Mark Murphy wrote: > > > > > Siu Man Yu wrote: > > > I would like to build my ownlauncherapplication. > > > Beside modify theLauncher.apk in the SDK, is there any other method > > > to replace my own application as the home menu? > > > Look in the following directory inside your Android 1.5 SDK: > > > platforms/android-1.5/samples/Home > > > That contains a sample replacement Home application. > > > I suspect there is at least one other open source replacement home > > application, though I am not certain. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 got syntax error of files of svn under eclipse
I see the same. Also, somehow the .svn directories are being created under \bin even though my SVN is setup to ignore \bin. Rud On Jul 8, 8:20 am, Victor Lin wrote: > Hi, > > I am developing android program under eplicse environment. I use svn > to store all my files. But it seems that svn files cause some problem. > > I got some errors like this: > > Description Resource Path Location Type > syntax error entries /PowerGrid/src/com/ez2learn/android/ > powergrid/.svn line 1 Android AIDL Problem > > It seems android system wallk all directories under src, and try to > parse files under .svn folder. Is that bug? how can I fix it? > > Thanks. > Victor Lin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Clickable ListView element?
Bump. Hi someone please? I think this is probably something pretty simple that I'm just missing. Thanks. On Jul 8, 1:20 pm, eags wrote: > I created a custom layout and adapter for a list view but now I cannot > make it clickable? Is there anything to look out for here? My list > item looks almost exactly like the alarms in the Alarm Clock app that > comes installed with Android. Everything seems to work fine but now > clicking on the list item does nothing. > > I tried setting android:clickable=true and android:focusable=true > (which already works because I can select using the trackball but I > was just trying random things. > > I can post code here if anyone needs more details. Thanks in advance > for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 could I customize the launcher without modify the SDK?
Thank you for your fast response. However, it reports error on startup again and selected the "Home Sample" options. As I need to restart my emulator to run the launcher, is there any method I could debug for that? On Jul 9, 12:35 am, Mark Murphy wrote: > Siu Man Yu wrote: > > I would like to build my ownlauncherapplication. > > Beside modify theLauncher.apk in the SDK, is there any other method > > to replace my own application as the home menu? > > Look in the following directory inside your Android 1.5 SDK: > > platforms/android-1.5/samples/Home > > That contains a sample replacement Home application. > > I suspect there is at least one other open source replacement home > application, though I am not certain. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Converting an image captured by camera to grayscale
You can try something like the following: Bitmap grayscaleBitmap = Bitmap.createBitmap( colorBitmap.getWidth(), colorBitmap.getHeight(), Bitmap.Config.RGB_565); Canvas c = new Canvas(grayscaleBitmap); Paint p = new Paint(); ColorMatrix cm = new ColorMatrix(); cm.setSaturation(0); ColorMatrixColorFilter cmcf = new ColorMatrixColorFilter(cm); p.setColorFilter(cmcf); c.drawBitmap(colorBitmap, 0, 0, p); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 8, 3:22 pm, Sharmila wrote: > Hi guys, > I have a camera application that captures a 640x480 image.I want to > convert this image to grayscale.I know I have to use the setSaturatio > (float sat) in the ColorMatrix method to zero but I dnt know how I can > set it to grayscale... > Can someone please help me out? > 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] Saving Scroll Position When Activity Returns
How can I save and load the scroll position of a listview that is destroyed/hidden/paused. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 use BitmapFactory.decodeStream to specify the size of my output Bitmap?
I think I know what is wrong outHeight is output values, not input values. On Wed, Jul 8, 2009 at 4:11 PM, n179911 wrote: > Hi, > > I have the following code which I tried to build a Bitmap from an > input stream and I want my output bitmap to be 20 x 20: > > BitmapFactory.Options opts = new BitmapFactory.Options(); > opts.outHeight = 20; > opts.outWidth = 20; > > InputStream stream = // an input stream to my image > Bitmap bm = BitmapFactory.decodeStream(stream, null, opts); > > But when I tried it, I do get a bitmap from the inputstream, but it > does not scale it to 20x20 which I specified in the > BitmapFactory.Options. > > Can you please tell me what am I missing? > > 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] How to use BitmapFactory.decodeStream to specify the size of my output Bitmap?
Hi, I have the following code which I tried to build a Bitmap from an input stream and I want my output bitmap to be 20 x 20: BitmapFactory.Options opts = new BitmapFactory.Options(); opts.outHeight = 20; opts.outWidth = 20; InputStream stream = // an input stream to my image Bitmap bm = BitmapFactory.decodeStream(stream, null, opts); But when I tried it, I do get a bitmap from the inputstream, but it does not scale it to 20x20 which I specified in the BitmapFactory.Options. Can you please tell me what am I missing? 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: dip and setting values in code
thanks, appreciate that! On Jul 8, 2:13 am, Romain Guy wrote: > int dip = (int) (20 * > aContext.getResources().getDisplayMetrics().density + 0.5f); > > > > On Tue, Jul 7, 2009 at 1:57 PM, kabir wrote: > > > Hi > > > I have read about using a 'dip' scale rather than just px, this is > > straightforward to implement in XML. > > But how do I adjust values accordingly in the java code? For example: > > > tv.setTextSize(20) > > > will result in text of size 20 px right? What's the quickest way of > > making this 20 dip, other than adding a resource? > > > Thanks > > > Kabir > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 hide user dictionary? or suggested words on keyboard
On Wed, Jul 8, 2009 at 3:16 PM, Eric F wrote: > 1) An extra dictionary for use auto-completing for that field You would be best off using AutoCompleteTextView, which allows you to generate your own completions of anything you want for the text being typed. (If you don't like the exact behavior of it, you can implement your own version using the same IME APIs it does such as InputMethodManager.displayCompletions(); not that this API is public but very not documented, so your best approach would be to look at the code to AutoCompleteTextView.) -- 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 -~--~~~~--~~--~--~---
[android-developers] Converting an image captured by camera to grayscale
Hi guys, I have a camera application that captures a 640x480 image.I want to convert this image to grayscale.I know I have to use the setSaturatio (float sat) in the ColorMatrix method to zero but I dnt know how I can set it to grayscale... Can someone please help me out? 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: How to hide user dictionary? or suggested words on keyboard
Cool text search! It seems like the best platform enhancement to cover this would be to have a property on text fields that controls two things: 1) An extra dictionary for use auto-completing for that field 2) whether or not the phone's global dictionary should be used (and if custom dictionary from #1 is also present, combine the two) That way, say I was writing a text based adventure game, and it had all sorts of special sci-fi objects in it that the user had to interact with, those words could be added to a custom dictionary and added to the phone's normal suggestion dictionary. Or in the case of a text field that isn't going to receive natural language input, no dictionary should be supplied and suggestions won't happen at all. Perhaps make a suggestion on the framework list? -E On Jul 8, 1:03 pm, ggcespia wrote: > Our entire product is geared around auto-complete, so the suggested > words are useless in all of our applications - of which we are > shipping about 40 apps at the moment. Do you know of a way to disable > this? Here is a sample video of our app > structure:http://www.youtube.com/boopsieinc#play/search/1/9fjTC6yoDVA You > can > see how the suggested words box on Android 1.5 basically gets in the > way. > > On Jul 1, 11:49 am, Andrew Burgess wrote: > > > > > This shouldn't happen if your text field is set as a password field, then > > that shouldn't be happening. Make sure to set your EditText.setInputType to > > TYPE_TEXT_VARIATION_PASSWORD > > > On Wed, Jul 1, 2009 at 2:17 PM, cvance383 wrote: > > > > Normally I agree, but this is really inconvenient when the text field > > > is for a password. 1) most passwords arent words, so it wont help 2) > > > it shows the password in visible text 3) it makes the password hard to > > > enter, since it autocorrects > > > > On Jul 1, 2:12 pm, Andrew Burgess wrote: > > > > I haven't really looked into this, but I think that since this is a user > > > > preference, it should be up to the user whether suggested words pop up > > > > or > > > > not. > > > > > On Wed, Jul 1, 2009 at 1:54 PM, cvance383 wrote: > > > > > > ?? i know this is a simple thing i just cant find it anywhere. I have > > > > > searched for hours > > > > > > On Jun 29, 12:29 pm, cvance383 wrote: > > > > > > bump. anyone? > > > > > > > On Jun 26, 2:26 pm, cvance383 wrote: > > > > > > > > How can I hide the suggested words or turn off auto complete for > > > the > > > > > > > virtual keyboard? Thanks ;) > > > > > -- > > > > Andrew Burgess > > > -- > > Andrew Burgess --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Encrypt files
Android has javax.crypto. I would utilize that to read and write encrypted files, I don't think a partition or driver will add value in this case. http://developer.android.com/reference/javax/crypto/package-summary.html Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 8, 3:16 am, John Smith wrote: > 2009/7/7 Cyril ROQUES > > > I need to encrypt some files but the user must have access to them in > > both read/write > > > I would to create a virtual partition and mount it into a folder but how to > > link an application with a folder ? or create a driver ? > > > If this approach can’t run maybe with a live folder but I don’t know how to > > save new file into it > > > If you have idea or different approach for this problem your are welcome > > You would be best just reading and writing encrypted data, rather than > trying to mess with partitions or other things that either need root access > to do, or very low system stuff. > > While I haven't really looked into this, if JAVA itself can't do it, you can > always use the bouncycastle libs can do crypto. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: ListView inside LinearLayout inside ScrollView
You're a genius! I pretty much did exactly what you said and it works perfectly now! BTW, I will be getting at least your Advanced Dev book, if not the Tutorials book as well! On Jul 8, 2:03 pm, Mark Murphy wrote: > Michael J wrote: > > So I'm using a modified version of the SectionedAdapter and it seems > > to be working quite well. The only issue is that I want to let each > > "section" adapter to determine the clickability of it's items. It > > seems like with the SectionedAdapter, all items except the headers are > > clickable. How exactly would I modify SectionedAdapter.isEnabled() to > > use the corresponding section's isEnabled()? > > Off the cuff, I'd try: > > Step #1: Modify the Section inner class of SectionedAdapter to hold an > isEnabled boolean, with an appropriate constructor parameter > > Step #2: Modify SectionedAdapter#addSection() to take an isEnabled > boolean and pass it to the Section constructor > > Step #3: Modify SectionedAdapter#isEnabled() to do a logical AND between > the current logic (getItemViewType(position)!=TYPE_SECTION_HEADER) and > the Section's isEnabled flag, for whatever Section corresponds to the > supplied position > > > I've spent time looking > > at the methods used for getItem(), getViewType(), and getView() which > > seem to do similar things, but honestly don't quite understand what's > > being done... > > Well, um, it's, er, explained in the book. :-) And if you've read the > chapter and still don't understand, then I need to do a better job on > that chapter. > > Upshot: SectionedAdapter implements a variant of the Aggregator pattern. > It implements the Adapter methods in such a way that the Section for a > given position determines what happens (e.g., what View goes with a > given position). Right now, isEnabled() only needs to worry about > whether or not the position corresponds to a heading -- in what you want > to do, you need to also see what the Section thinks. > > Also, bear in mind that it *is* just a book example, designed to > demonstrate a technique (in concert with the book itself). Use of this > code in a nuclear power plant or heart monitor -- let alone a > nuclear-powered heart monitor -- is not recommended... ;-) > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Training:http://commonsware.com/training.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 -~--~~~~--~~--~--~---
[android-developers] Re: Disappearing Views with ListView
Nikola Miljkovic wrote: > By the way...I cannot find any documentation about layout_weight. Can > you describe what it means? http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html For whatever reason, the attribute (layout_weight) is not documented, though the corresponding public field on the Java object (weight) is: "Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0." -- 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: Disappearing Views with ListView
By the way...I cannot find any documentation about layout_weight. Can you describe what it means? Thanks, Nikola On Jul 7, 8:39 pm, Nikola Miljkovic wrote: > Perfect. Thanks! > > On Jul 7, 8:11 pm, Romain Guy wrote: > > > Hi, > > > Do not use wrap_content on the ListView. Instead, use > > layout_height="0dip" and layout_weight="1.0". > > > On Tue, Jul 7, 2009 at 1:53 PM, NikolaMiljkovic wrote: > > > > Hello all, > > > > I am having a problem with ListViews. After adding a few items to the > > > list and it becomes larger than the layout, my cancel button > > > disappears. Scrolling and everything else on the ListView still work > > > fine, but it replaces the views I have below it. Anyone else run into > > > this issue? Am I missing something? > > > > Here is an example layout: > > > > http://schemas.android.com/apk/res/ > > > android" > > > android:orientation="vertical" > > > android:layout_width="fill_parent" > > > android:layout_height="fill_parent" > > > > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" > > > /> > > > > > android:layout_width="100dip" > > > android:layout_height="wrap_content" > > > android:text="Cancel" > > > /> > > > > > > -- > > Romain Guy > > Android framework engineer > > romain...@android.com > > > Note: please don't send private questions to me, as I don't have time > > to provide private support. All such questions should be posted on > > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] android socket server
Currently, my Android app is client and talks to other clients through a server proxy. I'd like to get rid of the server proxy if at all possible. Is it possible for an Android application to implement a socket server? If so, how would a client on the local network find it? I could find imagine several solutions, for example, the Android server app registers its address with a remote server and other clients check with the remote server for the address or alternatively, display the address in the Android app. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Clickable ListView element?
And here are code snips of how I use. To set up: aa = new AlarmListAdapter(this, R.layout.alarmlist_item, alarms); alarmsListView.setAdapter(aa); To update: switch( requestCode ) { case( NEW_ALARM ): { Alarm newAlarm = new Alarm(expiryString, title, message); alarms.add(newAlarm); aa.notifyDataSetChanged(); break; } case( EDIT_ALARM ): { // If we only get the default value of -1 then something is wrong if( index == -1 ) throw new RuntimeException(); alarms.get(index).setExpiry(expiryString); alarms.get(index).setTitle(title); alarms.get(index).setMessage(message); aa.notifyDataSetChanged(); break; } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Clickable ListView element?
And here is the adapter: package net.esalazar.alarmsutta; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.LinearLayout; import android.widget.TextView; public class AlarmListAdapter extends ArrayAdapter { int resource; public AlarmListAdapter(Context context, int textViewResourceId, List objects) { super(context, textViewResourceId, objects); resource = textViewResourceId; } @Override public View getView(int position, View convertView, ViewGroup parent) { LinearLayout alarmView; Alarm item = getItem(position); Date expiry = item.getExpiry(); String title = item.getTitle(); SimpleDateFormat sdf; sdf = new SimpleDateFormat("MM/dd/"); String expiryDateString = sdf.format(expiry); sdf = new SimpleDateFormat("hh:mm"); String expiryTimeString = sdf.format(expiry); String message = item.getMessage(); if(convertView == null) { alarmView = new LinearLayout(getContext()); String inflater = Context.LAYOUT_INFLATER_SERVICE; LayoutInflater vi; vi = (LayoutInflater)getContext().getSystemService(inflater); vi.inflate(resource, alarmView, true); } else { alarmView = (LinearLayout)convertView; } Calendar calendar = Calendar.getInstance(); calendar.setTime(expiry); // Get references to all the elements we wish to muck with TextView titleTextView = (TextView)alarmView.findViewById (R.id.itemTitleTextView); TextView messageTextView = (TextView)alarmView.findViewById (R.id.itemMessageTextView); TextView timeTextView = (TextView)alarmView.findViewById (R.id.itemTimeTextView); TextView dimmedAA; if( calendar.get(Calendar.HOUR_OF_DAY) > 12 ) { dimmedAA = (TextView)alarmView.findViewById(R.id.itemAMTextView); } else { dimmedAA = (TextView)alarmView.findViewById(R.id.itemPMTextView); } // Dim the AM/PM label accordingly leaving the correct one bright dimmedAA.setTextColor(13355979); // Set the title and message accordingly. We prefix the message with // the date just to be coy. titleTextView.setText(title); messageTextView.setText( expiryDateString + " " + message ); timeTextView.setText(expiryTimeString); return alarmView; } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Clickable ListView element?
Ok, here is the layout: http://schemas.android.com/apk/res/ android" android:orientation="horizontal" android:gravity="center_vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="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] Clickable ListView element?
I created a custom layout and adapter for a list view but now I cannot make it clickable? Is there anything to look out for here? My list item looks almost exactly like the alarms in the Alarm Clock app that comes installed with Android. Everything seems to work fine but now clicking on the list item does nothing. I tried setting android:clickable=true and android:focusable=true (which already works because I can select using the trackball but I was just trying random things. I can post code here if anyone needs more details. Thanks in advance for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 hide user dictionary? or suggested words on keyboard
Our entire product is geared around auto-complete, so the suggested words are useless in all of our applications - of which we are shipping about 40 apps at the moment. Do you know of a way to disable this? Here is a sample video of our app structure: http://www.youtube.com/boopsieinc#play/search/1/9fjTC6yoDVAYou can see how the suggested words box on Android 1.5 basically gets in the way. On Jul 1, 11:49 am, Andrew Burgess wrote: > This shouldn't happen if your text field is set as a password field, then > that shouldn't be happening. Make sure to set your EditText.setInputType to > TYPE_TEXT_VARIATION_PASSWORD > > > > On Wed, Jul 1, 2009 at 2:17 PM, cvance383 wrote: > > > Normally I agree, but this is really inconvenient when the text field > > is for a password. 1) most passwords arent words, so it wont help 2) > > it shows the password in visible text 3) it makes the password hard to > > enter, since it autocorrects > > > On Jul 1, 2:12 pm, Andrew Burgess wrote: > > > I haven't really looked into this, but I think that since this is a user > > > preference, it should be up to the user whether suggested words pop up or > > > not. > > > > On Wed, Jul 1, 2009 at 1:54 PM, cvance383 wrote: > > > > > ?? i know this is a simple thing i just cant find it anywhere. I have > > > > searched for hours > > > > > On Jun 29, 12:29 pm, cvance383 wrote: > > > > > bump. anyone? > > > > > > On Jun 26, 2:26 pm, cvance383 wrote: > > > > > > > How can I hide the suggested words or turn off auto complete for > > the > > > > > > virtual keyboard? Thanks ;) > > > > -- > > > Andrew Burgess > > -- > Andrew Burgess --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Packet Driver and RIL Header Files
Anyone know anything about 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 -~--~~~~--~~--~--~---
[android-developers] Re: converting files to android
Even though I have no idea what you're asking, I suspect that android-developers is the wrong group for it. On Wed, Jul 8, 2009 at 11:51 AM, chris.compo wrote: > > Is it easy to convert files or can you download a file converter ? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Broadcasting video with Android - without writing to local files
Hi, I am not sure if this is common knowledge, but I have found a way to broadcast video without writing to local files using the standard MediaRecorder class. I wrote a blog entry about it: http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system Best Regards, Gergely --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Bitmap, extracting a particular area from the bitmap as a bitmap
Probably because createBitmap(Bitmap, int, int, int, int) returns an immutable Bitmap. On Wed, Jul 8, 2009 at 12:16 PM, Jack Ha wrote: > > Is there a reason why Bitmap.createBitmap is being called twice? > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > > > On Jul 8, 11:35 am, karthikr wrote: >> Hi Guys, >> >> I need to extract a particular area from a Bitmap as a Bitmap. >> >> I have the starting co-ordinate of the main bitmap and the length and >> width of how much is to be extracted. >> >> I tried out the below code, >> >> Bitmap.createBitmap(Bitmap.createBitmap(mBitmapSource,0,0,30, 30)); >> >> Where 0 and 0 denote the starting position and 30 and 30 denotes the >> width and height respectively. >> >> But on executing i get IllegalArgumentException, checkWidthHeight >> should be > 0. >> >> Can someone please help me. >> >> Regards, >> R.Karthik > > > -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Bitmap, extracting a particular area from the bitmap as a bitmap
Is there a reason why Bitmap.createBitmap is being called twice? -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 8, 11:35 am, karthikr wrote: > Hi Guys, > > I need to extract a particular area from a Bitmap as a Bitmap. > > I have the starting co-ordinate of the main bitmap and the length and > width of how much is to be extracted. > > I tried out the below code, > > Bitmap.createBitmap(Bitmap.createBitmap(mBitmapSource,0,0,30, 30)); > > Where 0 and 0 denote the starting position and 30 and 30 denotes the > width and height respectively. > > But on executing i get IllegalArgumentException, checkWidthHeight > should be > 0. > > Can someone please help me. > > Regards, > R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: ListView inside LinearLayout inside ScrollView
Michael J wrote: > So I'm using a modified version of the SectionedAdapter and it seems > to be working quite well. The only issue is that I want to let each > "section" adapter to determine the clickability of it's items. It > seems like with the SectionedAdapter, all items except the headers are > clickable. How exactly would I modify SectionedAdapter.isEnabled() to > use the corresponding section's isEnabled()? Off the cuff, I'd try: Step #1: Modify the Section inner class of SectionedAdapter to hold an isEnabled boolean, with an appropriate constructor parameter Step #2: Modify SectionedAdapter#addSection() to take an isEnabled boolean and pass it to the Section constructor Step #3: Modify SectionedAdapter#isEnabled() to do a logical AND between the current logic (getItemViewType(position)!=TYPE_SECTION_HEADER) and the Section's isEnabled flag, for whatever Section corresponds to the supplied position > I've spent time looking > at the methods used for getItem(), getViewType(), and getView() which > seem to do similar things, but honestly don't quite understand what's > being done... Well, um, it's, er, explained in the book. :-) And if you've read the chapter and still don't understand, then I need to do a better job on that chapter. Upshot: SectionedAdapter implements a variant of the Aggregator pattern. It implements the Adapter methods in such a way that the Section for a given position determines what happens (e.g., what View goes with a given position). Right now, isEnabled() only needs to worry about whether or not the position corresponds to a heading -- in what you want to do, you need to also see what the Section thinks. Also, bear in mind that it *is* just a book example, designed to demonstrate a technique (in concert with the book itself). Use of this code in a nuclear power plant or heart monitor -- let alone a nuclear-powered heart monitor -- is not recommended... ;-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Training: http://commonsware.com/training.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 -~--~~~~--~~--~--~---
[android-developers] converting files to android
Is it easy to convert files or can you download a file converter ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: ListView inside LinearLayout inside ScrollView
So I'm using a modified version of the SectionedAdapter and it seems to be working quite well. The only issue is that I want to let each "section" adapter to determine the clickability of it's items. It seems like with the SectionedAdapter, all items except the headers are clickable. How exactly would I modify SectionedAdapter.isEnabled() to use the corresponding section's isEnabled()? I've spent time looking at the methods used for getItem(), getViewType(), and getView() which seem to do similar things, but honestly don't quite understand what's being done... Thanks again for all your help! On Jul 7, 11:51 am, "Mark Murphy" wrote: > > So are you saying I need to revert back to my original method of using > > a ListView with a custom adapter and add my "pre-list" content Views > > to the adapter itself? > > No, and I'm not sure, respectively. > > First, in terms of "need", I'm not saying you need to do anything. You > said you wanted a UI like the one screen in Android Market, and I > indicated how I would build it. It may be there is a way to achieve your > desired result from your current base. > > Second, I don't know what you mean by "'pre-list' content views" with > respect to my description. If you mean fixed items, like the logo pane or > the Open/Install pane in the Android Market screen, those are not in the > adapter because they are not in the scrolling list. If, on the other hand, > you're referring to various bits of things in the scrolling area (e.g., My > Rating versus user comments versus other entries in the Android Market > screen list), then yes, they would be returned as rows by the adapter. > > For example, Jeff Sharkey wrote up a post shortly before he was enGoogled, > demonstrating creating a ListView that looks like a UI for > SharedPreferences: > > http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-... > > His code probably still works, though it was for Android 0.9 and so your > kilometerage may vary. I have my own spin on his example, up to date for > Android 1.5, which you can download as part of the source code from: > > http://commonsware.com/AdvAndroid/ > > Both his and mine are focused on things that are mostly data, culled from > multiple adapters, with headings. I'd approach the Android Market scenario > a bit differently, but using the same underlying tools (e.g., > getViewTypeCount(), isEnabled()). > > Note to self: the Android Market scenario would be a nice example for a > future book revision... ;-) > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android App Developer Books:http://commonsware.com/books.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 -~--~~~~--~~--~--~---
[android-developers] Bitmap, extracting a particular area from the bitmap as a bitmap
Hi Guys, I need to extract a particular area from a Bitmap as a Bitmap. I have the starting co-ordinate of the main bitmap and the length and width of how much is to be extracted. I tried out the below code, Bitmap.createBitmap(Bitmap.createBitmap(mBitmapSource,0,0,30, 30)); Where 0 and 0 denote the starting position and 30 and 30 denotes the width and height respectively. But on executing i get IllegalArgumentException, checkWidthHeight should be > 0. Can someone please help me. Regards, R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: uploads disabled
The basic issue with G1 users today is the need to send a picture somewhere (facebook, ebay, craigslist, etc), followed by simply uploading other types of files for attachments in email. To fix the first problem, allowing access from the browser to the picture gallery would work and I am not sure that is a big security issue given other apps available access this folder. On Jul 8, 6:29 am, John Smith wrote: > 2009/7/8 Charlie Collins > > > > > I haven't heard any official stance on this, but I would imagine there > > are security concerns, and then other technical hurdles on this front > > (having a file browser, and then which files each activity has access > > to). > > And the same security and techincal issues don't exist on PCs? > > It's trivial to do such a file browser code, others have created file > browsers already and I don't think google staff would have an issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 style my own styleable with a style? (Custom view class with custom attribute)
Thank you very much, Dianne! It's alway amazing how quick and correct your answers are ;) This solves the problems I mentioned above, and some others I was not even aware of. I've seen that TypedArray-stuff in the plattform source before, e.g. in the constructor of TextView.java, but did not quite get its meaning and forgot about it. Your example above makes it much clearer. I was working along the instructions on http://developer.android.com/guide/topics/ui/custom-components.html to create my component. Maybe the part that sais "Note that you also might introduce your own attributes and parameters into the XML that can be pulled out and used by your constructor." should elaborate some more, or should be linked to the API demo you provided above. On 8 Jul., 17:50, Dianne Hackborn wrote: > If you are using attrs.getAttributeResourceValue(), then you are not using > the style/theming system at all. That is, there was no purpose to defining > a an at all, that function is just retrieving a > raw value from a resource for a given name. (This is also why the > "http://some.weird.url.com/seems/not/to/matter"; URI doesn't matter -- you > have declared it as a namespace in your XML, and you have retrieved the > attribute in that namespace in your Java code, and that is all that is > happening. You just made up a namespace and used it.) > > You can find a complete example if declaring styleables and themes in API > demos. Basically you declare a styleable like this (there is no "id" field > that is used): > > > > > > > > > Then use it in a layout like this: > > http://schemas.android.com/apk/res/android"; > > > xmlns:app="http://schemas.android.com/apk/res/com.example.android.apis"; > > android:orientation="vertical" > android:layout_width="fill_parent" > > android:layout_height="wrap_content"> > > > android:background="@drawable/green" > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > app:text="Green" app:textColor="#" /> > > > > Note that the URI of xmlns:app is very important, this is the namespace for > android resources (the first part) in your package (the second part). > > Finally to retrieve the resources, you do this: > > public LabelView(Context context, AttributeSet attrs) { > super(context, attrs); > initLabelView(); > > TypedArray a = context.obtainStyledAttributes(attrs, > > R.styleable.LabelView); > > CharSequence s = a.getString(R.styleable.LabelView_text); > if (s != null) { > setText(s.toString()); > } > > // Retrieve the color(s) to be used for this view and apply them. > > // Note, if you only care about supporting a single color, that you > // can instead call a.getColor() and pass that to setTextColor(). > setTextColor(a.getColor(R.styleable.LabelView_textColor, 0xFF00)); > > int textSize = > a.getDimensionPixelOffset(R.styleable.LabelView_textSize, 0); > if (textSize > 0) { > setTextSize(textSize); > } > > a.recycle(); > } > > The use of obtainedStyledAttributes() is very important, as that is the key > function that extracts the attributes you have declared in your styleable, > filling them in from the current AttributeSet or style or theme as > appropriate. > > With all of that together, you can now define your theme, assigning values > to your own custom attributes that will be seen in your custom view. > > On Wed, Jul 8, 2009 at 8:02 AM, brian.schim...@googlemail.com < > > > > brian.schim...@googlemail.com> wrote: > > > Hi, > > > I'm creating my own View class, and defining custom xml attributes > > with a attrs.xml. As long as I provide each attribute manually, there > > is no problem, but > > > > > > > > name="CustomizedButtonView"> > > > > > > > > > To be honest, I don't understand the proper use of the attributes "id" > > and "name" in the above code, but somehow it works. I can now > > reference the borderDrawable-Attribute from a layout xml file: > > > > > > xmlns:android="http://schemas.android.com/apk/res/android"; > > xmlns:mypack="http://some.weird.url.com/seems/not/to/matter"; > > > > android:text="This is my text" > > > mypack:borderDrawable="@drawable/border243"/> > > > > > My class CustomizedButtonView now reads the attribute like this: > > public CustomizedButtonView(Context context, AttributeSet attrs) { > > super(context, attrs); > > int borderDrawableId = attrs.getAttributeResourceValue( > > " > >http://some.weird.url.com/seems/not/to/matter";, > > "borderDrawable", -1); > > > Until now, everything works fine. Many of my CustomizedButtonView will > > have the same borderDra
[android-developers] Re: ListActivity selected Item
mike wrote: > I'm having trouble with a list Activity, and selected items. > Basically, when I move the wheel ball (i select an item without > touch), then the background of the list item will highlight an orange, > then I click my corresponding button below and it acts upon the > selected item. I also want the user to be able to press with their > finger once, and highlight the item, however, when I touch, it just > highlights it orange and then back to normal. This is by design. > I know it's calling the > onListItemClicked. I tried to set the position from that as > this.setSelected(position), but that doesn't make the background stay > a constant orange. It's not supposed to. Now, you are welcome to disable the list selector (by making it transparent) and then doing whatever you want manually to indicate selected rows, including keeping rows highlighted after being touched. Just bear in mind that what you are doing runs counter to the Android style and therefore may confuse your users. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 could I customize the launcher without modify the SDK?
Siu Man Yu wrote: > I would like to build my own launcher application. > Beside modify the Launcher.apk in the SDK, is there any other method > to replace my own application as the home menu? Look in the following directory inside your Android 1.5 SDK: platforms/android-1.5/samples/Home That contains a sample replacement Home application. I suspect there is at least one other open source replacement home application, though I am not certain. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: SurfaceView scrolling
Hi, if you are talking about having a larger SurfaceView inside of a ScrollView, it is really not intended to be used that way: you should effectively think of SurfaceView as an overlay you embed inside your window, giving you an area in which you can directly draw independently of the normal view update system. So once you start using a SurfaceView, you are moving yourself into a world where you have a blank area of pixels, and you are on your own to draw them how you want. It can be faster, but it also takes more effort. If this is really what you want, you will need to make the SurfaceView the size of the visible area on screen and implement the scrolling yourself inside of the surface view as you render. Alternatively, just create an off-screen bitmap and have it drawn by a normal ImageView (which can be sized to the entire size of the bitmap and placed in a scroll view). On Wed, Jul 8, 2009 at 12:37 AM, Lee wrote: > > I am writing an application that involves rendering into a SurfaceView > that is larger than the phone display size. (For example 1024*768 > pixels). > > I am currently displaying the image in the SurfaceView both scaled and > unscaled. When I am unscaled I would like to implement support for the > user to be able to move around the image using touch. > > There is so much seemingly information in the docs about how to handle > scrolling and gestures that I am kind of stuck. I'd like to just have > the system handle this for me but I'm not sure whether that's > possible. > > What suggestions do people have in terms of having a SurfaveView > scroll around to display the visible part of the underlying bitmap. > > Regards > Lee > > > > -- 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 -~--~~~~--~~--~--~---
[android-developers] ListActivity selected Item
I'm having trouble with a list Activity, and selected items. Basically, when I move the wheel ball (i select an item without touch), then the background of the list item will highlight an orange, then I click my corresponding button below and it acts upon the selected item. I also want the user to be able to press with their finger once, and highlight the item, however, when I touch, it just highlights it orange and then back to normal. I know it's calling the onListItemClicked. I tried to set the position from that as this.setSelected(position), but that doesn't make the background stay a constant orange. Here's my xml that the ListActivity uses http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> I've been googling, and reading about people who have similar (but not exactly the same problem) as me, and none of their solutions worked. If its important, I'm populating this listview with a custom extension of ArrayAdapter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] CMake/CDash with Android SDK/NDK
Hi, as we are basically use all our software in a CMake framework building for different platform I wonder if someone is using CMake together with Android. Although its fairly simple to create an Android.mk file manually, running everything within the build system has some striking advantages (automatic Eclipse project generation etc). Google did not give me any interesting results, so I'm asking if someone has already thought about this or is already using such an approach Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Change wallpaper set time
I begginer about android. I want to make one app. That app's goal is: I set time. Example 6.00 AM - 11.00. Change wallpaper that sun growup picture when that time. And in tne evening sunset picture. In the night starlit sky picture. But I have some problems. 1. I can't check when my set time. 2.(It's very funny :P ) I can't change wallpaper picture. Please help me. If I will done this app I will put sourse in this group. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Open email through code in android.
Hi Folks, Actually I want to open email in the emulator and need to take snap shot of that mail and need to put it on in my local machine.Could you please give me some java code to open email in the android emulator. thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How could I customize the launcher without modify the SDK?
I would like to build my own launcher application. Beside modify the Launcher.apk in the SDK, is there any other method to replace my own application as the home menu? Thank you very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Supl interfaces
Hello all, I am trying to use the SUPL interface given in Android 1.5. GpsSuplInterface is defined in gps.h But I don't see any function header defined in gps.h for getting the SUPL interface such a gps_get_interface() and gps_get_hardware_interface(). How do we define interface function in our module for giving this interface to android framework? How the SUPL interface, defined in gps.h, being used by the Android framework - (How is it getting called?) Thanks in advance Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] I got syntax error of files of svn under eclipse
Hi, I am developing android program under eplicse environment. I use svn to store all my files. But it seems that svn files cause some problem. I got some errors like this: Description ResourcePathLocationType syntax errorentries /PowerGrid/src/com/ez2learn/android/ powergrid/.svn line 1 Android AIDL Problem It seems android system wallk all directories under src, and try to parse files under .svn folder. Is that bug? how can I fix it? Thanks. Victor Lin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Urgent -Video Recording Problem
Hi, we are recording the Video using our own application .it uses Qualcomm MSM7K hardware interface files for receving the captured frame from the Driver .Once we get the preview callback the same buffer is given to both preview (submits to the Video surface) and Recording .But in recording path , the buffer is corrupted (when it calls frame- >getmemory() ,it says invalid arguments) .we are not able to identify why it is corrupted.Default recording application also uses the same path but it succeeds . Regards, Selva --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Playing video as a raw resource
I have the exact problem with you. Any one can help? On Jun 16, 11:22 pm, JP wrote: > I'm writing a program which requires that a video be packaged with > it. The only way I know of doing this is by adding the video to res/ > raw/, which coincidentally renders the video useless. I've looked all > over the web and the consensus seems to be you can only play streaming > video, or video from a file. In the emulator if I attempt to play the > video through the method used here > (http://developer.android.com/guide/topics/media/index.html > ), all I get is audio and a black screen. > > I've attempted to use VideoView as well, and the same thing occurs, > audio but with a black screen. There must be a way to package video > with your application without needing an SD card, or having to stream > the file and have the video actually play. In the words of Google, I > would like to create a "seamless" experience. :) > > Any help is greatly appreciated! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 add ListView
I need to add ListView in my application along with LinearLayout and GridView .But adding of ListView is not being possible ..according to API i am writting but generating a ElligalArgumentException . so if any one guide me to add ListView using Activity i will be very pleased ..if you can pleasehelp. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Baseband version in API ?
I want to read the baseband/radio version number but I can't find it. It's visible in the menu Settings/About Phone but not in the 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 -~--~~~~--~~--~--~---
[android-developers] R.java is not updated
Hi...I have this problem too (R.Java is not updated) I have found a code and I have copied that's res folder and I think that problem belong to this copy. what's your idea? If it is true, is there any solution for solve this problem (copying) ? regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SurfaceView scrolling
I am writing an application that involves rendering into a SurfaceView that is larger than the phone display size. (For example 1024*768 pixels). I am currently displaying the image in the SurfaceView both scaled and unscaled. When I am unscaled I would like to implement support for the user to be able to move around the image using touch. There is so much seemingly information in the docs about how to handle scrolling and gestures that I am kind of stuck. I'd like to just have the system handle this for me but I'm not sure whether that's possible. What suggestions do people have in terms of having a SurfaveView scroll around to display the visible part of the underlying bitmap. Regards Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: IME - Main Dictionary
So, in sending in a FileDescriptor, I assume I would need to modify openNative to take a FileDescriptor... Presumably, I would get a FileDescriptor like this: AssetManager am = context.getResources().getAssets(); AssetFileDescriptor afd = am.openNonAssetFd("mydictionaryfile"); FileDescriptor fd = afd.getFileDescriptor(); Is there anything else I would need to do? I will be storing my dictionary in raw, as it the case with the LatinIME. On Jul 8, 5:49 am, "nEx.Software" wrote: > Great... thanks for the info Dianne. I appreciate i. > > On Jul 8, 12:25 am, Dianne Hackborn wrote: > > > Oh sorry, yeah those are not part of the NDK. However you should be able to > > use the Java API to open a FileDescriptor for an asset, and hand that to > > native code for it to use the fd. The only limitation is that the asset > > will need to be stored uncompressed. (Alternatively, an .apk is just a zip > > file, so worst case you could compile the zip code into your app and use > > that to extract the file you want.) > > > On Tue, Jul 7, 2009 at 11:54 PM, nEx.Software > > wrote: > > > > So, I've been looking over the LatinIME in the git repository, and I > > > am getting the feeling that this (the native dictionary piece) can't > > > be compiled on the NDK - at least not officially? There seem to be > > > some unsupported libraries and such being used. Specifically, Asset.h > > > and AssetManager.h which look to be a part of the base/include/utils > > > portion of the source tree. I assume these are not a part of the NDK > > > scope at this point? > > > > On Jul 7, 4:13 pm, "nEx.Software" wrote: > > > > Awesome, thanks for the info. I had a feeling that was the case. > > > > Thanks for confirming that for me. > > > > > On Jul 7, 3:04 pm, Dianne Hackborn wrote: > > > > > > The prediction dictionary is built into the IME, it is not a part of > > > the > > > > > platform like the user dictionary, so you will need to implement your > > > own > > > > > for your IME. The LatinIME code is open source, so to start you can > > > just > > > > > copy it (especially now that we have the NDK available). > > > > > > On Tue, Jul 7, 2009 at 2:56 PM, nEx.Software < > > > justin.shapc...@gmail.com>wrote: > > > > > > > I am attempting to do an IME and am wondering the best way to use > > > > > > the > > > > > > main dictionary for the suggestions to work? Using the User > > > Dictionary > > > > > > is pretty straight forward, but I am not sure how to use the main > > > > > > dictionary. The System IME appears to use BinaryDictionary and a > > > > > > native method to do this? Can I piggy back on this or must I create > > > my > > > > > > own implementation? Thanks in advance. > > > > > > -- > > > > > 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. > > > -- > > 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 -~--~~~~--~~--~--~---
[android-developers] Using Intent to view specific App in Android Market
I've seen a few other threads on this subject, but none that addresses my need which is to not only find the app in the market via the market uri, but display it as if the user had navigated to it. The closest anyone has gotten to this answer is to show how to bring up the Android Market app and browse for the app you want which shows the single result in a list that the user must still select to get to the screen I want to display. Here's my existing code that does exactly that: private static final String MY_MARKET_APP = "com.some.silly.name"; Intent marketLaunch = new Intent(Intent.ACTION_VIEW); marketLaunch.setData(Uri.parse("market://search?q=pname:" + MY_MARKET_APP)); startActivity(marketLaunch); I don't want to have to force the user to select this single item from the list - just bypass that and bring up the next screen. Has anyone been able to successfully do this? Regards, - Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Widget not working properly when changing orientation
What do you mean the widget is not able to launch? Please post your source code here if possible. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 8, 1:49 am, sunita wrote: > I have a widget , thats working just fine in a particular orientation, > but the moment i change the orientation to landscape/portrait, the > widget is not able to launch. I have one layout and one layout-land > folder in res directory.The problem is that the widget created in > landscape mode is not opening in portrait mode and vice-versa. > > Thanks for the answer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Orientation problem while dynamically loading Views
Try changing: android:orientation="vertical" to android:orientation="horizontal" -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 8, 7:01 am, Ani wrote: > Hi , > I am trying to load textView and CheckBox view dynamically to a > LinearLayout. i am getting some Orientation problem while doing the > same.I want these two view in a single row but i its coming as in > different raw. Below is may code > LinearLayout layout=(LinearLayout) > findViewById(R.id.jlayout); > TextView textView=new TextView(this); > textView.setLayoutParams(new LayoutParams(75,35)); > textView.setText(exhibitData.getExhibitName()); > textView.setTextColor(Color.BLACK); > textView.setBackgroundColor(Color.CYAN); > checkBox= new CheckBox(this); > checkBox.setLayoutParams(new LayoutParams(75,35)); > checkBox.setId(exhibitData.getCheckBoxID()); > tableRow.setOrientation(0); > tableRow.setBackgroundColor(Color.YELLOW); > layout.addView(textView,new TableLayout.LayoutParams( > LayoutParams.WRAP_CONTENT, > LayoutParams.WRAP_CONTENT)); > layout.addView(checkBox,new TableLayout.LayoutParams( > LayoutParams.WRAP_CONTENT, > LayoutParams.WRAP_CONTENT)); > > layoutxml is > > > android:layout_width="fill_parent" > android:layout_height="250px" > > > > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:layout_centerInParent="true" > android:orientation="vertical" > android:layout_gravity="center"> > > > > > Please help me to solve this > 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: How to style my own styleable with a style? (Custom view class with custom attribute)
If you are using attrs.getAttributeResourceValue(), then you are not using the style/theming system at all. That is, there was no purpose to defining a an at all, that function is just retrieving a raw value from a resource for a given name. (This is also why the " http://some.weird.url.com/seems/not/to/matter"; URI doesn't matter -- you have declared it as a namespace in your XML, and you have retrieved the attribute in that namespace in your Java code, and that is all that is happening. You just made up a namespace and used it.) You can find a complete example if declaring styleables and themes in API demos. Basically you declare a styleable like this (there is no "id" field that is used): Then use it in a layout like this: http://schemas.android.com/apk/res/android"; xmlns:app="http://schemas.android.com/apk/res/com.example.android.apis"; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> Note that the URI of xmlns:app is very important, this is the namespace for android resources (the first part) in your package (the second part). Finally to retrieve the resources, you do this: public LabelView(Context context, AttributeSet attrs) { super(context, attrs); initLabelView(); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LabelView); CharSequence s = a.getString(R.styleable.LabelView_text); if (s != null) { setText(s.toString()); } // Retrieve the color(s) to be used for this view and apply them. // Note, if you only care about supporting a single color, that you // can instead call a.getColor() and pass that to setTextColor(). setTextColor(a.getColor(R.styleable.LabelView_textColor, 0xFF00)); int textSize = a.getDimensionPixelOffset(R.styleable.LabelView_textSize, 0); if (textSize > 0) { setTextSize(textSize); } a.recycle(); } The use of obtainedStyledAttributes() is very important, as that is the key function that extracts the attributes you have declared in your styleable, filling them in from the current AttributeSet or style or theme as appropriate. With all of that together, you can now define your theme, assigning values to your own custom attributes that will be seen in your custom view. On Wed, Jul 8, 2009 at 8:02 AM, brian.schim...@googlemail.com < brian.schim...@googlemail.com> wrote: > > Hi, > > I'm creating my own View class, and defining custom xml attributes > with a attrs.xml. As long as I provide each attribute manually, there > is no problem, but > > > > name="CustomizedButtonView"> > > > > > To be honest, I don't understand the proper use of the attributes "id" > and "name" in the above code, but somehow it works. I can now > reference the borderDrawable-Attribute from a layout xml file: > > > xmlns:android="http://schemas.android.com/apk/res/android"; >xmlns:mypack="http://some.weird.url.com/seems/not/to/matter"; > >android:text="This is my text" > > mypack:borderDrawable="@drawable/border243"/> > > > My class CustomizedButtonView now reads the attribute like this: >public CustomizedButtonView(Context context, AttributeSet attrs) { >super(context, attrs); >int borderDrawableId = attrs.getAttributeResourceValue( >" > http://some.weird.url.com/seems/not/to/matter";, >"borderDrawable", -1); > > Until now, everything works fine. Many of my CustomizedButtonView will > have the same borderDrawable, but not all of them, so I want to define > a style. My styles.xml reads like this: > > >- name="android:text">Default text
>- > name="mypack:borderDrawable">@drawable/border243
> > > And the layout like that: > > > xmlns:android="http://schemas.android.com/apk/res/android"; >xmlns:mypack="http://some.weird.url.com/seems/not/to/matter"; > >style="@style/customStyle1"/> > > > The android:text is properly set in my instance, but the > borderDrawable is not. I guess this has something to do with > namespaces, because inside the styles.xml, the > name="mypack:borderDrawable" is not handled by the XML parser's > namespace facility, because its inside an attribute value. So "mypack" > is in no way connected to "http://some.weird.url.com/seems/not/to/ > matter" and adding it via xmlns:mypack... to the stylefile would not > help, I guess. In the same file, "android:text" is somehow recognized, > even though "android" is AFAIK only a ns-defintion for "http:// > schemas.android.com/apk/res/android", which is also not declared in > that file. > > So what is t
[android-developers] How to style my own styleable with a style? (Custom view class with custom attribute)
Hi, I'm creating my own View class, and defining custom xml attributes with a attrs.xml. As long as I provide each attribute manually, there is no problem, but To be honest, I don't understand the proper use of the attributes "id" and "name" in the above code, but somehow it works. I can now reference the borderDrawable-Attribute from a layout xml file: http://schemas.android.com/apk/res/android"; xmlns:mypack="http://some.weird.url.com/seems/not/to/matter"; My class CustomizedButtonView now reads the attribute like this: public CustomizedButtonView(Context context, AttributeSet attrs) { super(context, attrs); int borderDrawableId = attrs.getAttributeResourceValue( "http://some.weird.url.com/seems/not/to/matter";, "borderDrawable", -1); Until now, everything works fine. Many of my CustomizedButtonView will have the same borderDrawable, but not all of them, so I want to define a style. My styles.xml reads like this:- Default text
- @drawable/border243
And the layout like that: http://schemas.android.com/apk/res/android"; xmlns:mypack="http://some.weird.url.com/seems/not/to/matter"; The android:text is properly set in my instance, but the borderDrawable is not. I guess this has something to do with namespaces, because inside the styles.xml, the name="mypack:borderDrawable" is not handled by the XML parser's namespace facility, because its inside an attribute value. So "mypack" is in no way connected to "http://some.weird.url.com/seems/not/to/ matter" and adding it via xmlns:mypack... to the stylefile would not help, I guess. In the same file, "android:text" is somehow recognized, even though "android" is AFAIK only a ns-defintion for "http:// schemas.android.com/apk/res/android", which is also not declared in that file. So what is the proper way to set a custom attribute in a style? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: YUV to RGB cpnversion
Did you look a the Bitmap docs yet? There are several UI methods to that effect. In what way were they insufficient for your needs? On Jul 4, 8:11 am, mudit wrote: > hi there... > > I am trying to convert YUV data stream into RGB 565. I am using > > http://blog.tomgibara.com/post/132956174/yuv420-to-rgb565-conversion-... > > this code to convert YUV frames into RGB format.from this rgb byte > array i hv stroed this array into a text file,JPG file, also tried to > convert it into bitmap using "decodebytearray".but none of them give > the result. > > plz help me to convert this RGB byte array to BITMAP. > > thanx in advance.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Vertical and Horizontal Scrolling together
I rolled my own from scratch for Shead Spreet. Works like a charm. I just catch scroll and fling actions, calculate the proper offset, and redraw my view at that location. Admittedly tedious but it got the job done. On Jul 7, 4:19 pm, Blackmarket wrote: > Hello, is it possible to have both Scrollbars together. My Application > is too big for just one of them. > I tried it with a ScrollView in a HorizontalScrollView Layout, but it > supports only vertical or horizontal scrolling at the same time and > not crosswise. > It would be nice to have a scrolling just like in the Browser of > Android. Is this possible? > > Regards, Pascal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Launch another app through Android Application.
Muthu Kumar K. wrote: > Hi All, > I am developing an Android application to launch the another Android > application in the device. Please let me know Is there any possible > way to do this Use startActivity(). The key is in crafting a suitable Intent to identify the activity in the application you want to run. -- 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] Launch another app through Android Application.
Hi All, I am developing an Android application to launch the another Android application in the device. Please let me know Is there any possible way to do this Thanks in Advance, Muthu Kumar K. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Orientation problem while dynamically loading Views
Hi , I am trying to load textView and CheckBox view dynamically to a LinearLayout. i am getting some Orientation problem while doing the same.I want these two view in a single row but i its coming as in different raw. Below is may code LinearLayout layout=(LinearLayout) findViewById(R.id.jlayout); TextView textView=new TextView(this); textView.setLayoutParams(new LayoutParams(75,35)); textView.setText(exhibitData.getExhibitName()); textView.setTextColor(Color.BLACK); textView.setBackgroundColor(Color.CYAN); checkBox= new CheckBox(this); checkBox.setLayoutParams(new LayoutParams(75,35)); checkBox.setId(exhibitData.getCheckBoxID()); tableRow.setOrientation(0); tableRow.setBackgroundColor(Color.YELLOW); layout.addView(textView,new TableLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); layout.addView(checkBox,new TableLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); layoutxml is Please help me to solve this 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: using appendChild and replaceChild
Okei, I fix it! Android browser don't let you the same GET all the time, so I use a random to add a ?STRING to the GET and then we have diferent GETs ;) thats all, clear! On 6 jul, 12:51, "jfcog...@gsyc.es" wrote: > Hi, > > I just developed an html that load and reload every time the same > external javascript, in firefox works, in android not. I'm trying to > make an appendchild and after that I make some replacechild but the > android browser don't make the second replacechild ... > > anyone know about this task? it really make my cry!!, lol > > I thinks this external sources ( the javascript ) is loaded in the > cache, cos' when I delete it I can make another appendchildren. any > idea? maybe there are a function in java-android to delete the cache > all the time? > > I replace the data in the javascript all the time, with another appi, > but here I post an example with "hello", maybe you can replace the > data on the fly yourself. > > thanks for your help. > > here I post my html and js code: > > --index.html--- > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > > > > > > VAMOS COPON > > > function loadjscssfile(filename, filetype){ > if (filetype=="js"){ //if filename is a external JavaScript file > var fileref=document.createElement('script') > fileref.setAttribute("type","text/javascript") > fileref.setAttribute("src", filename) > } > else if (filetype=="css"){ //if filename is an external CSS file > var fileref=document.createElement("link") > fileref.setAttribute("rel", "stylesheet") > fileref.setAttribute("type", "text/css") > fileref.setAttribute("href", filename) > } > if (typeof fileref!="undefined") > document.getElementsByTagName("head")[0].appendChild(fileref) > > } > > function createjscssfile(filename, filetype){ > if (filetype=="js"){ //if filename is a external JavaScript file > var fileref=document.createElement('script') > fileref.setAttribute("type","text/javascript") > fileref.setAttribute("src", filename) > } > else if (filetype=="css"){ //if filename is an external CSS file > var fileref=document.createElement("link") > fileref.setAttribute("rel", "stylesheet") > fileref.setAttribute("type", "text/css") > fileref.setAttribute("href", filename) > } > return fileref > > } > > function replacejscssfile(oldfilename, newfilename, filetype){ > var targetelement=(filetype=="js")? "script" : (filetype=="css")? > "link" : "none" //determine element type to create nodelist using > var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : > "none" //determine corresponding attribute to test for > var allsuspects=document.getElementsByTagName(targetelement) > for (var i=allsuspects.length; i>=0; i--){ //search backwards within > nodelist for matching elements to remove > if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null > && allsuspects[i].getAttribute(targetattr).indexOf(oldfilename)!=-1){ > var newelement=createjscssfile(newfilename, filetype) > allsuspects[i].parentNode.replaceChild(newelement, allsuspects[i]) > } > } > > } > > > > > > load > replace > temperature > > > > > lib.js- > > var petname="hello" > alert("Pet Name: " + petname) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: is it possible to get realtime gps values while not in a mapview?
Yes, you'll need to register a LocationListener with the LocationManager On Jul 8, 10:01 am, Georgios Galyfos wrote: > Hi, > > I was wondering if it is possible to start the gps receiver on the phone if > the current activity is not a mapactivity. I am displaying a listview and > when I start the gps I get the last location found correctly, however the > gps indicator never appears on top of the phone's display even if I wait or > restart this activity. The location of the gps stays the some. > The gps indicator appears on top only if I enter an activity where a mapview > is displayed. If I wait in the map activity for a little while then If I go > back to my other activity and request the location there, then the location > is updated with the last value that it had before exiting the map view. It > never gets updated If I move around after that, though.. > > Please let me know first of all if this is possible, I will provide a > snippet of code later for people here to tell me if I am doing something > wrong. > > Also, is it possible to somehow be notified with a callback as soon as the > location is updated? > > Thank you in advance!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: IME - Main Dictionary
Great... thanks for the info Dianne. I appreciate i. On Jul 8, 12:25 am, Dianne Hackborn wrote: > Oh sorry, yeah those are not part of the NDK. However you should be able to > use the Java API to open a FileDescriptor for an asset, and hand that to > native code for it to use the fd. The only limitation is that the asset > will need to be stored uncompressed. (Alternatively, an .apk is just a zip > file, so worst case you could compile the zip code into your app and use > that to extract the file you want.) > > On Tue, Jul 7, 2009 at 11:54 PM, nEx.Software > wrote: > > > > > > > > > So, I've been looking over the LatinIME in the git repository, and I > > am getting the feeling that this (the native dictionary piece) can't > > be compiled on the NDK - at least not officially? There seem to be > > some unsupported libraries and such being used. Specifically, Asset.h > > and AssetManager.h which look to be a part of the base/include/utils > > portion of the source tree. I assume these are not a part of the NDK > > scope at this point? > > > On Jul 7, 4:13 pm, "nEx.Software" wrote: > > > Awesome, thanks for the info. I had a feeling that was the case. > > > Thanks for confirming that for me. > > > > On Jul 7, 3:04 pm, Dianne Hackborn wrote: > > > > > The prediction dictionary is built into the IME, it is not a part of > > the > > > > platform like the user dictionary, so you will need to implement your > > own > > > > for your IME. The LatinIME code is open source, so to start you can > > just > > > > copy it (especially now that we have the NDK available). > > > > > On Tue, Jul 7, 2009 at 2:56 PM, nEx.Software < > > justin.shapc...@gmail.com>wrote: > > > > > > I am attempting to do an IME and am wondering the best way to use the > > > > > main dictionary for the suggestions to work? Using the User > > Dictionary > > > > > is pretty straight forward, but I am not sure how to use the main > > > > > dictionary. The System IME appears to use BinaryDictionary and a > > > > > native method to do this? Can I piggy back on this or must I create > > my > > > > > own implementation? Thanks in advance. > > > > > -- > > > > 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. > > -- > 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 -~--~~~~--~~--~--~---
[android-developers] Re: Cannot execute javascript function after loading html content with "loadDataWithBaseURL" method
Oh sorry, one more thing to mention. If I use webView.loadUrl("javascript:alert('xx')"), it will send alert message to my WebChromeClient. That is, loadUrl can indeed execute javascript but cannot execute javascript "in the custom generated HTML string". Any ideas? On 7月8日, 下午8時23分, treetop wrote: > Hi, I have put HTML document into a string variable and load it by > using webView.loadDataWithBaseURL(null, htmlString, "text/html", > "utf-8", null). After that, I tried two ways and want to execute > javascript function "exec()" by using > 1. webView.loadDataWithBaseURL(null, "javascript:exec()", "text/ > html", "utf-8", null) -> This will overlap the content of previous > "htmlString" and shows "javascript:exec()" on the screen. > 2. webView.loadUrl("javascript:exec()") -> There will be "Can't find > variable: exec line: ..." in Logcat > Besides, I have tried to output "htmlString" to a file located in > sdcard, and tried to use webView.loadUrl("file:///sdcard/xxx/a.xhtml") > + webView.loadUrl("javascript:exec()"). And...it fails again! > Could anybody help me figure out how to execute javascript function > after loading html content by "loadDataWithBaseURL"? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Cannot execute javascript function after loading html content with "loadDataWithBaseURL" method
Hi, I have put HTML document into a string variable and load it by using webView.loadDataWithBaseURL(null, htmlString, "text/html", "utf-8", null). After that, I tried two ways and want to execute javascript function "exec()" by using 1. webView.loadDataWithBaseURL(null, "javascript:exec()", "text/ html", "utf-8", null) -> This will overlap the content of previous "htmlString" and shows "javascript:exec()" on the screen. 2. webView.loadUrl("javascript:exec()") -> There will be "Can't find variable: exec line: ..." in Logcat Besides, I have tried to output "htmlString" to a file located in sdcard, and tried to use webView.loadUrl("file:///sdcard/xxx/a.xhtml") + webView.loadUrl("javascript:exec()"). And...it fails again! Could anybody help me figure out how to execute javascript function after loading html content by "loadDataWithBaseURL"? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: MINA, slf4j and Android
Fixed the error by using slf4j-simple which doesn't use a singleton ;) On Jun 28, 10:16 pm, Lumiken wrote: > Hey, > I was trying to useMINAwith Android for this RDP-Client I am > building. The Problem is that Android crashes during Runtime with this > error: > > INFO/dalvikvm(821): DexOpt: access denied from Lorg/slf4j/ > LoggerFactory; to field Lorg/slf4j/impl/StaticLoggerBinder;.SINGLETON > > I asked a colleague of mine and he thinks that sl4j tries to log > something into the filesystem and Android denies that. Has anyone an > idea of how to either allow that, disable this "Feature" of slf4j or > maybe another reason? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: GeoPoint issue
Dagvadorj Galbadrakh wrote: > I am using *android-sdk-windows-1.5_r2*. I guess the GeoPoint (raising > the problem 'MapPoint not found') is a issue. Is there no way that I use > the same SDK and solve the problem. http://code.google.com/p/android/issues/detail?id=2806 Get the maps.jar file from 1.5r1 and drop it over top your maps.jar file for 1.5r2 (add-ons/google_apis-3/libs), and it works. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now 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] how can have faded transition on Button.setText?
Hi dear, i want a faded transition on text when i change button text by Button.setText("Helo") on click. if i put startAnimation on button then the whole button comes faded but i just need faded transition on its text can anybody help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: uploads disabled
2009/7/8 Charlie Collins > > I haven't heard any official stance on this, but I would imagine there > are security concerns, and then other technical hurdles on this front > (having a file browser, and then which files each activity has access > to). And the same security and techincal issues don't exist on PCs? It's trivial to do such a file browser code, others have created file browsers already and I don't think google staff would have an issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 can i set fade animation on Button.setText?
Hi Dear, can anybody help me on setText transition? i want a faded transition on Button.setText when it clickes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Adobe Flash
2009/7/8 Mike Garcia > > Being a web developer in my day job, I'm still not sure the benefits > of having flash support on the phone. Even if it is true, it is > The only benefit would be for those that can't code in java, although a web OS type thing similar to what they're going to on Palm might be a better solution, but Adobe can't make a buck then --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Encrypt files
2009/7/7 Cyril ROQUES > I need to encrypt some files but the user must have access to them in > both read/write > > I would to create a virtual partition and mount it into a folder but how to > link an application with a folder ? or create a driver ? > > If this approach can’t run maybe with a live folder but I don’t know how to > save new file into it > > If you have idea or different approach for this problem your are welcome > You would be best just reading and writing encrypted data, rather than trying to mess with partitions or other things that either need root access to do, or very low system stuff. While I haven't really looked into this, if JAVA itself can't do it, you can always use the bouncycastle libs can do crypto. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] GeoPoint issue
I am using *android-sdk-windows-1.5_r2*. I guess the GeoPoint (raising the problem 'MapPoint not found') is a issue. Is there no way that I use the same SDK and solve the problem. Thanks. -- Dagvadorj GALBADRAKH --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: TIME_TICK in an AppWidget?
Just to post an update on this issue, the alarm manager approach seems to work. To simulate a TIME_TICK, I'm using the following code: // First alarm to go off when the RTC minute changes long firstTime = System.currentTimeMillis(); firstTime += (6 - firstTime % 6); // Schedule the alarm AlarmManager am = (AlarmManager)context.getSystemService (Context.ALARM_SERVICE); am.setRepeating(AlarmManager.RTC, firstTime, 6, sender); where "sender" is a PendingIntent I declared earlier. The CPU/battery usage doesn't seem too heinous at this point, and I have some further tuning to do. So I'm keeping my fingers crossed. If I do have to try to make AnalogClock work instead, though... I know that it's possible to use custom dial and hand drawables, but can't see how to make that happen in an AppWidget (using RemoteView). Can anyone shed any light on that? Thanks much, String On Jul 6, 7:23 pm, String wrote: > On Jul 6, 5:59 pm, Dianne Hackborn wrote: > > > You can use the AlarmManager. > > Thanks, I'll see if I can make that work. > > > Be very careful, though, you can easily make > > your widget a big battery hog. > > I'm well aware of that danger. :^) It might sink the whole project, > but there's no way to know until I try! > > 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 -~--~~~~--~~--~--~---
[android-developers] Re: TabHost Listview dissapearing after going to SMS screen and back.
Is this a bug that should be reported? On Jul 6, 11:51 am, extrapedestrian wrote: > Two more information: > > it works the same way on emulator, > it works the same way with simple list ArrayAdapter text only. > > On Jul 6, 11:38 am, extrapedestrian > wrote: > > > I have TabHost with custom ListView implemented. > > My ListView disappears after returning from SMS screen when I try to > > switch tab (refresh list content). > > > I have context menu option to send SMS to contact from the list, I > > start SMS activity there and Im able to return to my app. If I don't > > type anything in SMS screen, just return immediately everything is > > fine. List will work. > > If I type something in SMS and press back key, toast will be > > displayed: "Your message is saved in Drafts". And now if try to switch > > tabs, list content disappears. > > > Debugging revealed that list items are present, and that list adapter > > constructor is called. However, listAdapters GetView function is never > > called. And list results are not displayed. > > > I found similar problem in this > > post:http://groups.google.com/group/android-developers/browse_thread/threa... > > > Im working on sdk 1.5 and device. > > > Here is my list adapter function, pretty standard: > > > public class ResultListAdapter extends ArrayAdapter { > > public ResultListAdapter(Context context, ItemDescription[] > > objects) { > > super > > (context,R.layout.list_item_layout,objects); > > // > > being called > > } > > @Override > > public View getView(int position, View convertView, ViewGroup > > parent) { //not being called > > LayoutInflater inflater = LayoutInflater.from(getContext > > ()); > > View row = inflater.inflate(R.layout.list_item_layout, > > null); > > > TextView tv = (TextView) row.findViewById(R.id.listText); > > ItemDescription item = getItem(position); > > SpannableString ss = getSpannableFromMarkupString > > (item.getMarkupString()); > > tv.setText((CharSequence) ss); > > > return row; > > } > > } > > > my ListView widget has no special properties, just width and height to > > fit parent. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] is it possible to get realtime gps values while not in a mapview?
Hi, I was wondering if it is possible to start the gps receiver on the phone if the current activity is not a mapactivity. I am displaying a listview and when I start the gps I get the last location found correctly, however the gps indicator never appears on top of the phone's display even if I wait or restart this activity. The location of the gps stays the some. The gps indicator appears on top only if I enter an activity where a mapview is displayed. If I wait in the map activity for a little while then If I go back to my other activity and request the location there, then the location is updated with the last value that it had before exiting the map view. It never gets updated If I move around after that, though.. Please let me know first of all if this is possible, I will provide a snippet of code later for people here to tell me if I am doing something wrong. Also, is it possible to somehow be notified with a callback as soon as the location is updated? Thank you in advance!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Widget not working properly when changing orientation
I have a widget , thats working just fine in a particular orientation, but the moment i change the orientation to landscape/portrait, the widget is not able to launch. I have one layout and one layout-land folder in res directory.The problem is that the widget created in landscape mode is not opening in portrait mode and vice-versa. Thanks for the answer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Problem with Log Cat(log is empty)
HI Thanks For Reply i follow the procedure i got it... thank u On Wed, Jul 8, 2009 at 1:34 PM, Georgios Galyfos wrote: > sometimes this happens to me too. if you select the device tab and click on > one of the devices on the list the logCat might then display the log > correctly, this is how i fix this. Or disconnect and reconnect the phone, in > case it is a phone not an emulator (or maybe restart the emulator). > > > On Wed, Jul 8, 2009 at 10:33 AM, android.vinny wrote: > >> >> Hi >> >> I am using Android SDK 1.1 >> when i run or debug the application i am getting empty list >> it showing empty not show any log details >> >> what is the prob? >> >> any ideas regarding this ? >> thanks in advance >> >> > > > > -- Regards --- Desu Vinod Kumar vinny.s...@gmail.com 09916009493 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Problem with Log Cat(log is empty)
emulator is the same , all the times you can go to DDMS mode select the emulator and click the log cat blank it display 2009/7/8 Georgios Galyfos > sometimes this happens to me too. if you select the device tab and click on > one of the devices on the list the logCat might then display the log > correctly, this is how i fix this. Or disconnect and reconnect the phone, in > case it is a phone not an emulator (or maybe restart the emulator). > > > On Wed, Jul 8, 2009 at 10:33 AM, android.vinny wrote: > >> >> Hi >> >> I am using Android SDK 1.1 >> when i run or debug the application i am getting empty list >> it showing empty not show any log details >> >> what is the prob? >> >> any ideas regarding this ? >> thanks in advance >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with Log Cat(log is empty)
sometimes this happens to me too. if you select the device tab and click on one of the devices on the list the logCat might then display the log correctly, this is how i fix this. Or disconnect and reconnect the phone, in case it is a phone not an emulator (or maybe restart the emulator). On Wed, Jul 8, 2009 at 10:33 AM, android.vinny wrote: > > Hi > > I am using Android SDK 1.1 > when i run or debug the application i am getting empty list > it showing empty not show any log details > > what is the prob? > > any ideas regarding this ? > thanks in advance > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 questions about MediaPlayer
and i think that's not the formation of audio/video issue, because I put the 3gp video in the /data/app and modify the path to: setVideoURI(Uri.parse("/data/app/2.3gp")); now, it can work! I am so confused. On 7月8日, 下午3時26分, tstanly wrote: > hi all, > > I was very confused for MediaPlayer, > follow the audio supporting formate > from:http://developer.android.com/guide/appendix/media-formats.html > > i success in mp3 formate, > but failure in wav and 3gp formate.. > > i can't figure out why i can't? > > the other question is the error message from adb logcat, > > E/MediaPlayer( 729): error (1, -1) > E/MediaPlayer( 729): Error (1,-1) > > can somebody tell me what's the "(1,-1)" means??? > > i try my best for several methods and audio/video support formate, > but still failuere, > and always get the error message.. > > can somebody help me ? > > 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] Problem with Log Cat(log is empty)
Hi I am using Android SDK 1.1 when i run or debug the application i am getting empty list it showing empty not show any log details what is the prob? any ideas regarding this ? thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AudioManagaer 's setMode()
AudioManager am=(AudioManager)getSystemService(AUDIO_SERVICE); am.setSpeakerphoneOn(true); am.setMode(AudioManager.MODE_IN_CALL); //Log.e(tag, msg) mMediaPlayer = MediaPlayer.create(this, R.raw.ek); mMediaPlayer.start(); Hello, I am receiving incoming call and i want to play the sound so i want that the caller can listen it on other side. So i am using the AudioManager's setMode(AudioManger.MODE_IN_CALL) But yet it is not working as caller is not able to listen it. so can some one tell me what is wrong in 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] two questions about MediaPlayer
hi all, I was very confused for MediaPlayer, follow the audio supporting formate from: http://developer.android.com/guide/appendix/media-formats.html i success in mp3 formate, but failure in wav and 3gp formate.. i can't figure out why i can't? the other question is the error message from adb logcat, E/MediaPlayer( 729): error (1, -1) E/MediaPlayer( 729): Error (1,-1) can somebody tell me what's the "(1,-1)" means??? i try my best for several methods and audio/video support formate, but still failuere, and always get the error message.. can somebody help me ? 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: IME - Main Dictionary
Oh sorry, yeah those are not part of the NDK. However you should be able to use the Java API to open a FileDescriptor for an asset, and hand that to native code for it to use the fd. The only limitation is that the asset will need to be stored uncompressed. (Alternatively, an .apk is just a zip file, so worst case you could compile the zip code into your app and use that to extract the file you want.) On Tue, Jul 7, 2009 at 11:54 PM, nEx.Software wrote: > > So, I've been looking over the LatinIME in the git repository, and I > am getting the feeling that this (the native dictionary piece) can't > be compiled on the NDK - at least not officially? There seem to be > some unsupported libraries and such being used. Specifically, Asset.h > and AssetManager.h which look to be a part of the base/include/utils > portion of the source tree. I assume these are not a part of the NDK > scope at this point? > > On Jul 7, 4:13 pm, "nEx.Software" wrote: > > Awesome, thanks for the info. I had a feeling that was the case. > > Thanks for confirming that for me. > > > > On Jul 7, 3:04 pm, Dianne Hackborn wrote: > > > > > > > > > The prediction dictionary is built into the IME, it is not a part of > the > > > platform like the user dictionary, so you will need to implement your > own > > > for your IME. The LatinIME code is open source, so to start you can > just > > > copy it (especially now that we have the NDK available). > > > > > On Tue, Jul 7, 2009 at 2:56 PM, nEx.Software < > justin.shapc...@gmail.com>wrote: > > > > > > I am attempting to do an IME and am wondering the best way to use the > > > > main dictionary for the suggestions to work? Using the User > Dictionary > > > > is pretty straight forward, but I am not sure how to use the main > > > > dictionary. The System IME appears to use BinaryDictionary and a > > > > native method to do this? Can I piggy back on this or must I create > my > > > > own implementation? Thanks in advance. > > > > > -- > > > 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. > > > -- 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 -~--~~~~--~~--~--~---