[android-developers] viewport meta tag AndroidTV width/height attribute not working
I've set up an Android TV app using a Webview object and followed the explicit directions as to getting the meta tag's width/height defined (so that they are used when rendering the app). No matter what I do to alter the attributes of the meta tag, they do nothing to change the width and height: Width:912 Height:516 Device Pixel Ratio: 2 I've tried several things like setting various Websetting methods, but no luck. Anyone out there experienced this issue and come up with a resolution? webSettings.setJavaScriptEnabled(true); webSettings.setMixedContentMode(webSettings.MIXED_CONTENT_ALWAYS_ALLOW);//Allow mixed content webSettings.setLoadWithOverviewMode(true); webSettings.setUseWideViewPort(true);//Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport webSettings.setMediaPlaybackRequiresUserGesture(false); webSettings.setDomStorageEnabled(true); webSettings.setDatabaseEnabled(true); webSettings.setJavaScriptCanOpenWindowsAutomatically(true); webSettings.setBuiltInZoomControls(true); webSettings.setSupportZoom(true); Here's the meta viewport tag -- 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/5bda26a2-3e10-4c26-aa74-1e2a859ab262%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Android 7.0 Nougat not work with BLE API i.e. BluetoothLeService
Hi, did you manage to solve this issue? having the same problem. On Monday, September 19, 2016 at 4:29:20 PM UTC+3, Kalpak Keskar wrote: > > Hello, > > > > > I am trying to use android BLE API i.e. BluetoothLeService > > on Android 7.0 Nougat. In this Android 7.0, mGattUpdateReceiver is not > > receiving the data from BLE peripheral device. > > > BluetoothLeService.*ACTION_GATT_CONNECTED* > > This response shows BLE peripheral device is connected. However, data is > not received. > > > BluetoothLeService.*ACTION_DATA_AVAILABLE > * > > This response shows data is available but is not returning anything. > > > Everything is working with previous versions of Android (6.x, 5.x). Is > there any specific > > change in the BLE service for Android 7.0? > > > Thanks, > -- *Confidentiality Note*: This email and the information transmitted in this email, including within any attachments, is confidential and/or privileged information. The information contained herein is intended only for the person/s or entity to which it is addressed. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient/s is prohibited. If you received this in error, please destroy the message and any attachment and contact us immediately at i...@consumerphysics.com. -- 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/d8cfd017-8885-436c-8aaf-a24cb3ea1e76%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] cant see the application in my phone
hi i developed application and uploaded it to google store, but when i installed the application i dont see the icon or my app in my phone. is anyone know how to solve this problem? -- 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/eae79ab6-4bab-4229-8f4d-207ed022c4e9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Android, Bluetooth HID Keyboard, 'recent apps' 'Consumer Device' code
*UPDATE:*What I need is the HID equivalent of executing to following adb commandline ( that trigges the 'Recent Apps' menu ): adb shell input keyevent 187 On Saturday, March 14, 2015 at 7:05:52 AM UTC+2, Nadav wrote: Use-case 1. Implement a BlueTooth keyboard to connect to an android device 2. BT Keyboard should be able to lunch the 'Recent apps http://img.wonderhowto.com/img/49/72/63550209324803/0/install-android-lollipop-recent-apps-menu-any-android.w654.jpg' menu Problem description To be able to support special keys, in accordance with this link https://source.android.com/devices/input/keyboard-devices.html, I have implemented a consumer device SDP implementing 'HID Consumer Page (0x0c)', I have found the 'HID Usage' values for all buttons needed, BUT the HID Usage value for opening the 'Recent apps' menu. All is perfecty working BUT, opening the 'Recent apps' menu, br / *what 'HID Usage value' should I use to open the 'Recent apps' menu?* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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] Android, Bluetooth HID Keyboard, 'recent apps' 'Consumer Device' code
Use-case 1. Implement a BlueTooth keyboard to connect to an android device 2. BT Keyboard should be able to lunch the 'Recent apps http://img.wonderhowto.com/img/49/72/63550209324803/0/install-android-lollipop-recent-apps-menu-any-android.w654.jpg' menu Problem description To be able to support special keys, in accordance with this link https://source.android.com/devices/input/keyboard-devices.html, I have implemented a consumer device SDP implementing 'HID Consumer Page (0x0c)', I have found the 'HID Usage' values for all buttons needed, BUT the HID Usage value for opening the 'Recent apps' menu. All is perfecty working BUT, opening the 'Recent apps' menu, br / *what 'HID Usage value' should I use to open the 'Recent apps' menu?* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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] StringBuilder.append( double ) throws ArrayIndexOutOfBoundsException
Hi, I got an exception report from a client. In this report StringBuilder.append( double ) throws an ArrayIndexOutOfBoundsException. There is no thread issue involved, because that code simply looks as follows: StringBuilder sb = new StringBuilder( ); sb.append( degrees ); // This is the line that throws an exception (degrees is of type double) The stack trace of the exception is: at java.lang.RealToString.longDigitGenerator(RealToString.java:274) at java.lang.RealToString.convertDouble(RealToString.java:111) at java.lang.RealToString.appendDouble(RealToString.java:63) at java.lang.StringBuilder.append(StringBuilder.java:185) at my code The code runs on an Android telephone LG-C660h. Android version: 2.3.4 Android API: 10 Any ideas? Could this be a bug in the VM? 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] Android emulator is crashing upon startup
SDK source.properties: #Tue Nov 15 21:14:51 IST 2011.ApiLevel=14 I have a SmartCom usb WebCam, when it is plugged in the emulator crash, when I plug it out all works good, this is verified having camera_device_start_capturing as the last line printed when lunched the following command line: emulator.exe -avd avd -debug all -show-kernel results the following: D:\Android\android-sdk\toolsemulator: found SDK root at D:\Android \android-sdk emulator: Android virtual device file at: C:\Users\nadav\.android/avd/ avd.ini emulator: C:\Users\nadav\.android/avd/avd.ini: parsing as .ini file emulator:1: KEY='target' VALUE='android-10' emulator:2: KEY='path' VALUE='C:\Users\nadav\.android\avd\AVD.avd' emulator: C:\Users\nadav\.android/avd/avd.ini: parsing finished emulator: virtual device content at C:\Users\nadav\.android\avd \AVD.avd emulator: virtual device config file: C:\Users\nadav\.android\avd \AVD.avd/config.ini emulator: C:\Users\nadav\.android\avd\AVD.avd/config.ini: parsing as .ini file emulator:1: KEY='hw.lcd.density' VALUE='240' emulator:2: KEY='sdcard.size' VALUE='50M' emulator:3: KEY='skin.name' VALUE='WVGA854' emulator:4: KEY='skin.path' VALUE='platforms\android-10\skins \WVGA854' emulator:5: KEY='hw.cpu.arch' VALUE='arm' emulator:6: KEY='abi.type' VALUE='armeabi' emulator:7: KEY='vm.heapSize' VALUE='24' emulator:8: KEY='hw.ramSize' VALUE='256' emulator:9: KEY='image.sysdir.1' VALUE='platforms\android-10\images \' emulator: C:\Users\nadav\.android\avd\AVD.avd/config.ini: parsing finished emulator: using core hw config path: C:\Users\nadav\.android\avd \AVD.avd/hardware-qemu.ini emulator: Found target field in root AVD .ini file: 'android-10' emulator: Found AVD target API level: 10 emulator: found image search path: platforms\android-10\images\ emulator: found a total of 1 search paths for this AVD emulator: found skin 'WVGA854' in directory: D:\Android\android-sdk/ platforms\android-10\skins emulator: autoconfig: -skin WVGA854 emulator: autoconfig: -skindir D:\Android\android-sdk/platforms \android-10\skins emulator: adding binding BUTTON_CALL to F3 emulator: adding binding BUTTON_HANGUP to F4 emulator: adding binding BUTTON_HOME to HOME emulator: adding binding BUTTON_BACK to ESCAPE emulator: adding binding BUTTON_MENU to F2 emulator: adding binding BUTTON_MENU to PAGEUP emulator: adding binding BUTTON_STAR to Shift-F2 emulator: adding binding BUTTON_STAR to PAGEDOWN emulator: adding binding BUTTON_POWER to F7 emulator: adding binding BUTTON_SEARCH to F5 emulator: adding binding BUTTON_CAMERA to Ctrl-KEYPAD_5 emulator: adding binding BUTTON_CAMERA to Ctrl-F3 emulator: adding binding BUTTON_VOLUME_UP to KEYPAD_PLUS emulator: adding binding BUTTON_VOLUME_UP to Ctrl-F5 emulator: adding binding BUTTON_VOLUME_DOWN to KEYPAD_MINUS emulator: adding binding BUTTON_VOLUME_DOWN to Ctrl-F6 emulator: adding binding TOGGLE_NETWORK to F8 emulator: adding binding TOGGLE_TRACING to F9 emulator: adding binding TOGGLE_FULLSCREEN to Alt-ENTER emulator: adding binding BUTTON_DPAD_CENTER to KEYPAD_5 emulator: adding binding BUTTON_DPAD_UP to KEYPAD_8 emulator: adding binding BUTTON_DPAD_LEFT to KEYPAD_4 emulator: adding binding BUTTON_DPAD_RIGHT to KEYPAD_6 emulator: adding binding BUTTON_DPAD_DOWN to KEYPAD_2 emulator: adding binding TOGGLE_TRACKBALL to F6 emulator: adding binding SHOW_TRACKBALL to DELETE emulator: adding binding CHANGE_LAYOUT_PREV to KEYPAD_7 emulator: adding binding CHANGE_LAYOUT_PREV to Ctrl-F11 emulator: adding binding CHANGE_LAYOUT_NEXT to KEYPAD_9 emulator: adding binding CHANGE_LAYOUT_NEXT to Ctrl-F12 emulator: adding binding ONION_ALPHA_UP to KEYPAD_MULTIPLY emulator: adding binding ONION_ALPHA_DOWN to KEYPAD_DIVIDE emulator: keyset loaded from: C:\Users\nadav\.android\default.keyset emulator: trying to load skin file 'D:\Android\android-sdk/platforms \android-10\skins/WVGA854/layout' emulator: adjusting LCD dimensions to (480x856x) emulator: skin network speed: 'full' emulator: skin network delay: 'none' emulator: found kernel-qemu in search dir: D:\Android\android-sdk/ platforms\android-10\images\ emulator: autoconfig: -kernel D:\Android\android-sdk/platforms \android-10\images\/kernel-qemu emulator: found ramdisk.img in search dir: D:\Android\android-sdk/ platforms\android-10\images\ emulator: autoconfig: -ramdisk D:\Android\android-sdk/platforms \android-10\images\/ramdisk.img emulator: found system.img in search dir: D:\Android\android-sdk/ platforms\android-10\images\ emulator: Using initial system image: D:\Android\android-sdk/platforms \android-10\images\/system.img emulator: autoconfig: -data C:\Users\nadav\.android\avd\AVD.avd/ userdata-qemu.img emulator: autoconfig: -initdata C:\Users\nadav\.android\avd\AVD.avd/ userdata.img emulator: autoconfig: -cache C:\Users\nadav\.android\avd\AVD.avd/ cache.img emulator: autoconfig: -sdcard C:\Users\nadav\.android\avd\AVD.avd/ sdcard.img emulator: Physical RAM size: 256MB emulator
[android-developers] Android, MediaRecorder, Native API
Playing with the MediaRecorder Java code I have found the MediaRecorder class to be quite limited, there is no way to control the media before it is encoded/compressed, and, there is no way to control the result, file, socket, transport:MPEG2-TS, MP4 'moof' position, ... With windows enviroment DirectShow/MediaFoundation provide fine access and control of the media pipeline. I wonder, is there any LowLevel NDK API for the MediaRecorder that enable some of the above mentioned functionality? I would really like to avoid implementing a native C++ MediaRecorder my-self... Any Help will B appreciated. ~Nadav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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] libx264 @ Android OS
I am working with Android OS, my aim is doing propriotary imgproc and send the result as H264 video stream out of the device, for this, I will need to use a compression tool, I have considered the open source libx264 ( which got compiled on the Android env quite easily ). Having that said, does libx264 will know to identify the underling CPU/ instruction set, OR, would I need to maintain a specialized binary for each CPU type ( eg. Nvidia/ARM ) ? The last thing I want is to maintain a specific version of code/binary for each CPU type... Any help would be appreciated. ~Nadav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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] Spinner items missing selection radio button
Hey, i asked it at SO few days ago, no answer yet, hoped someone here will have an idea... (http://stackoverflow.com/questions/6146442/spinner-items-selection- radio-missing) When my items contains English and/or numeric signs, it shows the radio selection near the item, but when it doesn't contains any English and/or numeric signs (contains only Hebrew in my example) it does not show the radio selection near the item. For the adapters (array adapter) creation i used the layout android.R.layout.simple_spinner_item And before setting the Spinner adapter I did adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); The solution I found for now, is set the layout to simple_dropdown_item_1line; this solves the problem by not showing the radio button. Any ideas on how to get the radio button visible always? - correction - it does not solve the problem, in _few_ of my spinner the text is now whit (on a white background..) Thanks, Nadav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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: Bluetooth
On Mar 27, 11:05 am, ehpaul hansp...@gmail.com wrote: Yes. You can use Bluecove API. On Mar 26, 7:57 pm, Kristopher Micinski krismicin...@gmail.com wrote: Nice find then, I hadn't known about that, but is it possible from Java? Kris On Sat, Mar 26, 2011 at 10:24 PM, ehpaul hansp...@gmail.com wrote: It looks a better way is to make a l2cap connection and look at the exception. On Mar 26, 2:47 am, ehpaul hansp...@gmail.com wrote: So basically I will have a background thread that periodically tried to connec and immediate disconnect? On Mar 25, 4:35 pm, Kristopher Micinski krismicin...@gmail.com wrote: On Fri, Mar 25, 2011 at 4:53 AM, ehpaul hansp...@gmail.com wrote: Hello, I am writing an android program that I need to know when a bluetooth device (I know the Mac) is in range. The program also needs to be aware when the device is not in range. Is there any way to do this without establishing a connection? Not that I've seen from the Bluetooth API exposed to the user. I don't understand the underlying protocol horribly well, but you need to actually scan for the uuid using SDP, which requires a call to the API. When the device is in range, I am able to call BluetoothAdapter.getRemoteDevice and retrieve the friendly name. But when I am not in range, it seems this information is cached. I was thinking if I can use the friendly name as an indicator whether the device is within range (i.e If friendly name is not null, then it's in range). I am certain there is better way to do this. But it seems the only way is to establishing a connection. I don't think there is a better way, at least with the current API. Unless by better way you mean a more elaborate synchronization mechanism or something like that. But yes, I think at least from the API exposed by the android system, you have to do polling. (I wanted to do what you described too, I think it's a common thing, but perhaps not the anticipated use of BT and / or the android API.) Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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] Mounting and UnMounting SDCard
Hey, After some searches (actually a lot :)) the only related solution i found is to take the MountListener, MountService and their friends (some other related class) and to add them to the project. but when the code reaches to listenToSocket() function, it crashes on socket.connect(address); (line 203) the reason is permission denied. the apk contains the internet permission (which is the only somehow related permission since we create a LocalSocket). I also added a FactoryTest (app will run as root by manual) permission. non of them helped. from digging some more up, i saw that it connects to the VOLD (volume demon) and send commands to him. i checked to see if VDC is exists (thought it might by 2.3 breaking change or something like that...) but its there. the only thing i can think of is that i messed something up in the Mount* files and I should call those functions via reflection but i don't see how it will help me since it's crashing on permission denied. any ideas? if anyone ever done it (or know what to do) It will help me a lot to hear how and what I can do. Thanks, Nadav -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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: Force an Application to be alive
However you might be able to set up a broadcast receiver for different system events that would at least restart your service in case its down. For example listening to the boot, phone being plugged into power, etc.. Nadav On Jul 13, 7:44 am, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 13, 2010 at 3:49 AM, perumal316 perumal...@gmail.com wrote: I am writing an application to do fileobservation which can be done. Is there any way I can make the application to run in the background without killing it? No, sorry. Anything can be killed by the user or the operating system. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to 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] Configuring automated build scripts
I have an app that needs to be built in 3 versions, where the only differences between the versions are a few strings that need to be compiled with the app. One of those strings is the IP address of a server where the app needs to send data to, so for security reasons I want this to be compiled with the app rather than be a config file that's loaded in runtime. I want to set up a build script that would do the following: 1) Build my the 3 versions of the apk, based on some param file for each version, which would state the string values that should be compiled into it. I am imagining that this would be implemented by having the Android source code import a specific strings file, and the build script would replace that file for each version before compiling it. 2) Also generate some server-side .php files that depend on information from the build (e.g. the php file should have the latest version number of the Android app). 3) In the end will create 3 output directories one for each build, which have the respective .apk file and relevant .php files 4) Another note is that currently the app supports android 1.5 up to 2.1, and I read that sometimes build commands in Ant might be different between 1.5 and newer versions. 5) It would also be great if this mechanism could be generalizable to more than 3 apk versions in the future I don't know much about build scripting. I've looked around and saw that the Android full OS uses make/android.mk files, saw some other project that used maven to build android code (e.g. the i-jetty project), and also saw some discussion about doing something similar using Ant and the build.properties file. From what I've read, doing this from within Eclipse is not really possible (or at least not documented..) What would be the recommended (and easiest) approach to set up something like 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] Configuring automated build scripts
I have an app that needs to be built in 3 versions, where the only differences between the versions are a few strings that need to be compiled with the app. One of those strings is the IP address of a server where the app needs to send data to, so for security reasons I want this to be compiled with the app rather than be a config file that's loaded in runtime. I want to set up a build script that would do the following: 1) Build my the 3 versions of the apk, based on some param file for each version, which would state the string values that should be compiled into it. I am imagining that this would be implemented by having the Android source code import a specific strings file, and the build script would replace that file for each version before compiling it. 2) Also generate some server-side .php files that depend on information from the build (e.g. the php file should have the latest version number of the Android app). 3) In the end will create 3 output directories one for each build, which have the respective .apk file and relevant .php files 4) Another note is that currently the app supports android 1.5 up to 2.1, and I read that sometimes build commands in Ant might be different between 1.5 and newer versions. 5) It would also be great if this mechanism could be generalizable to more than 3 apk versions in the future I don't know much about build scripting. I've looked around and saw that the Android full OS uses make/android.mk files, saw some other project that used maven to build android code (e.g. the i-jetty project), and also saw some discussion about doing something similar using Ant and the build.properties file. From what I've read, doing this from within Eclipse is not really possible (or at least not documented..) What would be the recommended (and easiest) approach to set up something like 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] Re: Configuring automated build scripts
Sorry, I must have hit refresh on the page so it resubmitted :( On Jul 11, 12:41 pm, Nadav nad...@gmail.com wrote: I have an app that needs to be built in 3 versions, where the only differences between the versions are a few strings that need to be compiled with the app. One of those strings is the IP address of a server where the app needs to send data to, so for security reasons I want this to be compiled with the app rather than be a config file that's loaded in runtime. I want to set up a build script that would do the following: 1) Build my the 3 versions of the apk, based on some param file for each version, which would state the string values that should be compiled into it. I am imagining that this would be implemented by having the Android source code import a specific strings file, and the build script would replace that file for each version before compiling it. 2) Also generate some server-side .php files that depend on information from the build (e.g. the php file should have the latest version number of the Android app). 3) In the end will create 3 output directories one for each build, which have the respective .apk file and relevant .php files 4) Another note is that currently the app supports android 1.5 up to 2.1, and I read that sometimes build commands in Ant might be different between 1.5 and newer versions. 5) It would also be great if this mechanism could be generalizable to more than 3 apk versions in the future I don't know much about build scripting. I've looked around and saw that the Android full OS uses make/android.mk files, saw some other project that used maven to build android code (e.g. the i-jetty project), and also saw some discussion about doing something similar using Ant and the build.properties file. From what I've read, doing this from within Eclipse is not really possible (or at least not documented..) What would be the recommended (and easiest) approach to set up something like 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] How to get a phone number in normalized form
I am looking for a way to get the normalized form of phone numbers (which is probably the format Android uses when comparing two numbers). There are a few mentions of the normalization process in the dev site and elsewhere, but I could not find a single example where its accessible. I looked at the PhoneNumbeUtils which seems to have some number formatting functions, but I saw on this forum that it was recommended not to use it and that it would be deprecated soon. Please let me know if you know how to access the normalized form. 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: intensive writing to internal memory
Indeed we are not able to push continuously to a server - both because of network availability and also the power consumption is probably much higher than saving it and sending in bulk. I think we will indeed aim for the 3 level approach and try to put as little as possilbe on the main memory just to be safe.. Thanks to everyone who answered! Nadav On Apr 4, 4:37 pm, Bob Kerns r...@acm.org wrote: If Jason's suggestion of pushing it to a server is inadequate, you can buffer events, and only write them out once a minute or 10 minutes or something. This will put an upper bound on the number of writes performed. You can combine the approaches, and push to the server, and only write to the filesystem if you don't succeed in pushing to the server within a decent interval. Then when communications is reestablished, push the saved data up first. You could also send it to the SD -- and when the SD is not available, buffer it on the local filesystem until it becomes available again. Essentially, we're looking at a 3-level buffering hierarchy -- RAM, local flash, and either SD or server. The more the buffering in RAM, the more data you risk losing in the event of a crash, but the fewer writes and less battery required. On Apr 4, 12:53 pm, Nadav nad...@gmail.com wrote: Thanks Bob and Dianne, The issue is that I have no choice but do a lot of writing since this is a research app that constantly logs phone and user activity over many months... We are dealing ok with battery and processing power (we only write every several minutes), and the main concern remains the Flash lifetime. We are working with cyclic log files (that roll over every several hours), and have already found a way to move our older files to the SD card. However our current dilemma is whether to do all writing on the SD-card, or keep the current open file on the main memory, and copy it to SD when moving to the next log file. The problem of doing everything on the SD card is that when a user mounts the card to a PC, we can't access it for logging and other tasks, and that leads to various crashes and issues, so I thought it might be simpler if we work with the current file on the main memory, but I fear the Flash degradation... I'm willing to buy new SD cards every few months, but I really don't want to mess up the phone itself! On Apr 4, 2:27 am, Dianne Hackborn hack...@android.com wrote: If you are talking about internal storage (not RAM memory), then yes this is generally flash memory, and you want to be careful about how much you write to it for numerous reasons: also extremely important are the battery impact (writing to flash is expensive) and performance (causing other things that are accessing flash storage to be blocked by what you are doing). That said, properly designed flash storage won't let you write to the same block over and over. Writes are spread across the flash storage just to avoid that kind of issue. On Sat, Apr 3, 2010 at 9:49 AM, Nadav nad...@gmail.com wrote: Hi All, I'm wondering how worried should I be about writing an app that does a lot of writing (logs + db files) to the phone's main memory. In the past I was involved in a project that had to do a lot of writing to SD card, and the SD cards started malfunctioning after 2-3 months due to this, and had to be replaced every now and then. The developer realized he was reaching the flash memory's read/write guarantees (don't remember the exact specs). If the phone's main memory is also flash based, should this be a concern? I wouldn't want to damage the phone's memory in a permanent way I'm also not sure if the issue is related to reading writing to the same physical block (the guy was using a single log file and kept appending it, so he was constantly accessing the file's header block), and whether writing cyclic log files might remedy a problem like this.. Would appreciate any thoughts on this issue. 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.comandroid-developers%2Bunsubs cr...@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. -- 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
[android-developers] Re: intensive writing to internal memory
Thanks Bob and Dianne, The issue is that I have no choice but do a lot of writing since this is a research app that constantly logs phone and user activity over many months... We are dealing ok with battery and processing power (we only write every several minutes), and the main concern remains the Flash lifetime. We are working with cyclic log files (that roll over every several hours), and have already found a way to move our older files to the SD card. However our current dilemma is whether to do all writing on the SD-card, or keep the current open file on the main memory, and copy it to SD when moving to the next log file. The problem of doing everything on the SD card is that when a user mounts the card to a PC, we can't access it for logging and other tasks, and that leads to various crashes and issues, so I thought it might be simpler if we work with the current file on the main memory, but I fear the Flash degradation... I'm willing to buy new SD cards every few months, but I really don't want to mess up the phone itself! On Apr 4, 2:27 am, Dianne Hackborn hack...@android.com wrote: If you are talking about internal storage (not RAM memory), then yes this is generally flash memory, and you want to be careful about how much you write to it for numerous reasons: also extremely important are the battery impact (writing to flash is expensive) and performance (causing other things that are accessing flash storage to be blocked by what you are doing). That said, properly designed flash storage won't let you write to the same block over and over. Writes are spread across the flash storage just to avoid that kind of issue. On Sat, Apr 3, 2010 at 9:49 AM, Nadav nad...@gmail.com wrote: Hi All, I'm wondering how worried should I be about writing an app that does a lot of writing (logs + db files) to the phone's main memory. In the past I was involved in a project that had to do a lot of writing to SD card, and the SD cards started malfunctioning after 2-3 months due to this, and had to be replaced every now and then. The developer realized he was reaching the flash memory's read/write guarantees (don't remember the exact specs). If the phone's main memory is also flash based, should this be a concern? I wouldn't want to damage the phone's memory in a permanent way I'm also not sure if the issue is related to reading writing to the same physical block (the guy was using a single log file and kept appending it, so he was constantly accessing the file's header block), and whether writing cyclic log files might remedy a problem like this.. Would appreciate any thoughts on this issue. 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.comandroid-developers%2bunsubscr...@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. -- 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] intensive writing to internal memory
Hi All, I'm wondering how worried should I be about writing an app that does a lot of writing (logs + db files) to the phone's main memory. In the past I was involved in a project that had to do a lot of writing to SD card, and the SD cards started malfunctioning after 2-3 months due to this, and had to be replaced every now and then. The developer realized he was reaching the flash memory's read/write guarantees (don't remember the exact specs). If the phone's main memory is also flash based, should this be a concern? I wouldn't want to damage the phone's memory in a permanent way I'm also not sure if the issue is related to reading writing to the same physical block (the guy was using a single log file and kept appending it, so he was constantly accessing the file's header block), and whether writing cyclic log files might remedy a problem like this.. Would appreciate any thoughts on this issue. 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: Bluetooth API in 2.x problem.
I've also been quite frustrated by this issue since I'm also doing activities that depend on a device being always discoverable. There is an open issue on the Android project page about this - if you (and others) would like to see this implemented please star it! http://code.google.com/p/android/issues/detail?id=6348q=bluetooth%20discoverycolspec=ID%20Type%20Status%20Owner%20Summary%20Stars Moneytoo - what you say is interesting - do you mean that if my app has a specific service registered then it will respond to any peer requesting it even when it is not discoverable? However, even if it does work, from my prior experience working with BT, polling for specific services is much slower than doing regular BT discovery (and possibly more power consuming?) Nadav On Mar 16, 4:26 pm, moneytoo m...@seznam.cz wrote: You can't. Try creating and connecting to specific service instead of using discoverable mode. On Mar 15, 5:09 am, Rafal Z rzaj...@gmail.com wrote: I have written a small app that puts my bluetooth in discoverable mode for a long time (G1 - API 1.6). I use that along with small program on windows to lock/unlock the computer if the phone is close by. Recently i try to port this app to my nexus one but it seems like i have to pop up the message every 300s to enable device to go to discoverable mode. does anyone know how i can suppress 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] Keeping notification at the status bar after the service that spawned stops
Hi, I have a main application, that at some point spawns a service that checks for updates, if it finds any, it posts a notification with the link to the update, and then the update service stops. Through the debugger I've noticed that the notification pops up but then disappears once my service is stopped, which I guess makes sense since the Notification object was instantiated within that service. What would be the best practice of keeping that notice available until the user clicks it? I can see two paths: 1) somehow attaching the notification to my top service - which might get really ugly -- since that update service is spawned by another sub-service that is spawned by a broadcast receiver... so even if i wanted to somehow pass the object of my top level service it would mess the entire abstraction of my app structure and would force me to keep pointers to it through every event and service that I use... Perhaps there is some other way to get that service through the app's context? or any other alternative? 2) Finding a way to keep my update-service alive until the user presses the notification, but I'm not sure if there is any intent broadcasted that I could listen to... Any suggestions would be 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