[android-developers] Good Book for Developing Android Testing App
Hello, I think I have a handle on developing and android application, but creating the unit test application seems to be still be a problem for me. Are their any good books or resources out their (besides the android sdk website) that specifically discusses developing the unit test side of the application? 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: Writing a scripts for Android system
On 28 Mrz., 11:41, libioz luboc...@gmail.com wrote: Hello! This is my first day using android. I have to write scripts for testing the following things: · Verifying some folders on the system · Verifying file versions on the system · Verifying any drivers presents on the system Hello ! I think you are in the wrong group with this question as you seem to work for a manufacturer. Nevertheless : The frist three/four things can be done simply via adb shell calls from a connected pc or out of the box scripts. But I think the busybox will be helpful for you ( http://www.appbrain.com/app/busybox/stericson.busybox ) · Performing sleep/ shut down/ wake up automatically Maybe you can force a shudown, but I have no idea how to perform a wake up. Maybe via a switchable usb hub, but you need some soft controlled power button ? Depends from your hardware. Good luck ! Frank · And more Which script language is the best to use? Which options I have? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Reference styles across apps
I too having same problem. Thanks in advance. Best Regards http://www.android-codes-examples.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Acid2 test is failing
On 29 March 2011 07:59, yogi yogi.ru...@gmail.com wrote: Hi, I got a issue on Gingerbread, The problem is the acid2.acidtest.org is failing. I have only basic idea of JS., I didnt understand why it is failing although it is working fine for froyo. can anyone help in find the root cause for the problem. This is not the right group to discuss WebKit issues of that sort. -- 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: IPC Mechanism in android
I would suggest that you simply split you java part .. into Part a) native part + JNI -Java-Part running with system permissions and Part b) normal Java-App Between b und a use intents. IMHO this is the easiest way. The others used by the platform are sockets and aidl ( and system variables ). To use aidl for a native app will not be easiert, as how far as I know their is no aidl compiler for native apps. Good luck ! Frank On 27 Mrz., 02:43, arvind arv2...@gmail.com wrote: Hi All, I have an NDK application(written in C++) packaged as an executable and deployed in android. I also have a Java apk file in the application layer. Now my NDK app does some processing and outputs a string of data in the format name = value. Basically the output from NDK looks like this: name1 = value1 name2 = value2... Now i want each of these name value pairs to be passed to java application one by one. Currently i am writing the output from NDK to a file in sdcard and the java app reads from the file. But i want to use an IPC mechanism which is devoid of explicit file writing and reading and instead use something like sending and listening to a socket. I am not sure what is the best way of passing message between native code and java. Also i am not using JNI interface as i have some issue with root permissions as the C++ Native code runs as root userid and Java apk runs in application level and i can't combine both of them. Please give me suggestions on how to perform IPC between native code and java apk. I am using android developer phone 1 as the device. Thanks, aravind -- 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] Acid2 test is failing
Can u suggest me the group which have discussion webkit-android port Regards Yogi On Tue, Mar 29, 2011 at 12:46 PM, Marcin Orlowski webnet.andr...@gmail.comwrote: On 29 March 2011 07:59, yogi yogi.ru...@gmail.com wrote: Hi, I got a issue on Gingerbread, The problem is the acid2.acidtest.org is failing. I have only basic idea of JS., I didnt understand why it is failing although it is working fine for froyo. can anyone help in find the root cause for the problem. This is not the right group to discuss WebKit issues of that sort. -- 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 -- Yogendra Singh B-Tech,Computer Science and Engg., MNNIT,Allahabad -- 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] WifiLock and WakeLock regarding large downloads
Hold on a second here: device policy of shutting down wifi and switching to 3g after 15 minutes of screen off - that means if I'm at home sleeping (with WiFI enabled), the device will not use WiFi but 3G over night? Can you confirm this? Where is this specified? On Tue, Mar 29, 2011 at 10:41 AM, Irfan Sheriff isher...@gmail.com wrote: WifiLock keeps the device on Wifi and prevents the device policy of shutting down wifi and switching to 3g after 15 minutes of screen off. Holding a wifilock should normally be sufficient to complete a download since even in the power optimized state (screen off), the device should still wake up on packet reception and they should get handled by the device - though the packet loss in screen off state tends to be higher and the download will be slower. If you want to ensure the cpu is awake the whole time, you can hold a wakelock as well. Thanks On Mon, Mar 28, 2011 at 10:31 AM, Mark Carter mjc1...@googlemail.comwrote: From what I gather, WifiLock and WakeLock work completely independently and if you are downloading a large file over Wifi then you will need to acquire both locks?? Ideally, you would want something like this: 1. Acquire partial WakeLock 2. Preparing to download large file, check whether on Wifi or not. 3. If on Wifi, then acquire WifiLock. If not, then prevent device switching to Wifi (is this possible?) 4. Start download 5. When download has finished, release all locks. Is this correct? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] IPC Mechanism in android
You can just read the native program's standard output. Take a look at Java Process class. 29.03.2011 6:20 пользователь arvind arv2...@gmail.com написал: Hi All, I have an NDK application(written in C++) packaged as an executable and deployed in android. I also have a Java apk file in the application layer. Now my NDK app does some processing and outputs a string of data in the format name = value. Basically the output from NDK looks like this: name1 = value1 name2 = value2... Now i want each of these name value pairs to be passed to java application one by one. Currently i am writing the output from NDK to a file in sdcard and the java app reads from the file. But i want to use an IPC mechanism which is devoid of explicit file writing and reading and instead use something like sending and listening to a socket. I am not sure what is the best way of passing message between native code and java. Also i am not using JNI interface as i have some issue with root permissions as the C++ Native code runs as root userid and Java apk runs in application level and i can't combine both of them. Please give me suggestions on how to perform IPC between native code and java apk. I am using android developer phone 1 as the device. Thanks, aravind -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Where to start with simple video games?
If all you want is canvas drawing, just use a surfaceview. If you want OpenGL, use a GLSurfaceView. Those are all you need. On Mar 28, 5:53 pm, Toby t...@tobiah.org wrote: I'm finishing up my first app for my company, so I am getting more comfortable with android. I'd like to do a personal project now, something like a spacewar game. I figured that there would be a canvas widget somewhere, and that given canvas.plot(x, y) I'd be on my way. It seems that there is a large selection of surfaces to draw on. I find it confusing. Is there a decent guide to two dimensional game writing on android? Thanks, Tobiah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Final Class and Android Compatibility [CTS]
Hi all, I wonder if remove the keyword static of the class android.bluetooth.BluetoothManager will cause that my code will not passed the CTS program. In the CDD, it's written that we must not change the signature of public API. Do my code will pass the CTS if i remove the keyword static? Thanks, Adrien -- 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] Final Class and Android Compatibility [CTS]
This would be an API change and it's therefore not accepted. On Tue, Mar 29, 2011 at 1:12 AM, Adrien Grassein adrien.grass...@gmail.comwrote: Hi all, I wonder if remove the keyword static of the class android.bluetooth.BluetoothManager will cause that my code will not passed the CTS program. In the CDD, it's written that we must not change the signature of public API. Do my code will pass the CTS if i remove the keyword static? Thanks, Adrien -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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 WhiteBoxTesting
Hi all, Please given me some suggestions on how to start whitebox testing on Android Contacts. -- 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] Final Class and Android Compatibility [CTS]
So, the only solution to adapt Bluetooth for a specific product is to reimplement BluetoothService? 2011/3/29 Romain Guy romain...@android.com This would be an API change and it's therefore not accepted. On Tue, Mar 29, 2011 at 1:12 AM, Adrien Grassein adrien.grass...@gmail.com wrote: Hi all, I wonder if remove the keyword static of the class android.bluetooth.BluetoothManager will cause that my code will not passed the CTS program. In the CDD, it's written that we must not change the signature of public API. Do my code will pass the CTS if i remove the keyword static? Thanks, Adrien -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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: URLClassLoader to load an Android application components dynamically
I'm trying to implement the same solutions, help needed... -- 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] Physics in Box2D
Do you know AndEngine or libgdx? AndEngine is a full game engine for Android, libgdx are library with also a JNI wrapper for the box2d (I think that they're also used by AndEngine). Why do all the job when someone already done and make your life a lot easier? 2011/3/28 Lord_Peter piotrek@gmail.com Hi, I making game for Android. I wish to my game had elements of physics. I installed box2d on my project. My question: how to make an object that could fall, jump, etc? Do you have any examples how to add physics with box2d? Thanks for the reply. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jordan - http://www.lulz-industries.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Acid2 test is failing
On 29 March 2011 09:26, YoGenDr@ $iNgH yogi.ru...@gmail.com wrote: Can u suggest me the group which have discussion webkit-android port Frankly speaking I am not sure :/ But have you tried i.e. browsing bugs? http://code.google.com/p/android/issues/detail?id=15427q=acid2colspec=ID%20Type%20Status%20Owner%20Summary%20Stars Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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] Android Newby here
On 28 March 2011 16:59, Arvind arvind...@gmail.com wrote: Was wondering if anyone knows which version of Android provides support for Mobile Device Management (MDM) ? http://tinyurl.com/6bf3hqe * *PS: it's newbie not newby * *Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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] In App Billing enhancement request
On 25 March 2011 02:41, Marcus Watkins mar...@versatilemonkey.com wrote: Would it be possible to allow the in-app billing to check the purchase status of an app? I want to switch a paid app to a freemium model, but it's not possible to switch and allow existing paid users to keep access to the app. My thought as well. Maybe you shall fill a bug/feature request? Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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] onConfigurationChanged call back is not getting called?
Hi, I have defined my activity with keyboardhidden|orientation| locale config changes and screenOrientation is sensor. When i change orientation UI is getting changed but my onConfigurationChanged is not getting called. I have some widgets like buttons in my activity, even i change orientation old button reference are working but onConfigurationChanged is not getting called. I have to do some native changes when orientation is changed and my device does not have hard key board. How to get onConfigurationChanged() call back? 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] Sample SoftKeyboard
Hi All, I am using the sample soft keyboard source code available from the SDK samples to write my own keyboard. For my keyboard, instead of alphabets I am having words. E.g Insert. When user clicks this the word Insert will be inserted into the respective field. Under qwerty.xml, I can change the wordings of the keyboard, but how to insert a word instead of a letter? Currently they are specifying unicode to insert this. Any idea how to modify to insert word instead of a alphabet? Thanks In Advance, Perumal -- 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] Virtual Keypad in Hindi
Hi All I am working on a android app for which i need to have a Virtual in Hindi, Could anyone please let me know how we can have a Virtual keypad in Hindi.Is there any Component for this?. The Android phone Virtual keypad did support lots of other language but not Hindi. How can we make it to Hindi. -- Thanks and Regards Ajmer Singh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] onKeyDown
I think you can get this example code and refer with your code http://android-codes-examples.blogspot.com/2011/03/example-code-for-onkeydown-listener-in.html Best Regards http://android-codes-examples.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Virtual Keypad in Hindi
The Android phone Virtual keypad did support lots of other language but not Hindi. How can we make it to Hindi. Check SoftKeyboard sample in SDK Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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 a local install get updates from the market?
Hi I want my application to be downloadable from both the android market as from our website. I know that this is possible if you turn on 'Allow 3rd party applications on your phone'. What I want to know is: if a user installs the app from our website, will he be able to receive updates from the market if we publish an update there? (Assuming both are signed with the same key) -- 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] WXGA behaving like a normal size screen in emulator
What defines whether an AVD running in the emulator is a small/normal/ large/xlarge screen? hw.lcd.density can be used to set the density, but where is the screen size defined? I'm asking because using the WXGA skin for API 11 (hw.lcd.density=160, ie the default) it is applying resources from the values-normal-port folder. Ie as if the screen in the AVD was normal size. The app has uses-sdk android:minSdkVersion=3 android:targetSdkVersion=11/ supports-screens android:smallScreens=false android:normalScreens=true android:largeScreens=true android:xlargeScreens=true android:anyDensity=true The normal screen AVDs get the resources from values-normal-port. The large screen gets the default resources. But the xlarge (WXGA) screen gets resources from values-normal-port. Why? Is WXGA actually a normal screen? Shouldn't it be xlarge? Where is that defined and how can I change it? William -- 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] Can a local install get updates from the market?
as from our website. I know that this is possible if you turn on 'Allow 3rd party applications on your phone'. What I want to know is: if a user installs the app from our website, will he be able to receive updates from the market if we publish an update there? (Assuming both are signed with the same key) If package name is the same too, then yes. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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] getSharedPreferences for a wallpaper
The standard Cube2 Live Wallpaper demo seems to handle Preferences strangely to me, in that it wires up an event handler which modifies a global variable. I don't want to to do that (or, more to the point, when I tried it didn't work for me). I don't see that I need to wire up any event handlers; can't I just read the preferences directly where I need them? It seems to me from the documentation/samples is that the *only* thing I have to do is add the lines: String PREF_FILE_NAME = cube2_settings; SharedPreferences preferences = getSharedPreferences(PREF_FILE_NAME, MODE_PRIVATE); String teststring = preferences.getString(cube2_shape, cube); anywhere in the animation loop, and teststring should be either a cube or a dodecahedron depending on the preference. It is always a cube. cube2_settings.xml is the standard one: ?xml version=1.0 encoding=utf-8? PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/ android android:title=@string/cube2_settings android:key=cube2wallpaper_settings ListPreference android:key=cube2_shape android:title=@string/cube2_settings_title android:summary=@string/cube2_settings_summary android:entries=@array/cube2_shapenames android:entryValues=@array/cube2_shapeprefix / /PreferenceScreen If nothing else, the Cube demo doesn't show how to gain access to preferences from within its animation loop (that I can see), for the record can anybody tell me what I (and the cube demo) are missing to allow 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] Re: Physics in Box2D
I have two open source games using Box2D. https://code.google.com/p/swipe-n-roll (not released yet but working) https://code.google.com/p/breakin-android (released on Android Market) On 28 mar, 21:32, Lord_Peter piotrek@gmail.com wrote: Hi, I making game for Android. I wish to my game had elements of physics. I installed box2d on my project. My question: how to make an object that could fall, jump, etc? Do you have any examples how to add physics with box2d? Thanks for the reply. -- 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 can I get current activity from context?
On Mon, Mar 28, 2011 at 1:49 AM, 上田健之 grenouill.v...@gmail.com wrote: Does anyone knows that how can I get current activity from context? There is no mechanism for this, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] CTS annotation
On Mon, Mar 28, 2011 at 2:17 AM, deeppink spiri...@gmail.com wrote: In the CTS, I want to add the new test case, but I don't know how to use the @TestTargetNew annotation to the new added test method. Dose the @TestTargetNew annotation only specify the API methods in Android? Can I use it to specify a method than I defined? What does the @TestTargetNew annotation use for? This has nothing to do with this list. Visit http://source.android.com. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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 use @TestTargetNew annotation?
On Mon, Mar 28, 2011 at 3:29 AM, spiri...@gmail.com wrote: In the CTS, I want to add the new test case, but I don't know how to use the @TestTargetNew annotation to the new added test method. Dose the @TestTargetNew annotation only specify the API methods in Android? Can I use it to specify a method than I defined? What does the @TestTargetNew annotation use for? This has nothing to do with this list. Visit http://source.android.com. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Nexus S and no SD Card problem
On Sat, Mar 26, 2011 at 2:27 PM, EdV-IT i...@edvit.nl wrote: i am a developer off a application which needs WRITE_EXTERNAL_STORAGE permission. I now have the following problem: a customer has bought my app a while ago and all was working fine. Now he has bought a new phone (Nexus S without a SD Card), he wants to reinstal this app but it is not visible in the Market. I think this is because the app needs WRITE_EXTERNAL_STORAGE permission and the phone does not have a SD Card. The Nexus S has external storage, even though it does not have an SD card. All Android devices with the Android Market legitimately installed have external storage, regardless of whether or not they have an SD card slot or card. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] ERROR: 'c:\...\androidmanifest.xml' is not a directory
Move your project to a path that does not contain spaces. On Sat, Mar 26, 2011 at 1:28 PM, Claudiof claudio.facchine...@gmail.com wrote: I was able to run samples and develop my own app, but with no apparent reason I'm now getting since today the following error message when building: ERROR: 'c:\documents and settings\claudiof\workspace\hello \androidmanifest.xml' is not a directory I can edit the manifest, save, etc. Besides I have now also an R cannot be resolved on every line using a resources. I cleaned the project, double-checked files, reinstalled eclipse, tried simple apps from the sdk and other apps that were working before, but whatever I try now I get the above error message. Anyone solved this problem in the past? Regards, --Claudio -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Emulator not rotating screen?
This is a known problem with the 2.3 emulator. On Fri, Mar 25, 2011 at 5:12 PM, chc clepsyd...@gmail.com wrote: Hi there - posted this in -beginners a few weeks ago but got no response, sorry for the double-post: When I rotate the emulator screen (ctrl-F12 or ctrl-F11 or numpad 9/7) the emulator flips the screen but the contents rotate with it, and no rotation seems to happen in software... that is, the desktop just turns sideways and stays sideways. True of any screen, any app, I try rotating several times, try going home, try running apps and rotating those, etc, and it never seems to have any useful effect. Just flips everything sideways. I've let it sit there sideways for a while just in case it was taking a long time to notice the orientation change, no dice. For the AVM, I'm trying this with the default setup, i.e. autorotate screen is still enabled in the options. I'm running Kubuntu 10.10, Eclipse 3.6/Helios, SDK/ADK 10 (just downloaded/installed SDK/ADK yesterday). The target AVM is 2.3.3, WQVGA400, Device ram size 1024, starting from and saving to snapshot, and emulator is configured through eclipse to add options -cpu-delay 0 -no-boot-anim -cache /my/path/ (although nothing seems to show up in /my/path/, but maybe that's normal for what little i'm doing so far?) Any ideas? This is obviously a problem, since one of the main reasons for the emulator is testing various screen configurations, so I wonder if I'm doing something wrong? Thanks! -chc -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] What App has requested my location?
On Fri, Mar 25, 2011 at 11:43 AM, Hazim hazimsa...@gmail.com wrote: Would it be possible to know what app has requested my location? No, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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 know MIME TYPE from RTSP/RTP link?
Any update please? On Mar 28, 11:05 am, JC jay.chadderw...@gmail.com wrote: Hello All, Is it possible to know/detect that RTP/RTSP link is streaming audio link or streaming video link? Please post some of working examples of RTP/RTSP links !! In anroid 2.3.3(level 10)...there is MediaMetadataRetriever class which can help me. but i am looking solution for Android. 2.1/2.2 Thanks, JC -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Root status to application
Hi, I am trying to build an application which can be much more useful if it can be run as a root application. Is der a way to provide root status to an application. Regards Abhyudai -- 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] outOfMemoryError
I am getting the outOfMemoryError,bitmap size exceeds the virtual machine budget i am doing the below public void getBitmap1(String str) { InputStream is =null; try { URL myFileUrl =new URL(str); HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection(); conn.setDoInput(true); conn.connect(); is = conn.getInputStream(); Bitmap orgImg = BitmapFactory.decodeStream(is);//this line it is throwing exception barcode_bitmap.add(orgImg);// barcode_bitmap is an arraylist of bitmap. } catch (IOException e) { e.printStackTrace(); } finally{ if(is!=null) { try { is.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } How to resolve this, it comes once in a while. Please help,Thanks in advance:-) -- Regards, Vani Reddy -- 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] outOfMemoryError
Try recycling the unused bitmap. Not sure why do you need to store the all bitmaps in ArrayList. There could be a memory leak. Analyse the memory usage of your application. Check here for more info ( http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html) . On Tue, Mar 29, 2011 at 6:07 PM, vani reddy vani.redd...@gmail.com wrote: I am getting the outOfMemoryError,bitmap size exceeds the virtual machine budget i am doing the below public void getBitmap1(String str) { InputStream is =null; try { URL myFileUrl =new URL(str); HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection(); conn.setDoInput(true); conn.connect(); is = conn.getInputStream(); Bitmap orgImg = BitmapFactory.decodeStream(is);//this line it is throwing exception barcode_bitmap.add(orgImg);// barcode_bitmap is an arraylist of bitmap. } catch (IOException e) { e.printStackTrace(); } finally{ if(is!=null) { try { is.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } How to resolve this, it comes once in a while. Please help,Thanks in advance:-) -- Regards, Vani Reddy -- 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] help point in right direction for 3 menus = final result
Somewhat new to this, messing with DroidDraw to make a layout, and in the end, I need to have 2 clickable items that show a menu, and once each of the 2 have something chosen, it gives a return in a box of what it would be Like i have a spread sheet and the cross pattern is the values i need displayed, but i know i cant get to that point yet, too complicated and i cant find examples to figure out exactly what has to be what. i can donate if anyone can help lead me in the right direction -- 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 not starting on Samsung Galaxy Spica i5700 (Portal)
Our GPS based application works fine for 99% of the users. However, a handful have reported back that on their Galaxy Spica/Portal the GPS never gets a fix while being used by our program. More frustratingly, the users report that the stock Google Maps application gets the GPS to work just fine. We are using the standard way of initialising the GPS, like so this.lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if (this.lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { this.lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 1, this); } Does anyone know what else the Spica needs to get the GPS going? -- 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: Emulator not rotating screen?
On Mar 29, 7:25 am, Mark Murphy mmur...@commonsware.com wrote: This is a known problem with the 2.3 emulator. *sigh* Seems like a pretty obvious thing to test before releasing, wouldn't you think? -- 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] Open vcard apps in Android examples
Hi All, i am having a problem about vcard in android.after bit googling i am not able to confirm that where android is supporting vcard format. if i want to open a vcard file in android is it possible if yes how(Examples) ?? i want to programatically create a vcard apps in android open it with it ? if anybody have knowledge would be appeciated (some code examples). Thanks Regards Subrat -- 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: help point in right direction for 3 menus = final result
something like a dropdown or spinner? http://developer.android.com/resources/tutorials/views/hello-spinner.html -- 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] Root status to application
Hi, I am trying to build an application which can be much more useful if it can be run as a root application. Is der a way to provide root status to an application. Only on rooted devices. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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: help point in right direction for 3 menus = final result
Yes, and I am using that as an example for some of it, but , again as example say I had 2 of those lists, and a label, or anything to display my outcome, So if the list1 had, mens height, and list2 had mens age, i want the outcome to be displayed in the 3rd area.. not sure what I would be using for this yet, so mens weight + mens age = total amount of sit ups to do per day again, just an example for that weight+age stuff and I already have a grid chart with all of my numbers for the A+B=C stuff, just not sure how to apply it to this. thanks again for any help, if that made any sense. -- 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: help point in right direction for 3 menus = final result
you can use two spinners, one for the height and one for the age. -- 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: help point in right direction for 3 menus = final result
but will i be wanting to do a listener like command to know once the 2 are selected, to pull the info that makes item3? -- 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] back button implementation
Hi, How to make a button in my activity behave like a back button? -- Regards, Vani Reddy -- 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: help point in right direction for 3 menus = final result
not necessarily. item3 can be updated whenever item1 or item2 change. You don't really need the final compute button. -- 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] back button implementation
On Tue, Mar 29, 2011 at 9:29 AM, vani reddy vani.redd...@gmail.com wrote: How to make a button in my activity behave like a back button? Ideally, you do not do this. Do not waste screen space and confuse the user, since there already is a BACK button on any compliant Android device. That being said, you can call finish() to close the current activity and return control to the previous activity. One legitimate use of this is with startActivityForResult() -- the activity that is started this way might call finish() after setResult() to immediately return control to the previous activity. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: help point in right direction for 3 menus = final result
Still not quite sure what to use, as the area for the result. Could I just have it change the text of a button? and with the button click, do nothing, or just use a text view? and im still challenging how to display the result after 2 are chosen kinda of messing around from http://stackoverflow.com/questions/2652414/how-do-you-get-the-selected-value-of-a-spinner-android -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help point in right direction for 3 menus = final result
http://peltiertech.com/images/2009-09/ComboXYFillData.png again just to be clear, so i help explain myself with a visual, Like spinner1 would have the 1-9 options, spinner2 would have the A-Z options if I was to choose 4 from the spinner 1 list, and C from the spinner2 list, the label would be 37, im trying to find examples of how to store the data, to make it that simple , -- 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: Content Provider for Private Database?
Based on this discussion, I've decided to use a content provider for access to an internal private database for my app. It simply makes the data access simpler for me, and there's a really nice go-by in the NotePad sample. However, I'm worried about your comment about the leaked database connection. I'm still new to this arena. What are the consequences of leaking the database connection? -- 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: help point in right direction for 3 menus = final result
both spinners are fed by arrayadapters (the values can be stored in XML) then you register an onChange for each spinner, and point both to the same recompute function. The recompute function fetches the current values from both spinners, does its computation and then updates the text label item3. something like 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] tablet + browser + flv = tearing video content
Hello! I had take my android tablet and I had see it can play the embedded media (video) content in really really slow. So the media was tearing, you was not able to watch the video normally. Please note, I'm talking about only embedded video content. Anybody did experienced something like this ? Is there any solution for this? Need to rewire a browser? My tablet has 1Ghz in CPU and 512 Mb. Thanks: Károly p.s.: Google chome-lite Browser UCWEB Browser is the browser what I using -- 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: help point in right direction for 3 menus = final result
That helped a bit, to make more sense out of examples of things similar to what i want, my problem is that the X and Y data isnt to be added or anything, I just need a way to define what data would be held at item C4 if C was chosen from spinner1 and 4 was in spinner 2 thanks again, get me to a donate link! if any one else wants to chime in, that would be awesome. -- 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: Content Provider for Private Database?
There is no leaked database connection with Content Providers. What happens is, the database is kept open as long as the application process is alive, and is open just once, too. When/if the process is killed, the OS kernel closes the file. As far as that extra file being kept open - many (most?) OSs keep executable files open while their code is executing. One more shouldn't ruin anything. On the other hand, not having to reopen the database makes for better performance. -- Kostya 29.03.2011 17:55, Scott McCormack пишет: Based on this discussion, I've decided to use a content provider for access to an internal private database for my app. It simply makes the data access simpler for me, and there's a really nice go-by in the NotePad sample. However, I'm worried about your comment about the leaked database connection. I'm still new to this arena. What are the consequences of leaking the database connection? -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] encryption and decryption DES
hello I tried encryption of any errors I ecplise but the problem when I run the emulator I get error message on exception here is the code [Code] package example.com.cryptage; import java.security .*; import javax.crypto .*; / / / / Encrypt and decrypt using private key algorithm THE DES public class IN { public static void main (String [] args) throws Exception { / / / / Check args and get plaintext if (args.length! = 1) { System.out.println (Usage: java PrivateExample text); System.exit (1); } / / Byte [] plainText = args [0]. GetBytes (UTF8); String ss = Hello world, haris is here! byte [] plainText ss.getBytes = (); / / / / Get private key OF System.out.println (\ nStart OF Generating key); KeyGenerator keygen = KeyGenerator.getInstance (DES); keyGen.init (56); Key key = keyGen.generateKey (); System.out.println (Generating the Key Finish); / / / / Get cipher object and print OF The Provider Cipher cipher = Cipher.getInstance (DES/ECB/PKCS5Padding); System.out.println (\ n + cipher.getProvider (). GetInfo ()); / / / / Encrypt using The Key And The plaintext System.out.println (\ nStart encryption); cipher.init (Cipher.ENCRYPT_MODE, key); byte [] ciphertext = cipher.doFinal (plaintext); System.out.println (Finish encryption:); System.out.println (new String (ciphertext, UTF8)); / / / / Decrypt ciphertext using the Same The key System.out.println (\ nStart decryption); cipher.init (Cipher.DECRYPT_MODE, key); byte [] newPlainText cipher.doFinal = (ciphertext); System.out.println (Finish decryption:); System.out.println (new String (newPlainText, UTF8)); } } [/ Code] here is the error in java [Code] # # A fatal error has Been Detected By The Java Runtime Environment: # # Internal Error (classFileParser.cpp: 3375), pid = 376, tid = 3568 # Error: ShouldNotReachHere () # # JRE version: 6.0_24-b07 # Java VM: Java HotSpot (TM) 64-Bit Server VM (19.1-b02 mixed mode windows-amd64 oops compressed) # An error report File with more information is saved as: # C: \ Users \ hp \ Encryption \ hs_err_pid376.log # # If You Would Like to submit a bug report, please visit: # Http://java.sun.com/webapps/bugreport/crash.jsp # [/ Code] -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Content Provider for Private Database?
On Tue, Mar 29, 2011 at 10:19 AM, Kostya Vasilyev kmans...@gmail.com wrote: There is no leaked database connection with Content Providers. Yes, there is, at least by my definition (close() not being called). What happens is, the database is kept open as long as the application process is alive, and is open just once, too. When/if the process is killed, the OS kernel closes the file. That presumes that there is no SQLite logic in a database close() that is important. One hopes that is the case, given the way content providers are implemented. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jar with resources like android.jar
Can someone of the Android team give me a hint? Or just a no you can't, but i don't understand why. 2011/3/28 Mark Murphy mmur...@commonsware.com On Mon, Mar 28, 2011 at 8:56 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: Thank you for the reply, Mark. Any hint where to study how android.R class works? I suppose that it's generated when we compile the entire Android system, in a similar way of the standard R class, but it takes a photo of system resources. Since the values must not change from release to release of Android, I suspect the process is more involved than that. However, I have no idea where you should look for details, or even if there are any details beyond the source code. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jordan - http://www.lulz-industries.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Unique Random numbers
On 25 March 2011 20:45, Hassy hasith@gmail.com wrote: I want to display unique random numbers when button clicked. if a number appear once, that number should not appear again when button clicked. http://en.wikipedia.org/wiki/Linear_feedback_shift_register Looks random (and has been used as a random number generator at times), but doesn't repeat until the entire sequence has been used (maximal length). -- Andrew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Fixed widgets
Hello, I was wondering if it is possible to create widgets that cannot be moved to different locations on screen manually by dragging it? Or some kind of permanent widget? Any information on this is greatly appreciated. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Fixed widgets
On Tue, Mar 29, 2011 at 11:07 AM, tikky tiku...@gmail.com wrote: I was wondering if it is possible to create widgets that cannot be moved to different locations on screen manually by dragging it? Or some kind of permanent widget? No, sorry. A home screen implementation might somehow offer that feature to users, but an app widget author has no control over this. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jar with resources like android.jar
On Tue, Mar 29, 2011 at 3:52 PM, Jordan 5222 trolldr...@lulz-industries.org wrote: Can someone of the Android team give me a hint? Or just a no you can't, but i don't understand why. What exactly do you want to achieve or know about android.R ? It is a class created ahead of compiling of the source code by aapt. R contains static IDs to your resources that allow you to access the actual content of those resources. Resources themselves (images, sounds, variables,...) are being compiled into 1 big binary file and R.class consists of effectively pointers to those. It is the same with android.R.class, but obviously since those resources are openly distributed with the platform, there is much more effort made to get things right in the first place and keep it unchanged for as long as possible. Just like with any other public API. Have a look here for more info: http://developer.android.com/guide/topics/resources/accessing-resources.html Daniel 2011/3/28 Mark Murphy mmur...@commonsware.com On Mon, Mar 28, 2011 at 8:56 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: Thank you for the reply, Mark. Any hint where to study how android.R class works? I suppose that it's generated when we compile the entire Android system, in a similar way of the standard R class, but it takes a photo of system resources. Since the values must not change from release to release of Android, I suspect the process is more involved than that. However, I have no idea where you should look for details, or even if there are any details beyond the source code. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jordan - http://www.lulz-industries.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- 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: encryption and decryption DES
byte [] newPlainText cipher.doFinal = (ciphertext); Really? -- 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: encryption and decryption DES
I've only been programming in Java for about 15 years, so I'm a bit of a novice. So please someone tell me what the heck this means: byte [] plainText ss.getBytes = (); On Mar 29, 9:20 am, jaafar zbeiba jaafarinformati...@gmail.com wrote: hello I tried encryption of any errors I ecplise but the problem when I run the emulator I get error message on exception here is the code [Code] package example.com.cryptage; import java.security .*; import javax.crypto .*; / / / / Encrypt and decrypt using private key algorithm THE DES public class IN { public static void main (String [] args) throws Exception { / / / / Check args and get plaintext if (args.length! = 1) { System.out.println (Usage: java PrivateExample text); System.exit (1); } / / Byte [] plainText = args [0]. GetBytes (UTF8); String ss = Hello world, haris is here! byte [] plainText ss.getBytes = (); / / / / Get private key OF System.out.println (\ nStart OF Generating key); KeyGenerator keygen = KeyGenerator.getInstance (DES); keyGen.init (56); Key key = keyGen.generateKey (); System.out.println (Generating the Key Finish); / / / / Get cipher object and print OF The Provider Cipher cipher = Cipher.getInstance (DES/ECB/PKCS5Padding); System.out.println (\ n + cipher.getProvider (). GetInfo ()); / / / / Encrypt using The Key And The plaintext System.out.println (\ nStart encryption); cipher.init (Cipher.ENCRYPT_MODE, key); byte [] ciphertext = cipher.doFinal (plaintext); System.out.println (Finish encryption:); System.out.println (new String (ciphertext, UTF8)); / / / / Decrypt ciphertext using the Same The key System.out.println (\ nStart decryption); cipher.init (Cipher.DECRYPT_MODE, key); byte [] newPlainText cipher.doFinal = (ciphertext); System.out.println (Finish decryption:); System.out.println (new String (newPlainText, UTF8));} } [/ Code] here is the error in java [Code] # # A fatal error has Been Detected By The Java Runtime Environment: # # Internal Error (classFileParser.cpp: 3375), pid = 376, tid = 3568 # Error: ShouldNotReachHere () # # JRE version: 6.0_24-b07 # Java VM: Java HotSpot (TM) 64-Bit Server VM (19.1-b02 mixed mode windows-amd64 oops compressed) # An error report File with more information is saved as: # C: \ Users \ hp \ Encryption \ hs_err_pid376.log # # If You Would Like to submit a bug report, please visit: # Http://java.sun.com/webapps/bugreport/crash.jsp # [/ Code] -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Password Expiration Feature in 3.0
Hi I was trying to use Android Password expiration feature using DeviceAdmin. When I call setPasswordExpirationTimeout() API , it only sends a notification and doesnt actually force the user to change the password. It only sends a notification after timeout : V/DevicePolicyManagerService( 662): Sending password expiration notifications for action com.android.server.ACTION_EXPIRED_PASSWORD_NOTIFICATION You have to get the callback in DeviceAdminReceiver in onPasswordExpired() to force user to change password. Any specific reason its been implemented this way ( or is it just to give flexibility to the programmer ) ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] problem in reading .Net Rest webservice in android
On Sat, Mar 26, 2011 at 8:48 AM, satish satishkukun...@gmail.com wrote: how can I read this data in android application ? Same way you'd read it anywhere else - this is not Android specific. Please help me out in parsing this in android. Please Google parse json java. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to approach designing a clound sync adapter?
I'm trying to sync my users database data to a remote service such as Amazon services. I want it to behave similarly to gmail IMAP servers. I'm not sure how I go about creating a sync adapter that keeps track of user modified data and modifications made from other devices sync to the same account. All this time I'm thinking there has to be an easy way. I just don't want to re-invent the wheel if something already exists... :( Thanks for any tips you might have! -Moto -- 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] Issue passing context
So I'm trying to use openGl to draw an image for a live wallpaper, using the below method: https://github.com/markfguerra/GLWallpaperService And to draw then image Im referencing the foloowimg tutorial: http://obviam.net/index.php/texture-mapping-opengl-android-displaying-images-using-opengl-and-squares/ The only problem I'm having is the very last part, passing the context to the square object, because I'm not loading a GLSurfaceview. I've tried to figure this out myself but my low knowledge of android is making it difficult. Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Where to start with simple video games?
On 03/29/2011 01:08 AM, Robert Green wrote: If all you want is canvas drawing, just use a surfaceview. If you want OpenGL, use a GLSurfaceView. Thanks. I have never written anything for OpenGL. Presumably it makes drawing certain things much faster. In say, a vector based spacewar game, would I benefit from it? I've done this many times in other languages using trig, but I am not familiar with what OpenGL can do for me. Is there a steep learning curve? Thanks, Tobiah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue passing context
The issue is with the last part of the second link, also the xoom needs better autocorrect... On Mar 29, 4:38 pm, Jeffrey jeffisagen...@gmail.com wrote: So I'm trying to use openGl to draw an image for a live wallpaper, using the below method: https://github.com/markfguerra/GLWallpaperService And to draw then image Im referencing the foloowimg tutorial: http://obviam.net/index.php/texture-mapping-opengl-android-displaying... The only problem I'm having is the very last part, passing the context to the square object, because I'm not loading a GLSurfaceview. I've tried to figure this out myself but my low knowledge of android is making it difficult. Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Issue passing context
Sorry, the issue is the last part of the second link. Also, Xoom needs better auto correct... On Mar 29, 4:38 pm, Jeffrey jeffisagen...@gmail.com wrote: So I'm trying to use openGl to draw an image for a live wallpaper, using the below method: https://github.com/markfguerra/GLWallpaperService And to draw then image Im referencing the foloowimg tutorial: http://obviam.net/index.php/texture-mapping-opengl-android-displaying... The only problem I'm having is the very last part, passing the context to the square object, because I'm not loading a GLSurfaceview. I've tried to figure this out myself but my low knowledge of android is making it difficult. Please help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] on orientation change, keep all objects, just change content view
I want to set the content view of my activity to a different resource when user changes from portrait to landscape and vice versa. I want to try to avoid having the app call onCreate every time the user changes orientation so I read that what I'm left with is using onConfigurationChanged(...). I can set the new content view but unfortunately I have to re-initialize all my views. Is there any way to do this? Also, currently I have the - android:configChanges=orientation set for my activity and am wondering what are the states and methods it goes through when changing the orientation because I would like this same behavior except I just want the content view to change. If the only way/easiest way to accomplish this is for the app to re- create the activity, how would I go about setting the content view based on what the orientation is? Would I do a check in the onCreate method to see what the orientation is and then set the content view? -- 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: encryption and decryption DES
You can use the Bouncy Castle libraries instead. On 29 mar, 16:20, jaafar zbeiba jaafarinformati...@gmail.com wrote: hello I tried encryption of any errors I ecplise but the problem when I run the emulator I get error message on exception here is the code [Code] package example.com.cryptage; import java.security .*; import javax.crypto .*; / / / / Encrypt and decrypt using private key algorithm THE DES public class IN { public static void main (String [] args) throws Exception { / / / / Check args and get plaintext if (args.length! = 1) { System.out.println (Usage: java PrivateExample text); System.exit (1); } / / Byte [] plainText = args [0]. GetBytes (UTF8); String ss = Hello world, haris is here! byte [] plainText ss.getBytes = (); / / / / Get private key OF System.out.println (\ nStart OF Generating key); KeyGenerator keygen = KeyGenerator.getInstance (DES); keyGen.init (56); Key key = keyGen.generateKey (); System.out.println (Generating the Key Finish); / / / / Get cipher object and print OF The Provider Cipher cipher = Cipher.getInstance (DES/ECB/PKCS5Padding); System.out.println (\ n + cipher.getProvider (). GetInfo ()); / / / / Encrypt using The Key And The plaintext System.out.println (\ nStart encryption); cipher.init (Cipher.ENCRYPT_MODE, key); byte [] ciphertext = cipher.doFinal (plaintext); System.out.println (Finish encryption:); System.out.println (new String (ciphertext, UTF8)); / / / / Decrypt ciphertext using the Same The key System.out.println (\ nStart decryption); cipher.init (Cipher.DECRYPT_MODE, key); byte [] newPlainText cipher.doFinal = (ciphertext); System.out.println (Finish decryption:); System.out.println (new String (newPlainText, UTF8));} } [/ Code] here is the error in java [Code] # # A fatal error has Been Detected By The Java Runtime Environment: # # Internal Error (classFileParser.cpp: 3375), pid = 376, tid = 3568 # Error: ShouldNotReachHere () # # JRE version: 6.0_24-b07 # Java VM: Java HotSpot (TM) 64-Bit Server VM (19.1-b02 mixed mode windows-amd64 oops compressed) # An error report File with more information is saved as: # C: \ Users \ hp \ Encryption \ hs_err_pid376.log # # If You Would Like to submit a bug report, please visit: # Http://java.sun.com/webapps/bugreport/crash.jsp # [/ Code] -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] on orientation change, keep all objects, just change content view
http://developer.android.com/guide/topics/resources/index.html http://developer.android.com/guide/topics/resources/index.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] libgdx drag and drop sprite
Hi everyone, I am making a game in which there are a few non animated sprites on the screen. The sprites are drawn with the xml file. I am using libgdx as the game engine. I cannot seem to find any tutorial on dragging and dropping these sprites. Does any one know if there is a pre made function to implement this. Also is drawing the sprite through code going to be better? -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] AdMod in a Surfaceview
On Sat, Mar 26, 2011 at 7:55 PM, Kevina k.a.j.adege...@gmail.com wrote: That all works great, but now I want to integrate AdMod which leads to lots of crashes. Explaining what lots of crashes means would be helpful. What I basically want is my AdMod view on the bottom of my screen while being able to play my game. (Like angry birds but then different orientation). LinearLayout (Vertial, width and height = fill_parent) - GameView (layoutWeight = 1) - AdMob setContentView(linearLayoutContainingBothViews); - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: encryption and decryption DES
sorry I'm still a beginner so what's the solution ? -- 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: Content Provider for Private Database?
Mark, 29.03.2011 18:27, Mark Murphy пишет: On Tue, Mar 29, 2011 at 10:19 AM, Kostya Vasilyevkmans...@gmail.com wrote: There is no leaked database connection with Content Providers. Yes, there is, at least by my definition (close() not being called). By this definition, every program running in a non-GC environment has a memory leak, which would be a very interesting point of view. To me, a leak is where the use of some resource grows over time and has no chance of decreasing. The resource in question may be memory, open files, DMA buffers, etc. In this particular case, there is only one file which is kept open, and that number does not grow over time. Opening a new database connection for every db operation would be a leak, but that is not happening here. Besides, not closing a database is not specific to content providers. An application that shares a database object among different components might keep it open as well. What happens is, the database is kept open as long as the application process is alive, and is open just once, too. When/if the process is killed, the OS kernel closes the file. That presumes that there is no SQLite logic in a database close() that is important. One hopes that is the case, given the way content providers are implemented. It seems safe to not close a SQLite database, based on empirical evidence supported by some ten million Android devices worldwide, all having some databases and content providers, including those built into the platform. Besides empirical evidence, see this comment made by the author of SQLite, D. Richard Hipp: http://www.mail-archive.com/sqlite-users@sqlite.org/msg01280.html Program crashes, OS crashes, and power failures should not corrupt an SQLite database. -- Kostya Vasilyev -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ? Best way of storing text
On Sun, Mar 27, 2011 at 11:43 AM, William Moore atlantianfer...@gmail.comwrote: I am trying to write an application that would have a large amount of text. Define large amount. A bunch of 1KB files? A few 1MB files? Several gigabyte files? Note: I want it to be locally stored. So no connection is needed after installing. Otherwise this would be easy. Adding a connection requirement would make this easier? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Content Provider for Private Database?
On Tue, Mar 29, 2011 at 1:43 PM, Kostya Vasilyev kmans...@gmail.com wrote: There is no leaked database connection with Content Providers. Yes, there is, at least by my definition (close() not being called). By this definition, every program running in a non-GC environment has a memory leak, which would be a very interesting point of view. I never said a memory leak. I said a leaked database connection. To me, a leak is where the use of some resource grows over time and has no chance of decreasing. The resource in question may be memory, open files, DMA buffers, etc. To me, a leak is something that is allocated and not released. The release could be manually (e.g., calling close()) or automatically (e.g., finalizers in a GC environment). http://en.wikipedia.org/wiki/Resource_leak Besides, not closing a database is not specific to content providers. An application that shares a database object among different components might keep it open as well. Which, if never closed, would represent a leak of a database connection. That presumes that there is no SQLite logic in a database close() that is important. One hopes that is the case, given the way content providers are implemented. It seems safe to not close a SQLite database, based on empirical evidence supported by some ten million Android devices worldwide, all having some databases and content providers, including those built into the platform. Those same ten million Android devices worldwide are also using AsyncTask, which Romain Guy indicated has flaws severe enough to cause them to drop it back to a single-thread pool in an upcoming Android release, which may have fairly substantial backwards-compatibility issues. IOW, while I agree that empirical evidence beats no evidence, it is not a guarantee that everything is all coming up roses, either. Besides empirical evidence, see this comment made by the author of SQLite, D. Richard Hipp: http://www.mail-archive.com/sqlite-users@sqlite.org/msg01280.html Program crashes, OS crashes, and power failures should not corrupt an SQLite database. This too is a positive sign. It is entirely possible that I am merely a curmudgeon. Three decades of dealing with resource corruption due to poor coding practices -- like opening databases and not closing them -- will do that to a guy. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] dialogs in android and orientation change...
okay, this is officially driving me crazy. I have an Activity and in onCreate() if some condition is true, I want to pop up a dialog and inform the user. public void onCreate() { if (condition is true) showDialog(42); } And I put in the appropriate code in onCreateDialog and onPrepareDialog - no problem, everything is working fine. The issue is if I change screen orientation, it destroys the activity and re-creates it. Fine. But in doing that, it goes into onCreate and calls showDialog(42) again, which causes onCreateDialog and onPrepareDialog to be called again. Then it seems like the underlying system is trying to remember that I had a dialog up when i did the screen orientation so it calls onCreateDialog and onPrepareDialog a second time! I can save an instance of the dialog id in onSaveInstanceState() and restore it in onRestoreInstanceState(), but it seems like onRestoreInstanceState() doesn't get called until *after* onCreate is called, which means, it's going to make that call to showDialog(42) again. What's the best place to show dialogs after an activity has come up such that screen orientation changes won't cause multiple onCreateDialogs/onPrepareDialog calls to be made? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ? Best way of storing text
A lot depends on how you would access it. For example, you could store it as text files, compressed into a .zip file, along with a SQLite database with the metadata (including section boundaries within the files). For large amounts of text, this would be much more compact than storing the text in the SQLite database directly. If you need to do extensive text searching, you may also want to store a full-text index, perhaps using Apache Lucene. This will add about 20-30% (of the uncompressed text size) to your total size, but greatly speed searching. -- 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: Root status to application
I am trying to build an application which can be much more useful if it can be run as a root application. Is der a way to provide root status to an application. Only on rooted devices. While we're on the subject, anyone know a good means to determine if root is possible without actually attempting to do something that needs root ? Pent -- 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] Just display an image.
My google skills must be off today. I just want to load an image into a LinearLayout or TableLayout. I take it I need ImageView.setImageDrawable(). I think I'd like to put the images into the res/drawable directory. Can someone please show me the most concise example of what all this would look like? I need a little boost today. Thanks! Tobiah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How should I design questionnaire on android?
Thanks guy. What I am thinking is #1 has very clear and clean coding style, each question stands their own activity and screen. #2 needs one super activity to take care of everything. If you were me, which way you will go? On Mar 11, 6:05 pm, usher usher...@gmail.com wrote: Hi friend, I am trying to implement a questionnaire on android, and I have two solutions, but I am not sure which one is better, please advise. Basically I need display these 10 questions to user, on the bottom of each question, it will display Next and Previous button. There 10 questions are coming from server, so I will have to create part of UI dynamically. Here are two solutions: 1. Create a Question activity, then make 10 instances of this activity. The problem for this one is, when we click Previous, we have to finish() current question activity, and recreate new instance for current question when we click Next from that Previous question. In this case, we are creating so many instances 2. Create one Question activity, put ViewFlipper into this activity layout, which will be used to mimic Next and Previous action. Which way is better? Any idea? 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] Creating a Custom Expanded View in Code
I'm coding an SDK and I want to use a custom expanded view for the notification area. Is it possible to do that in Java code, without any reference to any Resource? (This is because resources cannot be included in an SDK) A RemoteView is usually created like this: RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_notification_layout); Can I create a RemoteView from I layout that I create with Java code? Any other solutions? -- 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] Just display an image.
You could load it through xml easily enough: ImageView android:id=@+id/image android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/image1 android:layout_x=90px android:layout_y=122px /ImageView Just set your content view to the default xml file -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] problem when passing value between activities !
Hi... I have a problem when i'm passing value between activitiesi'm using a activity to get information from a database and put into a listview after this I'm using a onListItemClick to call the another activity to show the a details of the item I selected...but when I put the key value of my item Id on Intent method putExtra I cant get then into another acitivity... what I'm doing wrong ?! Thanks Igor here my code: first activity class (Restaurant.java) public class Restaurants extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { setContentView(R.layout.restaurants); ListRestaurants(); } catch (Exception e) { // TODO: handle exception Log.e(oncreate resta,e.getMessage()); } } @Override protected void onListItemClick(ListView l, View v, int position, long id) { // TODO Auto-generated method stub //super.onListItemClick(l, v, position, id); String[] FROM = {_id,res_name, res_city}; Intent its = new Intent().setClass(getBaseContext(),RestaurantsDetails.class); DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(this); try { dbAdapter.createDataBase(); } catch (IOException e) { // TODO: handle exception Log.e(*** select ,e.getMessage()); } dbAdapter.openDataBase(); Cursor c = dbAdapter.selectRecordsFromDB(restaurants, FROM,null,null,null,null,null); c.moveToPosition(position); its.putExtra(Key,id); startActivity(its); } public void ListRestaurants(){ DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(this); String[] FROM = {_id,res_name, res_city}; int[] TO = {R.id._id,R.id.res_name,R.id.res_city}; try { dbAdapter.createDataBase(); } catch (IOException e) { // TODO: handle exception Log.e(*** select ,e.getMessage()); } dbAdapter.openDataBase(); Cursor c = dbAdapter.selectRecordsFromDB(restaurants, FROM,null,null,null,null,null); SimpleCursorAdapter sAdapter = new SimpleCursorAdapter(this,R.layout.restaurant_row,c,FROM,TO); setListAdapter(sAdapter); dbAdapter.close(); } } //Second Activity public class RestaurantsDetails extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { setContentView(R.layout.restaurants_details); Bundle extra = getIntent().getExtras(); if (extra != null) { String mRowId = extra.getString(Key); if (mRowId != null) { TextView txtResId = (TextView)findViewById(R.id.txtResId); txtResId.setText(mRowId); } } } catch (Exception e) { // TODO: handle exception Log.e(oncreate resta,e.getMessage()); } } } -- 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: on orientation change, keep all objects, just change content view
Ok so I read that site you linked to and although it gave me some hints, it still didn't solve my problem. So I already have my resource file in the layout-land folder. I guess the clarification I need is, how does the activity know to use that resource file? Do I name it the same thing and in my main layout folder? Also when creating my resource layout, I know I have the option in the pull down to select portrait or landscape. What I did was create a layout resource with the same name as in the main layout and made my changes and now when I go to the main layout and select the orientation to be landscape it changes to the correct resource, great! But... now when I run it on my device and change orientation I don't see the same changes. Any other hints? On Mar 29, 1:28 pm, TreKing treking...@gmail.com wrote: http://developer.android.com/guide/topics/resources/index.html http://developer.android.com/guide/topics/resources/index.html --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: on orientation change, keep all objects, just change content view
Ok I got it to work by removing the android:configChanges=orientation in the manifest file. On Mar 29, 1:28 pm, TreKing treking...@gmail.com wrote: http://developer.android.com/guide/topics/resources/index.html http://developer.android.com/guide/topics/resources/index.html --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: on orientation change, keep all objects, just change content view
On Tue, Mar 29, 2011 at 2:11 PM, Wall-E bashee...@gmail.com wrote: So I already have my resource file in the layout-land folder. I guess the clarification I need is, how does the activity know to use that resource file? Do I name it the same thing and in my main layout folder? Yes. If you have the default version in res/layout/main.xml, a landscape version to override the default would go in res/layout-land/main.xml. But... now when I run it on my device and change orientation I don't see the same changes. Of course not. You specifically told Android not to perform any changes, by using android:configChanges. If you want Android to automatically apply the changes, by destroying and recreating your activity, get rid of android:configChanges. Otherwise, you have to make whatever changes you want in Java code. Which is why you should not write your activities the way you did. android:configChanges is to be used in fairly limited cases, and there's nothing in either of your posts that suggests that your activity fits one of those cases (e.g., uses a WebView, uses a Camera). Any other hints? Use onSaveInstanceState() and onRetainNonConfigurationInstance() to pass data to the new activity from the old one, after you get rid of android:configChanges. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Disable a particular row in list view onCreate
Hi, I want to disable a particular row in list view based on some condition on onCreate. I can disable the row on itemClick. But I want to disable that particular row onCreate. Please provide me some piece of coode.I read in this forum that override the adapter class but I am confused how to do 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
Re: [android-developers] Just display an image.
I finally found it. This is all I was looking for: ImageView green = new ImageView(this); green.setImageResource(R.drawable.green); Thanks, Tobiah On 03/29/2011 11:08 AM, Raghav Sood wrote: You could load it through xml easily enough: ImageView android:id=@+id/image android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/image1 android:layout_x=90px android:layout_y=122px /ImageView Just set your content view to the default xml file -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 should I design questionnaire on android?
Why would you need an app to implement this? A simple web page would work just as well, be easier to maintain and also work on virtually any device, including iPhone, Android, tablets and those devices where the market wasn't installed. If you wanted to limit the questionnaire to just Android devices, you could check the agent. I guess a better question would be: Why try and kill a gnat with a sledgehammer? -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: on orientation change, keep all objects, just change content view
Thanks Mark, after I made the fixed I noticed that when I changed orientation the objects were not the same so I'll give onSaveInstanceState() and onRetainNonConfigurationInstance() a shot. On Mar 29, 2:18 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Mar 29, 2011 at 2:11 PM, Wall-E bashee...@gmail.com wrote: So I already have my resource file in the layout-land folder. I guess the clarification I need is, how does the activity know to use that resource file? Do I name it the same thing and in my main layout folder? Yes. If you have the default version in res/layout/main.xml, a landscape version to override the default would go in res/layout-land/main.xml. But... now when I run it on my device and change orientation I don't see the same changes. Of course not. You specifically told Android not to perform any changes, by using android:configChanges. If you want Android to automatically apply the changes, by destroying and recreating your activity, get rid of android:configChanges. Otherwise, you have to make whatever changes you want in Java code. Which is why you should not write your activities the way you did. android:configChanges is to be used in fairly limited cases, and there's nothing in either of your posts that suggests that your activity fits one of those cases (e.g., uses a WebView, uses a Camera). Any other hints? Use onSaveInstanceState() and onRetainNonConfigurationInstance() to pass data to the new activity from the old one, after you get rid of android:configChanges. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9.2 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Jar with resources like android.jar
You can't (right now). android.jar is special because these are the framework resources that exist on the device. Android.jar is not bundled with your project's code and resources, and the resources in android.jar are not part of your application's R class. A Jar with resources that is meant to be added to an existing project needs to be able to merge its resources with the project's own resources. This impacts the resources ID generated in the project's R class in a way that makes the R.*.* ID used to compile the jar obsolete. Since those constants are inlined, any code in the jar file that reference the resources will be broken as the IDs are different in the final APK. This is why the library projects in the SDK are source only. I'm working on a solution that may fix this but no ETA at the moment. Xav On Tue, Mar 29, 2011 at 7:52 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: Can someone of the Android team give me a hint? Or just a no you can't, but i don't understand why. 2011/3/28 Mark Murphy mmur...@commonsware.com On Mon, Mar 28, 2011 at 8:56 AM, Jordan 5222 trolldr...@lulz-industries.org wrote: Thank you for the reply, Mark. Any hint where to study how android.R class works? I suppose that it's generated when we compile the entire Android system, in a similar way of the standard R class, but it takes a photo of system resources. Since the values must not change from release to release of Android, I suspect the process is more involved than that. However, I have no idea where you should look for details, or even if there are any details beyond the source code. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Jordan - http://www.lulz-industries.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] IPC Mechanism in android
That works if you start the native program from the Java program. It doesn't work if it needs to run independently. I like Frank's approach. Generally, minimizing the amount of C++ code in an application will make things better. In fact, I would argue you never want to make a native C++ application, but rather write what you must in C++, expose it in small pieces via JNI, and package it as a Java application. In some cases, the C++ part might be the major piece, but you'll be better off with that thin bit of Java around your C++. Even if you don't see a need today, at some point in the future, there may some bit of functionality easily provided via Java, that you'll be happy to make use of. On Tuesday, March 29, 2011 12:48:44 AM UTC-7, Kostya Vasilyev wrote: You can just read the native program's standard output. Take a look at Java Process class. 29.03.2011 6:20 пользователь arvind arv...@gmail.com написал: Hi All, I have an NDK application(written in C++) packaged as an executable and deployed in android. I also have a Java apk file in the application layer. Now my NDK app does some processing and outputs a string of data in the format name = value. Basically the output from NDK looks like this: name1 = value1 name2 = value2... Now i want each of these name value pairs to be passed to java application one by one. Currently i am writing the output from NDK to a file in sdcard and the java app reads from the file. But i want to use an IPC mechanism which is devoid of explicit file writing and reading and instead use something like sending and listening to a socket. I am not sure what is the best way of passing message between native code and java. Also i am not using JNI interface as i have some issue with root permissions as the C++ Native code runs as root userid and Java apk runs in application level and i can't combine both of them. Please give me suggestions on how to perform IPC between native code and java apk. I am using android developer phone 1 as the device. Thanks, aravind -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-develop...@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