[android-developers] How to know MIME TYPE from RTSP/RTP link?
Hello All, Is it possible to know/detect that RTP/RTSP link is streaming audio link or streaming video link? Please post some of working examples of RTP/RTSP links !! In anroid 2.3.3(level 10)...there is MediaMetadataRetriever class which can help me. but i am looking solution for Android. 2.1/2.2 Thanks, JC -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] App is published in Android Market but not visible in some phones
I have application published in the market. Below is the link provided. I have HTC Wildfire and Desire with me. Both have android 2.2 https://market.android.com/details?id=com.cricket.fast Now I can see this and install this application on HTC Desire, but I cant see this in market on HTC Wildfire. But If I install app manually, it works, then why it is not listed for HTC Wildfire in the market ? While building application my target SDK is 8 and minSDK is 3. Whats the problem here. Can some one please look at the link and 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: Two functions Button?
take a boolean variable and wirtie two if condition on each condition set condtions On Mar 27, 8:55 pm, Gabriel gab...@gmail.com wrote: How I create a button with two functions? For example, when I click it once it starts a sound, and if I click it again it stops the sounds. Or a Mute button, that when I click it mutes all the sounds and change the imagebutton for a mute off image and if I click it again the sound returns. I appreciate any help. 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] performance issue of an android application
Hi, What tools would use to search out a performance issue of an android application??? Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: best way to save images files
store them in drawable folder within res and and call the imageview object.setbackgroundresource(r.drawable.name of the image) On Mar 27, 9:05 pm, Igor Nesralla Ribeiro nesra...@gmail.com wrote: Hi, I have this scenario : I have 50 images files of restaurants , that restaurants(name,city,address,image name) i saved into a database..My question is..how and where I saved this images files.and how I display this images files into a imageview Thanks in advance.. Igor -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Dialog box without title
On Mar 27, 8:05 am, TreKing treking...@gmail.com wrote: On Sun, Mar 27, 2011 at 2:25 AM, Doug beafd...@gmail.com wrote: It's not pointless, and please stop telling people that. :-) You just have to know when to use it. Use it when you need to store a context in an object that lives longer than an instance of an activity or service, but don't want to leak that activity or service. The application context is perfect for that. I suppose that is true. Though IMO a Context is not something that should be stored in an object that outlives an Activity or Service. If you need a Context, one is usually readily available wherever you happen to be and can be passed as a parameter. Do you have a good example of when storing a Context like this is a good idea? I'm just curious. I do it in an app I'm developing that has a bunch of background actions going on in another thread. A service wasn't appropriate for these actions, and they need a context in order to do things like broadcast messages, access resources, etc. So the class that encapsulates these behaviors best uses the application context to do its work. Generally speaking, if you have to create a persistent singleton of some sort (cache, state machine, whatever) and that singleton needs a context, only the application context will do. MOST of the time there is no need for the application context, but this app I'm working on is exceptionally complex as far as apps go. Sorry for hijacking the thread -- anyway! -- TreKing is correct, there is no need for application context when creating a dialog and you're begging for trouble when you use it for mundane UI stuff. However, it is a necessity in some uncommon cases. Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: App is published in Android Market but not visible in some phones
The Market filters out the applications that your device does ot support, using the hardware features requestes in the manifest.xml Most probably, your problem is the size of the screen. On api3, the default is _not_ to support hdpi and ldpi (if I remember correctly) so you need to explicitly tell that your applications supports them. On 28 mar, 07:30, umakantpatil umakantpat...@gmail.com wrote: I have application published in the market. Below is the link provided. I have HTC Wildfire and Desire with me. Both have android 2.2 https://market.android.com/details?id=com.cricket.fast Now I can see this and install this application on HTC Desire, but I cant see this in market on HTC Wildfire. But If I install app manually, it works, then why it is not listed for HTC Wildfire in the market ? While building application my target SDK is 8 and minSDK is 3. Whats the problem here. Can some one please look at the link and 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: how create a video with byte array
On Mar 27, 11:32 am, Danilo Veras danilosve...@hotmail.com wrote: I searched and not found how to do this. I do download a video and read the bytes through InputStream. someone know or have any idea of how do ? I think you'll need to be a lot more specific about what you're trying to accomplish. Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Storing Context vs Passing As Parameter Where Needed
On Mar 27, 8:25 am, TreKing treking...@gmail.com wrote: Spawning off the Dialog box without title thread to discuss the pros and cons of storing Context as a member vs passing a parameter. Here's the last bit of the discussion from that thread: Ugh, sorry, I discussed this in the original thread and apologized for hijacking the thread, THEN read this. Whoops. Anyway, nothing new to say here than what's already been said. Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 investigate the memory leak in jni method?
When given so little information, no. The best we can do is give vague generalities, such as use Traceview. But this is not such a bad vague generality after all. Traceview is the basic tool in the Android environment for finding memory leaks as well as solving other similar debugging problems. See http://groups.google.com/group/android-developers/browse_thread/thread/66e81163ab4599c8 for more details relevant to getting native code to output under Traceview. On Mar 26, 4:46 am, sunskyor sunskyor sunsk...@gmail.com wrote: Hi, I found the investigation of jni memory leak is too hard to execute. Anybody can give some clues for such problem?? 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: detect usb connected/disconnected event
Hi Karoly, their is no real sdk support to detect usb connect/disconnect. ( btw ..UMS == usb mass storage ). So don't expect that this will work reliably. I expect that this intent will not be sent, when you change to a non mass storage usb mode ( like mtp, pictbridge or others) if the concrete device support them. Good luck ! Frank On 27 Mrz., 19:58, Károly Holczhauser holczhau...@gmail.com wrote: Hi all! I had read in a lot of forum it is a problem to developers to write a program witch can detect the connected / disconnected USB event. Here is my solution: Manifest.xml : receiver android:name=.MyReceiver intent-filter action android:name=android.intent.action.ums_connected / /intent-filter /receiver Myreceiver: public class MyReceiver extends BroadcastReceiver{ if (intent.getAction().equalsIgnoreCase( android.intent.action.UMS_CONNECTED)) {...} } bye:Károly Holczhauser from Hungary -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Simulation of user interaction.
I'm interesting if there any way to simulate user activity on Android device. Application Exerciser Monkey for stress tests http://developer.android.com/guide/developing/tools/monkey.html MonkeyRunner for sending keystrokes and contol the emulator/device http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html and Robotium to rule them all! ;) http://code.google.com/p/robotium/ -- .enjoy. Alfredo Morresi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Developing app to connect with websites
you have to call thier webservices or attach to their rss feed, if available ;) http://stackoverflow.com/questions/1253788/simple-rss-parser-for-android -- .enjoy. Alfredo Morresi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: performance issue of an android application
What tools have you tried? http://lmgtfy.com/?q=android+performance+profiling -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Augmented Reality and Spherical 360º Views
Ok, thank you all. I'll try asap to fix the sensors issue. Also, lets try to put a thread invalidating the POIs view layer all the time. If that doesn works... I'll try to figure out by myself. Any other help? Has somebody achieved a smooth move using the orientation sensor? I would even pay for it! Regards! On 27 mar, 16:42, Greg Donald gdon...@gmail.com wrote: On Sat, Mar 26, 2011 at 9:01 PM, miguel miguelp...@gmail.com wrote: Do you think they are using openGL? Have you had a look at how AndEngine does it's AR stuff? I know the Qualcom AR SDK uses OpenGL. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to check all checkboxes at some specific event?
Hi guys, I am making an app which required my checkboxes to be checked at once when i check the main checkbox. I am using one normal checkbox widget which i am hoping will work as my main checkbox and i am also using LIST of multiple choice(simple_list_item_multiple_choice). Now i want to check all these listview's checkbox when i check my main checkbox. I am stuck at this part since last two days please help Thanks, Varundroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: display image from net
If it's anything like Java SE, then this (untested) will get you SSL (j.n.* classes don't automatically do the right thing with https, btw): static public Bitmap fromUrl(String urlStr) throws Exception { Bitmap bitmap = null; InputStream in = null; try { SocketFactory socketFactory = SSLSocketFactory.getDefault(); Socket socket = socketFactory.createSocket(urlStr, 80); in = socket.getInputStream(); bitmap = BitmapFactory.decodeStream(in); } finally { if (in != null) in.close(); } return bitmap; } HTH Thanks, Josh - Original Message - From: Robin Talwar r.o.b.i.n.abhis...@gmail.com To: android-developers@googlegroups.com Cc: Oscar oscar...@gmail.com Sent: Sunday, March 27, 2011 10:52:42 PM Subject: Re: [android-developers] Re: display image from net i dont think so i am just trying to show the user's facebook dp on my application when he logs into facebook using dialog interface. I have read the facebook sdk for android and i am able to fetch all data from user profile To get the image from the net i have to get the image from following link :- https://graph.facebook.com/ USERID /picture? and this is where i am stuck i dont think so that i require any username or password it is just something in coding . On Mon, Mar 28, 2011 at 9:57 AM, Oscar oscar...@gmail.com wrote: that's fine, Does the ssl use user/password? On Mar 26, 3:49 am, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: welll i have solved dis one now i am using following code Bitmap bitmap = null; InputStream in = null; try { URL url = new URL(URL); URLConnection conn = url.openConnection(); /* HttpsURLConnection cone = url.*/ conn.connect(); in = conn.getInputStream(); bitmap = BitmapFactory.decodeStream(in); in.close(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } return bitmap; But the problem occuring is dat my url is https and it is giving me an ssl error On Sat, Mar 26, 2011 at 2:06 PM, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: this may be more like a java question I just want to display an image placed on server onto my imageView The following is the code which m using :-- ImageView iv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); iv=(ImageView)findViewById(R.id.iv); String stringURL = https://graph.facebook.com/618306968/ picture?access_token + =103931556876|6ad1235e03c6472b20430aad-618306968| cDUe563_MNfHUeUiTpqqh8mB0o8; InputStream is = null; BufferedInputStream bis = null; Bitmap bmp = null; try { URL url = new URL(stringURL); URLConnection conn = url.openConnection(); conn.connect(); is = conn.getInputStream(); bis = new BufferedInputStream(is); bmp = BitmapFactory.decodeStream(bis); } catch (MalformedURLException e) { } catch (IOException e) { }catch (Exception e) { } finally { try { if( is != null ) is.close(); if( bis != null ) bis.close(); } catch (IOException e) { } } iv.setImageBitmap(bmp); } I am not getting any error but also my imageview is empty and is not showing anything -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at
Re: [android-developers] Re: display image from net
hey thanks but there are two socket factories - javax.net - org.apache.http same goes for SSLSocketFactory - javax.net - org.apache.http and if i use any permutation and combination :) i get an error on * getdefault* method that it doesnt exist On Mon, Mar 28, 2011 at 1:48 PM, Josh Long starbux...@gmail.com wrote: If it's anything like Java SE, then this (untested) will get you SSL (j.n.* classes don't automatically do the right thing with https, btw): static public Bitmap fromUrl(String urlStr) throws Exception { Bitmap bitmap = null; InputStream in = null; try { SocketFactory socketFactory = SSLSocketFactory.getDefault(); Socket socket = socketFactory.createSocket(urlStr, 80); in = socket.getInputStream(); bitmap = BitmapFactory.decodeStream(in); } finally { if (in != null) in.close(); } return bitmap; } HTH Thanks, Josh - Original Message - From: Robin Talwar r.o.b.i.n.abhis...@gmail.com To: android-developers@googlegroups.com Cc: Oscar oscar...@gmail.com Sent: Sunday, March 27, 2011 10:52:42 PM Subject: Re: [android-developers] Re: display image from net i dont think so i am just trying to show the user's facebook dp on my application when he logs into facebook using dialog interface. I have read the facebook sdk for android and i am able to fetch all data from user profile To get the image from the net i have to get the image from following link :- https://graph.facebook.com/ USERID /picture? and this is where i am stuck i dont think so that i require any username or password it is just something in coding . On Mon, Mar 28, 2011 at 9:57 AM, Oscar oscar...@gmail.com wrote: that's fine, Does the ssl use user/password? On Mar 26, 3:49 am, Robin Talwar r.o.b.i.n.abhis...@gmail.com wrote: welll i have solved dis one now i am using following code Bitmap bitmap = null; InputStream in = null; try { URL url = new URL(URL); URLConnection conn = url.openConnection(); /* HttpsURLConnection cone = url.*/ conn.connect(); in = conn.getInputStream(); bitmap = BitmapFactory.decodeStream(in); in.close(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } return bitmap; But the problem occuring is dat my url is https and it is giving me an ssl error On Sat, Mar 26, 2011 at 2:06 PM, Abhishek Talwar r.o.b.i.n.abhis...@gmail.com wrote: this may be more like a java question I just want to display an image placed on server onto my imageView The following is the code which m using :-- ImageView iv; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); iv=(ImageView)findViewById(R.id.iv); String stringURL = https://graph.facebook.com/618306968/ picture?access_token + =103931556876|6ad1235e03c6472b20430aad-618306968| cDUe563_MNfHUeUiTpqqh8mB0o8; InputStream is = null; BufferedInputStream bis = null; Bitmap bmp = null; try { URL url = new URL(stringURL); URLConnection conn = url.openConnection(); conn.connect(); is = conn.getInputStream(); bis = new BufferedInputStream(is); bmp = BitmapFactory.decodeStream(bis); } catch (MalformedURLException e) { } catch (IOException e) { }catch (Exception e) { } finally { try { if( is != null ) is.close(); if( bis != null ) bis.close(); } catch (IOException e) { } } iv.setImageBitmap(bmp); } I am not getting any error but also my imageview is empty and is not showing anything -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You
Re: [android-developers] Re: display image from net
Ok now i got this thing without any compile error :- SocketFactory socketFactory = SSLCertificateSocketFactory.getDefault(); Socket socket = socketFactory.createSocket(urlStr, 80); // *runtime System Error occurs at this line* in = socket.getInputStream(); bitmap = BitmapFactory.decodeStream(in); but i have a runtime system error :- 03-28 14:11:46.062: WARN/System.err(3142): java.net.UnknownHostException: https://graph.facebook.com/618306968/picture? 03-28 14:11:46.062: WARN/System.err(3142): at java.net.InetAddress.lookupHostByName(InetAddress.java:513) 03-28 14:11:46.072: WARN/System.err(3142): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278) 03-28 14:11:46.072: WARN/System.err(3142): at java.net.InetAddress.getAllByName(InetAddress.java:242) 03-28 14:11:46.072: WARN/System.err(3142): at java.net.Socket.tryAllAddresses(Socket.java:169) 03-28 14:11:46.072: WARN/System.err(3142): at java.net.Socket.init(Socket.java:258) 03-28 14:11:46.072: WARN/System.err(3142): at java.net.Socket.init(Socket.java:222) 03-28 14:11:46.072: WARN/System.err(3142): at javax.net.ssl.SSLSocket.init(SSLSocket.java:56) 03-28 14:11:46.072: WARN/System.err(3142): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.init(OpenSSLSocketImpl.java:174) 03-28 14:11:46.072: WARN/System.err(3142): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java:65) 03-28 14:11:46.072: WARN/System.err(3142): at org.imagefromNet.imagefromNet.fromUrl(imagefromNet.java:50) 03-28 14:11:46.072: WARN/System.err(3142): at org.imagefromNet.imagefromNet.onCreate(imagefromNet.java:33) 03-28 14:11:46.072: WARN/System.err(3142): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069) 03-28 14:11:46.072: WARN/System.err(3142): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751) 03-28 14:11:46.072: WARN/System.err(3142): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803) 03-28 14:11:46.072: WARN/System.err(3142): at android.app.ActivityThread.access$2300(ActivityThread.java:135) 03-28 14:11:46.072: WARN/System.err(3142): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136) 03-28 14:11:46.072: WARN/System.err(3142): at android.os.Handler.dispatchMessage(Handler.java:99) 03-28 14:11:46.082: WARN/System.err(3142): at android.os.Looper.loop(Looper.java:144) 03-28 14:11:46.082: WARN/System.err(3142): at android.app.ActivityThread.main(ActivityThread.java:4937) 03-28 14:11:46.082: WARN/System.err(3142): at java.lang.reflect.Method.invokeNative(Native Method) 03-28 14:11:46.082: WARN/System.err(3142): at java.lang.reflect.Method.invoke(Method.java:521) 03-28 14:11:46.082: WARN/System.err(3142): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 03-28 14:11:46.082: WARN/System.err(3142): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 03-28 14:11:46.082: WARN/System.err(3142): at dalvik.system.NativeStart.main(Native Method) On Mon, Mar 28, 2011 at 2:02 PM, Robin Talwar r.o.b.i.n.abhis...@gmail.comwrote: hey thanks but there are two socket factories - javax.net - org.apache.http same goes for SSLSocketFactory - javax.net - org.apache.http and if i use any permutation and combination :) i get an error on * getdefault* method that it doesnt exist On Mon, Mar 28, 2011 at 1:48 PM, Josh Long starbux...@gmail.com wrote: If it's anything like Java SE, then this (untested) will get you SSL (j.n.* classes don't automatically do the right thing with https, btw): static public Bitmap fromUrl(String urlStr) throws Exception { Bitmap bitmap = null; InputStream in = null; try { SocketFactory socketFactory = SSLSocketFactory.getDefault(); Socket socket = socketFactory.createSocket(urlStr, 80); in = socket.getInputStream(); bitmap = BitmapFactory.decodeStream(in); } finally { if (in != null) in.close(); } return bitmap; } HTH Thanks, Josh - Original Message - From: Robin Talwar r.o.b.i.n.abhis...@gmail.com To: android-developers@googlegroups.com Cc: Oscar oscar...@gmail.com Sent: Sunday, March 27, 2011 10:52:42 PM Subject: Re: [android-developers] Re: display image from net i dont think so i am just trying to show the user's facebook dp on my application when he logs into facebook using dialog interface. I have read the facebook sdk for android and i am able to fetch all data from user profile To get the image from the net i have to get the image from following link :- https://graph.facebook.com/ USERID /picture? and this is where i am stuck i dont think so that i require any username or
Re: [android-developers] java.net.UnknownHostException: android.clients.google.com
Try to completely deactivate WLAN in the settings and reactivate it again. That helps on my Nexus One 4 times out of 5 anyway. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: totally 2d
What about Tegra 2 based phones that run Android 2.x? That's about half the number of pixels compared to the Xoom. Is their rendering performance acceptable? Specifically, in 2d games, UI animations? -- Kostya 28.03.2011 9:58, Dianne Hackborn пишет: (Some background -- the number of pixels on the screens of the devices Android runs on has generally been growing significantly faster than the CPU and bus speeds. This has made the limitations of software rendering increasingly noticeable. The Tegra 2 tablets are basically the point where this came to a head, and required that the 2d drawing API be hardware accelerated in order to get acceptable performance.) -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Layar Framewrok
Hello, i am developing an application using augmented reality in android.i am not abo to understand that how do i start to work with the application. can u pls guide me? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layar Framewrok
well there are some api's available if you wish to play around with them you can check out the wikitude api On Mon, Mar 28, 2011 at 2:23 PM, parekh krupa kdparekh...@gmail.com wrote: Hello, i am developing an application using augmented reality in android.i am not abo to understand that how do i start to work with the application. can u pls guide me? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layar Framewrok
Have you checked their site? http://site.layar.com/create/start-now/ -- Kostya 28.03.2011 12:53, parekh krupa пишет: Hello, i am developing an application using augmented reality in android.i am not abo to understand that how do i start to work with the application. can u pls guide me? -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Jar with resources like android.jar
I would like to package my classes and my resources in a .jar file to redistribute it. Is it possible? I know that from sdk r8 there is the possibility to add a project as a Library, but if I can do this way it's better. Classes are not a problem inside a jar, but resources? How can i have a custom R class like android.R ? I don't care if they aren't inside the auto generated R class of the project. Thanks -- Jordan - http://www.lulz-industries.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to capture key events from View subclass
Dianne, thank you for the clarification. On Mon, Mar 28, 2011 at 5:33 AM, Dianne Hackborn hack...@android.comwrote: Correct the IME does not send you raw keyboard events. It may not even *have* raw keyboard events. Consider a handwriting IME, for example. That is why the interaction with it is through InputConnection. Every interaction you can have with the IME is basically through InputConnection. Note that on a soft keyboard, it *will* make calls on to InputConnection for each key pressed, to tell you about the text that should now be shown. Can you explain to me how I can 'listen' to these calls? This is exactly what I have been trying to achieve. Best, Rich On Sun, Mar 27, 2011 at 2:24 AM, Rich E reakina...@gmail.com wrote: Harsh, this doesn't make any sense. You are suggesting that implementing onKeyDown will cause onTouchEvent to receive touches from the keyboard? That is not right. Also, the touches are not in my view, they are in the global keyboard. From what I have found in other posts, onKeyDown/Up does not fire when pressing individual keys on the soft keyboard, only for the hard. Why this is so is unclear to me, but that is what I am experiencing. The only solution I have found so far is not a favorable one, subclass EditText and call addTextChangedListenerhttp://developer.android.com/reference/android/widget/TextView.html#addTextChangedListener(android.text.TextWatcher) with my own TextWatcher. On Thu, Mar 24, 2011 at 11:49 PM, harsh chandel harshdchan...@gmail.comwrote: ok you have to write the code for on key down and each time the key is pressed on soft keyboard you capture the event and do whatever you want to do with on press event @Override public boolean onTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { _active = false; } this was what i was talking about On Thu, Mar 24, 2011 at 5:56 PM, Rich E reakina...@gmail.com wrote: On Tue, Mar 22, 2011 at 6:14 PM, harsh chandel harshdchan...@gmail.com wrote: try ontouch method get x and y coordinate of the area clicked and do as you want on the clicked event harsh chandel, I am not sure that I understand you.. I am using onTouchEvent() to trigger the keyboard (imm.showSoftInput() code in my last post)... but I cannot get the pressed keys of the keyboard. As it is not my keyboard (it is the system shared keyboard), I cannot re-implement any onTouchEvent method that it may hold, unless I am missing something in your suggestion. There must be some event that I need to listen to (onKeyUp for the soft keyboard keys..), but I don't yet know how. Thanks for the help, Rich -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Regarding screen resolution
Hi Dianne, In my app the min sdk version is 7 that is android 2.1. But when I am running my app in qvga screen display some of the images are not coming properly. I guess, for small resolution screens we need to create different images for them. Any thought on this ? Thanks!! On Mon, Mar 28, 2011 at 11:19 AM, Dianne Hackborn hack...@android.comwrote: I strongly recommend you use android:targetSdkVersion=4 (or higher), so you don't need to do anything with supports-screens. And consider just making your android:minSdkVersion=4 -- there are few enough 1.5 devices around these days to be worth worrying about for a new app. On Sun, Mar 27, 2011 at 9:38 AM, Laxmi Verma laxmiverma.andr...@gmail.com wrote: Hi, I had make entry of support-screens tag in the AndroidManifest.xml, but the header which i customized is stil not coming in proper format. Please help!! Thanks!! -- Forwarded message -- From: Nicholas Johnson metthejohn...@gmail.com Date: Sun, Mar 27, 2011 at 9:58 PM Subject: [android-developers] Re: Regarding screen resolution To: android-developers@googlegroups.com Cc: Laxmi Verma laxmiverma.andr...@gmail.com Different screen resolutions started to get support in API Level 4 (1.6). So, I recommend using API Level 4 and then reading the documention on the Android Dev sitehttp://developer.android.com/guide/practices/screens_support.html. It's really good. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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] testFocusDistances Camera CTS Failure
Hi, I have one fail in android CTS hardware package. It is from Camera. Test case name is testFocusDistances. Assertion failed due to focus distance checking. This is error... android.hardware.cts.CameraTest#testFocusDistances(fail) junit.framework.AssertionFailedError at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1242) at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1242) at android.hardware.cts.CameraTest.testFocusDistancesByCamera(CameraTest.java:1203) at android.hardware.cts.CameraTest.testFocusDistances(CameraTest.java:1186) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204) at android.test.InstrumentationTestCase.access$000(InstrumentationTestCase.java:36) at android.test.InstrumentationTestCase$2.run(InstrumentationTestCase.java:184) at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1465) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3647) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) at dalvik.system.NativeStart.main(Native Method) at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1242) at android.hardware.cts.CameraTest.testFocusDistancesByCamera(CameraTest.java:1203) at android.hardware.cts.CameraTest.testFocusDistances(CameraTest.java:1186) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204) at android.test.InstrumentationTestCase.access$000(InstrumentationTestCase.java:36) at android.test.InstrumentationTestCase$2.run(InstrumentationTestCase.java:184) at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1465) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3647) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) at dalvik.system.NativeStart.main(Native Method) Is this focus distance depends on camera sensor? is it mandatory to set ? is it one of configurable parameter of the sensor? Where do i get these details to how and what to configure ... Please give me some details about this. I am using omini vision 5642 sensor. Thanks Regards, Pandi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Regarding screen resolution
I would like to disagree politely about the number of 1.5 devices. There's still a significant percentage of these out in the wild (around 3%) and since they have no chance of being updated they won't disappear any time soon. I'll keep my minSDK at 3 for a bit longer., and I'll do my int parsing of VERSION.SDK manually :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] testFocusDistances Camera CTS Failure
hey are you working cts? On Mon, Mar 28, 2011 at 5:26 PM, Pandi k pandiwelco...@gmail.com wrote: Hi, I have one fail in android CTS hardware package. It is from Camera. Test case name is testFocusDistances. Assertion failed due to focus distance checking. This is error... android.hardware.cts.CameraTest#testFocusDistances(fail) junit.framework.AssertionFailedError at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1242) at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1242) at android.hardware.cts.CameraTest.testFocusDistancesByCamera(CameraTest.java:1203) at android.hardware.cts.CameraTest.testFocusDistances(CameraTest.java:1186) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204) at android.test.InstrumentationTestCase.access$000(InstrumentationTestCase.java:36) at android.test.InstrumentationTestCase$2.run(InstrumentationTestCase.java:184) at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1465) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3647) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) at dalvik.system.NativeStart.main(Native Method) at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1242) at android.hardware.cts.CameraTest.testFocusDistancesByCamera(CameraTest.java:1203) at android.hardware.cts.CameraTest.testFocusDistances(CameraTest.java:1186) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204) at android.test.InstrumentationTestCase.access$000(InstrumentationTestCase.java:36) at android.test.InstrumentationTestCase$2.run(InstrumentationTestCase.java:184) at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1465) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3647) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) at dalvik.system.NativeStart.main(Native Method) Is this focus distance depends on camera sensor? is it mandatory to set ? is it one of configurable parameter of the sensor? Where do i get these details to how and what to configure ... Please give me some details about this. I am using omini vision 5642 sensor. Thanks Regards, Pandi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks and Regards Prasad Seemakurthi 9985118615 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to make Secure SDCard
On Sun, Mar 27, 2011 at 11:23 PM, spurwa spu...@gmail.com wrote: Anyone know how to make secure SDCard as Secure Element in Android ? Remove it from the device. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jar with resources like android.jar
On Mon, Mar 28, 2011 at 5:42 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: I would like to package my classes and my resources in a .jar file to redistribute it. Is it possible? No, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to check all checkboxes at some specific event?
Call setItemChecked() on the ListView for each position (0 to the size of your list - 1). On Mon, Mar 28, 2011 at 4:02 AM, Varun Batra varundr...@gmail.com wrote: Hi guys, I am making an app which required my checkboxes to be checked at once when i check the main checkbox. I am using one normal checkbox widget which i am hoping will work as my main checkbox and i am also using LIST of multiple choice(simple_list_item_multiple_choice). Now i want to check all these listview's checkbox when i check my main checkbox. I am stuck at this part since last two days please help Thanks, Varundroid. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jar with resources like android.jar
Thank you for the reply, Mark. Any hint where to study how android.R class works? I suppose that it's generated when we compile the entire Android system, in a similar way of the standard R class, but it takes a photo of system resources. 2011/3/28 Mark Murphy mmur...@commonsware.com On Mon, Mar 28, 2011 at 5:42 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: I would like to package my classes and my resources in a .jar file to redistribute it. Is it possible? No, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jordan - http://www.lulz-industries.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: Layar Framewrok
It depends on what you want to make. If you just want to make an AR app you can just take the Layar or Wikitude API and start from that point. however if you want to make your self custom application, well.. check this out: http://groups.google.com/group/android-developers/browse_thread/thread/69ecafe43750e067/c10677ee1129fe71?lnk=gstq=skymap+360#c10677ee1129fe71 and start coding when you have the preliminar design. you can search for magnitude or the Artoolkit api for Android but they both seem to have some leaks. Regards! On 28 mar, 10:53, parekh krupa kdparekh...@gmail.com wrote: Hello, i am developing an application using augmented reality in android.i am not abo to understand that how do i start to work with the application. can u pls guide me? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jar with resources like android.jar
On Mon, Mar 28, 2011 at 8:56 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: Thank you for the reply, Mark. Any hint where to study how android.R class works? I suppose that it's generated when we compile the entire Android system, in a similar way of the standard R class, but it takes a photo of system resources. Since the values must not change from release to release of Android, I suspect the process is more involved than that. However, I have no idea where you should look for details, or even if there are any details beyond the source code. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Share Coding
Does anyone want to share coding, about how to create a secure and safe SIMCard or SD Card? please ... 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: Time Out on Insistent Notifications
MM == Mark Murphy mmur...@commonsware.com writes: Or is there a way to manually clear the notification sound/vibrate/LED but without removing the text from the notification list? MM Raise a Notification with the desired settings and the same MM unique ID. The new Notification will replace the old one, MM assuming the old one is still there. H. Good idea. Didn't think of that: forest and trees. If the user has not yet cleared the insistent notification, you suggestion would allow me to replace the insistent, noisy notification with just a regular notification. But if he's already cleared the notification, say before my 60 second timeout occurs, then your suggestion would, of course, create a new notification! Is there a way to detect that a notification has been cleared so that I can cancel the alarm that I am using to replace the insistent notification? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Time Out on Insistent Notifications
There is a deleteIntent or something like that you can put on the Notification. On Mon, Mar 28, 2011 at 9:38 AM, Jake Colman col...@ppllc.com wrote: MM == Mark Murphy mmur...@commonsware.com writes: Or is there a way to manually clear the notification sound/vibrate/LED but without removing the text from the notification list? MM Raise a Notification with the desired settings and the same MM unique ID. The new Notification will replace the old one, MM assuming the old one is still there. H. Good idea. Didn't think of that: forest and trees. If the user has not yet cleared the insistent notification, you suggestion would allow me to replace the insistent, noisy notification with just a regular notification. But if he's already cleared the notification, say before my 60 second timeout occurs, then your suggestion would, of course, create a new notification! Is there a way to detect that a notification has been cleared so that I can cancel the alarm that I am using to replace the insistent notification? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Simulation of user interaction.
Thanks! On Mar 28, 9:11 am, Rainbowbreeze alfredo.morr...@gmail.com wrote: I'm interesting if there any way to simulate user activity on Android device. Application Exerciser Monkey for stress testshttp://developer.android.com/guide/developing/tools/monkey.html MonkeyRunner for sending keystrokes and contol the emulator/devicehttp://developer.android.com/guide/developing/tools/monkeyrunner_conc... and Robotium to rule them all! ;)http://code.google.com/p/robotium/ -- .enjoy. Alfredo Morresi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Battery consumption / LocationListener update intervals
Hi, what costs more battery life: 1) A registered LocationListener with an update interval of zero meters and zero seconds, or 2) A registered LocationListener with an update interval of 2 meters and 2 seconds and an registered GPSStatusListener. Is there any data available of battery consumption with different update intervals? 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] SIM NFC (card emulation). SWP support?
Hi, I have just get a SIM card where a MIFARE Classic 1k tag has been emulated. I put it into the Samsung GT-5230N mobile phone and I can read it with my NFC reader as a common tag. This is possible because the 5230N has full SWP (Single Wire Protocol). Moreover, I can connect to the applet running in the SIM and check the values as I can do with the reader and show the values on the screen, e.g. the tickets remaining. As far as I see in the Internet, the Nexus S has SWP support. Is that true? I mean, right now is the SWP available? If I insert the SIM into the Nexus S would it work as well as it does with the S5230n? Is it possible to access the applets and read the values to show them on the screen?? 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: Storing Context vs Passing As Parameter Where Needed
MM == Mark Murphy mmur...@commonsware.com writes: ... I'd further qualify that as ... a cached Context (if needed) should be an Application object reference, rather than a local, short-lived Context. Does extending the Application class to save the context and providing a static method to access that context an appropriate solution as well? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to implement a vertical Gallery with fixed focus?
I am working on an Android application where the requirement is to have a vertical list of items that would scroll up and down on key presses. The focus(item selected) should remain fixed at the center of the screen. AFAIK, Gallery widget does not support vertical mode and we probably have to achieve this behavior using ListView or may be by using vertical Scroll. Is this feasible? If ListView is used to create such a control, how do I override the default behavior to fix the focus at one point and make list items scroll up and down? Since the list is going to be long and of variable length, ListView should be the ideal choice so that view recycling can be leveraged upon? Has any one built such a control before? Any pointers or help is appreciated.. 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
Re: [android-developers] Re: Storing Context vs Passing As Parameter Where Needed
On Mon, Mar 28, 2011 at 9:59 AM, Jake Colman col...@ppllc.com wrote: MM == Mark Murphy mmur...@commonsware.com writes: ... I'd further qualify that as ... a cached Context (if needed) should be an Application object reference, rather than a local, short-lived Context. Does extending the Application class to save the context and providing a static method to access that context an appropriate solution as well? No. Application *is* a Context. There is no other type of Context that has the Application's lifetime. Do not cache non-Application Contexts in process-lifetime places (static data members or Application), or you will have to contend with memory leaks. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Storing Context vs Passing As Parameter Where Needed
28.03.2011 17:59, Jake Colman пишет: Does extending the Application class to save the context and providing a static method to access that context an appropriate solution as well? I don't see any problems with: class JakesApplication extends Application /* indirectly extends Context */ { @Override public void onCreate() { super.onCreate(); gInstance = this; } public static JakesApplication getInstance() { return gInstance; } private JakesApplication gInstance; } -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Storing Context vs Passing As Parameter Where Needed
Oh, I see where you're going. Yeah, that should be OK. I've often wondered why they didn't bother with a static getter on Application itself, if the thing is going to live as long as a static. On Mon, Mar 28, 2011 at 10:10 AM, Kostya Vasilyev kmans...@gmail.com wrote: 28.03.2011 17:59, Jake Colman пишет: Does extending the Application class to save the context and providing a static method to access that context an appropriate solution as well? I don't see any problems with: class JakesApplication extends Application /* indirectly extends Context */ { @Override public void onCreate() { super.onCreate(); gInstance = this; } public static JakesApplication getInstance() { return gInstance; } private JakesApplication gInstance; } -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Storing Context vs Passing As Parameter Where Needed
Actually, I had declared gInstance as a variable of ttype Context and not of type JakesApplication. I guess both are correct except that JakesApplication is more type-specific and better programming style? MM == Mark Murphy mmur...@commonsware.com writes: MM Oh, I see where you're going. Yeah, that should be OK. I've often MM wondered why they didn't bother with a static getter on MM Application itself, if the thing is going to live as long as a MM static. MM On Mon, Mar 28, 2011 at 10:10 AM, Kostya Vasilyev kmans...@gmail.com wrote: 28.03.2011 17:59, Jake Colman пишет: Does extending the Application class to save the context and providing a static method to access that context an appropriate solution as well? I don't see any problems with: class JakesApplication extends Application /* indirectly extends Context */ { @Override public void onCreate() { super.onCreate(); gInstance = this; } public static JakesApplication getInstance() { return gInstance; } private JakesApplication gInstance; } -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en MM -- MM Mark Murphy (a Commons Guy) MM http://commonsware.com | http://github.com/commonsguy MM http://commonsware.com/blog | http://twitter.com/commonsguy MM Android Training in NYC: http://marakana.com/training/android/ MM -- MM You received this message because you are subscribed to the Google MM Groups Android Developers group. MM To post to this group, send email to android-developers@googlegroups.com MM To unsubscribe from this group, send email to MM android-developers+unsubscr...@googlegroups.com MM For more options, visit this group at MM http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Storing Context vs Passing As Parameter Where Needed
On Mon, Mar 28, 2011 at 10:27 AM, Jake Colman col...@ppllc.com wrote: Actually, I had declared gInstance as a variable of ttype Context and not of type JakesApplication. I guess both are correct except that JakesApplication is more type-specific and better programming style? And safer. You do not want to somehow accidentally stuff an Activity in there, for example. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Monkey not playing video using Music app
Hi Kanishka, There is no such mechanism to execute MP3 file as parameter with default Music player. What you can instead try is: 1. launch Music player using command: am start -a android.intent.action.MAIN -n com.android.music/com.android.music.MusicBrowserActivity 2. provide input keyevent keycode commands and select your MP3 file 3. when MP3 file ends playback, use input keyevent keycode command to go back to HOME menu. -Vrukesh On Wed, Mar 9, 2011 at 5:31 PM, Kanishka Dutta kanishka.du...@gmail.comwrote: Hello, I am trying to run a mp3 file using monkey 1.mp3 is the name of the file. adb shell monkey -p com.android.music -v 10 1.mp3 Can you please help me with the proper command to play out a file after the music-player or nedia-player opens up? Regards, Kanishka Dutta -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: SIM NFC (card emulation). SWP support?
Gorka, Right now, with the Gingerbread 2.3.3 release, it is not possible. There is no support for emulation or SWP in that distribution. However you could modify the released source code for 2.3.3 and modify some macro definitions to compile your own version with SWP support that would work on the phone. This has been done if you search around, but you have to then run your own version of Android. On Mar 28, 8:52 am, Gorka Hernando g.herna...@ogmio.com wrote: Hi, I have just get a SIM card where a MIFARE Classic 1k tag has been emulated. I put it into the Samsung GT-5230N mobile phone and I can read it with my NFC reader as a common tag. This is possible because the 5230N has full SWP (Single Wire Protocol). Moreover, I can connect to the applet running in the SIM and check the values as I can do with the reader and show the values on the screen, e.g. the tickets remaining. As far as I see in the Internet, the Nexus S has SWP support. Is that true? I mean, right now is the SWP available? If I insert the SIM into the Nexus S would it work as well as it does with the S5230n? Is it possible to access the applets and read the values to show them on the screen?? 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] Audio streaming via Bluetooth
Is it possible to stream and play audio to the phone via Bluetooth? For example if i wanted to stream audio from my pc to my phone. I looked into the bluetooth api, and it seems that you can stream out of the phone (as a server) but not to stream in (as a client), or am i missing something? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Regarding screen resolution
I will stand behind the statement that for someone writing a new app, this is needless trouble to deal with. On Mon, Mar 28, 2011 at 5:12 AM, lbendlin l...@bendlin.us wrote: I would like to disagree politely about the number of 1.5 devices. There's still a significant percentage of these out in the wild (around 3%) and since they have no chance of being updated they won't disappear any time soon. I'll keep my minSDK at 3 for a bit longer., and I'll do my int parsing of VERSION.SDK manually :-) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to capture key events from View subclass
On Mon, Mar 28, 2011 at 3:10 AM, Rich E reakina...@gmail.com wrote: Can you explain to me how I can 'listen' to these calls? This is exactly what I have been trying to achieve. As has already been said, you need to override onCreateInputConnection() and return your own interface. -- 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] scaling
Can anyone tell me how to make the emulator scale my android game to the full window size? Here's the problem http://i1190.photobucket.com/albums/z449/m75214/Screenshot2011-03-24at92703AM.png -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Battery consumption / LocationListener update intervals
I don't think you'll see much difference between zero seconds and 2 seconds in regard to battery life. The device has to turn on and off the GPS radio for the 2 second interval or just leave it on for zero seconds. GPSStatusListener probably won't make a difference. I suggest testing it yourself if you really need to know. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ProgressDialog call from AsyncTask thread
I have a process, getNextBook, that takes maybe 5 or 20 seconds, depending on the size of the next book. It works OK but I need to inform the user that I'm working, just wait so they will not tell the App to do something else before the getNextBook process finishes. (the code for something else is not included for the sake of simplicity). I have included the display of a ProgressDialog so the user can see when it is working and when it finishes. I have experimented until I got it to work but there is something I do not understand. The code is abbreviated for the sake of simplicity and it does work even if I have created some error when I abbreviated.) I utilize AsyncTask to make another thread so I will not block the main thread. I want to call the ProgressDialog directly from the AsyncTask getNextBook_T, but I cannot get it to work. Is there a way to implement the ProgressDialog directly from getNextBook_T? Or is it OK (or necessary) to do it indirectly like the code shows? Thanks for your help code package very.long.name.App01; import android.app.Activity; import android.app.ProgressDialog; public class App01 extends Activity { private ProgressDialog pd; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public boolean onOptionsItemSelected(MenuItem item) { String strTemp; switch (item.getItemId()) { case R.id.mnuCkSrv: // bla, bla, bla return true; case R.id.mnuNextBook: pd = ProgressDialog.show(this, , Downloading next book..., true); new getNextBook_T().execute(); return true; default: return super.onOptionsItemSelected(item); } } private class getNextBook_T extends AsyncTaskVoid, Void, Integer { protected Integer doInBackground(Void... arg0 ) { return getNextBook(); } protected void onPostExecute(Integer result) { pdDismisser(); setDisplay(); } } public Integer getNextBook(){ // bla, bla, bla } public void pdDismisser(){ pd.dismiss(); } } /code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: LunarLander
I downloaded the source to Replica Island with svn. What is the easiest way to load this into Eclipse? On Mar 26, 6:02 pm, Kostya Vasilyev kmans...@gmail.com wrote: One more thing about Lunar Lander is that, afaik, it's not the best place to start on your own GL project, as it has some well known, annoying bugs. The open source Replica Island doesn't have those, and just may be a better sample to learn from. 27.03.2011 1:47 пользователь TreKing treking...@gmail.com написал: On Sat, Mar 26, 2011 at 3:24 PM, bob b...@coolgroups.com wrote: It uses the arrow keys, so I don't see how that would work on a real phone where there are no arrow keys. Some devices have a DPad or trackball. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] scaling
On Mon, Mar 28, 2011 at 12:04 PM, bob b...@coolgroups.com wrote: Can anyone tell me how to make the emulator scale my android game to the full window size? http://developer.android.com/guide/practices/screens_support.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ProgressDialog call from AsyncTask thread
John, You can use this method: http://developer.android.com/reference/android/os/AsyncTask.html#publishProgress(Progress...) This method can be invoked from |doInBackground(Params...)| to publish updates on the UI thread while the background computation is still running. Each call to this method will trigger the execution of |onProgressUpdate(Progress...)| on the UI thread. |onProgressUpdate(Progress...)| will note be called if the task has been canceled. ... and its twin brother, onProgressUpdate: Runs on the UI thread after |publishProgress(Progress...)| is invoked. The specified values are the values passed to |publishProgress(Progress...)|. -- Kostya 28.03.2011 21:21, john brown ?: I have a process, getNextBook, that takes maybe 5 or 20 seconds, depending on the size of the next book. It works OK but I need to inform the user that I'm working, just wait so they will not tell the App to do something else before the getNextBook process finishes. (the code for something else is not included for the sake of simplicity). I have included the display of a ProgressDialog so the user can see when it is working and when it finishes. I have experimented until I got it to work but there is something I do not understand. The code is abbreviated for the sake of simplicity and it does work even if I have created some error when I abbreviated.) I utilize AsyncTask to make another thread so I will not block the main thread. I want to call the ProgressDialog directly from the AsyncTask getNextBook_T, but I cannot get it to work. Is there a way to implement the ProgressDialog directly from getNextBook_T? Or is it OK (or necessary) to do it indirectly like the code shows? Thanks for your help code package very.long.name.App01; import android.app.Activity; import android.app.ProgressDialog; public class App01 extends Activity { private ProgressDialog pd; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public boolean onOptionsItemSelected(MenuItem item) { String strTemp; switch (item.getItemId()) { case R.id.mnuCkSrv: // bla, bla, bla return true; case R.id.mnuNextBook: pd = ProgressDialog.show(this, , Downloading next book..., true); new getNextBook_T().execute(); return true; default: return super.onOptionsItemSelected(item); } } private class getNextBook_T extends AsyncTaskVoid, Void, Integer { protected Integer doInBackground(Void... arg0 ) { return getNextBook(); } protected void onPostExecute(Integer result) { pdDismisser(); setDisplay(); } } public Integer getNextBook(){ // bla, bla, bla } public void pdDismisser(){ pd.dismiss(); } } /code -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ProgressDialog call from AsyncTask thread
On Mon, Mar 28, 2011 at 12:21 PM, john brown johnbrowngreybe...@gmail.comwrote: I want to call the ProgressDialog directly from the AsyncTask getNextBook_T, but I cannot get it to work. What does cannot get it to work mean? Is there a way to implement the ProgressDialog directly from getNextBook_T? Yes. Or is it OK (or necessary) to do it indirectly like the code shows? OK? Sure. Necessary? No. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] WifiLock and WakeLock regarding large downloads
From what I gather, WifiLock and WakeLock work completely independently and if you are downloading a large file over Wifi then you will need to acquire both locks?? Ideally, you would want something like this: 1. Acquire partial WakeLock 2. Preparing to download large file, check whether on Wifi or not. 3. If on Wifi, then acquire WifiLock. If not, then prevent device switching to Wifi (is this possible?) 4. Start download 5. When download has finished, release all locks. Is this correct? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: LunarLander
Select File - Import - General (either Existing Projects into Workspace or File System, I forget). Or New - Android Project - From existing source. There is an SVN plugin for Eclipse, it might have its own commands (sorry, I use Mercurial). You also might want to subscribe to this: https://groups.google.com/group/replica-island-coding-community Which has this relevant thread: https://groups.google.com/group/replica-island-coding-community/browse_thread/thread/e78dae80789b2012 -- Kostya 28.03.2011 21:23, bob пишет: I downloaded the source to Replica Island with svn. What is the easiest way to load this into Eclipse? -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to detect tablet devices
This thread has focused on the tablet screen as a distinguisher. Another real problem is that tablets from a specific carrier (such as the T-Mobile Galaxy), cannot make a phone call. I have found no way to distinguish this characteristic of tablets. What I have tried: 1. catching an exception from start_activity using the ACTION_CALL intent ( no exception) 2. TelephonyManager.getPhoneType() returns a valid state (GSM) 3. TelephonyManager.getCallState() return a valid state (IDLE) Any ideas? Olaf Lubeck On Feb 25, 7:36 am, Mark Murphy mmur...@commonsware.com wrote: On Wed, Feb 23, 2011 at 12:47 PM, Carlo Codega sazi...@gmail.com wrote: Is there any numeric size about XLARGE screens? AFAIK there could be smartphone devices with xlarge screens, or not? I don't see any documentation which says that XLARGE screens are 6 inches Does xlarge refer to the phisical size? or resolution? Neither, though physical size is more relevant. Screen size, in terms of small/normal/large/xlarge, will be determined by device manufacturers based upon physical screen size and the distance that screen will be from the user. A phone is held closer to the user's eyes than is a tablet, and both are held closer to the user's eyes than is an LCD TV. At best, Google might come up with a size guideline per form factor -- 10 tablets are xlarge, for example. However, in the end, the device manufacturer will choose the value for the device. How the device manufacturer makes that choice, AFAIK, is up to the device manufacturer. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 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] video playback on emulator target android 3.0 API 11
Hi All, I would like to know if anyone was able to successfully play the video on the android emulator targetting 3.0 api 11. I am able to play it on the xoom device but the same apk and setup (video file located at the /mnt/sdcard/ location) does not work on the emulator. Was wondering if any of you had a better luck at this. 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] task affinity across devices
Hi, I have set up an application which uses task affinity to define two areas in an application. This is working really well on the Nexus 1 however I'm getting quite different experiences on other devices. For example, on the Dell Streak, the task affinity doesn't seem to have any effect at all on the stack - Activities just get layered on top of one another irrespective of task affinity. On the Nexus S, if the Home button is pressed and the user goes back into the application, a new Activity is placed on top of the stack of existing Activities that existed before selecting the Home button. Has anyone got some advice on this? Regards, Julius. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] video playback on emulator target android 3.0 API 11
The emulator generally cannot play videos, as there is no hardware acceleration, plus the general speed of the emulator itself. Older versions of Android on fairly fast hardware can play videos in the emulator, but that has been declining in the past few versions. On Mon, Mar 28, 2011 at 2:25 PM, droid-stricken harik...@gmail.com wrote: Hi All, I would like to know if anyone was able to successfully play the video on the android emulator targetting 3.0 api 11. I am able to play it on the xoom device but the same apk and setup (video file located at the /mnt/sdcard/ location) does not work on the emulator. Was wondering if any of you had a better luck at this. 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Device Drivers - Who Maintains the Bastard Devices?
I am discovering issues in some audio and display driver implementations in Android. I'm trying to determine where to report these issues. I'l like to know how drivers are handled with Android releases, say for instance the 2.3.0 and 2.3.3 releases. Let's take the Nexus One and Nexus S as good examples of bastard devices. 1. Do HTC and Samsung maintain the drivers for these devices or is it on Google's plate now? 2. Is there a default driver set provided in each Android release that supercedes older drivers on these devices? 3. Is it up to the device manufacturer to provide new (or test old) drivers for each release of android? 4. Can manufacturers provide driver updates outside of an official android os update? 5. Where should I report bugs in the Nexus One drivers? (display driver) 6. Where should I report bugs in the Nexus S drivers? (audio driver) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Device Drivers - Who Maintains the Bastard Devices?
None of this has anything to do with this list. This list is for application development using the Android SDK. Questions regarding HTC and Samsung devices should go to HTC or Samsung. Questions regarding the Android open source project should go to a relevant list on http://source.android.com. On Mon, Mar 28, 2011 at 3:56 PM, Zach zachary.bu...@gmail.com wrote: I am discovering issues in some audio and display driver implementations in Android. I'm trying to determine where to report these issues. I'l like to know how drivers are handled with Android releases, say for instance the 2.3.0 and 2.3.3 releases. Let's take the Nexus One and Nexus S as good examples of bastard devices. Do HTC and Samsung maintain the drivers for these devices or is it on Google's plate now? Is there a default driver set provided in each Android release that supercedes older drivers on these devices? Is it up to the device manufacturer to provide new (or test old) drivers for each release of android? Can manufacturers provide driver updates outside of an official android os update? Where should I report bugs in the Nexus One drivers? (display driver) Where should I report bugs in the Nexus S drivers? (audio driver) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ProgressDialog call from AsyncTask thread
TreKing, What does cannot get it to work mean? Well... The following code does not produce any Eclipse errors but does produce the Sorry! App has stopped unexpectedly... when I try to run it on the emulator, AVD. private class getNextBook_T extends AsyncTaskVoid, Void, Integer { private ProgressDialog pd1; protected Integer doInBackground(Void... arg0 ) { pd1 = ProgressDialog.show(App01.this, , Downloading next book..., true); return getNextBook(); } protected void onPostExecute(Integer result) { pd1.dismiss(); setDisplay(); } } The DDMS LogCat display shows: 03-28 15:42:32.132: ERROR/AndroidRuntime(227): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() Thanks, John I did get it to work. Your post prompted me to try it a different way. I just didn't get it at first. Thanks, John Brown On Mar 28, 11:27 am, TreKing treking...@gmail.com wrote: On Mon, Mar 28, 2011 at 12:21 PM, john brown johnbrowngreybe...@gmail.comwrote: I want to call the ProgressDialog directly from the AsyncTask getNextBook_T, but I cannot get it to work. What does cannot get it to work mean? Is there a way to implement the ProgressDialog directly from getNextBook_T? Yes. Or is it OK (or necessary) to do it indirectly like the code shows? OK? Sure. Necessary? No. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Xoom Camera Settings
If anyone has a Motorola Xoom and is willing to help could you please take a few pictures (at different zoom settings) so I can test my EXIF reader application. I am also needing the exact specs of the camera used in the Motorola Xoom CCD size, etc... 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: ProgressDialog call from AsyncTask thread
Kostya, Part of my problem is that I do not know enough to understand the documentation. In this specific documentation I got lost when it said: publishProgress(... setProgressPercent( showDialog(. I do not know what those lines mean. I type them in my code, they are not recognized and produce errors in my editor. (eclipse) (I am studying. I have ordered new books. etc) Thanks, John Brown On Mar 28, 11:26 am, Kostya Vasilyev kmans...@gmail.com wrote: John, You can use this method: http://developer.android.com/reference/android/os/AsyncTask.html#publ..) This method can be invoked from |doInBackground(Params...)| to publish updates on the UI thread while the background computation is still running. Each call to this method will trigger the execution of |onProgressUpdate(Progress...)| on the UI thread. |onProgressUpdate(Progress...)| will note be called if the task has been canceled. ... and its twin brother, onProgressUpdate: Runs on the UI thread after |publishProgress(Progress...)| is invoked. The specified values are the values passed to |publishProgress(Progress...)|. -- Kostya 28.03.2011 21:21, john brown ?: I have a process, getNextBook, that takes maybe 5 or 20 seconds, depending on the size of the next book. It works OK but I need to inform the user that I'm working, just wait so they will not tell the App to do something else before the getNextBook process finishes. (the code for something else is not included for the sake of simplicity). I have included the display of a ProgressDialog so the user can see when it is working and when it finishes. I have experimented until I got it to work but there is something I do not understand. The code is abbreviated for the sake of simplicity and it does work even if I have created some error when I abbreviated.) I utilize AsyncTask to make another thread so I will not block the main thread. I want to call the ProgressDialog directly from the AsyncTask getNextBook_T, but I cannot get it to work. Is there a way to implement the ProgressDialog directly from getNextBook_T? Or is it OK (or necessary) to do it indirectly like the code shows? Thanks for your help code package very.long.name.App01; import android.app.Activity; import android.app.ProgressDialog; public class App01 extends Activity { private ProgressDialog pd; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public boolean onOptionsItemSelected(MenuItem item) { String strTemp; switch (item.getItemId()) { case R.id.mnuCkSrv: // bla, bla, bla return true; case R.id.mnuNextBook: pd = ProgressDialog.show(this, , Downloading next book..., true); new getNextBook_T().execute(); return true; default: return super.onOptionsItemSelected(item); } } private class getNextBook_T extends AsyncTaskVoid, Void, Integer { protected Integer doInBackground(Void... arg0 ) { return getNextBook(); } protected void onPostExecute(Integer result) { pdDismisser(); setDisplay(); } } public Integer getNextBook(){ // bla, bla, bla } public void pdDismisser(){ pd.dismiss(); } } /code -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: ProgressDialog call from AsyncTask thread
29.03.2011 0:21, john brown пишет: Kostya, Part of my problem is that I do not know enough to understand the documentation. In this specific documentation I got lost when it said: publishProgress(... setProgressPercent( showDialog(. AsyncTask is pretty simple. It has two sides: the worker thread and the UI thread. Your code that performs a lengthy operation on the worker thread can call publishProgress(), which is automatically dispatched to the UI thread and turned into onProgressUpdate(). This is needed because Android UI components can only be used from the UI thread, and AsyncTask's doInBackground() runs on a worker thread (which is AsyncTask's reason for existence). UI thread is defined here: http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html#Threads which also gives some simple rules to follow when dealing with threads on Android. Back to your error message. What it means (in translation from Androidese) is that your code tries to create a UI component (ProgressDialog) from the worker thread. This violates the rule that you can only touch the UI from the UI thread. I do not know what those lines mean. I type them in my code, they are not recognized and produce errors in my editor. (eclipse) Yes, you really need to know at least the basics of Java to program with it. -- Kostya (I am studying. I have ordered new books. etc) Thanks, John Brown -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ContentProvider - problem setting filename for files delivered by using ContentProvider.openFile
I'm facing the following problem while implementing a ContentProvider to deliver images stored in the private data area of an application in an android-project: The files returned by the implementation below have the complete absolute path to the stored images as filename which look like _data_data_com.mypackage.imageprovider_app_images_123456789.jpg where app_images is the name of the directory the images are stored in by the application and 123456789.jpg is the actual filename. My question now is: How can I make the ContentProvider set only the actual filename (or alternatively a filename I specify) for the delivered images? It should be possible, since e.g. the built-in providers in android manage to deliver only the actual filename for an image. The database table has columns for _id, filename and _data, where _data holds the absolute path to the image in the filesystem. Any hints are very highly appreciated :) Thanks in advance, 131071 Here are the relevant parts of my current ContentProvider: @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { final SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder(); queryBuilder.setTables(PhotosTable.TABLE_NAME); switch (URI_MATCHER.match(uri)) { case PHOTO_DIR: if (sortOrder == null) { sortOrder = PhotosDirectory.DEFAULT_SORT_ORDER; } break; case PHOTO_ID: queryBuilder.appendWhere(IPhotoColumns.FILENAME + = + uri.getPathSegments().get(1) + AND ); break; default: throw new IllegalArgumentException(Unknown URI + uri); } if (!mDb.isOpen()) { assignWritableDb(); } return queryBuilder.query(mDb, PhotosDirectory.ALL_COLUMNS, selection, selectionArgs, null, null, sortOrder); } @Override public ParcelFileDescriptor openFile(Uri uri, String mode) { if (URI_MATCHER.match(uri) != PHOTO_ID) { throw new IllegalArgumentException( operation only permitted for single file); } try { return openFileHelper(uri, mode); } catch (FileNotFoundException e) { return null; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 for button
I wanted to make a small application when client types their password it has acceded list but the problem I find when I run list and password at the same time here is the code for two classes Code: one class public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); password= (EditText)findViewById(R.id.password); ok= (Button)findViewById(R.id.ok); ok.setOnClickListener(this); password.setOnClickListener(this); final String TESTSTRING = new String(1234); FileOutputStream fOut; try { fOut = openFileOutput(fichier.txt, MODE_WORLD_READABLE); OutputStreamWriter osw = new OutputStreamWriter(fOut); osw.write(TESTSTRING); osw.flush(); osw.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public void sendFeedback(View button) { String name1 =password.getText().toString(); try { FileInputStream fIn = openFileInput(fichier.txt); InputStreamReader isr = new InputStreamReader(fIn); char[] inputBuffer = new char[name1.length()]; isr.read(inputBuffer); String readString = new String(inputBuffer); if (readString.equals(name1)){ Toast.makeText(this,Mot de passe correct,Toast.LENGTH_SHORT).show(); Tutoriel5_Android aa=new Tutoriel5_Android(); aa.showDialog(BIND_AUTO_CREATE); } else{ Toast.makeText(this,Mot de passe Incorrect,Toast.LENGTH_SHORT).show(); } } catch (IOException e) { Toast.makeText(this,Une erreur est survenue,Toast.LENGTH_SHORT).show(); e.printStackTrace(); } } @Override public boolean onKey(View arg0, int arg1, KeyEvent arg2) { // TODO Auto-generated method stub return false; } code two class List public class Tutoriel5_Android extends Activity { private ListView maListViewPerso; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //Récupération de la listview créée dans le fichier main.xml maListViewPerso = (ListView) findViewById(R.id.listviewperso); //Création de la ArrayList qui nous permettra de remplire la listView ArrayListHashMapString, String listItem = new ArrayListHashMapString, String(); //On déclare la HashMap qui contiendra les informations pour un item HashMapString, String map; //Création d'une HashMap pour insérer les informations du premier item de notre listView map = new HashMapString, String(); //on insère un élément titre que l'on récupérera dans le textView titre créé dans le fichier affichageitem.xml map.put(titre, compte); //on insère un élément description que l'on récupérera dans le textView description créé dans le fichier affichageitem.xml map.put(description, opération de compte); //on insère la référence à l'image (convertit en String car normalement c'est un int) que l'on récupérera dans l'imageView créé dans le fichier affichageitem.xml //enfin on ajoute cette hashMap dans la arrayList listItem.add(map); //On refait la manip plusieurs fois avec des données différentes pour former les items de notre ListView map = new HashMapString, String(); map.put(titre, opération financière); map.put(description, trasfert de solde); listItem.add(map); map = new HashMapString, String(); map.put(titre, Suvie); map.put(description, partie wap); listItem.add(map); //Création d'un SimpleAdapter qui se chargera de mettre les items présent dans notre list (listItem) dans la vue affichageitem SimpleAdapter mSchedule = new SimpleAdapter (this.getBaseContext(), listItem, R.layout.affichageitem, new String[] {img, titre, description}, new int[] {R.id.img, R.id.titre, R.id.description}); //On attribut à notre listView l'adapter que l'on vient de créer maListViewPerso.setAdapter(mSchedule); //Enfin on met un écouteur d'évènement sur notre listView
[android-developers] Re: scaling
Ok, I added this to AndroidManifest.xml supports-screens android:smallScreens=true android:normalScreens=true android:largeScreens=true android:xlargeScreens=true android:anyDensity=true / It works now. On Mar 28, 12:24 pm, TreKing treking...@gmail.com wrote: On Mon, Mar 28, 2011 at 12:04 PM, bob b...@coolgroups.com wrote: Can anyone tell me how to make the emulator scale my android game to the full window size? http://developer.android.com/guide/practices/screens_support.html --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ProgressDialog call from AsyncTask thread
Kostya, Back to your error message. What it means (in translation from Androidese) is that your code tries to create a UI component (ProgressDialog) from the worker thread. This violates the rule that you can only touch the UI from the UI thread. Bingo! That is what I was guessing all this means. With that bit of information, maybe I will can learn a little more. Now I know why the first code works and the second one does not. Thanks Kostya, John Brown On Mar 28, 2:39 pm, Kostya Vasilyev kmans...@gmail.com wrote: 29.03.2011 0:21, john brown пишет: Kostya, Part of my problem is that I do not know enough to understand the documentation. In this specific documentation I got lost when it said: publishProgress(... setProgressPercent( showDialog(. AsyncTask is pretty simple. It has two sides: the worker thread and the UI thread. Your code that performs a lengthy operation on the worker thread can call publishProgress(), which is automatically dispatched to the UI thread and turned into onProgressUpdate(). This is needed because Android UI components can only be used from the UI thread, and AsyncTask's doInBackground() runs on a worker thread (which is AsyncTask's reason for existence). UI thread is defined here: http://developer.android.com/guide/topics/fundamentals/processes-and-... which also gives some simple rules to follow when dealing with threads on Android. Back to your error message. What it means (in translation from Androidese) is that your code tries to create a UI component (ProgressDialog) from the worker thread. This violates the rule that you can only touch the UI from the UI thread. I do not know what those lines mean. I type them in my code, they are not recognized and produce errors in my editor. (eclipse) Yes, you really need to know at least the basics of Java to program with it. -- Kostya (I am studying. I have ordered new books. etc) Thanks, John Brown -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] tried ADT tools and got these errors
Cannot complete the request. See the details. Cannot complete the request. See the details. Android Development Tools is already installed, so an update will be performed instead. Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.core.runtime/3.5.0 Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ui/3.5.0 Cannot find a solution where both org.eclipse.ui 3.5.0 and org.eclipse.ui [3.4.2.M20090204-0800] are satisfied. Cannot find a solution where both org.eclipse.core.runtime 3.5.0 and org.eclipse.core.runtime [3.4.0.v20080512] are satisfied. Cannot find a solution where both org.eclipse.ui 3.5.0 and org.eclipse.ui [3.4.2.M20090204-0800] are satisfied. Cannot find a solution where both org.eclipse.core.runtime 3.5.0 and org.eclipse.core.runtime [3.4.0.v20080512] are satisfied. Cannot find a solution where both org.eclipse.ui 3.5.0 and org.eclipse.ui [3.4.2.M20090204-0800] are satisfied. Cannot find a solution where both org.eclipse.core.runtime 3.5.0 and org.eclipse.core.runtime [3.4.0.v20080512] are satisfied. Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ui/3.5.0 Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.core.runtime/3.5.0 What should I do? Thanks, Sherry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] tried ADT tools and got these errors
Are you using Eclipse 3.4? ADT requires 3.5 or later. 29.03.2011 1:28 пользователь sherry syang...@gmail.com написал: Cannot complete the request. See the details. Cannot complete the request. See the details. Android Development Tools is already installed, so an update will be performed instead. Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.core.runtime/3.5.0 Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ui/3.5.0 Cannot find a solution where both org.eclipse.ui 3.5.0 and org.eclipse.ui [3.4.2.M20090204-0800] are satisfied. Cannot find a solution where both org.eclipse.core.runtime 3.5.0 and org.eclipse.core.runtime [3.4.0.v20080512] are satisfied. Cannot find a solution where both org.eclipse.ui 3.5.0 and org.eclipse.ui [3.4.2.M20090204-0800] are satisfied. Cannot find a solution where both org.eclipse.core.runtime 3.5.0 and org.eclipse.core.runtime [3.4.0.v20080512] are satisfied. Cannot find a solution where both org.eclipse.ui 3.5.0 and org.eclipse.ui [3.4.2.M20090204-0800] are satisfied. Cannot find a solution where both org.eclipse.core.runtime 3.5.0 and org.eclipse.core.runtime [3.4.0.v20080512] are satisfied. Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.ui/3.5.0 Unsatisfied dependency: [com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.core.runtime/3.5.0 What should I do? Thanks, Sherry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: MPlayer for Android
You could do like all the others, write a JNI wrapper for ffmpeg and bundle it with your application - which, depending on how you build your version of ffmpeg would either be GPL or LGPL - and probably be .. somewhat problematic to sell in that epic train-wreck that the US calls a patent system. On 26 mar, 23:35, Ankur Avlani ankuravl...@gmail.com wrote: Since Android is deployed on Linux, I am guessing there should be a mechanism in Android to invoke the MPlayer? or any undocumented way? Thanks and regards, Ankur. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ContentProvider - problem setting filename for files delivered by using ContentProvider.openFile
Take a look at MediaColumns.TITLE 29.03.2011 0:47 пользователь snowcrash 131...@gmail.com написал: I'm facing the following problem while implementing a ContentProvider to deliver images stored in the private data area of an application in an android-project: The files returned by the implementation below have the complete absolute path to the stored images as filename which look like _data_data_com.mypackage.imageprovider_app_images_123456789.jpg where app_images is the name of the directory the images are stored in by the application and 123456789.jpg is the actual filename. My question now is: How can I make the ContentProvider set only the actual filename (or alternatively a filename I specify) for the delivered images? It should be possible, since e.g. the built-in providers in android manage to deliver only the actual filename for an image. The database table has columns for _id, filename and _data, where _data holds the absolute path to the image in the filesystem. Any hints are very highly appreciated :) Thanks in advance, 131071 Here are the relevant parts of my current ContentProvider: @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { final SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder(); queryBuilder.setTables(PhotosTable.TABLE_NAME); switch (URI_MATCHER.match(uri)) { case PHOTO_DIR: if (sortOrder == null) { sortOrder = PhotosDirectory.DEFAULT_SORT_ORDER; } break; case PHOTO_ID: queryBuilder.appendWhere(IPhotoColumns.FILENAME + = + uri.getPathSegments().get(1) + AND ); break; default: throw new IllegalArgumentException(Unknown URI + uri); } if (!mDb.isOpen()) { assignWritableDb(); } return queryBuilder.query(mDb, PhotosDirectory.ALL_COLUMNS, selection, selectionArgs, null, null, sortOrder); } @Override public ParcelFileDescriptor openFile(Uri uri, String mode) { if (URI_MATCHER.match(uri) != PHOTO_ID) { throw new IllegalArgumentException( operation only permitted for single file); } try { return openFileHelper(uri, mode); } catch (FileNotFoundException e) { return null; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] onKeyDown
Can someone tell me why the onKeyDown event never gets called here? (even when a key is pressed) import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.os.Bundle; import android.view.Display; import android.view.KeyEvent; import android.view.View; import android.view.Window; import android.view.WindowManager; public class Tutorial2D extends Activity { public int ctr = 0; Bitmap bkGround; Bitmap _scratch; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(new Panel(this)); bkGround = BitmapFactory.decodeResource(getResources(), R.drawable.background_ocean); Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); int wid = display.getWidth(); int height = display.getHeight(); bkGround = bkGround.createScaledBitmap(bkGround, wid, height, true); _scratch = BitmapFactory.decodeResource(getResources(), R.drawable.icon); } class Panel extends View { public Panel(Context context) { super(context); } @Override public boolean onKeyDown(int keyCode, KeyEvent msg) { return false; // return thread.doKeyDown(keyCode, msg); } @Override public void onDraw(Canvas canvas) { canvas.drawBitmap(bkGround, 0, 0, null); // canvas.drawBitmap(_scratch, ctr % 200, 10, null); ctr++; invalidate(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] onKeyDown
You need to catch key events on your activity, not your view. On Mon, Mar 28, 2011 at 3:09 PM, bob b...@coolgroups.com wrote: Can someone tell me why the onKeyDown event never gets called here? (even when a key is pressed) import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.os.Bundle; import android.view.Display; import android.view.KeyEvent; import android.view.View; import android.view.Window; import android.view.WindowManager; public class Tutorial2D extends Activity { public int ctr = 0; Bitmap bkGround; Bitmap _scratch; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(new Panel(this)); bkGround = BitmapFactory.decodeResource(getResources(), R.drawable.background_ocean); Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); int wid = display.getWidth(); int height = display.getHeight(); bkGround = bkGround.createScaledBitmap(bkGround, wid, height, true); _scratch = BitmapFactory.decodeResource(getResources(), R.drawable.icon); } class Panel extends View { public Panel(Context context) { super(context); } @Override public boolean onKeyDown(int keyCode, KeyEvent msg) { return false; // return thread.doKeyDown(keyCode, msg); } @Override public void onDraw(Canvas canvas) { canvas.drawBitmap(bkGround, 0, 0, null); // canvas.drawBitmap(_scratch, ctr % 200, 10, null); ctr++; invalidate(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- ~ Jeremiah:9:23-24 Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] onKeyDown
On Mon, Mar 28, 2011 at 6:09 PM, bob b...@coolgroups.com wrote: Can someone tell me why the onKeyDown event never gets called here? If I had to guess, your View probably cannot be focused, and so will not receive key events. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Setting maxWeight on a TextView
Hi, I'm trying to accomplish what I thought was a pretty simple layout, but am having trouble finding my way. Basically, I just want one TextView immediately after another where the second one has a fixed width and the first one can grow as large as it needs to be but will be ellipsized so that it doesn't push the second one out of the parent container: | TextView 1 text is short here: TextView 2 text | | TextView 1 text is really, really long here... TextView 2 text | Using layout_weight causes the 2nd view to be pushed all the way to end of the container, even if it does not need to be: | TextView 1 text is short here:TextView 2 text | | TextView 1 text is really, really long here... TextView 2 text | I can use maxWidth on the 1st TextView and things work ok, but I don't know the value (parent container width-TextView 2 width) without doing some measuring at run time. It seems like I need some hybrid maxWidth/ layout_weight mechanism. Seems I am missing the obvious -- can anybody point it out? Thanks! Scott -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Android Market slow or broken, or is it just me?
I wouldn't normally ask something like this, but I've noticed my app's sales have been tremendously down over the past weekend. And this afternoon, I saw a gap of three hours between purchases when normally I would see at least three or four per hour. This is just pretty bizarre to me and I'm wondering if anyone else is seeing the same. Or Is there something about the end of March that makes people not want to buy stuff online so much? Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] problem for button
help me pleaseee -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Where to start with simple video games?
I'm finishing up my first app for my company, so I am getting more comfortable with android. I'd like to do a personal project now, something like a spacewar game. I figured that there would be a canvas widget somewhere, and that given canvas.plot(x, y) I'd be on my way. It seems that there is a large selection of surfaces to draw on. I find it confusing. Is there a decent guide to two dimensional game writing on android? Thanks, Tobiah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Sorting MediaStore results
I'm a java dev new to android and looking to sort songs by artist and album. I'd like to have a list of artists and when you click an artist it expands to show that artist's albums and if you click an album it expands to show the songs on that album. I've tried looking at the source for the native Music app but was unable to locate this snippet of code. Thanks 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] holographic theme without building against Android 3.0
I'm a little confused with the following section of the documentation page on optimizing Apps for Android 3.0 (from http://developer.android.com/guide/practices/optimizing-for-3.0.html): Apply the new holographic theme to your application Open your manifest file and update the uses-sdk element to set android:targetSdkVersion to 11. For example: ... Build your application against the same version of the Android platform you have been using previously (such as the version declared in your android:minSdkVersion), but install it on the Android 3.0 AVD. Is it even possible to build an app against a different API than the target API? Isn't it necessary to target Android 3.0 (SDK 11) to get a holographic theme in the first place? Thanks for your help, Andrew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Drawing to Canvas inside ListView element
Hi, I'm writing an app where I'd like to draw to a Canvas inside each element of a ListView. To do this I have created the ListView with a custom Adaptor, overriding the getView function to inflate a new View as shown below: @Override public View getView(int position, View convertView, ViewGroup parent) { //Change row view to include textview at the top //followed by canvas Row row = elements.get(position); RowCanvas rowCanvas = (RowCanvas) convertView; if (rowCanvas == null) { // inflate a new view rowCanvas = (RowCanvas) LayoutInflater.from(context).inflate(R.layout.row, parent, false); } return rowCanvas; } ...where the RowCanvas class which extends View is as follows: public RowCanvas(Context context, AttributeSet attrs) { super(context, attrs); paint = new Paint(); paint.setColor(Color.WHITE); } /*@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(400, 40); }*/ @Override public void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawText(Testing this is working..., 25, 25, paint); //canvas.drawRect( /* e.g. from 10% across the screen to 90% across */ ); } As you can see, at the moment I'm unsure how I would go about drawing something in the Canvas so that it fills a certain percentage of the width of the screen, and how to correctly set the dimensions of the RowCanvas view, as at the moment I'm just arbitrarily setting them. What's the best way to go about this? Thanks for any help 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] On Click method not working for buttons gotten by inflating the layout!
All my other On Click methods work except the ones the I have to inflate the layout to get the button. What should I do to make this work? Or is it just my code that is wrong? Here are how I define my On Click listeners for the problem buttons: Button updateLevel = (Button)getLayoutInflater().inflate(R.layout.level, null).findViewById(R.id.updateLevel); updateLevel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { setLevelOnClick(v); } }); Button goBackMainMenu = (Button) getLayoutInflater().inflate(R.layout.play, null).findViewById(R.id.tomenu); goBackMainMenu.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { toMenuOnClick(v); } }); Here are my onClick actions: protected void toMenuOnClick(View v) { setContentView(R.layout.main); } protected void setLevelOnClick(View v) { setContentView(R.layout.main); } What is wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] HomeScreen Widget frustrating
Hi I'm new in dealing with HomeScreen Widgets. I tried to read as many as I could get but I didn't find a solution for my problem. I've created an Application which uses a ListView with some TextViews and ImageViews in it. The source is a SQLLite Database. What I try to do is now a HomeScreen Widghet which displays the ImageViews and Textviews in a scrollable matter. How do I have to do this? I know that I can't use my ListView for that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] can't get audio with MediaRecorder in first 0.7 seconds
i use MediaRecorder to record audio ,but i find that it can't record audio in first 0.7s. plz help me to solve this problem. my code like this: public void init() { try { mediaRecorder = new MediaRecorder(); mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); if (file == null) { File rootDir = Environment.getExternalStorageDirectory(); file = File.createTempFile(PREFIX, EXTENSION, rootDir); } mediaRecorder.setOutputFile(file.getAbsolutePath()); mediaRecorder.prepare(); } catch (Exception ex) { Log.e(SysConst.TAG, init, ex); } } public void start() { startRecording(); } public void free() { stopRecording(); } public void startRecording() { mediaRecorder.start(); } /** * This method stops recording */ private void stopRecording() { mediaRecorder.stop(); mediaRecorder.release(); } MediaRecordUtil reco = new MediaRecordUtil(); reco.init(); reco.start(); mRecoThread = new VoiceRecoThread(4000); mRecoThread.start(); mRecoThread.join(); reco.free(); the amr data in first 0.7s like this 0030h: E7 BA F0 00 00 00 C0 00 00 00 00 00 00 00 00 00 ; 绾?..? 0040h: 00 00 00 00 00 00 3C 55 00 88 B6 66 79 E1 E0 01 ; ..U.�� fy徉. 0050h: E7 CF F0 00 00 00 80 00 00 00 00 00 00 00 00 00 ; 缦?.. �. 0060h: 00 00 00 00 00 00 3C 48 F9 1F 96 66 79 E1 E0 01 ; ..H?�f y徉. 0070h: E7 8A F0 00 00 00 C0 00 00 00 00 00 00 00 00 00 ; ��?..? 0080h: 00 00 00 00 00 00 3C 54 FD 1F B6 66 79 E1 E0 01 ; ..T?�f y徉. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Reference styles across apps
Hi All, I am trying to modify a style used within com.android.inputmethod.latin, I have followed the guide here http://developer.android.com/guide/topics/resources/style-resource.html but am still unable to reference the style. This is using the T-Mobile theme engine. This example works (referencing the framework) style name=Widget.ListView.Menu parent=@android:style/ Widget.ListView.Menu item name=android:divider@android:drawable/ divider_horizontal_bright/item /style This returns - error: Error retrieving parent for item: No resource found that matches the given name '@com.android.inputmethod.latin:style/LatinKeyboardBaseView' style name=LatinKeyboardBaseView parent=@com.android.inputmethod.latin:style/LatinKeyboardBaseView item name=android:keyTextColor#FF00/item /style Can anyone help me out here? I'm very new to this. Thanks Gas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] url connection returning negetive value.
url = paths[0]; HttpURLConnection connection = (HttpURLConnection) url.openConnection(); int length = connection.getContentLength(); // i get negetive length InputStream is = (InputStream) url.getContent(); byte[] imageData = new byte[length]; int buffersize = (int) Math.ceil(length / (double) 100); int downloaded = 0; int read; while (downloaded length) { if (length buffersize) { read = is.read(imageData, downloaded, length); } else if ((length - downloaded) = buffersize) { read = is.read(imageData, downloaded, length - downloaded); } else { read = is.read(imageData, downloaded, buffersize); } downloaded += read; publishProgress((downloaded * 100) / length); } Bitmap bitmap = BitmapFactory.decodeByteArray(imageData, 0, length); if (bitmap != null) { Log.i(TAG, Bitmap created); } else { Log.i(TAG, Bitmap not created); } is.close(); return bitmap; I looked at this in java doc, the length is negetive because the following reason the number of bytes of the content, or a negative number if unknown. If the content length is known but exceeds Long.MAX_VALUE, a negative number is returned. What might be the reason for this. I am trying to download an image -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ask about Android with stock trading
I've been wrote stock trading with the android on mobile. So what happen with Intent Receiver ? With new version is it Broadcast Receiver ? And I can use the SQL Lite to store some data on mobile phone but have any frameworks to support to communicate with application server same J2EE ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] In App Billing enhancement request
Would it be possible to allow the in-app billing to check the purchase status of an app? I want to switch a paid app to a freemium model, but it's not possible to switch and allow existing paid users to keep access to the app. This could easily be remedied with a new reserved product id, something like 'android.app_purchase' that could be retrieved by the billing API. It would be present for any users that have purchased the app. It would, of course, need to be present even if the app is switched to a free app for those users that previously purchased when it was paid. If someone has an alternate mechanism to switch a paid app to freemium and keep access for existing users, please let me know! Thanks -Marcus Watkins Versatile Monkey -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 scroll in canvas or view (android)
Hi Thanks for reading this. 1. Big Canvas (1000x1000) and display(screen) 320x480 2. drawBitmap(bitmap1, 100, 100, null); 3. drawBitmap(bitmap2, 500, 500, null); ... and do something bitmap or animation 4. on touch drag (just like iphone werule display) 5. how to scroll(move) screen ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] RSS - APP
Hi TreKink, I want it to open without the webview, is how to implement it? 2011/3/23 TreKing treking...@gmail.com On Tue, Mar 22, 2011 at 10:54 PM, diego barbosa diegobcarne...@gmail.comwrote: being that I wanted him to open inside my app Use WebView. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en