[android-beginners] Re: Adding Undo feature in FingerPaint app bundled with APIdemos.
:) Thanks James for your reply. I was skeptical about the said approach because it will consume some memory and we all know how precious that is on the device. I was checking to make sure that I am not missing anything available in the framework, here. If the framework could let us have hooks for establishing savepoints and then reverting back to them, I'd rather used that approach. On Oct 9, 12:15 am, James Yum j...@google.com wrote: Hi Samuh, I think you're on the right path. Cheers, James On Wed, Oct 7, 2009 at 11:42 PM, Samuh Varta samuh.va...@gmail.com wrote: @Romain: thanks for your reply...I'd *like* to believe that you wrote FingerPaint and would help me here :) Most of the applications in the Android Market(PicSay et al.) that provide a similar feature(drawing strokes on canvas) provide Undo functionality. I was trying to imitate the same in the original FingerPaint app. My approach to implementing this feature,as already mentioned in the earlier post, would be to: 1. memorize all the paths, 2. reset the canvas and 3. redraw all the paths again expect the last one. I was wondering if there was any alternative to this? Is there any class in the framework that can help me here? Please help. Thanks again! On Oct 7, 9:34 pm, Romain Guy romain...@google.com wrote: save() and restore() are just used to save the state of the Canvas (translate, scale, etc.) It won't help you for what you want. On Wed, Oct 7, 2009 at 12:26 AM, Samuh Varta samuh.va...@gmail.com wrote: I am playing with the FingerPaint application that comes bundled with the API demos package. I was wondering if I could add an Undo feature to it, which would allow the user to remove/undo his latest stroke drawing from the canvas. I am not sure of how to achieve this though. I was looking at the android.graphics.Canvas class and therein I found a few methods that caught my interest. canvas.restore() and canvas.save(). But I couldn't get them to work per my requirement. One of the approach could be memorizing all the Path(representing strokes drawn) and then resetting the canvas and reapinting all the stroked one by one except the latest. I somehow dont like this approach. How do I undo my drawings on canvas? Please help. Thanks. -- 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- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] listview disable items
Hi all, I have a listview and when an item is selected a new activity is started. I want when an item is selected to disable the entire listview so no other items can be selected before the activity is displayed. I tried setEnabled(false),setChoiseMode(1) but it didn't help, so how can i disable item clicking in listview thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to get Gmail address?
Hello everyone, I am looking for how to get Gmail address which is set up on my phone. TelephonyManager does't have the fuction and the propery. Does anyone have idea? Thank you ibuun --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Creating my own helper classes
I have some methods that I would like to put into a helper library so that I can use them in different projects. How should I do this in eclipse. Make a new android project and put a package in it like com.example.helper OR Make a new Java Project and the package com.example.helper OR just put the new package in the existing project Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Reading/Decoding bar code stored in resources
Wahid, Thanks a lot brother. Is it possible for you to send you activity file to me on abhishek.moh...@gmail.com? I will keep you posted about my progress on this application. Abhishek On Oct 7, 7:42 pm, wahib haq wahib.t...@gmail.com wrote: hiabhishek!! I am a newbie and my first initiative is also building a simple barcode decoding module. I dont have a android phone so i have to go on a different path to do this barcode app thing. :S can you plz guide me what to be on right side of BufferedImage myImage = ... ?? I am using this code I have imported these ... import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.widget.TextView; import com.google.zxing.MonochromeBitmapSource; import com.google.zxing.MultiFormatReader; import com.google.zxing.Reader; import com.google.zxing.ReaderException; import com.google.zxing.client.androidtest.*; import com.google.zxing.common.BaseMonochromeBitmapSource; Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.bar5); Bitmap bitmap1 = BitmapFactory.decodeFile(file://sdcard/DCIM/Camera/2009-10-04 21.31.02.jpg); MultiFormatReader reader1=new MultiFormatReader();//For all barcode formats try { result=reader1.decode(new RGBMonochromeBitmapSource(bitmap)); tv.setText(result.getText()); } catch (Exception e) { tv.setText(Error occured !!); } } // I have tried it with reading bmp and jpeg image from pasting in res/drawable folder and it works fine with 1D barcode. Its not working with 2D and i dont know how to do it though multiformat i guess means it shud support 2D as well. Well this will solve ur problem. I also tried to read it with a sdcard image coz after all it has to fetch from the image taken by camera. but i dont have a camera and unable to push image in gallery after lots of tries so it still undone. Share anything else you cum to know abt barcode decoding task. Regards, wahib On 10/6/09,Abhishekabhishek.moh...@gmail.com wrote: Hello All, I am writing an application to scan a bar code. As a small module of it I am trying to decode the bar code form the image file stored as resource. (R.raw.bc02) where bc02.jpg is my bar code image file. I am usinghttp://code.google.com/p/zxing/wiki/DeveloperNotesto write a program for decoding. I am stuck up at following step: i.e. reading the image as bufferedImage BufferedImage myImage = ...; MonochromeBitmapSource source = new BufferedImageMonochromeBitmapSource (myImage); I have written following code to read the image which works fine InputStream is= this.getApplicationContext().getResources ().openRawResource(R.raw.bc02); The run time object is of class android.content.res.AssetManager $AssetInputStream Can any help me in reading the file and decoding? Please let me know if I am doing correct or not. Thank you, Abhishek -- Wahib-ul-haq Communications Engineering Student, NUST, Pakistan.www.sizzlotech.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Project Idea....Not sure if its possible!
Hi guys thiss is my first time posting and I really have no clue of the capabilties of Android etc so pease bear with me. Ok basically what I would like to do is create an app using gps, which tracks the direction and speed the user is moving. now the next part is the part im not sure if it is possible. I need the app to either track other users movements or recieve info from other users about their movements(directions and speed). The other users would be using the same app but on seperate devices. The users would be within no more than 30 meters apart. Does anybody know if this would be possible, and how difficult it would be if possible? I'm trying to avoid using wifi but if this is not possible I may have to change my idea a bit and look into it... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to modify the default Android splash screen in source code?
Hi... I want to have my image as the splash image instead of the default Android splash image. Could someone advise how to customise the default android splash screen in the source code? Is it true that I need to change initlogo.rle? If yes, how to do that? Thank you in advance... :) Cheers, Smallzz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Android development tutorial for beginners - writing a Twitter client
http://activefrequency.com/blog/2009/ground-up-android-getting-started-with-app-development/ Thought a lot of you might get something out of this. This is a Web formatted version of a live talk/coding demo I've given at a few conferences where I build a Twitter client starting from nothing in 30 minutes or so. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] 1.6 quick search box to work with other app such as calculator
Hi All, Is there a way to connect to search input to a certain application? For example, I would like to enter 5 + 6 and quick search will bring up the caculator. Cheers, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Maps API Add-Ons Device Support?
Hello, I am designing an application for Android, and I was thinking of adding Maps support (http://code.google.com/android/add-ons/google- apis/) to my application. However, I don't want to add this if many people with Android phones won't be able to use it. I've found lists of devices and their API levels; however, is there a list of devices and their compatibility with Google API add-ons? Thank you, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Voice recognition
hi all , im trying to write an app which uses speech recognition.As per the introduction video , i can see a 'mike' next to the quick search box. But cant be seen in the emulator(1.6).do i need to do any configuration for the same or any application needs to be installed to enable that?? Or, is it not supported for emulator (1.6)?? thanks and regards Anirudh N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] HTTP Connect Problem
I need to make my application to connect to the server. And sent 3 to the server like when i type in http://192.168.10.3/3 in the web browser but i need to make a button in my app and it will sent 3 to the server. Pls, Help me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: DDMS doesn't show my G1
heartbraden wrote: I've been working at this for hours now, and I can't figure out what's going wrong. I've got USB debugging turned on, I have eclipse, I have android-sdk-1.6, but when I click ddms.bat, I get a blank command prompt, and Dalvik Debug Monitor comes up, but it doesn't show any devices at all. I'm on Windows XP 32 bit. What could I be doing wrong? Did you install the G1 driver? -- 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 Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Binder IPC
initparams wrote: Hi. I am trying to understand the IPC mechanism in Android. I wanted to have a high level view of this whole mechanism after a call to transact() is initiated. This list is for people with basic questions about developing using the Android SDK. Questions about the Android source code should go to [android-platform] (if you are contributing to the Android open source project) or [android-porting] (if not). Since Binder is its own open source project, you might also find out more from: http://www.open-binder.org/ -- 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 Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Maps API Add-Ons Device Support?
I haven't seen a list for google api compatability, however, the google apis should work for *most* devices. The maps application can be downloaded by anyone with a Google Experience phone, from the market app now. The only time you're going to run into issues will be anyone running an AOSP build, we don't have access to the official market or gmaps app :) I've installed apps requiring maps on hero roms, as well as the G1 and MyTouch3G, so you should be safe for the vast majority of users. On Oct 8, 3:56 pm, Daniel Lew danle...@gmail.com wrote: Hello, I am designing an application for Android, and I was thinking of adding Maps support (http://code.google.com/android/add-ons/google- apis/) to my application. However, I don't want to add this if many people with Android phones won't be able to use it. I've found lists of devices and their API levels; however, is there a list of devices and their compatibility with Google API add-ons? Thank you, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Displaying a single oversized image + using zoom features
I'm writing an application that involves basically printing a single image to the user, in full screen mode. The images that will be printed are very large, much larger than the screen resolution of most devices. I don't want to scale or resize this image, instead I'd like the user to be able to swipe his/her finger around to see the rest of the image, and to add some zoom options too. My question, is this possible with ImageView? Everytime I try it it'll just try and shove as much of the image it can onto the screen, which is not what I want. Any help would be great, thanks. Regards, Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Reading/Decoding bar code stored in resources
Hey Wahid, Same code worked for me. Multiformatreader can read QR codes. Thanks a lot for help. Abhishek On Oct 9, 9:11 am, Abhishek abhishek.moh...@gmail.com wrote: Wahid, Thanks a lot brother. Is it possible for you to send you activity file to me onabhishek.moh...@gmail.com? I will keep you posted about my progress on this application. Abhishek On Oct 7, 7:42 pm, wahib haq wahib.t...@gmail.com wrote: hiabhishek!! I am a newbie and my first initiative is also building a simple barcode decoding module. I dont have a android phone so i have to go on a different path to do this barcode app thing. :S can you plz guide me what to be on right side of BufferedImage myImage = ... ?? I am using this code I have imported these ... import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.widget.TextView; import com.google.zxing.MonochromeBitmapSource; import com.google.zxing.MultiFormatReader; import com.google.zxing.Reader; import com.google.zxing.ReaderException; import com.google.zxing.client.androidtest.*; import com.google.zxing.common.BaseMonochromeBitmapSource; Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.bar5); Bitmap bitmap1 = BitmapFactory.decodeFile(file://sdcard/DCIM/Camera/2009-10-04 21.31.02.jpg); MultiFormatReader reader1=new MultiFormatReader();//For all barcode formats try { result=reader1.decode(new RGBMonochromeBitmapSource(bitmap)); tv.setText(result.getText()); } catch (Exception e) { tv.setText(Error occured !!); } } // I have tried it with reading bmp and jpeg image from pasting in res/drawable folder and it works fine with 1D barcode. Its not working with 2D and i dont know how to do it though multiformat i guess means it shud support 2D as well. Well this will solve ur problem. I also tried to read it with a sdcard image coz after all it has to fetch from the image taken by camera. but i dont have a camera and unable to push image in gallery after lots of tries so it still undone. Share anything else you cum to know abt barcode decoding task. Regards, wahib On 10/6/09,Abhishekabhishek.moh...@gmail.com wrote: Hello All, I am writing an application to scan a bar code. As a small module of it I am trying to decode the bar code form the image file stored as resource. (R.raw.bc02) where bc02.jpg is my bar code image file. I am usinghttp://code.google.com/p/zxing/wiki/DeveloperNotestowrite a program for decoding. I am stuck up at following step: i.e. reading the image as bufferedImage BufferedImage myImage = ...; MonochromeBitmapSource source = new BufferedImageMonochromeBitmapSource (myImage); I have written following code to read the image which works fine InputStream is= this.getApplicationContext().getResources ().openRawResource(R.raw.bc02); The run time object is of class android.content.res.AssetManager $AssetInputStream Can any help me in reading the file and decoding? Please let me know if I am doing correct or not. Thank you, Abhishek -- Wahib-ul-haq Communications Engineering Student, NUST, Pakistan.www.sizzlotech.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] javax.imageio.ImageIO?
Hello, Looks like android does not support javax.imageio, but I need javax.imageio.ImageIO or a reasonable substitute for image processing. Any recommendations? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Long Press Search BUtton
I have an application that contains a receiver with the following intent filters: intent-filter android:priority= action android:name=android.intent.action.CAMERA_BUTTON / action android:name=android.intent.action.SEARCH_LONG_PRESS / /intent-filter For devices that have a camera button everything works fine. However, for devices that don't have a camera button, I decided to use a long- press of the search button. One of the users has reported that this is not working and that pressing the search button does not launch my app... it only launches the speech recorder, as it did before my app was installed. There is a setting that turns this feature on and off, but I have verified that it is indeed on. Am I missing something here? What else do I need to do to get my app to launch when the search button is pressed? Thanks, Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to get resource path?
Thank you, Balwinder. But I just have a string for the name of the song and so, its not possible to get the ID for it using: . Please find my code below: String songFile = NameOfSong.mp3; MediaPlayer mp = new MediaPlayer(songFile); //This is not working since I don't have the entire path to the music file which is stored inside the .APK file Maybe I am using a wrong approach here. On Oct 8, 10:32 am, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: getResources().openRawResourceFd(int id) Get the FileDescriptor for the file and use MediaPlayer.setDataSource (FileDescriptor fd) method. Balwinder Kaur Mobile.Software.Development ·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 Oct 8, 12:55 am, abhi rkabhi1...@gmail.com wrote: Hi, I have included three MP3 file in the R.raw folder. Now I am able to get the file name of the MP3 file, but I need to find out the complete path of the file in order to play the file using MediaPlayer. I am using MediaPlayer.setDataSource(String path) to set the path to the file. When I set the path as just the file name, the MediaPlayer does not play it. Is there any way to get the full path of the MP3 file in resources? Or else, can I use some other implementation of MediaPlayer.setDataSource ()? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Project Idea....Not sure if its possible!
Yes this is possible. You will need to create web service also where user movement is stored. The book I was reading Professional Android Application Development covers how to make the speed application. The application will need to probe a webservice now and then to attain the locations of other users and also submit it's own location and speed data. So basicall you need: 1. Local Android Application 2. Reliable internet connection on running devices (GPRS is fine as long as it is reliable) 3. A central database somewhere that holds all location and speed data...(Maybe a Java Applet). On Oct 9, 8:04 pm, burrkie keith4presid...@hotmail.com wrote: Hi guys thiss is my first time posting and I really have no clue of the capabilties of Android etc so pease bear with me. Ok basically what I would like to do is create an app using gps, which tracks the direction and speed the user is moving. now the next part is the part im not sure if it is possible. I need the app to either track other users movements or recieve info from other users about their movements(directions and speed). The other users would be using the same app but on seperate devices. The users would be within no more than 30 meters apart. Does anybody know if this would be possible, and how difficult it would be if possible? I'm trying to avoid using wifi but if this is not possible I may have to change my idea a bit and look into it... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Reading/Decoding bar code stored in resources
You are welcome. Btw my name is wahib :) How do u intend to use this barcode code with camera thing? are you using your own camera preview code or calling built in camera app intent?? I am just stuck with this phase .. i hope its the last thing. Regards, wahib On 10/10/09, Abhishek abhishek.moh...@gmail.com wrote: Hey Wahid, Same code worked for me. Multiformatreader can read QR codes. Thanks a lot for help. Abhishek On Oct 9, 9:11 am, Abhishek abhishek.moh...@gmail.com wrote: Wahid, Thanks a lot brother. Is it possible for you to send you activity file to me onabhishek.moh...@gmail.com? I will keep you posted about my progress on this application. Abhishek On Oct 7, 7:42 pm, wahib haq wahib.t...@gmail.com wrote: hiabhishek!! I am a newbie and my first initiative is also building a simple barcode decoding module. I dont have a android phone so i have to go on a different path to do this barcode app thing. :S can you plz guide me what to be on right side of BufferedImage myImage = ... ?? I am using this code I have imported these ... import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.widget.TextView; import com.google.zxing.MonochromeBitmapSource; import com.google.zxing.MultiFormatReader; import com.google.zxing.Reader; import com.google.zxing.ReaderException; import com.google.zxing.client.androidtest.*; import com.google.zxing.common.BaseMonochromeBitmapSource; Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.bar5); Bitmap bitmap1 = BitmapFactory.decodeFile(file://sdcard/DCIM/Camera/2009-10-04 21.31.02.jpg); MultiFormatReader reader1=new MultiFormatReader();//For all barcode formats try { result=reader1.decode(new RGBMonochromeBitmapSource(bitmap)); tv.setText(result.getText()); } catch (Exception e) { tv.setText(Error occured !!); } } // I have tried it with reading bmp and jpeg image from pasting in res/drawable folder and it works fine with 1D barcode. Its not working with 2D and i dont know how to do it though multiformat i guess means it shud support 2D as well. Well this will solve ur problem. I also tried to read it with a sdcard image coz after all it has to fetch from the image taken by camera. but i dont have a camera and unable to push image in gallery after lots of tries so it still undone. Share anything else you cum to know abt barcode decoding task. Regards, wahib On 10/6/09,Abhishekabhishek.moh...@gmail.com wrote: Hello All, I am writing an application to scan a bar code. As a small module of it I am trying to decode the bar code form the image file stored as resource. (R.raw.bc02) where bc02.jpg is my bar code image file. I am usinghttp://code.google.com/p/zxing/wiki/DeveloperNotestowrite a program for decoding. I am stuck up at following step: i.e. reading the image as bufferedImage BufferedImage myImage = ...; MonochromeBitmapSource source = new BufferedImageMonochromeBitmapSource (myImage); I have written following code to read the image which works fine InputStream is= this.getApplicationContext().getResources ().openRawResource(R.raw.bc02); The run time object is of class android.content.res.AssetManager $AssetInputStream Can any help me in reading the file and decoding? Please let me know if I am doing correct or not. Thank you, Abhishek -- Wahib-ul-haq Communications Engineering Student, NUST, Pakistan.www.sizzlotech.com -- Wahib-ul-haq Communications Engineering Student, NUST, Pakistan. www.sizzlotech.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Project Idea....Not sure if its possible!
Sorry Servlet not Applet :p On Oct 10, 10:17 am, jax jackma...@gmail.com wrote: Yes this is possible. You will need to create web service also where user movement is stored. The book I was reading Professional Android Application Development covers how to make the speed application. The application will need to probe a webservice now and then to attain the locations of other users and also submit it's own location and speed data. So basicall you need: 1. Local Android Application 2. Reliable internet connection on running devices (GPRS is fine as long as it is reliable) 3. A central database somewhere that holds all location and speed data...(Maybe a Java Applet). On Oct 9, 8:04 pm, burrkie keith4presid...@hotmail.com wrote: Hi guys thiss is my first time posting and I really have no clue of the capabilties of Android etc so pease bear with me. Ok basically what I would like to do is create an app using gps, which tracks the direction and speed the user is moving. now the next part is the part im not sure if it is possible. I need the app to either track other users movements or recieve info from other users about their movements(directions and speed). The other users would be using the same app but on seperate devices. The users would be within no more than 30 meters apart. Does anybody know if this would be possible, and how difficult it would be if possible? I'm trying to avoid using wifi but if this is not possible I may have to change my idea a bit and look into it... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Voice recognition
On Fri, Oct 9, 2009 at 12:51 PM, anirudh anirudh11777s...@gmail.com wrote: hi all , im trying to write an app which uses speech recognition.As per the introduction video , i can see a 'mike' next to the quick search box. But cant be seen in the emulator(1.6).do i need to do any configuration for the same or any application needs to be installed to enable that?? Or, is it not supported for emulator (1.6)?? thanks and regards Anirudh N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Voice recognition
Hi Anirudh ,I did not try it but go to the site : http://developer.htc.com/adp.html download system image signed-dream_devphone_userdebug-img-14721.zipjavascript:void(0); and replace yours in SDK 1.6 . Pay attention that image should be for android 1.6. Regards. On Fri, Oct 9, 2009 at 12:51 PM, anirudh anirudh11777s...@gmail.com wrote: hi all , im trying to write an app which uses speech recognition.As per the introduction video , i can see a 'mike' next to the quick search box. But cant be seen in the emulator(1.6).do i need to do any configuration for the same or any application needs to be installed to enable that?? Or, is it not supported for emulator (1.6)?? thanks and regards Anirudh N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---