[android-developers] Re: Force Portrait Screen

2009-08-13 Thread String
Is there any way to accomplish this for a single activity, rather than the whole app? The default orientation switch is fine for most of my app, but for one activity, it makes a lot more sense to handle it internally. String On Aug 7, 2:54 pm, Mark Murphy wrote: > condor wrote: > > Hello I deve

[android-developers] Wifi Notifications

2009-08-13 Thread androiduser mobile
Can anybody have an example of how to generate wifi notifications in the status bar? Your help is highly appreciated. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this

[android-developers] Re: onRetainNonConfigurationInstance confusion

2009-08-13 Thread Keith Wiley
Bump. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developer

[android-developers] Context menu creation

2009-08-13 Thread Nasam
I have created a LinearLayout wich has webview as its child. But when i long click on this webView I am not able to see any contextmenu. I have enable contextmenu for this layout/webview using registerForContextMenu(layout); registerForContextMenu(sWebView); and have overlaoded public void on

[android-developers] MediaPlayer and memory buffers.

2009-08-13 Thread phil
I have looked at the documentation for MediaPlayer and it doesn't seem to do what I need. I need to be able to feed a personalized stream to the media player. For example, I have an AAC stream that has some header information in it, so I can't simply feed the HTTP URL to the media player because

[android-developers] Re: add images to gallery view after downloading

2009-08-13 Thread Sagar
Hi... Thanks for the reply. I did it..its working fine.. But I can only display images in gallery after all images have been downloaded. How i can update gallery after each image has been downloaded (like in android market appliaction. icon is displayed after downloading it). On Aug 13, 6:11 pm,

[android-developers] How to Add menu of my app to gallery and other applications

2009-08-13 Thread Naveen
Hi! My application is working on images. I want to a add my menu in Gallery application and other image handeling applications. There are many posts regarding this but still I could not succesfully achive that. I could not find any sample code for full application. It will be great if any one ca

[android-developers] Re: Error found in build "htonl" no reference

2009-08-13 Thread taosinker
Thanks all, I have fix the problem. It is due to my code error. in bionic, htonl is defined as Marcro. On Aug 14, 10:25 am, taosinker wrote: > Hi all: > When I build my native library, an error reported. > the error message is: >          undefined reference to `htonl' > > Could you help me?

[android-developers] Re: Charset encoding problem

2009-08-13 Thread william
sorry I have posted twice, please ignore this message On Aug 14, 10:36 am, myopc wrote: > hi, all >    I found a strange charset encoding bug of dalvik VM. please see the > following code: > >  public class CharsetMain extends Activity { >  private final static String LOG_TAG = "zzw"; > >  final

[android-developers] Re: charset encoding error

2009-08-13 Thread william
http://android.git.kernel.org/?p=platform/dalvik.git;a=commitdiff;h=e406b316295f07d40679ce2372051c3b2bce5de4;hp=8493876016e383b59af707cb5184100374f7f353 I found this commit has solved the bug, On Aug 14, 11:20 am, william wrote: > hi, all >      I met a strange error of charset encoding, see be

[android-developers] charset encoding error

2009-08-13 Thread william
hi, all I met a strange error of charset encoding, see below code: public class CharsetMain extends Activity { private final static String LOG_TAG = "zzw"; final String s123="1我2"; // at least one none-ascii final String sabc="abcdef"; @Override public void onCreate(Bundle savedInstan

[android-developers] Charset encoding problem

2009-08-13 Thread myopc
hi, all I found a strange charset encoding bug of dalvik VM. please see the following code: public class CharsetMain extends Activity { private final static String LOG_TAG = "zzw"; final String s123="1我2"; // at least one none-ascii final String sabc="abcdef"; @Override public void onC

[android-developers] GPRS attach and detach/Wifi connection

2009-08-13 Thread Gabriel Tessarolli
Hi, In cupcake release, it is known that only one network interface can be active at a time. That is, if you turn Wifi ON and connect to a network, the GPRS/UMTS interface will be dropped. Does that mean that handset will perform GPRS detach? It deactivates the PDP context, but what about GPRS at

[android-developers] Is it possible to connect to a local dev server using Phone connected to debugger?

2009-08-13 Thread bkbonner
I'd like to connect to a local tomcat dev server on my laptop and use my android phone connected via a usb cable to debug things. Is this possible? Do I need to use wifi to make this happen? --~--~-~--~~~---~--~~ You received this message because you are subscri

[android-developers] Re: Text and delay

2009-08-13 Thread Jeff Sharkey
You shouldn't be using loops like this to delay things, especially if they end up running on the UI thread. Instead, create a Handler and send a message to your future self using postDelayed() or sendMessageDelayed(). j On Thu, Aug 13, 2009 at 8:23 AM, bluewind wrote: > > I want to display text

[android-developers] Re: canvas.save() / restore() , what is this?

2009-08-13 Thread Jeff Sharkey
Think of it as checkpointing the transformation matrix and clip rectangle of your Canvas at a known place in time. This is useful when rendering children views that may leave them in an unknown state. (You can restore back to the checkpointed state when children are done drawing.) Here's an exa

[android-developers] Camera Activity

2009-08-13 Thread bkbonner
If I fire off an android.media.action.IMAGE_CAPTURE, I'm wondering what i'm supposed to do with the resulting intent that has extra data that is sent back to me? There are also other cameras out there for Android -- how come there isn't a common intent that can be filtered? Brian --~--~-

[android-developers] Re: Crashes with no usefull stacktrace

2009-08-13 Thread Jeff Sharkey
Sadly, it looks like the best short-term answer would be to roll your own formatting code. The formatter here is calling into native code for speed, so a pure-Java implementation wouldn't run into these native crashes. j On Thu, Aug 13, 2009 at 2:58 AM, Klaus Kartou wrote: > Thank you for your

[android-developers] Re: default measuring units px or dp

2009-08-13 Thread Jeff Sharkey
You're right, setting dimensions through code only takes raw pixel values. You have to multiply the display density; something like this should work: final float density = getResources().getDisplayMetrics().density; int pxSize = (int)((float)dipSize * density); Or if you're writing your own vie

[android-developers] Error found in build "htonl" no reference

2009-08-13 Thread taosinker
Hi all: When I build my native library, an error reported. the error message is: undefined reference to `htonl' Could you help me? Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers"

[android-developers] Contacts GroupU - easily manage your contacts

2009-08-13 Thread Yao
Hi guys, Contacts GroupU is an application which manages group of contacts. It integrates with built-in phonebook seamlessly. All groups edited in GroupU will appear in phonebook, and can be synced with gmail group setting. With GroupU, user can send sms/mms/email to a group, or multiple group mem

[android-developers] Re: GridView inside a Linear Layout displayed in a tab

2009-08-13 Thread sai
Thanks for the reply Jack. No. I am using a TabActivity and I am doing a getTabHost(). Then I am adding the grid view from the Inflated UI to the tab host. Actually If I keep just the grid view inside the xml with out any other layouts or views it works fine. For example if my example looked lik

[android-developers] Re: Why calendar APP don't run in Android 1.5?

2009-08-13 Thread Shang Hao
Connect ur emulator to internet and make sure u are able to browse the internet.. once this is done, u can use the caendar application. On Aug 13, 5:32 pm, luggie wrote: > Thank you,Jack Ha. > And how to start Google Service ? > > On 8月13日, 下午2时03分, Jack Ha wrote: > > > Assuming you are ref

[android-developers] Re: how to get notified(or Listen) for the changes in SD card

2009-08-13 Thread Dianne Hackborn
http://developer.android.com/reference/android/os/FileObserver.html But trying to watch for any change on any file is potentially extremely expensive, since you need to be monitoring every single directory on the file system, and updating what you are monitoring as directories are created or remov

[android-developers] Sydney, Australia GTUG

2009-08-13 Thread Nick Mayall
All, I am setting up a Google Technology Users Group in Sydney, Australia. We have already secured a room in the new Google HQ in Pyrmont, Sydney for our first meetup on September 2nd. If you are interested please join the group at http://groups.google.com/group/sydney-gtug where further informa

[android-developers] Re: how to get notified(or Listen) for the changes in SD card

2009-08-13 Thread Harshit Mapara
Can you guys please tell me, how do I use intent - ACTION_MEDIA_EJECT? How do I get notified if Media card(sd card) is ejected or mounted ? I came to know of using this by intent action and broad cast receiver, but dont know how to do this actually. Thanks On Aug 13, 12:36 pm, Casper Bang wro

[android-developers] Re: Why calendar APP don't run in Android 1.5?

2009-08-13 Thread luggie
Thank you,Jack Ha. And how to start Google Service ? On 8月13日, 下午2时03分, Jack Ha wrote: > Assuming you are referring to running the Calendar app in the > emulator. The reason is that the Google Service is not available. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick toge

[android-developers] Re: on-screen keyboard always displays on Galaxy

2009-08-13 Thread Peter Jeffe
> You can use android:softInputMode to control this behavior as introduced > here: Thanks Diane. I'm sure I'm just missing something, but I've never gotten this to have any effect. Whether I do this in the manifest: or in the activity code: getWindow().setSoftInputMode (WindowManager.Layout

[android-developers] Re: How to download a read only sqlite database at runtime

2009-08-13 Thread yao chen
On Fri, Aug 14, 2009 at 7:59 AM, trev wrote: > > My application needs to download a reasonably sized SQLite database at > runtime, depending on the location of the user. On a remote server I > will have many databases for various regions around the globe and > would like to download the database

[android-developers] Re: how can I catch SCREEN_ON/SCREEN_OFF broadcasts?

2009-08-13 Thread Randy McEoin
Thanks for this post. I'm using this to clean up auto lock in OI Safe. Randy On Jul 20, 9:36 am, Peli wrote: > In your main activity, you have to write something like > >    BroadcastReceivermReceiver = newBroadcastReceiver() { >             @Override >             public void onReceive(Conte

[android-developers] How to download a read only sqlite database at runtime

2009-08-13 Thread trev
My application needs to download a reasonably sized SQLite database at runtime, depending on the location of the user. On a remote server I will have many databases for various regions around the globe and would like to download the database file, but can't quite work out what steps are required.

[android-developers] Re: Emulator gsm call

2009-08-13 Thread androiduser mobile
Hi all, I added the LOCAL_MODULE_TAGS := eng in Android.mk file and I built the SDK again and from then I am able to see the phone call successfully running on my emulator. Thanks all for helping, Android user. On Aug 13, 12:55 pm, androiduser mobile wrote: > I built the SDK locally using make

[android-developers] Re: on-screen keyboard always displays on Galaxy

2009-08-13 Thread Dianne Hackborn
The behavior between devices with and without hard keyboards is indeed different because... well, there being a hard keyboard significant impacts how you use the soft keyboard on a device. You can use android:softInputMode to control this behavior as introduced here: http://android-developers.bl

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Dianne Hackborn
And the solution is NOT to increase your thread priority so you can better "fight" with the system. You will get better results by putting in the sleep so you aren't fighting. On Thu, Aug 13, 2009 at 3:32 PM, Justin (Google Employee) wrote: > > The recommendation for this is to sleep in the tou

[android-developers] Re: cancelling pending Toasts

2009-08-13 Thread Dianne Hackborn
Sorry, there isn't any way to do this. On Thu, Aug 13, 2009 at 3:49 PM, Jason Proctor < jason.android.li...@gmail.com> wrote: > > i'm writing an application that demonstrates various gesture > algorithms, and Toast after each one is detected. of course if the > user goes all hogwild then the Toas

[android-developers] cancelling pending Toasts

2009-08-13 Thread Jason Proctor
i'm writing an application that demonstrates various gesture algorithms, and Toast after each one is detected. of course if the user goes all hogwild then the Toasts back up. can i flush the Toast queue somehow? tx -- jason.software.particle --~--~-~--~~~---~--~--

[android-developers] Re: list with multiple selection

2009-08-13 Thread Justin (Google Employee)
Can you define "not working", this will help indicate the solution. Cheers, Justin Android Team @ Google On Aug 11, 5:18 am, Honest wrote: > I tried same code in my application but it is not working. Please > suggest me something. > > On Aug 10, 8:05 pm, Jack Ha wrote: > > > Take a look at Lis

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Streets Of Boston
For me a sleep of about 20millisecs was most effective. Note that this only works if your opengl render-thread is a seperate thread (not the main gui-thread). On Aug 13, 6:32 pm, "Justin (Google Employee)" wrote: > The recommendation for this is to sleep in the touch event handler. > The system

[android-developers] Re: id specify

2009-08-13 Thread Justin (Google Employee)
Sorry, I misspoke, the tutorial is correct, in Step 4 the two id's specified are special id's defined by the platform. The syntax in Step 5 (and specified in the previous) post is how to define your own IDs. Cheers, Justin Android Team @ Google On Aug 13, 3:42 pm, "Justin (Google Employee)" wro

[android-developers] on-screen keyboard always displays on Galaxy

2009-08-13 Thread Peter Jeffe
I have a layout with a TextView and a List, and in onCreate() I have the TextView request focus. On the G1 and emulator the screen comes up with the TextView having focus, and the on-screen keyboard will display when you tap on the TextView, but on the Galaxy apparently the on-screen keyboard is

[android-developers] Re: id specify

2009-08-13 Thread Justin (Google Employee)
It looks like our notepad tutorial is a little rusty. Is what you want. Cheers, Justin Android Team @ Google On Aug 10, 6:59 am, Honest wrote: > Hello, > > Can some one tell me how can i specify I.D in android ? acutlly i want > to create List . I add the following code in main.xml file. But

[android-developers] Re: Reading Calendar?

2009-08-13 Thread Justin (Google Employee)
The calendar data provider is not currently exposed. Your best, albeit not simple, bet is to use the Google Calendar web API to access the user's calendar data. Cheers, Justin Android Team @ Google On Aug 10, 7:43 am, Kaj Bjurman wrote: > Hi, > > I think I've seen somewhere that it's still not

[android-developers] Re: Simply touching screen reduces fps

2009-08-13 Thread Justin (Google Employee)
The recommendation for this is to sleep in the touch event handler. The system will send you touch events as fast as you can process them. If you artificially decrease this by sleeping in the handler, you will allow more processing time for other threads which are theoretically running your comput

[android-developers] Re: Listview with different rows (layouts)

2009-08-13 Thread Marco Nelissen
The position is passed in as a parameter, and presumably you know which layout you want to use for a given position, so you can return the appropriate layout here. Alternatively, you could return a view that can serve as any of the layouts you need (by showing and hiding elements as needed), and t

[android-developers] Re: Listview with different rows (layouts)

2009-08-13 Thread Wouter
I have a custom adapter like this: private class FriendsAdapter extends ArrayAdapter { .. public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) getSy

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Mark Murphy
Jonathan wrote: > Right, you did say that, but as I mentioned I tested it and you were > absolutely right. Everything worked when I changed the extension > to .mp3. Ah, sorry, I thought you were just paraphrasing -- I hadn't realized you tried it. On the minus side, aapt does not appear to have

[android-developers] Re: Detecting Long Press on a Map Overlay

2009-08-13 Thread mscwd01
That sounds like a hacky way of doing things, isn't there a "proper" way of implementing this? On Aug 13, 4:49 pm, Pugnap00 wrote: > What about setting up a time for when the screen is being pressed. You > could use a while loop, and after a certain amount of ticks you execue > your code. > > On

[android-developers] Re: Listview with different rows (layouts)

2009-08-13 Thread Marco Nelissen
On Thu, Aug 13, 2009 at 3:00 PM, Wouter wrote: > > Hey, > > I want to make a listview that has different rows (layouts). I will > load the data from a webservice and it can be 2 or more layouts i have > to generate then. I am creating a social network app and want to show > a stream of the users a

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Jonathan
Right, you did say that, but as I mentioned I tested it and you were absolutely right. Everything worked when I changed the extension to .mp3. Thanks for your help! On Aug 13, 3:05 pm, Mark Murphy wrote: > Jonathan wrote: > > Someone on StackOverflow responded to my question there and mentione

[android-developers] Re: Listview with different rows (layouts)

2009-08-13 Thread Mark Murphy
Wouter wrote: > I want to make a listview that has different rows (layouts). I will > load the data from a webservice and it can be 2 or more layouts i have > to generate then. I am creating a social network app and want to show > a stream of the users activity. > So when he made a comment, make a

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Mark Murphy
Jonathan wrote: > Someone on StackOverflow responded to my question there and mentioned > it's a problem with compressed files. Uh, hi! Actually, I said "IIRC" it is a problem with compressed files. You'd have to give it a shot to confirm my memory. -- Mark Murphy (a Commons Guy) http://common

[android-developers] Listview with different rows (layouts)

2009-08-13 Thread Wouter
Hey, I want to make a listview that has different rows (layouts). I will load the data from a webservice and it can be 2 or more layouts i have to generate then. I am creating a social network app and want to show a stream of the users activity. So when he made a comment, make a new friend, this

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Jonathan
Someone on StackOverflow responded to my question there and mentioned it's a problem with compressed files. If the file is stored uncompressed it works. In order to do this (per their suggestion) I renamed my file to .mp3, which is a known compressed format to android, and the reads work. It so

[android-developers] Re: Any way to transfer Android ID from App environment to Browser on Android phone

2009-08-13 Thread Mark Murphy
rch wrote: > If I build my own app I definitely have access to Android ID, but my > main question was if I did not use any app and went to www.cnn.com is > there a way to pass ANDROID_ID to cnn.com? Oh, I sure hope not. That would invite many privacy-related lawsuits. > Basically all the apps e

[android-developers] Re: Any way to transfer Android ID from App environment to Browser on Android phone

2009-08-13 Thread rch
Mark: If I build my own app I definitely have access to Android ID, but my main question was if I did not use any app and went to www.cnn.com is there a way to pass ANDROID_ID to cnn.com? Basically all the apps even though they have their own sandboxes etc have the ability to log a unique device

[android-developers] view.draw() at horizontal offset?

2009-08-13 Thread Bob
Hi, I have a very large view that is normally only very partially displayed on the screen. Is there any way for me to draw at an offset into a bitmap from a canvas. I am getting out of memory errors if I try to access something at say pixel width 2000. Code: Bitmap image = Bitmap.createBitmap(

[android-developers] Re: Loading large assets

2009-08-13 Thread Mark Murphy
Jonathan wrote: > I have a fairly large asset (about 2mb) that I would like to process. > I only need to read from the InputStream 24 bytes at a time. I get > IOExceptions for reads on files over a meg (via the AssetManager). > > I don't need to load the entire file into memory or anything, I ju

[android-developers] Re: Any way to transfer Android ID from App environment to Browser on Android phone

2009-08-13 Thread Mark Murphy
rch wrote: > Is there a way to access System.ANDROID_ID on webkit browser on > Android phone G1? Build your own app, embedding the WebView browser widget, and you can expose that information via addJavascriptInterface()...to any Web page on the planet that chooses to look that you bring up in the

[android-developers] Re: Using setCurrentTab on a TabHost in landscape mode doesn't work. (in emulator)

2009-08-13 Thread Mark Murphy
Mathieu Plourde wrote: > Hello devs, > > Since I only have access to the emulators, I don't know if the problem > can be reproduced on real phones. I'm using setCurrentTab on a TabHost > to dynamically select a tab. When I am in portrait mode, it works, but > as soon as I change to landscape (ctr

[android-developers] Re: Controling a Video in a view

2009-08-13 Thread Marco Nelissen
On Thu, Aug 13, 2009 at 1:41 PM, mjoselli wrote: > > Hello All, > > I am trying to create a video player using a custom interface (with a > lot of images). > > I am moving from J2ME to android apps. > > In J2ME I just create a canvas and set the video to draw to the > canvas... > > but now with an

[android-developers] IOException while reading a raw resource.

2009-08-13 Thread Jason Proctor
yeah, looking at AssetManager.java, read() calls native readAssetChar(), whereas read(byte[]) calls native readAsset(). readAsset() throws the IOException if the underlying Asset.read() returns negative. readAssetChar() just returns negative if the read() fails, no throw. Asset.h has UNCOMPRE

[android-developers] Re: curious

2009-08-13 Thread Marco Nelissen
On Thu, Aug 13, 2009 at 11:00 AM, Andrei wrote: > > web is WebView > > Interestingly, if i put info = null it causes NullPointerException > I don't think this should happen > > header = "header"; > footer = "footer"; > info = "info"; > web.loadData( header+info+footer, "text/html", "utf-8" ); > in

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Jonathan
I'm not exactly sure... I'm actually only reading the file 24 bytes at a time, so I'm not quite sure why the IOException is thrown. I'm never allocating a buffer for the full file. If I do two sequential one byte reads it's fine... but a single 2 byte read (using read(byte[])) it throws the exce

[android-developers] Any way to transfer Android ID from App environment to Browser on Android phone

2009-08-13 Thread rch
Is there a way to access System.ANDROID_ID on webkit browser on Android phone G1? If not, is there a way we can reliably connect the System.ANDROID_ID with some cookie on the mobile web browser? I am just looking for a way to track the user uniquely across App and Browser. Any thoughts? --~--~---

[android-developers] IOException while reading a raw resource.

2009-08-13 Thread Jason Proctor
why is there a 1mb file limit in this case? and is the restriction 1mb in the amount of stuff read, or in the size of the file? could you maybe open the file, skip a megabyte, then continue to read the second megabyte? >1048576 is the file limit >If you have bigger file split it -- jason

[android-developers] Loading large assets

2009-08-13 Thread Jonathan
I have a fairly large asset (about 2mb) that I would like to process. I only need to read from the InputStream 24 bytes at a time. I get IOExceptions for reads on files over a meg (via the AssetManager). I don't need to load the entire file into memory or anything, I just need to read it 24 byte

[android-developers] Controling a Video in a view

2009-08-13 Thread mjoselli
Hello All, I am trying to create a video player using a custom interface (with a lot of images). I am moving from J2ME to android apps. In J2ME I just create a canvas and set the video to draw to the canvas... but now with android I am not able to do it... So I have seen that I can create a V

[android-developers] Re: using shape as my background never show the color I specify

2009-08-13 Thread n179911
I tried using http://schemas.android.com/apk/res/android"; android:shape="oval"> It should gives me a white circle for my view's background. Any idea? Thank you. On Thu, Aug 13, 2009 at 12:34 PM, n179911 wrote: > Hi, > > i specify the following xml as my background for my vie

[android-developers] Re: Slow GPS updates

2009-08-13 Thread CG
You know what Paul, I double checked my calculations, and for some embarasing reason, I am not able to substract two number, The HTC also have delays of 1000ms. so you should multiply above numbers by 2, sorry for the confusion. --~--~-~--~~~---~--~~ You received

[android-developers] Re: Layout problem with ListView

2009-08-13 Thread Boxy
Hmm it looks like my diagrams didn't post quite right to the message board. Just use your imagination to picture nicely drawn boxes that borders the text :) On Aug 13, 12:19 pm, Boxy wrote: > First let me say that this problem is probably real easy to solve. > But I've been looking at it all

[android-developers] ExtractEditText and InputServiceManager's Context

2009-08-13 Thread bnovc
I'm trying to create a PopupWindow inside of TextView.java, which works fine when in Portrait/non-fullscreen mode, but when I go into Landscape/ExtractEditText, then I get an exception about my activity being null. In TextView.java, I have: ... private PopupWindow mCursorPopup; ... on touch:

[android-developers] Re: Emulator gsm call

2009-08-13 Thread androiduser mobile
I built the SDK locally using make sdk for latest android sources. On Aug 13, 12:51 pm, Xavier Ducrohet wrote: > You really shouldn't have to do this. > > The emulator system image provided with the SDK should be provisioned > (it's setup to run the app SdkSetup on the first boot to provision th

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Jonathan
Is that a restriction on InputStream, or for assets? I was able to include an MP3 file as a resource and it would play just fine (although I didn't open it via InputStream)... the MP3 was about 3mb. On Aug 13, 12:46 pm, Andrei wrote: > 1048576 is the file limit > If you have bigger file split i

[android-developers] Re: Emulator gsm call

2009-08-13 Thread Xavier Ducrohet
You really shouldn't have to do this. The emulator system image provided with the SDK should be provisioned (it's setup to run the app SdkSetup on the first boot to provision the device). Are you using the SDK, or a self made system image? Xav On Thu, Aug 13, 2009 at 12:30 PM, Roman ( T-Mobile

[android-developers] Layout problem with ListView

2009-08-13 Thread Boxy
First let me say that this problem is probably real easy to solve. But I've been looking at it all night and its got me stumped. So to keep from pulling my hair out, I'll post this problem here where some expert can look at it for 5 seconds and figure out what I'm an idiot :) Here's the backgro

[android-developers] Re: Slow GPS updates

2009-08-13 Thread CG
Surely seems faster then. from 2051 samples. the mean delay is 507ms and only 14 samples is above 600ms --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Andrei
1048576 is the file limit If you have bigger file split it On Aug 13, 3:35 pm, Jonathan wrote: > I was able to load a 1MB file okay, but 1.5MB crashed. > > On Aug 13, 12:30 pm, Jonathan wrote: > > > > > If I truncate the file to 100,000 bytes (file is: 1,917,408 bytes > > originally) it works f

[android-developers] Re: how to get notified(or Listen) for the changes in SD card

2009-08-13 Thread Casper Bang
Filesystem monitoring is only provided in Java in the NIO2 stuff coming with Java 7. Android supports a subset of Java 6 so perhaps you can port this over yourself by looking at their source. As far as I know though, even the NIO2 will often need to use constant polling which would absolutely kill

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Jonathan
I was able to load a 1MB file okay, but 1.5MB crashed. On Aug 13, 12:30 pm, Jonathan wrote: > If I truncate the file to 100,000 bytes (file is: 1,917,408 bytes > originally) it works fine.  Is there a problem with files over a > certain size? > > On Aug 13, 10:36 am, Jonathan wrote: > > > I'm r

[android-developers] using shape as my background never show the color I specify

2009-08-13 Thread n179911
Hi, i specify the following xml as my background for my view. It shows the oval, but the color is always white. I have played around with the android:color field, but the color never changes, it is always white. I tried "#FF", "#ff", "#00ff" Any idea? Thank you. http://schemas.an

[android-developers] Re: IOException while reading a raw resource.

2009-08-13 Thread Jonathan
If I truncate the file to 100,000 bytes (file is: 1,917,408 bytes originally) it works fine. Is there a problem with files over a certain size? On Aug 13, 10:36 am, Jonathan wrote: > I'm running into a strange problem while reading from an InputStream > on the Android platform. I'm not sure if

[android-developers] how to get notified(or Listen) for the changes in SD card

2009-08-13 Thread Jason Proctor
alternatively, the regular java File class has a lastModified() method. you could run a Service which has a Timer of some sort and then messages your activity when the mod time on the appropriate directory changes. >You might want to look at the following java libraries and see whether >you

[android-developers] Re: Emulator gsm call

2009-08-13 Thread Roman ( T-Mobile USA)
You can change the phone application to be able to handle incoming calls on the emulator. See code at Phone/src/com/android/phone/CallNotifier.java and set boolean provisioned = true; (in method onNewRingingConnection) -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together T

[android-developers] Re: how to get notified(or Listen) for the changes in SD card

2009-08-13 Thread Roman ( T-Mobile USA)
You might want to look at the following java libraries and see whether you can port one of them to Android. http://www.rgagnon.com/javadetails/java-0617.html Another way might be to execute system commands like stat (for which you have to be root which makes it more complicated to use it from SD

[android-developers] Re: Emulator gsm call

2009-08-13 Thread androiduser mobile
Hi Mark, Thanks for the response. I am using DDMS and when I see the logcat the message is "rejecting incoming call: device isn't provisioned". I dont know what I am missing here. Thanks. On Aug 11, 5:21 pm, Mark Murphy wrote: > androiduser mobile wrote: > > Hi, > > > Can anyone suggest how to

[android-developers] Re: curious

2009-08-13 Thread Andrei
info is String single thread On Aug 13, 2:43 pm, "Roman ( T-Mobile USA)" wrote: > What exactly is "info"? Do you have multiple threads running which > access info? > > -- > Roman Baumgaertner > Sr. SW Engineer-OSDC > ·T· · ·Mobile· stick together > The views, opinions and statements in this emai

[android-developers] how to get notified(or Listen) for the changes in SD card

2009-08-13 Thread Mapara,Harshit Nitinkumar
Hi All, I am creating an app and the requirement is - I have to listen to the SD card for new data comes in. Whenever a new file is downloaded into SD card , I want to be notified. (or say , I want to listen for changes) I searched, but can't get any useful help. Please help me in this issue.

[android-developers] Re: ambiguous column name: _id when querying the contacts list

2009-08-13 Thread Jeff Sharkey
Using the SDK version to handle the logic sounds like a good solution. You should use Build.VERSION.SDK (instead of RELEASE), since its values are much more predictable. (The SDK always increments by "1" for each platform release; Cupcake was 3, Donut will be 4, Eclair will be 5.) Also, a side

[android-developers] Sensor getting ArrayIndexOutOfBoundsException in onSensorChanged(int, float[]) from SensorListener

2009-08-13 Thread Stefano Malinconico
Hi All, I´m implementing a simple application that prints on the screen "Right" if i shake the device to the to right and prints "Left" otherwise. It was working fine till I tried to incline to one of the two sides. It remained printing "Right" indefinitely because the x axis acquired the gravity

[android-developers] Re: how to play video from raw folder?

2009-08-13 Thread Zeeshan Muhammad
mMediaPlayer= MediaPlayer.create(this, R.raw.intro); raw folder is the resource folder in the project directory , its not in the sdcard. 2009/8/13 Tang Droid.Dev.Team > > 抱歉 > > if(sdcard_raw_dir!=null){ > for(String raw_file:sdcard_raw_dir){ > mRawList.add(your_sdcard_raw_folder_path+

[android-developers] Re: Application & ApplicationContext

2009-08-13 Thread Dianne Hackborn
I generally recommend just doing singletons in statics rather than making a custom Application class. To me it seems easier, and avoids issues in the future when you are breaking an app apart or combining apps together or other kinds of refactoring where having a bunch of stuff in a global Applica

[android-developers] Re: curious

2009-08-13 Thread Roman ( T-Mobile USA)
What exactly is "info"? Do you have multiple threads running which access info? -- Roman Baumgaertner Sr. SW Engineer-OSDC ·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 t

[android-developers] Re: Has ADC submission site opened?

2009-08-13 Thread Yusuf Saib (T-Mobile USA)
No. 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 Aug 13, 10:02 am, Khurram Samad wrote: > Hey > Any update ont h

[android-developers] Re: How to make chat window for IM?

2009-08-13 Thread Yusuf Saib (T-Mobile USA)
Can you give more details on the problems you encountered with TextView or ListView? 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

[android-developers] Re: Getting Friends list from Facebook

2009-08-13 Thread Yusuf Saib (T-Mobile USA)
Facebook uses a REST API. So your app would use REST get the info thusly: http://wiki.developers.facebook.com/index.php/Friends.get 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

[android-developers] Re: got a black screen after no operation on app for a while

2009-08-13 Thread Yusuf Saib (T-Mobile USA)
There are stupid questions, and there are stupid answers. Your question wasn't stupid, but forgive me if my answer is: Could it be the Android screensaver? You did mention that you left for a while. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this emai

[android-developers] Re: voice recognition on HTC Hero

2009-08-13 Thread jdesbonnet
Same here with my Vodafone branded HTC Magic. I believe it requires a Google Voice account do the the actual recognition work which is not available in the UK at the moment. On Aug 13, 6:31 pm, Ivan Viola wrote: > Hi, > has somebody managed to bring the voice recognition to run on the HTC > Her

[android-developers] curious

2009-08-13 Thread Andrei
web is WebView Interestingly, if i put info = null it causes NullPointerException I don't think this should happen header = "header"; footer = "footer"; info = "info"; web.loadData( header+info+footer, "text/html", "utf-8" ); info = null; // if i add this line it causes NullPointerException --~

[android-developers] Using setCurrentTab on a TabHost in landscape mode doesn't work. (in emulator)

2009-08-13 Thread Mathieu Plourde
Hello devs, Since I only have access to the emulators, I don't know if the problem can be reproduced on real phones. I'm using setCurrentTab on a TabHost to dynamically select a tab. When I am in portrait mode, it works, but as soon as I change to landscape (ctrl + f12), it doesn't work anymore.

[android-developers] List View multiple choice slow to update

2009-08-13 Thread kec6227
I am having trouble with a list aspect of my app. Essentially, it has a multiple choice listview(simple_list_item_multiple_choice) on the right and a text view on the left. When an item of the list view is checked off, I want to add it to the text view or remove it if it gets unchecked. This almo

  1   2   3   >