[android-developers] save parts of streaming vides
Hello, I want to create an app which record video from camera, and while video recording save pieces of this streaming - length is 30 second. And when recording will stop I will have a lot of video files - each duration 30 seconds. Is it possible to do in Android? If yes - what libraries or methods use for this task? Thank you -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/a3b2653b-ffb1-45ba-bbfd-9699d0549ed0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: How to avoid reverse engineering of an APK file?
Frankly speeking, Proguard just minimize code. It's just a matter of patience to roll back all changes. I suggest to use more sophisticated tools. On Tuesday, April 14, 2015 at 11:18:47 AM UTC+3, bo wrote: HI All please any body help to restrict extracting apk . Regards Vinod -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] HttpsUrlConnection: Trust anchor for certification path not found on 2.3
Hello, there. I need to establish https connection with https://free.temafon.ru but I've got CertPathValidatorException on Android 2.3 and below. What have I done. 1. Grab all certs from https://free.temafon.ru with Firefox. 2. Import certs in keystore in sequence from temefon certificate to root certificate. 3. Init ssl context: final KeyStore keystore = KeyStore.getInstance(BKS); keystore.load(getResources().openRawResource(R.raw.temafon), W0d3Uoa5PkED.toCharArray()); final TrustManager trustManager = new TemafonTrustManager(keystore); final SSLContext sslContext = SSLContext.getInstance(TLS); sslContext.init(null, new TrustManager[] { trustManager }, null); HttpsURLConnection.setDefaultSSLSocketFactory(sslContext .getSocketFactory()); Here, I use custom TrustManager(http://blog.chariotsolutions.com/2013/01/https-with-client-certificates-on.html), because server sends certs in wrong order. This code works fine on Android 4.0, but failed on 2.3 with `java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.` What I'm doing whrong? I've created a test project, which can be found here(https://github.com/Drnkn/HttpsTest). -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: HttpsUrlConnection: Trust anchor for certification path not found on 2.3
I have tried everything from StackOverflow, but without success. In addition many answers suggest just trust all certs. On Monday, September 23, 2013 7:41:57 PM UTC+4, Jonathan S wrote: Try http://stackoverflow.com/questions/6825226/trust-anchor-not-found-for-android-ssl-connection On Monday, September 23, 2013 11:22:26 AM UTC-4, Dmitry wrote: Hello, there. I need to establish https connection with https://free.temafon.ru but I've got CertPathValidatorException on Android 2.3 and below. What have I done. 1. Grab all certs from https://free.temafon.ru with Firefox. 2. Import certs in keystore in sequence from temefon certificate to root certificate. 3. Init ssl context: final KeyStore keystore = KeyStore.getInstance(BKS); keystore.load(getResources().openRawResource(R.raw.temafon), W0d3Uoa5PkED.toCharArray()); final TrustManager trustManager = new TemafonTrustManager(keystore); final SSLContext sslContext = SSLContext.getInstance(TLS); sslContext.init(null, new TrustManager[] { trustManager }, null); HttpsURLConnection.setDefaultSSLSocketFactory(sslContext .getSocketFactory()); Here, I use custom TrustManager( http://blog.chariotsolutions.com/2013/01/https-with-client-certificates-on.html), because server sends certs in wrong order. This code works fine on Android 4.0, but failed on 2.3 with `java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.` What I'm doing whrong? I've created a test project, which can be found here( https://github.com/Drnkn/HttpsTest). -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: how to develope a popup window class ?
I believe you should try to dismiss your popup in UI thread. On Thursday, September 12, 2013 5:44:25 AM UTC+4, Amit Mangal wrote: Any idea developers how to remove this crash ? On Thursday, September 12, 2013, Amit Mangal forum.am...@gmail.comjavascript: wrote: Problem is my popup window class shows message correct. i am having a 3 sec timer to dismiss popup. this dismiss popup is crashing my app here is my popup window class public class PopupMessage { private Context context ; SetCustomFonts customFonts ; private TextView tv_message_popup ; private ImageView iv_imageview ; Timer dismissPopupTimer ; View popupView ; PopupWindow message_Popup ; Timer timer; PopupMessage ( Context context ) { this.context = context ; } public void DisplayPopupMessage (String messageString, int resourceID, RelativeLayout relativeLayout, int alphaValue) { LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) ; popupView = inflater.inflate(R.layout.message_popup, null); customFonts = new SetCustomFonts(context) ; tv_message_popup = (TextView) popupView.findViewById(R.id.id_tv_message_popup) ; tv_message_popup.setText(messageString) ; customFonts.SetBookFont(tv_message_popup) ; iv_imageview = (ImageView) popupView.findViewById(R.id.id_iv_imageview) ; iv_imageview.setBackgroundResource(resourceID) ; popupView.getBackground().setAlpha(alphaValue) ; message_Popup = new PopupWindow( popupView, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); //message_Popup.showAtLocation(relativeLayout, Gravity.CENTER,0,0); message_Popup.showAsDropDown(relativeLayout); dismissPopupTimer = new Timer(); dismissPopupTimer.schedule(new TimerTask() { @Override public void run() { DismissPopupWindow(); } }, 3000, 1); } public void DismissPopupWindow () { dismissPopupTimer.cancel() ; if (message_Popup.isShowing()) { message_Popup.dismiss() ; /// At this line app is crashing getting error message_Popup = null ; } } here is the error it is coming due to relative layout which i am passing for displaying popup. i want to display popup as a drop down thats why this relative layout i am passing popup is displaying correct but while dismissing app get crashed 09-12 00:42:03.599: E/WindowManager(15187): Activity com.app.fashion.TabbbActivity has leaked window android.widget.RelativeLayout{41e1cb28 V.E. ..I. 0,0-720,78 #7f0a0141 app:id/id_rl_layout} that was originally added here 09-12 00:42:03.599: E/WindowManager(15187): android.view.WindowLeaked: Activity com.app.fashion.TabbbActivity has leaked window android.widget.RelativeLayout{41e1cb28 V.E. ..I. 0,0-720,78 #7f0a0141 app:id/id_rl_layout} that was originally added here 09-12 00:42:03.599: E/WindowManager(15187): at android.view.ViewRootImpl.init(ViewRootImpl.java:409) 09-12 00:42:03.599: E/WindowManager(15187): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:218) 09-12 00:42:03.599: E/WindowManager(15187): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) 09-12 00:42:03.599: E/WindowManager(15187): at android.widget.PopupWindow.invokePopup(PopupWindow.java:993) 09-12 00:42:03.599: E/WindowManager(15187): at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:899) 09-12 00:42:03.599: E/WindowManager(15187): at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:862) 09-12 00:42:03.599: E/WindowManager(15187): at com.app.fashion.PopupMessage.DisplayPopupMessage(PopupMessage.java:54) 09-12 00:42:03.599: E/WindowManager(15187): at com.app.fashion.SearchProductActivity$SaveRemoveAsyncTask.onPostExecute(SearchProductActivity.java:984) 09-12 00:42:03.599: E/WindowManager(15187): at com.app.fashion.SearchProductActivity$SaveRemoveAsyncTask.onPostExecute(SearchProductActivity.java:1) 09-12 00:42:03.599: E/WindowManager(15187): at android.os.AsyncTask.finish(AsyncTask.java:631) 09-12 00:42:03.599: E/WindowManager(15187): at android.os.AsyncTask.access$600(AsyncTask.java:177) 09-12 00:42:03.599: E/WindowManager(15187): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644) 09-12 00:42:03.599: E/WindowManager(15187): at android.os.Handler.dispatchMessage(Handler.java:99) 09-12 00:42:03.599: E/WindowManager(15187): at android.os.Looper.loop(Looper.java:153) 09-12
[android-developers] Re: Are NPOT textures compressed to ETC format supported on SGX540 GPUs?
Yep! Confirming this. Galaxy Nexus, ICS 4.0.4. Got this segfault while using POT: I/DEBUG (26556): #00 pc dbec /system/lib/libc.so (memcpy) I/DEBUG (26556): #01 lr 5b98c588 /system/vendor/lib/egl/ libGLESv2_POWERVR_SGX540_120.so When I switched to using NPOT textures, this crash went away Weird :) On Wednesday, January 25, 2012 4:54:47 AM UTC+4, markusn82 wrote: I noticed today that my OpenGL game was crashing when attempting to load an NPOT texture compressed using ETC format into an SGX540 (Galaxy Nexus to be specific). The stacktrace in the log showed that the crash was happening in the SGX driver. When I run the same code by only change the texture to POT, then everything is ok. I have followed all the rules for using NPOT textures, like ensuring that CLAMP repeat mode is used and LINEAR texture sampling is used (i.e. no mipmapping). Can anyone else confirm this behaviour? Thanks, Mark -- -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: How to dynamically apply themes in Android
As I know, the only way to achieve it is to recreate your activity like this: final Intent intent = getIntent(); overridePendingTransition(0, 0); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); finish(); overridePendingTransition(0, 0); startActivity(intent); and set your theme every time during onCreate(). On Friday, December 4, 2009 4:24:24 PM UTC+4, kirti kaul wrote: Hi, My query is regarding on whether we can apply dynamically themes in android,like what we do with our phones in which we can select a theme and the same theme gets applied all across the phone.Is there a way to do this in android (I am able to change the default theme by hardcoding in the code (styles.xml),but I need to know how we can we set themes dynamically. I saw the Android phone,but there is no Setting where we can set the Theme.) Any help will be appreciated!!! Thanks, Kirti -- -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Streaming video over RTMP
Hello, I am programming android client that would show video from web camera in real time. The issue is that I get this stream over RTMP protocol. It seems that nobody knows an easy way to do that. I have found a few libs as www.aftek.com/afteklab/aftek-RTMP-library.shtml http://code.google.com/p/android-rtmp-client/ , but can not play video with it via url as is rtmp://v1.viewcity.ru/vod/sample1_150kbps.f4v Could you please give me any information how I can do that? 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: Augmented Reality
What kind of AR application do you want to write? Basically AR apps are divided into two groups: 1. Apps with markers where user sees something when looks on markers through device's camera. 2. Apps where you put some information upon camera view - POIs, routes.. Thanks, Dmitry On 15 фев, 12:11, Anirudh Loya loya.anir...@gmail.com wrote: Pls reply On Mon, Feb 13, 2012 at 8:42 PM, Anirudh Loya loya.anir...@gmail.com wrote: Thanks Raghav. I saw your book in A-Z market also, but the pricing was a concern to me. I would be greatful if you could assist me with any blogs of yours where I can start from scratch on AR or any material as a reference if you can mail me up. Anyhow, I am looking in blogs of Chris as of now. Thanks, Anirudh Loya On Tue, Feb 14, 2012 at 2:10 AM, Raghav Sood raghavs...@androidactivist.org wrote: Currently, there are no books on Augmented Reality and Android, AFAIK. I am in the process of writing one, but that will not be published until May. You can see if it can help you:http://www.apress.com/9781430239451. If you use Google, you should be able to find Chris Haseman's tutorial on the subject on devx. That should serve as an introduction. I'd also recommend looking into Augmented Reality engines like AndAR. Thanks On Mon, Feb 13, 2012 at 6:48 PM, Anirudh Loya loya.anir...@gmail.com wrote: Hi Guys, Need your help regarding Augmented reality. I am not new to Android Development. I am in the beginning stage of reality app. Basically I have no idea about making Augmented reality app. Pls suggest me with books on Augmented reality and It would be great help if you could give direct weblinks of Ebook. Cheers, Anirudh Loya -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Raghav Sood http://www.androidactivist.org/- Author http://www.appaholics.in/- Founder -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Android linear accelerometer's values are different on several devices
I'm working on Android navigation app which uses complex of sensors to determine position changes. In some cases device cannot achieve GPS signal for a while (tunnel or multilevel parking) and I want to compensate these gaps using INS approach. Yes I know that there're another approaches like cell-id or data got from device's carrier, but currently I'm focused on sensors. Well, INS approach can be divided into two big tasks: 1. attitude determination (gyro or accelerometer + magnetometer or some combination) 2. velocity and distance calculation. Here I double integrate linear accelerometer values. Now I try to resolve the second task. I prepared all calculation and made contrastive analysis of data got from linear accelerometer on different Android devices: Sensation, Motorola Xoom and Nexus S. I put all devices on a platform and moved the platform on 8 meeters with an acceleration on Y axis. After that I built graphics and they really confused me - all 3 graphics has the same amplitude but peak values are different. For example at the same moment I have 0.2 m/s^2 on Xoom and 1.2 m/s^2 on Sensation. Hence after calculation I had a big difference in distance. Official documentation doesn't explain it. I surfed the web but didn't find any answer about that issue. So my question is: did someone faced to it? Or maybe you know an advice which will help me to solve it? In addition, android Sensor class has few parameters. I found that Sensation and Xoom has different RESOLUITON values - Sensor.getResolution(). Sensation - 1.0 Xoom - 0.009576807 I'm stack with it, so any help will be really good! 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: Android linear accelerometer's values are different on several devices
Hi Guillermo, thanks for your collaboration. Regarding my issue. I didn't try low-pass filter, but I'm not sure that it will make sense to use it. Let me explain: Low-pass filter just reduce peaks and remove some white noise. For each device it will reduce peaks with the same proportion, and as a result I'll get the same difference in peaks for different devices. I mentioned that there's a sensor's resolution parameter and it also different for linear accelerometer on Xoom and Sensation. I hope it can help me, but I still have no answer what this parameter means. Maybe someone here heard about that or google guys throw the light upon it. OK, what about your issue. Previously I made the similar actions with transformations like you described. What you need to do: 1. to handle device position against X axis. There're two states: device lay down (on a table for example) and device in vertical position. You must implement and register OrientationEventListener. It has a callback onOrientationChanged(int orientation) where orientation is a degree value. There's a hint - (orientation == OrientationEventListener.ORIENTATION_UNKNOWN) in case device lays down. So I hope there're no problems. In code bellow I called it mInclinationType and made additional enum for values: enum Incline {VERTICAL, HORIZONTAL } 2. to handle device position against Z axis. In other words rotation. You can achieve it using getRotation() call from Display instance. 3. and finally to determine how to map axis for transformation based on values above. This is my code for onSensorChanged() callback: switch (mDisplay.getRotation()) { case Surface.ROTATION_0: if (mInclinationType == Incline.VERTICAL) { SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_X, SensorManager.AXIS_Z, mRTransformed); } else { SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_X, SensorManager.AXIS_Y, mRTransformed); } break; case Surface.ROTATION_90: if (mInclinationType == Incline.VERTICAL) { SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_Z, SensorManager.AXIS_MINUS_X, mRTransformed); } else { SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X, mRTransformed); } break; case Surface.ROTATION_270: if (mInclinationType == Incline.VERTICAL) { SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_MINUS_Z, SensorManager.AXIS_X, mRTransformed); } else { SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_MINUS_Y, SensorManager.AXIS_X, mRTransformed); } break; } SensorManager.getOrientation(mRTransformed, mOrientation); Some comments: here I missed case with Surface.ROTATION_180 because it wasn't applicable for my HTC desire. You can simply add it by yorself :) mInclinationType - my first parameter. mR - rotation matrix got using accel and magnetic data mRTransformed - array for transformed matrox mOrientation - array for result (yaw, roll, pitch) I hope it will be helpfull. Feel free if something unclear. What about getRotationMatrix(). It requires gravity data. Values got from plain 3-x axis accelerometer (not linear) are fine, because their contain gravity. You also can achieve gravity values using separate GRAVITY sensor which were introduced since 9 API version. Thanks, Dmitry On 14 фев, 16:10, Guillermo Polonsky polons...@gmail.com wrote: Are you low filtering the values? That can help. For example you can create an array of 10 position, then each time the accelerometer/linear acceleration gives you a value you do something like this: accelVals = lowPass( currentEvent.values, accelVals ); where lowPass method is: protected float[] lowPass( float[] input, float[] output ) { if ( output == null ) return input; for ( int i=0; iinput.length; i++ ) { output[i] = output[i] + ALPHA * (input[i] - output[i]); } return output; } and static final float ALPHA = 0.2f; Can you please share how you handled 1)? Right now I have a problem knowing if the device is with it's screen looking up, to the user, or the opposite of those, and the remapCoordinateSystem. Please have a look at my question: Hi all! What I'm trying to achieve is calculate if a runner is running, stopping, etc. (and I can't use the GPS), where the runner can have the device in different positions (portrait facing
[android-developers] Android: Sensor.getResolution() value
I'm working on Android applications which uses SensorManager for defferent purposes. During investigation I found that Sensor.getResolution() function returns different values for different devices: HTC Sensation has 1.0 resolution value for all on board sensors. Motorola XOOM: 3-axis Accelerometer - 0.009576807 3-axis Magnetic field sensor - 0.0625 L3G4200D Gyroscope sensor - 0.0012217305 Linear Acceleration Sensor - 0.009576807 Gravity Sensor - 0.009576807 It's not clear whether I need to do additional calculation using this resolution value before using appropriate sensor's values. Official documentation doesn't throw the light upon it. Can anybody explain me this 'resolution' value purpose? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] GPS multipath errors filtering?
Hello! I'm develop an application which uses GPS to periodically determine user location. The problem is that when the user is stationary, the successive locations comes with a large jumps in latitude and longitude (up to 100 meters). Is there any way to filter out these jumps (also known as GPS multipath errors)? For obtaining locations, I'm use requestLocationUpdates(...) with 0.0 minDistance parameter and interval (minTime) between 30 and 90 s (depending on network availability for sending locations and battery state). -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Application is available for 0 devices
After submitting of new app (com.mcf.strip_club) we see 0 devices in console, and no compatible phones on Market. The main info is below (I can be incorrect in some terms since I see them not in English): API Level: 7-14+ Supported screens: small-xlarge OpenGL Textures: all Code Version: 1 Version: 1.0 Size: 5,2M Supported languages: default Permissions: android.permission.INTERNET Features: android.hardware.screen.landscape, android.hardware.touchscreen Well, does not seem very restricive to me, but we see in console, that all devices are filtered out due to manifest. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: what's wrong? curl http://Android.git.kernel.org/repo ~/bin/repo doesn't work!
You can use this tutorial http://php.webtutor.pl/en/2011/09/05/kernel-org-hacked-how-to-get-android-repo/ to get repo and source. On Oct 16, 8:00 am, puwei puwei...@gmail.com wrote: can't use curl to get repo, when i try commad curlhttp://Android.git.kernel.org/repo~/ bin/repo just can't download any thing , and there was a file name repo , use vi ~/bin/repo there just a few line words like ther was error , from this site ...bla bla , i'm a newbie in android develope, could you tell me , what should i do ,to fix this step ,download repo? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] postDelayed vs. post
Hi, Q1: Is post(action) equivalent to postDelayed(action, 0)? Q2: If a view implements a never stopping cycle like this, depending on two time parameters, N and T: public void timerEvent() { final class Timer implements Runnable { public void run() { timerEvent(); } } native_code(); // guaranteed to run no longer than N msecs postDelayed(new Timer(), T); } what combinations of N and T ranges (including T = 0) are acceptable to make sure the view remains responsive to touch and other user- generated events, and force close/wait dialog does not appear? I currently set N to 200msec max. Any lower bound on T? In other words, if T = 0 and a touch event arrived while in native code, will it be processed by the view at all, or is it necessary to have T 0 to guarantee that touch event will be processed? 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: postDelayed vs. post
Dianne, Thanks for your quick reply. On Aug 31, 12:28 pm, Dianne Hackborn hack...@android.com wrote: On Wed, Aug 31, 2011 at 9:16 AM, Dmitry Golubovsky golubov...@gmail.comwrote: Q1: Is post(action) equivalent to postDelayed(action, 0)? Yes. OK, may I suggest that this be reflected in the reference? what combinations of N and T ranges (including T = 0) are acceptable to make sure the view remains responsive to touch and other user- generated events, and force close/wait dialog does not appear? It will remain responsive because older messages are processes before newer messages, so you can't starve other messages from the queue by re-posting a message when you handle it, even with no delay. OK, so there are no specific priorities on user-generated vs. posted events. the user is in your app, if using a delay of 20ms means you are keeping the CPU running at near 100%, are going to much more quickly drain the battery (and the user will see this in the battery use report). I posted much simplified code. This is the same Smalltalk VM port that I mentioned several times in the NDK group. The VM has an interval timer (which is N in my example), and when it expires inside the native code, the VM saves its state and returns to the Java UI code. Or otherwise it may return if there is nothing to process (no input events). If return happened by timer, the VM will be reentered ASAP (that is, after T in my example). Otherwise it may not be reentered until another user event is registered. That is, zero-or- near-delays between entering native code do not happen 100% of the time. All I am concerned about is not to have the non-responding dialog and buffer pending events within the application. Your explanation is very helpful. Thanks again. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaPlayer: setDataSource failed (streaming)
Hi there. I write Android app and I want to playing music from a remote URL via HTTP streaming. In official tutorial is showed this code: String url = http://;; // your URL here MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setDataSource(url); mediaPlayer.prepare(); // might take long! (for buffering, etc) mediaPlayer.start(); But I don't know what kind of URL I should use. I try to use vorbis.com/music/Epoq-Lepidoptera.ogg from google tutorial: it correct open in browser but when I have invoked setDataSource(url) I catch java.io.IOException: setDataSource failed.: status=0x8000. I googled and find meaning of this error: file at which points the this path is not valid. Can you show me example of URL that I should use for playing music via HTTP streaming? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: ActionBar/Mode Style Regressions with SDK 12r2 and 13r1
My concern is why I can easily change android:actionOverflowButtonStyle... and cannot do the same with search icon. Gray search icon is not acceptable for our brand style... so default action bar became useless for us, and we should create custom bar for tablet that is ridiculous:) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Launch activity on a file with certain name pattern (file-manager independent)
Hi, Suppose I have a number files whose names satisfy certain pattern, located anywhere in the file system (SD card likely). I am looking for a file-manager independent way to launch a predefined target activity upon user tapping on those files icons provided that the activity has proper intent filter configured in its manifest xml. For example, file name pattern is *.image, and the target application has in its manifest: intent-filter action android:name=android.intent.action.PICK / action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:scheme=file android:mimeType=*/* android:host=* android:pathPattern=.*\\.image / /intent-filter I am hoping that the intent filter definition is correct (based on examples found in many places) Unfortunately several file managers I tried (ES, Linda, AndExplorer, etc.) do not seem to honor this, and try to open a *.image file in their own way (that is in most cases say they just say cannot open it). And in fact I think it is not a good idea to require installation of some application just to launch activities on files. How else could it be done regardless of file manager? Ideally it would be an icon for each file on the home screen. Tapping on such an icon launches the target activity. Do I have to create a fake wrapper application for each file? Or is there a standardized/programmatic way to place a file shortcut icon on the home screen without third party app installations? The intended usage scenario: Squeak VM executable is packaged as an application on its own. Smalltalk images + changes + sources are distributed separately, and may come into the device in various ways (e. g. transferred via USB). If creation of a fake wrapper application is the only way, can an application delete its assets after installation is complete? I can see possible logic for such an application to have the files packed in assets, and when installed, files are copied from assets to sdcard. Assets are no longer needed, and just waste the storage space. A wrapper application code is basically boilerplate; are there any automated tools to generate it? Any suggestions? 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: Intercept Emails
Hi, Daniel I solve this problem by installing app as system app. For example, I'm using following batch file with commands: adb shell mount -oremount,rw -t yaffs2 /dev/block/mtdblock3 /system adb push C:\Your.apk /system/app/ adb reboot On Apr 7, 8:53 am, Daniel Felix zaandr...@gmail.com wrote: Hi All, Thanks for your kind replies, I am wondering some software are using these facilities like flexiSpy is using this facility. I want to only read the emails from the email client and when I try to access it throws an exception which is security permission access exception. If someone know about this exception please give me suggestion. I have add the security permission which is mentioned in exception. Regards, Felix On Apr 6, 6:29 pm, Dianne Hackborn hack...@android.com wrote: On Wed, Apr 6, 2011 at 3:41 AM, Daniel Felix zaandr...@gmail.com wrote: I have rooted phone. Could you send me some snippet for the email recieving. I doubt anybody is going to be able to send you a snippet of code. This is an extremely non-trivial thing to do, and will be deeply tied to whatever implementations there are in the particular e-mail app you are using. If you have a rooted phone, replace your e-mail app with one that does what you want. -- 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] Transparent InputConnection?
Hi, Is there an example of/tutorial on maximally transparent subclass of BaseInputConnection? Android 2.0 if that matters. All I need is to pass a key event to the target view on any alpha or digit or special character soft key pressed, bypassing any built-in text editing capabilities. This is perhaps a generalization of my earlier question about KEYCODE_DEL (I got a suggestion for this one on another forum that the problem lies in the input connection), but it looks like input of digits does not work properly either: I just want to have a transparent input method. 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] How to get an event for soft keyboard KEYCODE_DEL?
Hi, In my application, I bring the soft keyboard on from time to time, and it looks like events for the DEL key are not delivered. The method in question is at http://pastebin.com/zZaZWJ4t and the whole Java class is at http://squeakvm-tablet.googlecode.com/hg/project/src/org/squeak/android/SqueakView.java Any alphanumeric key or Enter (Return) tapped on the soft keyboard is passed to the application except for KEYCODE_DEL. I tried to replace KEYCODE_DEL in the case clause with anything else (e. g. with code for for hardware button PAGE_UP), and the clause takes control when that button is pressed. I did not subclass the Android Keyboard class, just used the default input manager. What can be done in order to receive events for KEYCODE_DEL? Is deriving a subclass the only way? Thanks. PS When the soft keyboard is visible, toast messages do not show up although key events definitely pass through (I can e. g. enter text into Squeak workspace). Is this normal behavior of toasts? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] SDcard mount point in portable way?
Hi, In my program, I need to access the full contents of the sdcard for reading and writing. I have found that the sdcard is itself mounted at /system/media/sdcard (on Pandigital Novel 9 tablet, Android 2.0). Is there any library function that would return this path correctly for any other Android version? I tried Environment.getExternalStorageDirectory, but it only returns /sdcard, and through that path I cannot see any files in the root of the sdcard, only directories like Music, Images, etc. Through /system/media/sdcard though I can see the entire card contents. /proc/self/mounts shows two different devices mounted at /sdcard and at /system/media/sdcard. In other words, I had to hardcode /system/media/sdcard in my program, but I would like to aviod such hardcoding, and replace it with some library call. My code currently is: . String imgpath = /system/media/sdcard/ + imageName; File imgfile = new File(imgpath); context.toastMsg(getExternalStorageDirectory: + Environment.getExternalStorageDirectory()); long fsize = imgfile.length(); context.toastMsg(image found size: + fsize); InputStream fstr = new FileInputStream(imgfile); . The toast popup shows /sdcard. 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: SDcard mount point in portable way?
Mark, Thank you for response. On Feb 25, 4:38 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Feb 25, 2011 at 6:41 AM, Dmitry Golubovsky golubov...@gmail.com wrote: I have found that the sdcard is itself mounted at /system/media/sdcard (on Pandigital Novel 9 tablet, Android 2.0). Is there any library [skip] From an Android SDK standpoint, getExternalStorageDirectory() is the right answer. If a device manufacturer elects to do something else, that is their problem. So, on a compilant device getExternalStorageDirectory would return a real sdcard mountpoint? Or still an overlay to access only specialized directories? That's what I need to understand first. Furthermore, that device does not support third-party apps, let alone have the Android Market on it. I recommend that you get a real device, one that ships with a legitimate Android Market on it, for your app testing purposes. Well, I need to use what a random/average customer could pick. This one is sold physically in stores, and price/functionality ratio is reasonable. I didn't even try to root it, that's the condition of my experiment. Anyway, if there is no formal answer, I'll need to apply more heuristics... it is a mountpoint anyway, controlled by vold (sp?), I am assuming at least this holds for all devices? Thanks. Dmitry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to use ListView in Tab?
Good day. In my app I have three tab (one Activity extend TabActivity and others activitys provides access to content). In first tab I have ImageView, a few TextView and it is works. But when I add ListView and in activity that contain ListView I add a few rows it was not show in may tab. Can someone tell me where I was wrong? Here my code: In StartActivity: intent = new Intent().setClass(this, GoodsAndShopsActivity.class); spec = tabHost.newTabSpec(shops).setIndicator(Shops, res.getDrawable(R.drawable.ic_tab_shops)) .setContent(intent); tabHost.addTab(spec); In GoodsAndShopsActivity: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.descriptions); m_shopsLayout = (ListView) findViewById(R.id.shops); m_shopList = new ArrayListShop(); m_shopAdapter = new ShopAdapter(m_shopList, this); m_shopsLayout.setChoiceMode(ListView.CHOICE_MODE_SINGLE); m_shopsLayout.setAdapter(m_shopAdapter); for (int i = 0; i3; i++) { m_shopList.add(new Shop(new description)); m_shopAdapter.notifyDataSetChanged(); } } In class that extends BaseAdapter: @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = m_inflater.inflate(R.layout.shop, null); holder = new ViewHolder(); holder.descriptions = (TextView) convertView.findViewById(R.id.shop); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } String textOnView = m_shops.get(position).getDescription(); holder.descriptions.setText(textOnView); return convertView; } static class ViewHolder{ TextView descriptions; } And my xml where define ListView (Sorry that so much): RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent LinearLayout android:id=@+id/full_info android:layout_width=wrap_content android:layout_height=wrap_content ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10px android:src=@drawable/icon /ImageView LinearLayout android:id=@+id/short_info android:orientation=vertical android:layout_width=fill_parent android:layout_height=wrap_content android:layout_toRightOf=@id/icon android:layout_alignParentRight=true TextView android:id=@+id/name_for_good android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:gravity=center_vertical android:text=Наименование товара /TextView TextView android:id=@+id/best_price android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:singleLine=true android:ellipsize=marquee android:text=Лучшая цена: /TextView TextView android:id=@+id/worst_price android:layout_width=fill_parent android:layout_height=0dip android:layout_weight=1 android:text=Худшая цена: /TextView /LinearLayout /LinearLayout LinearLayout android:id=@+id/description_and_shop android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/full_info TextView android:id=@+id/description android:layout_width=fill_parent android:layout_height=wrap_content android:text=Большое подробное описание товара с всякими деталями, нюансами и т.п. /TextView ScrollView android:id=@+id/ScrollView android:layout_width=fill_parent android:layout_height=fill_parent ListView android:id=@+id/shops android:layout_width=fill_parent
[android-developers] Re: Screen flicker when swapping bitmaps to draw
This maybe a problem with painting itself. On Sep 17, 7:34 am, EmilDiego emildi...@gmail.com wrote: I am working on a Live Wallpaper app. Basically id downloads a bunch of different background images and then randomly picks one to display. They change every few minutes to another background. THe problem I an encountering is during the transitions. The bitmaps sometimes flickers when transitioning to the new one. I have a thread class that does the drawing for me and while i swap the bitmaps i pause the drawing thread but I still get the flicker. Here's some of the code. I'm not sure what else I need to do. Any suggestions would be great. Thanks. //* we don't want to paint the background while we are loading the //* new image into it so lets pause the drawing then restart //* it after were done. this.pausePainting(); xTmpBitmap = BitmapFactory.decodeStream(ifp.getInputStream()); if (xTmpBitmap == null) { LiveWallpaper1.debugLog.log_error(Unable to create the bitmap,); ifp.close(); //* if we fail for some reason we need to restart the painting this.resumePainting(); return false; } //* get a reference to the new bitmap this.m_xBitmap = xTmpBitmap; xTmpBitmap = null; //* resume the painting this.resumePainting(); -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 access proximity sensor on Droid X
I'm writing an app that uses the proximity sensor, but registerListener keeps returning false whenever I try to register to the sensor. getDefaultSensor returns null, getSensorList returns an empty list, but the sensor works fine during calls and according to the log, SensorManager actually finds the sensor: 08-18 18:14:38.276 2077 2077 D SensorManager: found sensor: KXTF9 3- axis Accelerometer, handle=0 08-18 18:14:38.276 2077 2077 D SensorManager: found sensor: AK8973 3- axis Magnetic field sensor, handle=1 08-18 18:14:38.284 2077 2077 D SensorManager: found sensor: AK8973 Temperature sensor, handle=3 08-18 18:14:38.284 2077 2077 D SensorManager: found sensor: SFH7743 Proximity sensor, handle=4 08-18 18:14:38.284 2077 2077 D SensorManager: found sensor: Orientation sensor, handle=2 08-18 18:14:38.284 2077 2077 D SensorManager: found sensor: Ambient Light sensor, handle=5 I had my phone replaced due to a dead pixel and the app ran fine on the old one, so am I missing something simple or is this a hardware issue? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to create a DBAdapter object in class extends BaseExpandableListAdapter?
Hello there, I want to populate ExpandableListView from database. But I can't create the DBAdapter object in class extends BaseExpandableListAdapter, because I don't know what context must be passed to DBAdapter constructor. I use DBAdapter db = new DBAdapter(AutoContacts.this); but it doesn't work (AutoContacts is main class extends Activity). And here is DBAdapter constructor: public DBAdapter(Context ctx) { this.context = ctx; DBHelper = new DatabaseHelper(context); } -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 get the screen lock status
On Friday 04 June 2010 17:44:19 ubuntu_user wrote: I am looking for a method to get the current screen lock status. I would like to know if it is locked or not. I have a live wall paper that only need to work if the screen is unlock (i.e. full display is on), otherwise, it should be just blank. You should just reimplement WallpaperService::Engine::onVisibilityChanged(bool) inside your live wallpaper's engine - this will tell you when wallpaper gets shown/hidden. It's better to use this method, because you don't need to do anything not only if screen is locked, but e.g. when some other app starts and wallpaper isn't visible. onVisibilityChanged is exactly what you need in this case :) See http://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html#onVisibilityChanged(boolean) Cheers, Dmitry. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Screen switch callback?
Hi! I wonder if there's a way to know that user started switching from one virtual screen to another (i.e. at home screen)? And also i'd be interested to know when this switch ends :) Maybe some callback or event or whatever it can be :) Quick grepping through API docs and googling didn't reveal anything, so hoping for your advice here, thanks :) Cheers, Dmitry. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] LiveWallpapers: Delayed posting of Runnable vs full-fledged paint thread
Hello guysngirls! :) Lately I've started to implement my first livewallpaper. Basically it just fades one bitmap into another by reducing alpha of one image and increasing alpha of another (while drawing). Bitmaps are not very small, 800x480 in size. Currently the drawing is done by continuously posting a Runnable with a call to a drawFrame() function, once in a 1000/25 msecs - just as suggested by a livewallpaper sample from SDK samples. But I notice that the transitions are somewhat step-like - not very smooth. I think it can be smoother. The question is this: can this be due to a posting overhead? Would It get smoother if I would implement drawing in a separate thread? Then it would run on its own, all the time, and call drawFrame(). Also, is this acceptable for a live wallpapers? I have a game in which I use the paint thread to draw on a SurfaceView, just as I described above, and i have got a good performance :) Thanks in advance, Dmitry. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Linear Layout
On Monday 31 May 2010 17:43:47 Anton Persson wrote: As it is now, each following object will get zero space, and hence won't be visible. Can this be solved somehow? What are the layout_width and layout_height properties of the first object? If they (or one of them - depending on layout orientation) are fill_parent, then it will take all the space available :) In this case you should try setting this property (be it layout_width or layout_height) to wrap_content - this will make this object occupy only needed space. Cheers, Dmitry. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 a bitmap to Canvas every frame - supposed to be slow?
Hello, guys! I've run into a little problem, need some advice. I'm painting in SurfaceView, and I need to constantly fade one screen-sized bitmap into another. Something like a slideshow. I even simplified this drawing to draw one bitmap for testing purposes, and still I notice the slowness. The code does something like this (pseudo): void drawFrame() { mPaint.setAlpha(progress); // progress varies from 0 to 255 canvas.drawBitmap(mBitmap, 0, 0, mPaint); //mBitmap has screensize } and with this I get *noticable* lags while drawing. Well, these lags are not completely lenghty, but they are noticable indeed. And if I add canvas.drawColor(Color.BLACK); to the beginning of the function then it becomes dog slow. Is this supposed to be so? Am I doing something wrong? Any suggestions on how could I improve this situation? Thanks in advance, Dmitry. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] emulator: ERROR: the user data image is used by another emulator. aborting
Hi, I am trying to start the emulator and get this message. No other emulator is running. I am working under Linux, home directory is mounted via sshfs. I saw reports of this message from Windows users when emulator images were located on networked drives/folders. Does the same problem apply to sshfs-mounted directories on Linux? Is there any workaround? 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] emulator: ERROR: the user data image is used by another emulator. aborting (cont'd)
OK, finally strace gave me this: lstat64(/home/dima/.android/avd/AVD-1.avd/userdata- qemu.img.tmp-6p9Pnr, {st_mode=S_IFREG|0600, st_size=6, ...}) = 0 link(/home/dima/.android/avd/AVD-1.avd/userdata-qemu.img.tmp-6p9Pnr, /home/dima/.android/avd/AVD-1.avd/userdata-qemu.img.lock) = -1 ENOSYS (Function not implemented) and several other attempts to call link that also fail (sshfs does not support hard links). Is it possible to change the emulator's behavior to create lock files somewhere in /tmp (using some hash of image path as lock file name)? I am OK to try this myself: which repositories from https://android.git.kernel.org/ are necessary to rebuild the emulator alone, and where in the sources is the code responsible for image locks? 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: emulator: ERROR: the user data image is used by another emulator. aborting (cont'd)
David, On Apr 14, 12:44 pm, David Turner di...@android.com wrote: It is possible, and quality patches are gladly accepted, to be sent at b.android.com The code you're looking for is at external/qemu/android/utils/filelock.c Thank you, For the record, I also have submitted Issue 7717. I pulled the emulator repo earlier today (looks like I also need to build libSDL, is there anything else?). To my understanding this is Android- specific (not qemu-specific) code, so no need to submit any patches to upstream qemu, 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Pipe separator | in sms
I am receive sms from server with | delimeter, but android make it unreadable. Can I make something with 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] Control styling
Hello, I need create some EditText dynamically in my application, but these components have to apply one custom style in styles.xml. I am trying to this next way: XmlResourceParser parser = getResources().getXml(R.style.MyStyle); AttributeSet attributes = Xml.asAttributeSet(parser); ... for (SomeObject obj : ObjArray) { EditText edit = new EditText(this, attributes); edit.addTextChangedListener(new CustomTextWatcher(obj)); parentObj.addView(edit); } but while executing it fails with exception android.content.res.Resources$NotFoundException: Resource ID #0x7f050001 at android.content.res.Resources.getValue(Resources.java:846) at android.content.res.Resources.loadXmlResourceParser(Resources.java: 1796) at android.content.res.Resources.getXml(Resources.java:734) Can somebody tell me - how to do this feature? 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] Adding contacts via Intent
Hello! I am trying to add new contact using intent: Intent addPersonIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT); addPersonIntent.putExtra(Insert.NAME, John Smith); addPersonIntent.setType(Contacts.People.DISPLAY_NAME); addPersonIntent.putExtra(Insert.PHONE, Uri.decode(806547850012)); addPersonIntent.putExtra(Insert.PHONE_TYPE, Contacts.Phones.TYPE_MOBILE); addPersonIntent.setType(Contacts.Phones.CONTENT_ITEM_TYPE); addPersonIntent.putExtra(Insert.PHONE, Uri.decode(+3(51)268012)); addPersonIntent.putExtra(Insert.PHONE_TYPE, Contacts.Phones.TYPE_WORK); addPersonIntent.setType(Contacts.Phones.CONTENT_ITEM_TYPE); addPersonIntent.putExtra(Insert.EMAIL, Uri.decode(em...@email.com)); ddPersonIntent.putExtra(Insert.EMAIL_TYPE, Contacts.ContactMethodsColumns.TYPE_WORK); addPersonIntent.setType(Contacts.People.CONTENT_ITEM_TYPE); addPersonIntent.putExtra(Contacts.Organizations.TITLE, Super company); addPersonIntent.putExtra(Contacts.Organizations.TYPE, Contacts.Organizations.TYPE_WORK); addPersonIntent.setType(Contacts.People.CONTENT_ITEM_TYPE); This code works but not adds several phones and company field doesn't initialize. What I do wrong? 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] TableLayout
Hello, I have some table with custom cell, for example, TableLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:stretchColumns=* TableRow TextView android:layout_column=1 android:text=open android:padding=3dip android:background=#00f android:gravity=center/ TextView android:text=open2 android:gravity=center android:padding=3dip android:background=#f00 / /TableRow TableRow TextView android:layout_column=1 android:text=open3 android:padding=3dip android:background=#00f/ TextView android:text=open4 android:gravity=left android:padding=3dip android:background=#f00/ TextView android:text=open5 android:gravity=center android:background=#0f0 / /TableRow /TableLayout and I want to make colspan second cell from first row. How can I make it? thanks/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to open or register a new file extension in Android?
Thanks. Alex, .exe is registered in android mimeTypes,so if you specify */* it would be founded with all other types.But .my_type isn't registered in Android.So it wouldn't help.I think now your application could open diferent types of files. On 23 июл, 14:42, alex gsm...@gmail.com wrote: I had to specify android:mimeType=*/*. Here's an example: -- activity android:name=.activity.Activity intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:scheme=http / data android:scheme=https / data android:scheme=ftp / data android:host=* / data android:mimeType=*/* / data android:pathPattern=.*\\.exe / /intent-filter /activity -- On Jul 20, 4:37 pm, Dmitry Manayev dmitry.mana...@gmail.com wrote: Hi! I have problem with adding a new file type to android(the file type is .comap).I need to run my application with this file from android browser and from file manager. I know that I need to write a special intent-filter for that,but I don't know how,because this format hasn't any special,registered MIME type. I tried to write in AndroidManifest.xml to open a file test.comap: intent-filter action android:value=android.intent.action.VIEW / category android:value=android.intent.category.DEFAULT / data android:scheme=file android:host=* android:path=sdcard/test.comap / /intent-filter But this doesn't work. How to do it right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. 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 open or register a new file extension in Android?
Hi! I have problem with adding a new file type to android(the file type is .comap).I need to run my application with this file from android browser and from file manager. I know that I need to write a special intent-filter for that,but I don't know how,because this format hasn't any special,registered MIME type. I tried to write in AndroidManifest.xml to open a file test.comap: intent-filter action android:value=android.intent.action.VIEW / category android:value=android.intent.category.DEFAULT / data android:scheme=file android:host=* android:path=sdcard/test.comap / /intent-filter But this doesn't work. How to do it right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. 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 open or register a new file extension in Android?
Thanks for reply. So if i registry this new MIME type,how and when it would be added to Android? //Comap is based on xml. On 20 июл, 23:50, Dianne Hackborn hack...@android.com wrote: Android doesn't know anything about file extensions, only MIME types. On Mon, Jul 20, 2009 at 6:37 AM, Dmitry Manayev dmitry.mana...@gmail.comwrote: Hi! I have problem with adding a new file type to android(the file type is .comap).I need to run my application with this file from android browser and from file manager. I know that I need to write a special intent-filter for that,but I don't know how,because this format hasn't any special,registered MIME type. I tried to write in AndroidManifest.xml to open a file test.comap: intent-filter action android:value=android.intent.action.VIEW / category android:value=android.intent.category.DEFAULT / data android:scheme=file android:host=* android:path=sdcard/test.comap / /intent-filter But this doesn't work. How to do it right? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: UnknownHostException on 1.5 emulator
Yes, I have the same problem. Sometimes it happens very soon after launch-( On May 21, 10:11 pm, Peter Jeffe pje...@gmail.com wrote: If I leave the 1.5 emulator running for a while (overnight, maybe less) it starts getting unknown host errors like this: 05-21 18:03:23.618 2663 2683 I InetAddress: Unknown hostwww.google.com, throwing UnknownHostException It doesn't matter what app is trying to access the net, it always gets an unknown host. The network is working, since it works if I use an IP address. So it's as if the DNS client is getting stuck and just stops resolving. It takes a while to get the error too, like it's timing out on its queries, not like an immediate logic problem. I haven't bothered to do a network trace to see what it's doing. I also haven't tried to see if this is also a problem with the 1.1 emulator in the 1.5 SDK, but it was certainly never a problem with the 1.0 SDK. Anyone else seeing this, and more importantly, anyone seeing it on 1.5 on a device? -- Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. 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] Focus issue after calling ArrayAdapter.notifyDataSetChanged()
Hello dear Android developers. I have a problem with focus on items of ListView after calling notifyDataSetChanged() on its adapter. Could you please help me with it? Problem description: I need to show ListView with custom items. Every of such items has 2 Views in it. One on the left side and other - on the right side. Both Views are focusable. I need to change selected View of item in ListView with navigation hard keys. Also I need to update data in adapter periodically. I decided to use method notifyDataSetChanged() of the adapter. Expected result: After calling this method View that was focused before calling stay focused. All data is updated. Actual result: After calling this method the left View of the item becomes focused. Еven if before calling the right View was focused. All data is updated. Could you please suggest me any ways to solve my problem? My code is below. Thanks in advance, Dmitry ---My code:-- TestActivity.java: package demon.test; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnFocusChangeListener; import android.widget.ListView; public class TestActivity extends Activity implements OnClickListener { CustomAdapter arrayAdapter; OnFocusChangeListener focusListener = new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) { v.setBackgroundColor(Color.RED); } else { v.setBackgroundColor(Color.BLACK); } } }; @Override public void onClick(View v) { arrayAdapter.notifyDataSetChanged(); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ListView listView = new ListView(this); arrayAdapter = new CustomAdapter(this, R.layout.item); for (int i = 0; i 3; i++) { LayoutInflater inflater = getLayoutInflater(); View result = inflater.inflate(R.layout.item, null); result.findViewById(R.id.item_text1).setOnClickListener (this); result.findViewById(R.id.item_text2).setOnClickListener (this); result.findViewById(R.id.item_text1).setOnFocusChangeListener (focusListener); result.findViewById(R.id.item_text2).setOnFocusChangeListener (focusListener); arrayAdapter.add(result); } listView.setAdapter(arrayAdapter); listView.setItemsCanFocus(true); setContentView(listView); } } CustomAdapter.java: package demon.test; import android.content.Context; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; public class CustomAdapter extends ArrayAdapterView { public CustomAdapter(Context context, int textViewResourceId) { super(context, textViewResourceId); } @Override public View getView(int position, View convertView, ViewGroup parent) { View result = getItem(position); return result; } } item.xml: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=25px android:gravity=center_vertical|center_horizontal TextView android:focusable=true android:id=@+id/item_text1 android:textSize=16sp android:singleLine=true android:ellipsize=marquee android:text=Bar text android:layout_width=wrap_content android:layout_height=wrap_content android:nextFocusRight=@+id/item_text2/ TextView android:focusable=true android:id=@+id/item_text2 android:textSize=16sp android:singleLine=true android:ellipsize=marquee android:text=Bar text 2 android:layout_width=wrap_content android:layout_height=wrap_content android:nextFocusLeft=@+id/item_text1/ /LinearLayout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use headset button to pick up/hang up a call?
It would be great if Phone application would support both muting and un-muting the call as well as hanging up current call from the headset button. One of the ways to support it would be to recognize a long press of the headset button. Currently when headset buttong is pressed during the call, phone mutes and un-mutes continuously, which is not useless. IMHO 2 section press would be fine. On Apr 14, 11:32 am, Marco Nelissen marc...@android.com wrote: The headset button already answers an incoming call, but once you're in the call, it mutes/unmutes. If you want it to hang up the call instead, you'll need to modify the Phone application.On Tue, Apr 14, 2009 at 2:44 AM, sein fang.sh...@zte.com.cn wrote: When I'm testing the functionality of the headset button in a call,it just muted the mic,didn't hang up the call.And if there is no call,when I press the button,there will be a song playing,so I think the keycode is correctly reported.there maybe some code I need to add? Anybody knows how to? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. 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 build library without optimization in order to properly debug it
hi, I'm trying to debug native library (in particular, libril.so). Everythig is going fine, breakpoint is being hit, I can go thru the lines of RIL_onRequestComplete() function. But when I tried to print out particular struct I got, (gdb) print pRI $2 = value optimized out (gdb) print pRI-pCI $3 = (android::._115 *) 0x613 (gdb) print pRI-pCI-requestNumber Cannot access memory at address 0x613 I suspect it could be due to optimization done by compiler. But when I tried to add, LOCAL_CFLAGS := -g3 -O0 into makefile of the lib, I've got another problem when I cannot correctly set breakpoint on desired function. Instead of correct one, (gdb) break RIL_onRequestComplete Breakpoint 1 at 0xae402e4e: file hardware/ril/libril/ril.cpp, line 1800. I got, (gdb) break RIL_onRequestComplete Breakpoint 1 at 0xab44: file bionic/libm/src/s_tanf.c, line 42. Does anybody know what could be a problem, and what is the right way to handle this? -- Dmitry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. 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: Soap issues
may be this will help you: http://android.amberfog.com/?p=45 On Mar 2, 1:42 am, Seer gilligan.ch...@gmail.com wrote: Guys, Is there a Soap lib for android? I know Soap is not the best for the android but the web services i wish to use are written in soap. I have tried ksoap2 but none of the versons of ksoap i have been able to find will work with android sdk 1.0 or 1.1. I have tried a version of ksoap2 hosted onhttp://www.tuxpan.com/android-soap/but it always crashed when the app used it and then when i tried to comple the source I discovered that it seems to have been built for a past version of the sdk that has different classes. If worst comes to worst i will use RISK WS to call a web service i will right that will then call the soap web service but i would prefer to directly call the soap web service instead of bouncing via another web service. The web services i am trying to call are detailed in this pdfhttps://www.pennytel.com/api.pdf Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. 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] Development environment setup fails on Mac OS
Hi all, When trying to install the Android environment on Mac OS X 10.5.6 I cannot advance past the POSIXLY_CORRECT stage. The installation freezes on this: --- Fetching gnupg --- Attempting to fetch gnupg-1.4.9.tar.bz2 from http://ftp.gnupg.org/gcrypt/gnupg/ --- Attempting to fetch gnupg-1.4.9.tar.bz2 from ftp://ftp.gnupg.org/gcrypt/gnupg/ Any ideas? Regards, Dmitry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android SW development request
Dear All, we are UK-based transnational group developing and marketing mobile phones. Our main RD centre is based in Moscow, Russia. As we have interest to develop Android-based mobile phone novelty, please advise your terms of its S/W and apps development. Looking forward to your reply, Sincerely, Dmitry Tsoy Meridian Group Moscow Product Dev. Planning DEPT PM [EMAIL PROTECTED] M: + 7.926.036 5534|T: +7.495.780 5136 X 321|F: +7.495.956 6849 Skype: tsoy88| MSN: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---