[android-developers] How to generate the public key file in recovery rootfs
Hi I'm doing enhancement to Android recovery feature for Freescale's i.MX platform. Main target is to add EXT3 partition support based on the original MTD partition, and let android rootfs running on movi-nand or SD card can do recovery. As the normal recovery procedure, recovery service unpacks the update.zip after reading update command. It reads the public key in / res/keys from rootfs into a structure before apply the update-script: typedef struct RSAPublicKey { int len; /* Length of n[] in number of uint32_t */ uint32_t n0inv; /* -1 / n[0] mod 2^32 */ uint32_t n[RSANUMWORDS]; /* modulus as little endian array */ uint32_t rr[RSANUMWORDS]; /* R^2 as little endian array */ } RSAPublicKey; This public key is used to decrypt the .SF file's signature stored in .RSA file, and compare to the .SF file's SHA-1 digest. This makes sure .SF file is correct. So in our recovery implement, we will have own keystore, and create own /res/keys. But I can not find the res/keys file in the android source or, in the recovery image which used to hack G1 to get root permission. My question is: 1. Does the hacked recovery rootfs image remove this verification codes? (As I dump the recovery binary, seems no res/keys symbol) 2. What's key file's format, and how to generate it from a certification file? Thanks. BR Xinyu Chen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Eclipse: Your project contains errors, please fix them: - How to find ??
You can try to compile in the command-line, since you prefer it. In the IDE, Xavier's suggestion is one good way. Also if you look at the source tree, you will see a red x on the problem branch. Expand that branch to find where the culprit file is. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 23, 2:52 pm, Xavier Ducrohet x...@android.com wrote: The compilations errors are displayed in a view called Problems. It should be in the same tab group as Console. The Error Log view is for error related to the plug-ins running in eclipse. Xav On Wed, Jul 22, 2009 at 8:12 PM, Jamestc4...@gmail.com wrote: I'm not much a fan of GUI IDE's like Eclipse, but it's harder to debug without it. :-( I have a project that compiles and loads fine using ant (via make); no compile errors. The trouble is that it doesn't quite work correctly, and it'd be nice to get some runtime debug info like you can get using Eclipse and its adb interface. The trouble is that when I try to run it in Eclipse/Debug (F11) a popup box says You have errors in your application, please fix them before running. But how do I find these errors? There is no useful information in the Console or Error Log. Or if someone can parse the Error.log entry below, please help! None of the files have little red X's indicative of a problem. And the program runs (but doesn't work) outside of Eclipse. Or is there a way I can debug (and query runtime variables) without using Eclipse? Thanks ! Jim (This is my second attempt at posting; the first didn't seem to show up. But if you see it twice, my apologies.) -- eclipse.buildId=I20090611-1540 java.version=1.6.0_14 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product !ENTRY org.eclipse.help.ui 4 0 2009-07-22 14:34:18.359 !MESSAGE There was an error executing the command: org.eclipse.debug.ui.commands.OpenDebugConfigurations !STACK 0 org.eclipse.core.commands.NotHandledException: There is no handler to execute for command org.eclipse.debug.ui.commands.OpenDebugConfigurations at org.eclipse.core.commands.Command.executeWithChecks (Command.java: 485) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks (ParameterizedCommand.java:508) at org.eclipse.help.ui.internal.ExecuteCommandAction.executeSerializedCommand (ExecuteCommandAction.java:115) at org.eclipse.help.ui.internal.ExecuteCommandAction.access$1 (ExecuteCommandAction.java:110) at org.eclipse.help.ui.internal.ExecuteCommandAction$2.run (ExecuteCommandAction.java:76) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java: 35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages (Display.java: 3468) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java: 3115) at org.eclipse.ui.internal.Workbench.runEventLoop (Workbench.java: 2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java: 2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench (PlatformUI.java: 149) at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run (EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559) at
[android-developers] Re: How to generate the public key file in recovery rootfs
Hi, questions about device-level work should be posted to android-porting. Thanks. On Thu, Jul 23, 2009 at 11:06 PM, Xinyu Chen muddo...@gmail.com wrote: Hi I'm doing enhancement to Android recovery feature for Freescale's i.MX platform. Main target is to add EXT3 partition support based on the original MTD partition, and let android rootfs running on movi-nand or SD card can do recovery. As the normal recovery procedure, recovery service unpacks the update.zip after reading update command. It reads the public key in / res/keys from rootfs into a structure before apply the update-script: typedef struct RSAPublicKey { int len; /* Length of n[] in number of uint32_t */ uint32_t n0inv; /* -1 / n[0] mod 2^32 */ uint32_t n[RSANUMWORDS]; /* modulus as little endian array */ uint32_t rr[RSANUMWORDS]; /* R^2 as little endian array */ } RSAPublicKey; This public key is used to decrypt the .SF file's signature stored in .RSA file, and compare to the .SF file's SHA-1 digest. This makes sure .SF file is correct. So in our recovery implement, we will have own keystore, and create own /res/keys. But I can not find the res/keys file in the android source or, in the recovery image which used to hack G1 to get root permission. My question is: 1. Does the hacked recovery rootfs image remove this verification codes? (As I dump the recovery binary, seems no res/keys symbol) 2. What's key file's format, and how to generate it from a certification file? Thanks. BR Xinyu Chen -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why the method IWindowManager.setRotation can't do the right thing ?
Hi, this is not a part of the SDK, and is not intended to be used from outside of the window manager. On Thu, Jul 23, 2009 at 10:44 PM, James 030440...@163.com wrote: Dears: My android device doesn't do anything after I called this method,And the log tells me nothing more. If you know anything about this,Tell me,please,Thanks! Best regards! James -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Bug in activity stack if launching from Home icon?
This is just an issue with how ADT launches the application, effectively under a different identity so resulting in two instances running if you also try to launch it from home. On Thu, Jul 23, 2009 at 10:22 PM, adamphillips12 adamphillip...@gmail.comwrote: I've noticed some strange behaviour with resuming a task from a Home icon. Very easy to replicate, just create a new bare bones android project using eclipse, don't need to add anything. Then follow these steps: 1. In eclipse, Run the project on a emulator or device. 2. Once the app installs and launches the first activity, press Home key. 3. Launch the app again by pressing its icon. 4. Press Back key. Now this part seems wrong, you'll go back to the original activity in the stack, instead of the Home screen, even though its been previously launched and what you expect is it to bring back the stack as it was left, with one activity. If you repeat steps 2-3, it will just keep adding the same activity to the stack. That is until you press Back all the way through the stack to the Home screen. Now this behaviour will never again replicate. It will be the correct (?) behaviour of bringing back the stack history at the state it was when Home was pressed. Note there are no behavioural modifications, this is just a default application. However, I tried many combinations of launchModes and stack clearing, they had no effect on the first run. Unless I'm interpreting the documentation wrong, when the user presses the Home key, the task is moved in to the background and simply brought back the next time they press the app icon? Why is the app icon altering the task it creates, if it already exists (with no flag modifications)? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Protocol Buffers (protobuf)
I don't know anything about protobufs, just that these are the classes the developers use. On Thu, Jul 23, 2009 at 8:31 PM, Micah mi...@ourmailbox.net wrote: Further investigation into com.google.common.io.protocol makes me believe that a custom Protocol Buffers compiler would be needed to compile a .proto file into a .java file that is compatible. Does such a compiler exist? Is it publicly available? Does it let me use a custom package name? I took a look at com.android.internal.location.protocol files and they look too uniform to be written by hand, though perhaps Google is just really hard on it's employees when it comes to standardizing coding style. ;) If there isn't a compiler then there is little reason left for me to use Protocol Buffers over some of the alternatives since half the point was that I could write one .proto file and compile it for multiple platforms. On Jul 23, 8:08 pm, Micah mi...@ourmailbox.net wrote: Is there a way to tell the Protocol Buffers compiler to use my package name when generating .java classes instead of the default com.google.protobuf package? Am I going to have to install a C++ compiler and build my own protocol buffers compiler that uses my custom package name? On Jul 23, 2:52 am, Dianne Hackborn hack...@android.com wrote: You should consider using the MIDP protobuf code, which is what is used by various Google apps: http://android.git.kernel.org/?p=platform/external/protobuf.git;a=tre. .. This is much more appropriate for Android. (Note this this is not part of the platform, so you will want to link it into your app in a different namespace.) On Thu, Jul 23, 2009 at 2:30 AM, Micah mi...@ourmailbox.net wrote: It takes 20 seconds to load the test case class on an ADP1. :( If anyone has any ideas I'm open to trying things out or giving out the test case source code to look at. I don't know what Protocol Buffers does that is causing this, but if I'm not mistaken Protocol Buffers are used internally by the OS so my thought is that someone somewhere knows the answer. On Jul 22, 2:05 pm, Micah mi...@ourmailbox.net wrote: Unfortunately, this doesn't seem to fully resolve my issue. I have created a very simple repro case that causes the stall to occur (let me know if anyone wants the source / APK). In the test, it will eventually finish but it takes ~10 seconds just to make the call: Class.forName(com.zoltu.AndroidTest.Messages.Sample) On the plus side, the sample code isn't deadlocking, but it looks like I'll still need to test on a physical device to see if it takes a noticeable amount of time there like on the VM. On Jul 22, 10:49 am, fadden fad...@android.com wrote: On Jul 21, 10:56 pm, fadden fad...@android.com wrote: The bug is that, while generating the list of declared methods, the VM would initialize classes found in method arguments. Those classes shouldn't be getting initialized at that point, and initialization ordering problems ensue. I got a copy of the APK (thanks!) and poked at it. I believe this is the same bug. When the app launch stalled a sent the process a kill -3 and pulled the stack trace out of /data/anr/traces.txt. The two interesting threads are: main prio=5 tid=3 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x4001d520 self=0xbc60 | sysTid=1086 nice=0 sched=0/0 handle=-1343996920 at java.lang.Class.getDeclaredMethods(Native Method) - waiting on 0x1a8598 (a java.lang.Class) at java.lang.ClassCache.getDeclaredPublicMethods(ClassCache.java: 166) at java.lang.ClassCache.getDeclaredMethods(ClassCache.java:179) at java.lang.ClassCache.findAllMethods(ClassCache.java:249) at java.lang.ClassCache.getFullListOfMethods(ClassCache.java:223) at java.lang.ClassCache.getAllPublicMethods(ClassCache.java:204) at java.lang.Class.getMethod(Class.java:1006) at com.google.protobuf.GeneratedMessage.getMethodOrDie (GeneratedMessage.java:900) ... Graphics prio=5 tid=19 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x43748ef8 self=0x1a4878 | sysTid=1094 nice=0 sched=0/0 handle=1722776 at com.ZZZ.Level$Map.clinit(Level.java:~1978) - waiting on 0x146768 (a java.lang.Class) at com.ZZZ.Level$LoadedAnnouncement.init(Level.java:-1) at com.ZZZ.Level$LoadedAnnouncement.clinit(Level.java:2586) at java.lang.Class.getDeclaredMethods(Native Method) at java.lang.ClassCache.getDeclaredPublicMethods(ClassCache.java: 166) ... The're both under getDeclaredMethods, and they're both waiting on a Class object monitor (but not the same class). The Graphics thread is doing a couple layers of class initialization that it shouldn't
[android-developers] Re: Texture appears white in the real device but not in the emulator
I also had trouble getting the GLUtils.texImage2D function to work on real hardware and I suspect they aren't implemented correctly. I would recommend using the glTexImage2D function directly. You can look at my Gears4Android demo (http://www.jeffboody.net/gears4android.php) for an example of how to do this. --Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: StackOverflow Exception while using TabActivity
Hi Romain, I just thought about that. I removed three layers, and it now runs fine. Thanks Dexter On Jul 21, 8:43 pm, Romain Guy romain...@google.com wrote: You have way too many nested viewsgroups/layout. Remove some of them :) On Mon, Jul 20, 2009 at 10:04 PM, Dexter#39;s Braincoomar@gmail.com wrote: Hi, I have a TabActivity, there are 4 tabs. In each tab I have put a single Activity. One of the activities contains a Custom List View which uses a CustomAdapter which extends the BaseAdapter. I get this excpetion, when I try to open the tab containing this activity. It seems to be thrown at a point when probably the TabActivity is being re-drawn. Can anybody please suggest some alternatives, or solutions to avoid this problem. Here is the stack trace. java.lang.StackOverflowError at android.text.SpannableStringBuilder.drawText (SpannableStringBuilder.java:1042) at android.graphics.Canvas.drawText(Canvas.java:1273) at android.text.Styled.each(Styled.java:119) at android.text.Styled.foreach(Styled.java:249) at android.text.Styled.drawText(Styled.java:302) at android.text.Layout.drawText(Layout.java:1346) at android.text.Layout.draw(Layout.java:339) at android.widget.TextView.onDraw(TextView.java:3921) at android.view.View.draw(View.java:5838) at android.view.ViewGroup.drawChild(ViewGroup.java:1486) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.widget.AbsListView.dispatchDraw(AbsListView.java:1319) at android.widget.ListView.dispatchDraw(ListView.java:2820) at android.view.View.draw(View.java:5944) at android.widget.AbsListView.draw(AbsListView.java:2121) at android.view.ViewGroup.drawChild(ViewGroup.java:1486) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.View.draw(View.java:5841) at android.widget.FrameLayout.draw(FrameLayout.java:352) at android.view.ViewGroup.drawChild(ViewGroup.java:1486) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.View.draw(View.java:5841) at android.widget.FrameLayout.draw(FrameLayout.java:352) at android.view.ViewGroup.drawChild(ViewGroup.java:1486) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.ViewGroup.drawChild(ViewGroup.java:1484) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1228) at android.view.View.draw(View.java:5841) at android.widget.FrameLayout.draw(FrameLayout.java:352) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw (PhoneWindow.java:1847) at android.view.ViewRoot.draw(ViewRoot.java:1217) at android.view.ViewRoot.performTraversals(ViewRoot.java:1030) at android.view.ViewRoot.handleMessage(ViewRoot.java:1482) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3948) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) at dalvik.system.NativeStart.main(Native Method) Thanks, Dexter -- 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: How to generate the public key file in recovery rootfs
Hi Hackborn I do not think it's device-level work or only porting issue, but the understand to Android recovery feature. Anybody familiar with recovery, can help? Thanks. On Jul 24, 2:25 pm, Dianne Hackborn hack...@android.com wrote: Hi, questions about device-level work should be posted to android-porting. Thanks. On Thu, Jul 23, 2009 at 11:06 PM, Xinyu Chen muddo...@gmail.com wrote: Hi I'm doing enhancement to Android recovery feature for Freescale's i.MX platform. Main target is to add EXT3 partition support based on the original MTD partition, and let android rootfs running on movi-nand or SD card can do recovery. As the normal recovery procedure, recovery service unpacks the update.zip after reading update command. It reads the public key in / res/keys from rootfs into a structure before apply the update-script: typedef struct RSAPublicKey { int len; /* Length of n[] in number of uint32_t */ uint32_t n0inv; /* -1 / n[0] mod 2^32 */ uint32_t n[RSANUMWORDS]; /* modulus as little endian array */ uint32_t rr[RSANUMWORDS]; /* R^2 as little endian array */ } RSAPublicKey; This public key is used to decrypt the .SF file's signature stored in .RSA file, and compare to the .SF file's SHA-1 digest. This makes sure .SF file is correct. So in our recovery implement, we will have own keystore, and create own /res/keys. But I can not find the res/keys file in the android source or, in the recovery image which used to hack G1 to get root permission. My question is: 1. Does the hacked recovery rootfs image remove this verification codes? (As I dump the recovery binary, seems no res/keys symbol) 2. What's key file's format, and how to generate it from a certification file? Thanks. BR Xinyu Chen -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
What didn't you understand in my last reply? It is trivial unless I have misunderstood something. I guess you got unit tests? Now take the code below. Replace the download/decrypt code in your unit tests with something like what I posted previously: Properties license = new Properties(); license.put(p, TelephonyMgr.getLine1Number()); license.put(d, Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID); license.put(e, aDateInTheFuture); Then run your unit tests again. Downloading won't fail since we have _replaced_ the download code, and no decryption would fail, since we aren't decrypting anything. We replaced that code as well. You don't even need to find all license check snippets that the developer has springled his code with, since they all will check against our valid license that we created above. I really can't believe that you don't see this. Please tell me in what way it fails given my description above. On 23 Juli, 23:07, Al Sutton a...@funkyandroid.com wrote: We're going to update the page, but we'd kind of assumed it was an obvious thing to check. As for your latest idea, the download code downloads an encrypted file so an error would be thrown during decryption which would show up problmes with a spoof server or modified download code. I think you get my point. You may think it's trivial to circumvent, but when you get down to it there are various things we've done to make it a lot trickier than an initial inspection would make you believe, which is why you've still not come up with a reproducable system for cracking it. Even if you did crack a version of an application, the steps you took wouldn't be easily reproduced for other applications and even other versions of the application if the developer moved the decryption/test code around. Al. On Jul 23, 5:54 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: Shouldn't the code on the page say that in that case, and it's still very easy to spoof. Replace the code that downloads the certificate and encrypts it with code that does this: Properties license = new Properties(); license.put(p, TelephonyMgr.getLine1Number()); license.put(d, Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID); license.put(e, aDateInTheFuture); .. .. and so on. I think you get the point. We have enabled all settings. Remember I'm not a hacker/cracker and I have already shown you that it's very easy to crack your system. You aren't protecting the code. Applications will still be pirated very easy, and it's even possible to write an application that does it automatically. Users of the applications will also be very frustrated if they for some reason can't contact your license servers, so the value that you are adding is about zero. On Jul 23, 5:38 pm, Al Sutton a...@funkyandroid.com wrote: And doing what you say should cause the application to operate as if no license is present (i.e. demo mode). The demo code is to cover all bases for all types of license where the properties in the license are unknown. If you know that you'll be using a specific license property your app should enter demo mode if that property isn't present. Al. On Jul 23, 1:45 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: Sorry to say, but there's a huge flaw in your examples. The snippet below is taken from your link: X509EncodedKeySpec keySpec = new X509EncodedKeySpec (ANDAPPSTORE_APP_KEY); KeyFactory factory = KeyFactory.getInstance(RSA); PublicKey key = factory.generatePublic(keySpec); Cipher cipher = Cipher.getInstance(RSA/ECB/PKCS1Padding); cipher.init(Cipher.DECRYPT_MODE, key); byte[] original = cipher.doFinal(LICENSE); Properties props = new Properties(); props.clear(); ByteArrayInputStream bis = new ByteArrayInputStream(original); try { props.load(bis); } finally { bis.close(); } Very few classes are using using e.g X509EncodedKeySpec, so it's very easy to find all classes that are using it, and it's thus very easy to find that section of code. Now replace all operands in the class file with no operation instead, except this part: Properties props = new Properties(); I.e. we are creating an empty license. Now read all your other code snippets with this in mind. E.g. 4(c)(i). Testing the phone number String licensePhoneNumber = license.getProperty(p); if( licensePhoneNumber != null ) { //Uh, uh. An empty license returns null, we won't do any checks. TelephonyManager TelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String devicePhoneNumber = TelephonyMgr.getLine1Number(); if(licensePhoneNumber.equals(devicePhoneNumber) == false) { throw new RuntimeException(** Phone Number Check Failed **); } } Remember that license now is an empty instance
[android-developers] Emulator taking More time to open main page
HI My emulator is taking more time to open main page what may be the Problem Can any body give some suggestions for this .. thanks a lot in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Andriod applications and obfuscation
Yes... You should avoid obfuscating everything obviously,as you may end up getting verify errors. Runs fine on both 1.1 and 1.5; I don't think obfuscated code has any dependency on SDK versions On Jul 23, 9:56 am, Raja Nagendra Kumar nagendra.r...@tejasoft.com wrote: Thank you Rao for the quick reply. After obfuscation were u able to run it on real device both 1.1 and 1.5 phones. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Is there a way to auto-power on the phone?
Would be a good addition for future. But note that compared to most other phones, power on from total shutdown is quite long. What would be good is an option to go to hibernate (not only sleep). Even without programmed wake up, this would allow to shutdown your phone and start it up again without : 1-waiting for whole boot process (if you need to make an emergency call I imagine how frustrating this would be ! -Maybe an easy boot option to have just emergency calls available ASAP would be a nice addition-) 2-loosing your context (the application you were running,...) And totally shutdown the phone is useful when you want to really use 0 battery for some time, you want to pull off the battery (extract SIM, put a spare battery). - As of now, is it possible to force Android to sleep (even if only to RAM), so that it does nothing except keep state in memory, and wake up on button press ? On Fri, Jul 24, 2009 at 03:53, Dianne Hackbornhack...@android.com wrote: Android doesn't do this. On Thu, Jul 23, 2009 at 6:26 PM, quill quill...@163.com wrote: No, I really mean power off. And when I said the alarm will keep working after power off the phone, I don't mean G1 or G2 or any other android phone(I don't know if they have this function). But some other phones like Nokia do have this function. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Why the method IWindowManager.setRotation can't do the right thing ?
Hi,But I'm not developing a normal APP using SDK. And can you answer my question directly ? Tks! On Jul 24, 2:25 pm, Dianne Hackborn hack...@android.com wrote: Hi, this is not a part of the SDK, and is not intended to be used from outside of the window manager. On Thu, Jul 23, 2009 at 10:44 PM, James 030440...@163.com wrote: Dears: My android device doesn't do anything after I called this method,And the log tells me nothing more. If you know anything about this,Tell me,please,Thanks! Best regards! James -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why the method IWindowManager.setRotation can't do the right thing ?
BTW,I'm using the following code: IWindowManager.Stub.asInterface(ServiceManager.getService (window)).setRotation(int xx,boolean xxx,int ); On Jul 24, 3:49 pm, James 030440...@163.com wrote: Hi,But I'm not developing a normal APP using SDK. And can you answer my question directly ? Tks! On Jul 24, 2:25 pm, Dianne Hackborn hack...@android.com wrote: Hi, this is not a part of the SDK, and is not intended to be used from outside of the window manager. On Thu, Jul 23, 2009 at 10:44 PM, James 030440...@163.com wrote: Dears: My android device doesn't do anything after I called this method,And the log tells me nothing more. If you know anything about this,Tell me,please,Thanks! Best regards! James -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] IS it possible to get Notification
Hi is it possible to do an application for geting the notification when we get a new mail or sms to our mobile how can i take the notification from email client woth writing the code form email cliend like how we recieve the the message (smsReciever ) is there any SMS reciever ..for this email plz guide me regarding this . thanks a lot in advance.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Toast Duration
Thank you for all those who replied. But Toast is the only UI component I could find that appears over the incoming call dialog. I need to show some information when an incoming call arrives. This is why I am using the Toast. On Jul 24, 1:34 am, Dianne Hackborn hack...@android.com wrote: It sounds like you are abusing toasts. How about just showing your own dialog that is set up to not get focus or be touchable? You can use this background to make it look like a toast: http://developer.android.com/reference/android/R.drawable.html#toast_... And this animation style for the same fade effect: http://developer.android.com/reference/android/R.style.html#Animation... On Thu, Jul 23, 2009 at 8:17 AM, Mohamed Amir mohamed.a...@gmail.comwrote: Is there a way to make the Toast last for longer time? I have tried this code Toast t = new Toast(this); View v = View.inflate(this, R.toast_layout, null); t.setView(v); t.setDuration(Toast.LENGTH_LONG); t.show(); t.show(); t.show(); By calling show() method more than once, I hoped this would give a similar effect to lasting for longer time with some flickering, but I didn't see any difference. Is there some limit to the number of times that show() method can be called on the same Toast? e.g. just once per toast instance and further calling has no effect? Any ideas to increase that duration? Thank you. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why the method IWindowManager.setRotation can't do the right thing ?
If you aren't programming with the SDK, you are in the wrong group -- you probably want android-porting. Also, as I said, this function isn't there for you to just call. You haven't said what you are trying to do, so there's not much I can do to help, but you probably want to look at PhoneWindowManager and WindowManagerService for the code that manages the screen orientation. On Fri, Jul 24, 2009 at 12:49 AM, James 030440...@163.com wrote: Hi,But I'm not developing a normal APP using SDK. And can you answer my question directly ? Tks! On Jul 24, 2:25 pm, Dianne Hackborn hack...@android.com wrote: Hi, this is not a part of the SDK, and is not intended to be used from outside of the window manager. On Thu, Jul 23, 2009 at 10:44 PM, James 030440...@163.com wrote: Dears: My android device doesn't do anything after I called this method,And the log tells me nothing more. If you know anything about this,Tell me,please,Thanks! Best regards! James -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
The confusion arose because your previous post said Replace the code that downloads the certificate and encrypts it, in this post you're talking about the download/decrypt code, the first is a combination of client code (download) and server code (encryption), the latter is client-only code. Referring to the download/decrypt replacement, the problem here is the amount of time it would take to find where the download/decrypt code resides in a compiled app, replace it, and recompile it. If you had the original source code then yes, you could do a drop in replacement, but if you had the source code you could easily strip out any protection mechanism. Seriously, try it on a compiled application, you'll find it takes you a lot longer than you think, and longer than many crackers would be willing to spend on a low-cost app. Al. On Jul 24, 8:02 am, Kaj Bjurman kaj.bjur...@gmail.com wrote: What didn't you understand in my last reply? It is trivial unless I have misunderstood something. I guess you got unit tests? Now take the code below. Replace the download/decrypt code in your unit tests with something like what I posted previously: Properties license = new Properties(); license.put(p, TelephonyMgr.getLine1Number()); license.put(d, Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID); license.put(e, aDateInTheFuture); Then run your unit tests again. Downloading won't fail since we have _replaced_ the download code, and no decryption would fail, since we aren't decrypting anything. We replaced that code as well. You don't even need to find all license check snippets that the developer has springled his code with, since they all will check against our valid license that we created above. I really can't believe that you don't see this. Please tell me in what way it fails given my description above. On 23 Juli, 23:07, Al Sutton a...@funkyandroid.com wrote: We're going to update the page, but we'd kind of assumed it was an obvious thing to check. As for your latest idea, the download code downloads an encrypted file so an error would be thrown during decryption which would show up problmes with a spoof server or modified download code. I think you get my point. You may think it's trivial to circumvent, but when you get down to it there are various things we've done to make it a lot trickier than an initial inspection would make you believe, which is why you've still not come up with a reproducable system for cracking it. Even if you did crack a version of an application, the steps you took wouldn't be easily reproduced for other applications and even other versions of the application if the developer moved the decryption/test code around. Al. On Jul 23, 5:54 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: Shouldn't the code on the page say that in that case, and it's still very easy to spoof. Replace the code that downloads the certificate and encrypts it with code that does this: Properties license = new Properties(); license.put(p, TelephonyMgr.getLine1Number()); license.put(d, Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID); license.put(e, aDateInTheFuture); .. .. and so on. I think you get the point. We have enabled all settings. Remember I'm not a hacker/cracker and I have already shown you that it's very easy to crack your system. You aren't protecting the code. Applications will still be pirated very easy, and it's even possible to write an application that does it automatically. Users of the applications will also be very frustrated if they for some reason can't contact your license servers, so the value that you are adding is about zero. On Jul 23, 5:38 pm, Al Sutton a...@funkyandroid.com wrote: And doing what you say should cause the application to operate as if no license is present (i.e. demo mode). The demo code is to cover all bases for all types of license where the properties in the license are unknown. If you know that you'll be using a specific license property your app should enter demo mode if that property isn't present. Al. On Jul 23, 1:45 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: Sorry to say, but there's a huge flaw in your examples. The snippet below is taken from your link: X509EncodedKeySpec keySpec = new X509EncodedKeySpec (ANDAPPSTORE_APP_KEY); KeyFactory factory = KeyFactory.getInstance(RSA); PublicKey key = factory.generatePublic(keySpec); Cipher cipher = Cipher.getInstance(RSA/ECB/PKCS1Padding); cipher.init(Cipher.DECRYPT_MODE, key); byte[] original = cipher.doFinal(LICENSE); Properties props = new Properties(); props.clear(); ByteArrayInputStream bis = new ByteArrayInputStream(original); try { props.load(bis); } finally { bis.close(); } Very few classes are using using e.g
[android-developers] Dealing with CPU-hogging processes
This is not strictly a developer question, but it's technical enough that I don't know where else to ask it. For a while now I have been running top on my HTC Magic whenever I suspect it of using more CPU then normal, and often I see some process constantly using CPU (From 10% to 80% in some cases). Sometimes its system_server, sometimes it's com.android.browser or com.htc.album. Is there any way to deal with this except restarting? Because a program I write is not allowed to kill other applications I suspect? Is there something that can be done by Android itself and if so will this problem be fixed in later versions? Or is it only a matter of application developers writing better code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: videoview can't play mp4 smoothly
No, Not need to change the movie file. You have to modify your software/program to fit into that video codec level and profile. You can look into the AudioHarwareALSA.cpp (...\open_src\external\libaudio) or similar codec lib level file. There you need to change your MAX_BUFFER_SIZE, sample rate etc. BR, Chand On Fri, Jul 24, 2009 at 12:33 AM, tstanly tsai.sta...@gmail.com wrote: thanks for your reply, so what's the section I could modify my code?? or your suggestion is about change movie file formate(not the code can determine),?? such as sample rate. and what's your mean about increase buffer size? and how to do? thanks! On 7月23日, 下午7時13分, Suchand Ghosh chand4andr...@gmail.com wrote: That might be due to codec sample rate which is default max (44100 Hz), available channels (2), buffer size (2048 Bytes). Pls increase those values, provided your h/w need to support. Ref to file AudioHarwareALSA.cpp. It may solve your issue. Thank you. BR, Chand On Thu, Jul 23, 2009 at 5:14 PM, tstanly tsai.sta...@gmail.com wrote: hi all, this question i have post once, but nobody can answer me I have used videoview to play mp4 formate movie, but when start to play it, the videoview can't play smoothly, that means there have a little lag, but in the: http://developer.android.com/guide/appendix/media-formats.html the android support media formate have mp4.. the code is very simple,just like in the sample code, please help me, thanks you! =code=== videoview=(videoview)findIdByView(r.id.videoview); videoview.setVideoPath(path); videoview.start(); videoview.requestFocus(); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can't display GoogleMaps in application
Do you target the Google API, ie do you have target=Google Inc.:Google APIs:3 in you default.properties ? On Jul 22, 7:02 pm, Alex agmon...@gmail.com wrote: Hi guys, I'm trying to display GoogleMaps in my application, but instead of map I just get an empty screen with crosses and Google logo in the bottom left corner. I'm using Internet permission in manifest file, just as the library com.google.android.maps. I have also supported my application with Android Maps API key and I placed it in layout as android:apiKey value for MapView, but it still can't display the map. main.xml: com.google.android.maps.MapView android:id=@+id/myMapView android:layout_width=fill_parent android:layout_height=fill_parent android:enabled=true android:clickable=true android:apiKey=07vNiwHa094tV14bUdyK0VTtXx0eeAZlk6WdKXQ / manifest.xml: uses-library android:name=com.google.android.maps / ... uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / I have used two different apiKey values, regarding whether I signed the application with debug or my own created keystore, but it didn't work with none of them. If someone can help me, I would really appreciate it. Best regards, Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] what coomand can go back to home screen or destop
hi all, what's command can back to home screen or destop screen? eg: a.java have a button can link to b.java, and b have a button can back to home/destop, is by finish()? should a.this.finish() or b.this.finish()? or both needed? if it can work possible? thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Clickable ListView element?
Apologies, my example was too simple and once I expanded upon it I hit across the same problem. See you have solved it now, please can you share this so we can all learn from it. Thanks, On Jul 23, 8:58 pm, eags eagsala...@gmail.com wrote: This didn't work for me unfortunately. Were you having the same problem where your list items were not clickable but could be selected using the trackball? And setting duplicateParentState fixed it? I feel pretty fuzzy in general about the relationship between nested views. It seems like something non-obvious is happening behind the scenes here. On Jul 23, 3:13 am, Andrew cub...@googlemail.com wrote: Hi, I've been following this thread trying to get listviews working and think I may have cracked it. I'm new to Android development so dont bite my head off if its wrong but I got this working ok; The key to it is the android:duplicateParentState=true I'm not sure which Layout you'll need to put it on yours but hopefully you can see how it works. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=center_vertical android:orientation=horizontal android:minHeight=40sp LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:orientation=horizontal android:duplicateParentState=true TextView android:id=@+id/itemname android:layout_width=fill_parent android:layout_height=wrap_content android:textSize=20sp android:text=Item Name / /LinearLayout TextView android:id=@+id/duration android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=right android:layout_marginRight=20sp android:layout_marginLeft=10sp android:textSize=20sp android:text=0 Days / /LinearLayout On Jul 10, 9:44 am, eags eagsala...@gmail.com wrote: Bump. Mystery remains. Why can the entireListViewitem not be madeclickable??? On Jul 9, 7:57 pm, eags eagsala...@gmail.com wrote: And I tried making sure the first sub LinearLayout was not fill_parent for width or height. No dice. On Jul 9, 7:52 pm, eags eagsala...@gmail.com wrote: Anyone?? Total mystery. I played around with .bringToFront() and friends with no avail. I'm thinking the issue is simply that the list item is simply completely covered by its children but that doesn't really explain why TextView does work even when it is set to fill_parent. On Jul 9, 5:11 pm, eags eagsala...@gmail.com wrote: So I methodically tried removing items from my top level LinearLayout in the list item layout until clicking started working at the top level. It turns out that with LinearLayout, you can only have one child (total, not just immediate children) before clicking stops working. Then I found some example code where this works but they are using RelativeLayout and if you try to nest a LinearLayout inside it also stops working. Honestly this all seems like utter nonsense to me. Is there someone who can explain things or point to a document so that all this makes some sense?? Right now it seems like my options are, redo all my layouts using only relative (which just won't work for a more complicated layout like this one) or set a sub-element to beclickableand do the dance to figure out which list element that corresponds to. Thanks again in advance for any information explaining this. On Jul 9, 4:28 pm, eags eagsala...@gmail.com wrote: I did what you said and it worked. This is actually exactly what the Alarm Clock application does since when you click on an alarm it doesn't select the entireListViewelement but just the clock and message. However I still have a couple problems with this: 1. Why??? I find this behavior to be very confusing especially when other simpler list view item layouts work just fine at the top level (for example browser options clicking selects the entire element including the checkbox which is what I want) 2. This actually really screws up my code because now my OnItemClickListener which was returning to me the index which is useful now just has a reference to the element. I could probably figure out the index either way but it seems like a pointless mess. Is there some piece of documentation you could point me to that explains what is going on here? It
[android-developers] Re: videoview can't play mp4 smoothly
thank you, but the AudioHardwareALSA.cpp is about audio codec, what's the video codec source name?? thanks On 7月24日, 下午5時04分, Suchand Ghosh chand4andr...@gmail.com wrote: No, Not need to change the movie file. You have to modify your software/program to fit into that video codec level and profile. You can look into the AudioHarwareALSA.cpp (...\open_src\external\libaudio) or similar codec lib level file. There you need to change your MAX_BUFFER_SIZE, sample rate etc. BR, Chand On Fri, Jul 24, 2009 at 12:33 AM, tstanly tsai.sta...@gmail.com wrote: thanks for your reply, so what's the section I could modify my code?? or your suggestion is about change movie file formate(not the code can determine),?? such as sample rate. and what's your mean about increase buffer size? and how to do? thanks! On 7月23日, 下午7時13分, Suchand Ghosh chand4andr...@gmail.com wrote: That might be due to codec sample rate which is default max (44100 Hz), available channels (2), buffer size (2048 Bytes). Pls increase those values, provided your h/w need to support. Ref to file AudioHarwareALSA.cpp. It may solve your issue. Thank you. BR, Chand On Thu, Jul 23, 2009 at 5:14 PM, tstanly tsai.sta...@gmail.com wrote: hi all, this question i have post once, but nobody can answer me I have used videoview to play mp4 formate movie, but when start to play it, the videoview can't play smoothly, that means there have a little lag, but in the: http://developer.android.com/guide/appendix/media-formats.html the android support media formate have mp4.. the code is very simple,just like in the sample code, please help me, thanks you! =code=== videoview=(videoview)findIdByView(r.id.videoview); videoview.setVideoPath(path); videoview.start(); videoview.requestFocus(); - 隱藏被引用文字 - - 顯示被引用文字 - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Can't display GoogleMaps in application
Have you checked whether your browser can open a simple www.google.comwebsite. I had this problem when I run the application on emulator , when my laptop was connected to a proxy server. At home it works On Fri, Jul 24, 2009 at 3:09 PM, sasq jonas.minnb...@gmail.com wrote: Do you target the Google API, ie do you have target=Google Inc.:Google APIs:3 in you default.properties ? On Jul 22, 7:02 pm, Alex agmon...@gmail.com wrote: Hi guys, I'm trying to display GoogleMaps in my application, but instead of map I just get an empty screen with crosses and Google logo in the bottom left corner. I'm using Internet permission in manifest file, just as the library com.google.android.maps. I have also supported my application with Android Maps API key and I placed it in layout as android:apiKey value for MapView, but it still can't display the map. main.xml: com.google.android.maps.MapView android:id=@+id/myMapView android:layout_width=fill_parent android:layout_height=fill_parent android:enabled=true android:clickable=true android:apiKey=07vNiwHa094tV14bUdyK0VTtXx0eeAZlk6WdKXQ / manifest.xml: uses-library android:name=com.google.android.maps / ... uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / I have used two different apiKey values, regarding whether I signed the application with debug or my own created keystore, but it didn't work with none of them. If someone can help me, I would really appreciate it. Best regards, Alex -- Bibrak Qamar NUST-SEECS --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Texture appears white in the real device but not in the emulator
Sorry Thiago, Obviously didn't read the post properly. Other than the power of 2 thing the other common issue is to do with the image format i.e. 16bpp or 32bpp etc There is a discussion about it all here: http://groups.google.com/group/android-developers/browse_thread/thread/2cb496c5da3b6955/8342dab8331955dd?q=#8342dab8331955dd On Jul 24, 3:03 am, Thiago Assis thiagoassis@terra.com.br wrote: Mr. MrChaz, As I have already mentioned I'm using texture with sizes power of 2. (I still have the problem.) Thanks for your contribution. Regards, Assis On Jul 23, 1:52 pm, MrChaz mrchazmob...@googlemail.com wrote: The device requires the textures to be sizes in the power of 2. e.g. 64x64, 128x128, 256x256 etc you can have 64x128 etc too On Jul 23, 6:24 am, Thiago Assis thiagoassis@terra.com.br wrote: Texture appears white in the real device but not in the emulator Hello fellows, I’ve already tried to find the solution in other POSTS but none of the solutions worked. The problem that I have is that the loaded texture not displayed in the real device (G1, firmware 1.5). If I turn of the texture and put a color in the geometry, it works fine. Details: the file that I’m loading has width and height power of 2. And I tried with .bmp and .png files, for both I had the same problem. Let me know if you know what is going wrong and what I should do. My code works fine in the emulator but not in the real device. (This is a simple code that I’ve done months ago, so I’m using this is a reference to find the problem.) Thanks a lot for your attention. Best regards, Assis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: what coomand can go back to home screen or destop
the android develops an activity stack as u keep calling activities. wen finish() is called, the activity is not stored in the stack... so u need to call both: a.this.finish() after u start b.java and then to go bach to the home screen, call b.this.finish(). hope this helps. cheers! On Fri, Jul 24, 2009 at 2:43 PM, tstanly tsai.sta...@gmail.com wrote: hi all, what's command can back to home screen or destop screen? eg: a.java have a button can link to b.java, and b have a button can back to home/destop, is by finish()? should a.this.finish() or b.this.finish()? or both needed? if it can work possible? thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] GPS Project doesn't work on sdk 1.5
Hi to everyone, I've inherited a project that worked on sdk 1.0, but when I try to use them on sdk 1.5 it crashes. I'm a beginner so I'm not able to understand where is the problem..So I hope that writing on this forum someone can help me..The project concerns the detection via GPS coordinates and the notification of events close to the location where it was at that time .FIrst of all where can I post the files?? 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: Emulator taking More time to open main page
I use Fedora and its fast. Vista its really slow (20 mins, to launch). On Fri, Jul 24, 2009 at 1:06 PM, android.vinny vinny.s...@gmail.com wrote: HI My emulator is taking more time to open main page what may be the Problem Can any body give some suggestions for this .. thanks a lot in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Soft references freed too early
Hi fadden, thanks for your answer and for looking things up in the dalvik source. Sounds very much like you are right. I didn't know of dalvik.system.VMRuntime.setMinimumHeapSize() but now tried it. Invoking that with 4 MB or 5MB has no visible effect. But invoking it with 8MB solves my problem. So while my needs are fullfilled now, at least until Android 1.6 or 2.0 comes out and dropps support for setMinimumHeapSize, I had some insights I want to share: Interestingly, while doing some benchmarking it turned out that the real heap size and heap usage is not increased by this. I called setMinimumHeapSize jsut before the caching/prebuffering starts. I've compiled my app with different values and used the eclipse DDMS view to query the heap usage at three important times in my application life cycle: Step 1: Start the application and wait for the caching to be done, then GC Step 2: Open up another activity that displays a visual list, showing the first 9 objects, then GC Step 3: Scroll several times up and down through the list, until scrolling is smooth, then GC Without using setMinimumHeapSize: Step 1: 3,258 used: 2,473 Step 2: 3,445 used: 2,571 Step 3: 3,508 used: 2,639 runtime.setMinimumHeapSize(400); runtime.setTargetHeapUtilization(0.9f); Step 1: 3,195 used: 2,485 Step 2: 3,508 used: 2,580 Step 3: 3,508 used: 2,583 runtime.setMinimumHeapSize(500); Step 1: 3,250 used: 2,386 Step 2: 3,258 used: 2,517 Step 3: 3,383 used: 2,595 runtime.setMinimumHeapSize(800); Step 1: 3,320 used: 2,480 Step 2: 3,320 used: 2,519 Step 3: 3,320 used: 2,531 As you can see, there is now big difference in those values. Anyway, only when setting the heap to 8MB, none of my weakly referenced objects where thrown away, and in Step 3 I instantly get a smooth scrolling list. The usage is always around 76%. I noticed there is a method setTargetHeapUtilization and tried it once, supplying 0.9f as parameter. As you can see in the above numbers, doing it results in the same actual usage around 76%. with best regards, Brian schimmel On 23 Jul., 22:16, fadden fad...@android.com wrote: On Jul 23, 5:50 am, brian.schim...@googlemail.com brian.schim...@googlemail.com wrote: Actually, something like that happens: Object 1 is cached Object 2 is cached Object 3 is cached Object 4 is cached Object 5 is cached Objects 1 to 4 are cleared by the GC Object 6 is cached Object 7 is cached Object 8 is cached Object 9 is cached Objects 5 to 8 are cleared by the GC and so on. I don't believe this is the desired behavior. Looking at tryMalloc() in dalvik/vm/alloc/Heap.c, it initially calls gcForMalloc(false), which should not be attempting to collect soft references. Only later, when confronted with the possibility of throwing OOM, does it call gcForMalloc(true). Hmm. In dvmHeapSizeChanged() there's a SOFT_REFERENCE_GROWTH_SLACK value that appears to be trying to strike a balance between expanding without limit and collecting objects. If there's no cap we might fill 16MB with softly-reachable objects before we discard any of them, which isn't desirable on a device that has multiple applications resident in memory. It appears the function wants the GC to collect some of the soft references, which sounds good, but it looks like SR_COLLECT_SOME doesn't receive special treatment during the mark sweep. In the current implementation, it's all or nothing. So my guess is you've got more than 128KB of softly-reachable objects (i.e. the things that are softly referenced, and the things that are only reachable through them). When the GC has to choose between expanding the current heap size and chucking the soft references, it's choosing to discard some, which in the current implementation means all. The observed behavior changes after you have a bunch of other stuff allocated, because the soft limit is higher, and the GC doesn't have to choose between expanding the heap and collecting the soft references. You might be able to work around this behavior by calling dalvik.system.VMRuntime.setMinimumHeapSize() (which really shouldn't be exposed in the API, but there it is). If you start it out at 4MB that might prevent you from thrashing like this right after the app starts up. I think the issue will come back if you manage to get close to the soft limit again, but I don't think that's avoidable without a change to the GC behavior. (There are some kluges you could employ to suppress the behavior, like periodically grabbing hard references to all cached items, allocating something large, discarding it, and un-refing the cache entries, but that's ugly and might not work anyway.) I'll file a bug against the GC. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group,
[android-developers] Re: Pausing VideoView when launching a new intent...
junker37 wrote: I'm thinking that the buffer must be lost somewhere, so I now try to capture the current position via videoView.getCurrentPosition(), however, this is always returning 0. When are you calling getCurrentPosition()? I am using getCurrentPosition() to update an elapsed-time counter in a video player, and it definitely works. I use MediaPlayer rather than VideoView, so it could be that this explains the difference in behavior. However, if you are calling getCurrentPosition() too late, it may be the video has stopped and, therefore, is actually at position 0. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 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] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
As I said previously. I have tried to protected java applications, and I have done what I described with pure java applications, without having the source code (I have even done it in assembler/machine code on non java applications). I don't know much about the dex format and what tools that are available to modify compiled classes, but it's only a matter of time before they are here, if they don't exist right now. Crackers don't think about if a program is expensive or not. They only want to get known for their talents, and they crack all popular applications, even if they are almost for free. So all popular applications get cracked, regardless of price, and time isn't an issue for the cracker. He doesn't think in economical terms. On 24 Juli, 10:44, Al Sutton a...@funkyandroid.com wrote: The confusion arose because your previous post said Replace the code that downloads the certificate and encrypts it, in this post you're talking about the download/decrypt code, the first is a combination of client code (download) and server code (encryption), the latter is client-only code. Referring to the download/decrypt replacement, the problem here is the amount of time it would take to find where the download/decrypt code resides in a compiled app, replace it, and recompile it. If you had the original source code then yes, you could do a drop in replacement, but if you had the source code you could easily strip out any protection mechanism. Seriously, try it on a compiled application, you'll find it takes you a lot longer than you think, and longer than many crackers would be willing to spend on a low-cost app. Al. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Protocol Buffers (protobuf)
Ah, I've now run into this issue also, it seems. Strangely, it works just fine for the most part, except for random, unreproducable cases, where it starts to hang somewhere inside getDeclaredMethods(). easiest way to do this is to call Class.forName(String className) early in the app start sequence. Does this mean Application.onCreate()? Michael fadden schrieb: On Jul 21, 10:56 pm, fadden fad...@android.com wrote: The bug is that, while generating the list of declared methods, the VM would initialize classes found in method arguments. Those classes shouldn't be getting initialized at that point, and initialization ordering problems ensue. I got a copy of the APK (thanks!) and poked at it. I believe this is the same bug. When the app launch stalled a sent the process a kill -3 and pulled the stack trace out of /data/anr/traces.txt. The two interesting threads are: main prio=5 tid=3 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x4001d520 self=0xbc60 | sysTid=1086 nice=0 sched=0/0 handle=-1343996920 at java.lang.Class.getDeclaredMethods(Native Method) - waiting on 0x1a8598 (a java.lang.Class) at java.lang.ClassCache.getDeclaredPublicMethods(ClassCache.java: 166) at java.lang.ClassCache.getDeclaredMethods(ClassCache.java:179) at java.lang.ClassCache.findAllMethods(ClassCache.java:249) at java.lang.ClassCache.getFullListOfMethods(ClassCache.java:223) at java.lang.ClassCache.getAllPublicMethods(ClassCache.java:204) at java.lang.Class.getMethod(Class.java:1006) at com.google.protobuf.GeneratedMessage.getMethodOrDie (GeneratedMessage.java:900) ... Graphics prio=5 tid=19 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x43748ef8 self=0x1a4878 | sysTid=1094 nice=0 sched=0/0 handle=1722776 at com.ZZZ.Level$Map.clinit(Level.java:~1978) - waiting on 0x146768 (a java.lang.Class) at com.ZZZ.Level$LoadedAnnouncement.init(Level.java:-1) at com.ZZZ.Level$LoadedAnnouncement.clinit(Level.java:2586) at java.lang.Class.getDeclaredMethods(Native Method) at java.lang.ClassCache.getDeclaredPublicMethods(ClassCache.java: 166) ... The're both under getDeclaredMethods, and they're both waiting on a Class object monitor (but not the same class). The Graphics thread is doing a couple layers of class initialization that it shouldn't be doing at that point. It's possible we've deadlocked on class init. I tried it twice and ended up in the exact same place both times. With the bug fix in place it started up every time. This problem will go away in a future release, but for now you can work around it by forcing initialization to happen earlier. The easiest way to do this is to call Class.forName(String className) early in the app start sequence. Start with Level$Map and Level $LoadedAnnouncement and see if that cures it. For anyone building their own VM, you can see the patch in http://code.google.com/p/android/issues/detail?id=3005 . --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is Multiple Language Support is in Android ?
Hi Is multiple Languages like indian Espiceally Malayalam,Tamil Telugeu hindi like all the languages supports android ... can any body guide me about this .. Thanks A lot 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] App opens previous activity - but only intermittently
Hi all, This is an intermittent bug in one of my apps. I don't expect anyone to solve it immediately, but I'd appreciate any thoughts on how to start debugging! So, my app lets users edit an item (in the EditPage activity). When they press the Back key, the desired behaviour is that it saves their edits and returns them to the home page (the HomeList activity). The code for this is below. It works fine. Except... The bug is this. Some users report that sometimes when they reopen the application after a pause, they are seeing *not* the home page, where they left the application - but the previous edit activity. Crucially, they are also seeing the edit activity without their saved edits - effectively losing their most recent edits :( I've been able to reproduce this myself. It only happens after the application hasn't been opened for a while. If I save something, minimize the application and reopen it straight away, it shows the HomeList activity just fine, and the edits have all been saved. But if I save something, leave it for a couple of hours and then reopen it, it shows the previous EditPage activity, without the saved edits (i.e. in the state that the EditPage activity was previously launched). Any ideas, anyone? I had wondered whether it was due to the Back button being used to return the user to the HomeList activity - maybe Android thinks that the Back button means that the HomeList is not the most recent activity, instead the EditPage is. I'd like to carry on using the Back button if possible, though. And in particular, I'm puzzled why it only happens after the app has been idle for an hour or so, and not immediately? Is it something to do with Android's memory management? As I say, would appreciate any tips on how to debug - quite baffled at the moment! Thanks very much, Anna -- Code used in the EditPage activity to save edits when the Back key gets pressed. Works fine, apart from bug described above. // Save everything when the Back key gets pressed public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (saveEdits()) { Context context = getApplicationContext(); CharSequence text = ' + title + ' has been saved; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); Intent i = new Intent(EditPage.this, HomeList.class); startActivity(i); } else { // failed to save! showDialog(SAVE_WARNING); } } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to open or register a new file extension in Android?
I see. Something as simple as intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:scheme=file / data android:mimeType=*/* / data android:pathPattern=.*epub / /intent-filter would catch all file downloads from browser. I'll dig more into this. The only thing I can suggest so far is: 1) have a wildcard intent filter to catch all files 2) check the file extension in onCreate(), onNewIntent(). if matches, handle it, pass the received intent with startNextMatchingActivity() otherwise. This is ugly but at least will work. On Jul 24, 8:29 am, Dmitry Manayev dmitry.mana...@gmail.com wrote: Thanks. Alex, .exe is registered in android mimeTypes,so if you specify */* it would be founded with all other types.But .my_type isn't registered in Android.So it wouldn't help.I think now your application could open diferent types of files. On 23 июл, 14:42, alex gsm...@gmail.com wrote: I had to specify android:mimeType=*/*. Here's an example: -- activity android:name=.activity.Activity intent-filter action android:name=android.intent.action.VIEW / category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / dataandroid:scheme=http / dataandroid:scheme=https / dataandroid:scheme=ftp / data android:host=* / data android:mimeType=*/* / data android:pathPattern=.*\\.exe / /intent-filter /activity -- On Jul 20, 4:37 pm, Dmitry Manayev dmitry.mana...@gmail.com wrote: Hi! I have problem with adding a new file type to android(the file type is .comap).I need to run my application with this file from android browser and from file manager. I know that I need to write a special intent-filter for that,but I don't know how,because this format hasn't any special,registered MIME type. I tried to write in AndroidManifest.xml to open a file test.comap: intent-filter action android:value=android.intent.action.VIEW / category android:value=android.intent.category.DEFAULT / dataandroid:scheme=file android:host=* android:path=sdcard/test.comap / /intent-filter But this doesn't work. How to do it right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Pausing VideoView when launching a new intent...
I call getCurrentPosition on the onPause method of my activity. So, what you're saying is maybe before onPause is called, the video has been stopped already? That makes sense. I'll look at th activity lifecycle again and see if there is another method I should use to pause the video. On Jul 24, 5:44 am, Mark Murphy mmur...@commonsware.com wrote: junker37 wrote: I'm thinking that the buffer must be lost somewhere, so I now try to capture the current position via videoView.getCurrentPosition(), however, this is always returning 0. When are you calling getCurrentPosition()? I am using getCurrentPosition() to update an elapsed-time counter in a video player, and it definitely works. I use MediaPlayer rather than VideoView, so it could be that this explains the difference in behavior. However, if you are calling getCurrentPosition() too late, it may be the video has stopped and, therefore, is actually at position 0. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 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] Re: Pausing VideoView when launching a new intent...
I took a look at the activity lfiecycle again and it seems onPause would be the only place I could get the current position before the activity is paused. The video has definitely not finished playing before onPause has been called. Is it possible that videoView.getCurrentPosition has not been implemented yet? On Jul 24, 7:52 am, junker37 junke...@gmail.com wrote: I call getCurrentPosition on the onPause method of my activity. So, what you're saying is maybe before onPause is called, the video has been stopped already? That makes sense. I'll look at th activity lifecycle again and see if there is another method I should use to pause the video. On Jul 24, 5:44 am, Mark Murphy mmur...@commonsware.com wrote: junker37 wrote: I'm thinking that the buffer must be lost somewhere, so I now try to capture the current position via videoView.getCurrentPosition(), however, this is always returning 0. When are you calling getCurrentPosition()? I am using getCurrentPosition() to update an elapsed-time counter in a video player, and it definitely works. I use MediaPlayer rather than VideoView, so it could be that this explains the difference in behavior. However, if you are calling getCurrentPosition() too late, it may be the video has stopped and, therefore, is actually at position 0. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 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] Re: Pausing VideoView when launching a new intent...
junker37 wrote: I took a look at the activity lfiecycle again and it seems onPause would be the only place I could get the current position before the activity is paused. The video has definitely not finished playing before onPause has been called. Is it possible that videoView.getCurrentPosition has not been implemented yet? No, it is implemented. Search Google Code Search for: package:android videoview and you will see the implementation. Most likely, by the time onPause() is called, the underlying MediaPlayer instance is stopped. The two differences in my case: 1. I'm using MediaPlayer directly, rather than VideoView, so I get finer-grained control over matters. You can see a sample video player using MediaPlayer over here: https://github.com/commonsguy/vidtry/tree 2. I am simply using postDelayed() to get control once a second and am updating a visual elapsed-time counter at that point based on getCurrentPosition() (note: this is in a separate project than the vidtry app I link to above). You could do the same thing, caching the last-known position for use when onPause() is called. You might be a second off, but I would hope that users would be amenable to that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 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] Re: Can't display GoogleMaps in application
Do you set satellite off? I had the same problem, after set satellite off, it has worked. Post your source code On Jul 22, 7:02 pm, Alex agmon...@gmail.com wrote: Hi guys, I'm trying to display GoogleMaps in my application, but instead of map I just get an empty screen with crosses and Google logo in the bottom left corner. I'm using Internet permission in manifest file, just as the library com.google.android.maps. I have also supported my application with Android Maps API key and I placed it in layout as android:apiKey value for MapView, but it still can't display the map. main.xml: com.google.android.maps.MapView android:id=@+id/myMapView android:layout_width=fill_parent android:layout_height=fill_parent android:enabled=true android:clickable=true android:apiKey=07vNiwHa094tV14bUdyK0VTtXx0eeAZlk6WdKXQ / manifest.xml: uses-library android:name=com.google.android.maps / ... uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / I have used two different apiKey values, regarding whether I signed the application with debug or my own created keystore, but it didn't work with none of them. If someone can help me, I would really appreciate it. Best regards, Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
And as I've said before they would need to do a crack per app and potentially per version of the app if the developer so desired. Its' a technique I've used for several years on various applications and I've always offered up the source code so people see for themselves it's not a trivial thing to crack. Anyway, we're getting way off topic, so unless you're actually going to try and do what you think is possible I can't see any benefit in continuing this discussion, because from what you're saying you're putting across an opinion that a task is relatively trivial without any knowlege of the tools needed to do the job or having ever tried to do it. Al. On Jul 24, 12:01 pm, Kaj Bjurman kaj.bjur...@gmail.com wrote: As I said previously. I have tried to protected java applications, and I have done what I described with pure java applications, without having the source code (I have even done it in assembler/machine code on non java applications). I don't know much about the dex format and what tools that are available to modify compiled classes, but it's only a matter of time before they are here, if they don't exist right now. Crackers don't think about if a program is expensive or not. They only want to get known for their talents, and they crack all popular applications, even if they are almost for free. So all popular applications get cracked, regardless of price, and time isn't an issue for the cracker. He doesn't think in economical terms. On 24 Juli, 10:44, Al Sutton a...@funkyandroid.com wrote: The confusion arose because your previous post said Replace the code that downloads the certificate and encrypts it, in this post you're talking about the download/decrypt code, the first is a combination of client code (download) and server code (encryption), the latter is client-only code. Referring to the download/decrypt replacement, the problem here is the amount of time it would take to find where the download/decrypt code resides in a compiled app, replace it, and recompile it. If you had the original source code then yes, you could do a drop in replacement, but if you had the source code you could easily strip out any protection mechanism. Seriously, try it on a compiled application, you'll find it takes you a lot longer than you think, and longer than many crackers would be willing to spend on a low-cost app. Al. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 in the HelloMapView tuto
I'm using the plugin ADT for Eclipse and the sdk is the 1.5. I've done what you said but it was already configured do you have thought about an other solution ??? (thx for your previous answer) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 in the HelloMapView tuto
It's seems like the Internet permission doesn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Save onDraw canvas
I want to to animation as follows. The first call of onDraw, I will draw the scene. Subsequent times, I want to translate the scene, by doing canvas.translate(dx, dy), but the canvas returned by onDraw is always blank. Thus, I have to redraw the whole scene again. public void onDraw(Canvas canvas){ canvas.translate(dx, dy); drawScene(canvas); } Is there anyway I can save the scene drawn on to canvas from the first time so that subsequent times, I just need to translate? This will improve performance significantly. 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] cant zoom , or set traffic view in map
Friends, in the following application-- package mycom.ju.gmap; //import HelloItemizedOverlay; import mycom.ju.gmap.R; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.*; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import com.google.android.maps.Overlay; import java.util.ArrayList; import java.util.List; import com.google.android.maps.ItemizedOverlay; import com.google.android.maps.OverlayItem; public class gmap extends MapActivity { //Called when the activity is first created. MapView mapView; Toast toast; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ mapView = (MapView)findViewById(R.id.mapv); mapView.setBuiltInZoomControls(true); mapView.displayZoomControls(true); mapView.setTraffic(true); } catch(Exception e){ toast = Toast.makeText(this,e.toString(), Toast.LENGTH_LONG); toast.show(); } setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { return true; } } ---main.xml--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/mainlayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.google.android.maps.MapView android:id=@+id/mapv android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true android:apiKey=02OwWVKUsUMSUwUZPEOHkWSQge2bW6FOISMYvDw / /LinearLayout The map is showing perfectly but but not in traffic view , neither the zooming button is visible . I used the try -- catchjust to check where the problem is . When ever I'm using mapv object to call any method of MapView class it's giving Null Pointer Exception . I even tried other constructor of MapView class like MapView( this, 02OwWVKUsUMSUwUZPEOHkWSQge2bW6FOISMYvDw) ; I even checked whether mapv contains null or not [ using mapv.equals (null)] . But it's not null either. But problem remains the same . 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: Help in the HelloMapView tuto
Can u plz explain ur prob in detail? N if possible plz post ur code snippet so that it'd be easier to identify ur prob. On Fri, Jul 24, 2009 at 7:40 PM, sweet junkbr...@gmail.com wrote: It's seems like the Internet permission doesn't work. -- Regards, Sujay Mike Ditka http://www.brainyquote.com/quotes/authors/m/mike_ditka.html - If God had wanted man to play soccer, he wouldn't have given us arms. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
On Jul 24, 6:01 am, Kaj Bjurman kaj.bjur...@gmail.com wrote: Crackers don't think about if a program is expensive or not. They only want to get known for their talents, and they crack all popular applications, even if they are almost for free. So all popular applications get cracked, regardless of price, and time isn't an issue for the cracker. He doesn't think in economical terms. This is exactly why it is a waste of time for developers to focus too much on preventing piracy when there is no proof that the piracy rate is higher than that of the general rate. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] documentation show all the classes offered by the SDK ?
Deal All, Is there a poster showing all the class and methodes offered by the android SDK and their inter dependence ? 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: Bug in activity stack if launching from Home icon?
Ah I see, that makes sense. Thanks for clearing that up for me :) On Jul 24, 4:27 pm, Dianne Hackborn hack...@android.com wrote: This is just an issue with how ADT launches the application, effectively under a different identity so resulting in two instances running if you also try to launch it from home. On Thu, Jul 23, 2009 at 10:22 PM, adamphillips12 adamphillip...@gmail.comwrote: I've noticed some strange behaviour with resuming a task from a Home icon. Very easy to replicate, just create a new bare bones android project using eclipse, don't need to add anything. Then follow these steps: 1. In eclipse, Run the project on a emulator or device. 2. Once the app installs and launches the first activity, press Home key. 3. Launch the app again by pressing its icon. 4. Press Back key. Now this part seems wrong, you'll go back to the original activity in the stack, instead of the Home screen, even though its been previously launched and what you expect is it to bring back the stack as it was left, with one activity. If you repeat steps 2-3, it will just keep adding the same activity to the stack. That is until you press Back all the way through the stack to the Home screen. Now this behaviour will never again replicate. It will be the correct (?) behaviour of bringing back the stack history at the state it was when Home was pressed. Note there are no behavioural modifications, this is just a default application. However, I tried many combinations of launchModes and stack clearing, they had no effect on the first run. Unless I'm interpreting the documentation wrong, when the user presses the Home key, the task is moved in to the background and simply brought back the next time they press the app icon? Why is the app icon altering the task it creates, if it already exists (with no flag modifications)? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
Just FYI, Jesusfreke has posted a dex [de]compiler set: http://jf.andblogs.net/ (Smali and baksmali). So there are already tools to do that (and Al, if you want to put up a bounty for a simple/repeatable hack, that'd go a lot farther than handwaving. Everyone else, if you want to claim that bounty, that'd go a lot..etc :) ..) On Fri, Jul 24, 2009 at 7:01 AM, Kaj Bjurman kaj.bjur...@gmail.com wrote: As I said previously. I have tried to protected java applications, and I have done what I described with pure java applications, without having the source code (I have even done it in assembler/machine code on non java applications). I don't know much about the dex format and what tools that are available to modify compiled classes, but it's only a matter of time before they are here, if they don't exist right now. Crackers don't think about if a program is expensive or not. They only want to get known for their talents, and they crack all popular applications, even if they are almost for free. So all popular applications get cracked, regardless of price, and time isn't an issue for the cracker. He doesn't think in economical terms. On 24 Juli, 10:44, Al Sutton a...@funkyandroid.com wrote: The confusion arose because your previous post said Replace the code that downloads the certificate and encrypts it, in this post you're talking about the download/decrypt code, the first is a combination of client code (download) and server code (encryption), the latter is client-only code. Referring to the download/decrypt replacement, the problem here is the amount of time it would take to find where the download/decrypt code resides in a compiled app, replace it, and recompile it. If you had the original source code then yes, you could do a drop in replacement, but if you had the source code you could easily strip out any protection mechanism. Seriously, try it on a compiled application, you'll find it takes you a lot longer than you think, and longer than many crackers would be willing to spend on a low-cost app. Al. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android BUG....
As a IT Architect working for several fortune companies, I can very well appreciate the prioritization process that is required to manage defects. My concerns here is that this was low-hanging fruit and should have only take one (1) developer about an hour or so to resolve. My clients concerns regarding this it affect their ability to manage customers with the same phone numbers. All they really wanted was an ETA on the resolution. They might have been fine if it was another 6-9 months, however, what was not acceptable to them was the Google's inability to provide basic communication on a defect that affected them. Again, don't get me wrong... I want Android to succeed. I think its got great potential, but someone has to pay attention to functional and usability aspects so something this dumb doesn't doesn't end up in release software again. -Derek On Jul 23, 1:04 pm, Romain Guy romain...@google.com wrote: The Android team is responding and resolving basic usability issues, and even non-basic ones, etc. Unfortunately, and believe me when I say we're sorry about it, we *cannot* fix *every single* bug. Some bugs are fixed right away, some take more time. On Thu, Jul 23, 2009 at 10:58 AM,dotclickdotcl...@gmail.com wrote: Good point... and I probably deserve the criticism. However, your comments only strengthen my original point of GOOGLE is not responding and resolving basic usability issues. This is one of the key reasons why a company I work with made the decision today to dump 100+ Android G1 phones that are only 9 months old and order non- Android phones. -D On Jul 15, 5:30 pm, Mark Murphy mmur...@commonsware.com wrote: dotclickwrote: So the only response I am going to get from Google is from someone who didn't read the message or take the time to research it. No, the only responses you will get is from people other than Google employees. As Romain Guy pointed out, if you read the response you were lambasting, you would notice that it is from a T-Mobile employee. It seems curious that you seem to have made the same error that you are complaining about -- not completely reading the email. It's almost as if making mistakes were, like, human or something. Of course, it is also curious that you appear to think this is an end-user tech support forum (which it is not) and that it is Google's primary responsibility to respond to you here (which it is not). But I digress. No status updates or responses on the bug report from 7+ months ago. Please point out the official public bug trackers for Windows Mobile, Blackberry, iPhone, and Palm WebOS. I'm not even sure there's one up for Symbian, and they're at least on the road to open source. Please point out where you get detailed, bug-level information months in advance of product releases for Windows Mobile, Blackberry, iPhone, Palm WebOS, and Symbian. Please point out how you -- whether via your own engineering efforts, or by hiring somebody, or by collecting interested people to raise money to hire somebody -- have a chance to fix bugs in Windows Mobile, Blackberry, iPhone, or Palm WebOS, as you can with Android. I'll give Symbian a mulligan here, since they're in progress on this issue. Had this same bug, or an equivalent one, affected you on one of these other platforms, the best-case scenario is that, after sitting in indefinite tech support queues, you would be told it is a bug and it may get fixed someday. Here, not only were you able to file the bug report without much effort (albeit with no better of a response), but you have options for spearheading a fix, which you lack with any other commercial-grade smartphone platform. Now, you may not elect to use any of those options to accelerate a fix, but that's your decision, not Google's. Regardless, you are no worse off than you would have been with any other platform with the same sort of bug. If you want to whine about how Android has bugs, be my guest, just don't whine about the lack of response, since that's all you'll get from anyone. Note: once Symbian gets a-rollin' in earnest on the open source front, the bar for Google and Android may get raised a fair bit, but we're not there yet. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training:http://commonsware.com/training.html -- 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
[android-developers] Re: finish() won't close activity
After more debugging, it seems to me that some MotionEvent events don't like no handling and are acting up. On Jul 23, 6:26 pm, Lewis Z. lzh...@gmail.com wrote: I have an EditText field and I want to pop up a new window/activity whenever a user touches/clicks the field. The new window has some widgets and of course Apply and Cancel buttons. Here is the code how I intercept the onTouch event. EditText ctlMaskEt = (EditText)findViewById(R.id.mask_field); ctlMaskEt.setOnTouchListener(new OnTouchListener() { public boolean onTouch (View v, MotionEvent event) { popMaskEditor(); return true; } }); Everythings work fine until I click the Apply and Cancel buttons. The API finish() won't close the new window unless I click the same button one more time. Calling popMaskEditor() from a button's OnClick event handler doesn't have this problem. Can someone please tell me why? How to fix this problem? Thanks a lot. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] [ANNOUNCE] ArtfulBits aiCharts for Android
Demo Movie: http://www.youtube.com/watch?v=3ho5wiV-o8g ArtfulBits aiCharts for Android OS is the professional solution with comprehensive features set. aiCharts is the complete framework that allows developer to enhance applications with slick interactive charts in mere hours (with available technical support, samples and tutorials). aiCharts provides excellent visual experience with flexible customization abilities. It's been designed exclusively for Android platform and compatible with Android version 1.1 and higher. Provided online documentation. ArtfulBits has a great experience in creation of developer tools and components. More than 4 years of intensive implementation of components for .NET platform gives us deep experience and understanding of developer’s demands. Several large and well-known vendors use our services and achieve significant results on market with our help. Right now ArtfulBits invests time and efforts into products for Google Android platform. Innovative OS with great potential and huge community is probably the best area where our company can exhibit both the talent and the experience. aiCharts is product that visualizing wide range of financial, business, engineering, and mathematical charts. Easy to learn API and tutorials allow quick start of the new component using and finishing integration in an hour. And modern visual appearance must be admired by users and customers. Instead of spending precious time on inventing charting components you can invest into your own application’s features list, which gives you more opportunities to succeed. Deatils about product: http://www.artfulbits.com/Android/aiCharts.aspx Please use promotion coupon: AICHARTS-I'M-IN-TOP100 that gives 50% discount for first 100 customers. Coupon is valid till: 31/07/2009. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Launching a Service at the startup
First, I have no desire to be evil. Yet I have an app that must listen for events, and it seems that the only way to hear those events is with a listener in a persistent service that starts up on device boot. The reason is that not all those events have a corresponding broadcast. There are also efficiency and UI issues in that data structures need to be rebuilt every time the service must start to deal with events. A particular example of interest to me is PhoneStateListener, and in particular incoming phone calls. I see no way around having a persistent service at this time, and in fact I need to take some special action to fairly quickly get the service going again should the system kill it. After all, the user downloaded the app and expects it to do what we say it does. Is there a better approach that meets the requirement yet also plays well with resource contention? Will there at least be more broadcasts in future that will complement additional listener events? I know this is asking for a lot, so perhaps being evil for now is in fact the lesser evil. I really do want the app to cooperate with the Android environment. On Jul 23, 3:58 pm, Dianne Hackborn hack...@android.com wrote: Mark answered how to do this, but please: think again about whether you really need to do this. Then think another time. And think once more. And if you are really really absolutely positively sure, this what you want to do, fine, but realize -- On current Android devices, we can keep only a small handful of applications running at the same time. Having your application do this is going to going to take resources from other things that at any particular point in time would be better used elsewhere. And in fact, you can be guaranteed that your service will -not- stay running all of the time, because there is so much other stuff that wants to run (other background services that are only running when needed will be prioritized over yours), or needs more memory for what the user is actually doing (running the web browser on complicated web pages is a great way to kick background stuff out of memory). We have lots of facilities for implementing applications so they don't need to do this, such as alarms, and various broadcasts from events going on in the system. Please please please use them if at all possible. Having a service run forever is pretty close to the side of evil. On Wed, Jul 22, 2009 at 5:43 PM, R Ravichandran ravirajami...@gmail.comwrote: Hello, I have a need to create a background service that starts up during the system boot up, and keeps running until the device is powered down. There is no UI or Activity associated with this. I created a class extending the android Service class, and added the setttings to the AndroidManifest.xml file. When I launch this service in the emulator, I don't see this launched at all. I have overrided almost all the methods in the Service class to put log statements, but none of them shows up. I believe the key is in the console message: [2009-07-22 17:38:59 - MyEventsManager] No Launcher activity found! [2009-07-22 17:38:59 - MyEventsManager] The launch will only sync the application package on the device! I am not sure what to make of this. Here is the AndroidManifest.xml file: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.test android:versionCode=1 android:versionName=1.0 application android:enabled=true android:icon=@drawable/icon android:label=@string/app_name service android:name=.MyEventsManager android:permission=android.permission.RECEIVE_BOOT_COMPLETED intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /service /application uses-sdk android:minSdkVersion=3 / /manifest Here is the console output: [2009-07-22 17:38:59 - MyEventsManager] -- [2009-07-22 17:38:59 - MyEventsManager] Android Launch! [2009-07-22 17:38:59 - MyEventsManager] adb is running normally. [2009-07-22 17:38:59 - MyEventsManager] No Launcher activity found! [2009-07-22 17:38:59 - MyEventsManager] The launch will only sync the application package on the device! [2009-07-22 17:38:59 - MyEventsManager] Performing sync [2009-07-22 17:39:01 - MyEventsManager] New emulator found: emulator-5554 [2009-07-22 17:39:01 - MyEventsManager] Waiting for HOME ('android.process.acore') to be launched... [2009-07-22 17:39:02 - Emulator] 2009-07-22 17:39:02.415 emulator[8874:10b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz. [2009-07-22 17:39:21 - MyEventsManager] HOME is up on device 'emulator-5554' [2009-07-22 17:39:21 - MyEventsManager] Uploading
[android-developers] Re: cant zoom , or set traffic view in map
You need to place the following line before findViewById()... setContentView(R.layout.main); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 24, 7:31 am, saptarshi chatterjee saptarshichatterj...@gmail.com wrote: Friends, in the following application-- package mycom.ju.gmap; //import HelloItemizedOverlay; import mycom.ju.gmap.R; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.*; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import com.google.android.maps.Overlay; import java.util.ArrayList; import java.util.List; import com.google.android.maps.ItemizedOverlay; import com.google.android.maps.OverlayItem; public class gmap extends MapActivity { //Called when the activity is first created. MapView mapView; Toast toast; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try{ mapView = (MapView)findViewById(R.id.mapv); mapView.setBuiltInZoomControls(true); mapView.displayZoomControls(true); mapView.setTraffic(true); } catch(Exception e){ toast = Toast.makeText(this,e.toString(), Toast.LENGTH_LONG); toast.show(); } setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { return true; } } ---main.xml--- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/mainlayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.google.android.maps.MapView android:id=@+id/mapv android:layout_width=fill_parent android:layout_height=fill_parent android:clickable=true android:apiKey=02OwWVKUsUMSUwUZPEOHkWSQge2bW6FOISMYvDw / /LinearLayout The map is showing perfectly but but not in traffic view , neither the zooming button is visible . I used the try -- catch just to check where the problem is . When ever I'm using mapv object to call any method of MapView class it's giving Null Pointer Exception . I even tried other constructor of MapView class like MapView( this, 02OwWVKUsUMSUwUZPEOHkWSQge2bW6FOISMYvDw) ; I even checked whether mapv contains null or not [ using mapv.equals (null)] . But it's not null either. But problem remains the same . 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] How to make andorid plugin does not start everything I launch eclipse
Hi, Is it possible to configure android eclipse plugin that it does not start up whenever I launch eclipse? I don't have android perspective enable, and yet android plugin start itself up as part of eclipse launch (i can tell by ddms port is no available). I would like android plugin to start when I click android perspective. Can you please tell me if that is possible? If so, how? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: GPS Project doesn't work on sdk 1.5
Does logcat output show any error messages? Please copy/paste your source file and the manifest file here so that we can better help you. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 24, 3:03 am, Lorenz lorenzoteod...@gmail.com wrote: Hi to everyone, I've inherited a project that worked on sdk 1.0, but when I try to use them on sdk 1.5 it crashes. I'm a beginner so I'm not able to understand where is the problem..So I hope that writing on this forum someone can help me..The project concerns the detection via GPS coordinates and the notification of events close to the location where it was at that time .FIrst of all where can I post the files?? 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] Paid app support for developers from other countires
Hi Guys, When is google going to provide support for paid apps support for users from other countries? Its been quite a qhile and in the last couple of months i have got just 2 mails regarding their support for additional countries? Im from India, any idea on when google is going to complete the process? Regards, R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Paid app support for developers from other countires
Hi Guys, When is google going to provide support for paid apps support for users from other countries? Its been quite a qhile and in the last couple of months i have got just 2 mails regarding their support for additional countries? Im from India, any idea on when google is going to complete the process? Regards, R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 taking More time to open main page
I see a slow boot even with Ubuntu. But canceling the launch and relaunching brings it up fast. MCON Dev wrote: I use Fedora and its fast. Vista its really slow (20 mins, to launch). On Fri, Jul 24, 2009 at 1:06 PM, android.vinny vinny.s...@gmail.com wrote: HI My emulator is taking more time to open main page what may be the Problem Can any body give some suggestions for this .. thanks a lot in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: HTML5 Schedule
I would like to know when HTML5 will be implemented as well, lacking that, I would like better documentation on how to use the WebView Plugin Architecture so that I can use the same plugins (i.e. Gears) that are currently being used in the Android Browser, so that I don't have to re-invent the wheel in the short term. Also, what are the current roadblocks that are preventing this from happening? On Jul 22, 12:41 am, Miguel Paraz mpa...@gmail.com wrote: Hi, What is the schedule forHTML5support in WebKit? Specifically - offline web applications and storage. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 taking More time to open main page
Brian Conrad wrote: I see a slow boot even with Ubuntu. But canceling the launch and relaunching brings it up fast. I run into this on occasion as well with Ubuntu, where the emulator launch seems to stall on the Android-with-animated-gleam screen. I've just been assuming there's some race condition bug in the emulator/qemu interaction. As you indicate, closing the emulator and trying again seems to work for me. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need help for your Android OSS project? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Mipmap Generation
In texture loading function please try the following gl.glGenTextures(1, texID, 0); gl.glBindTexture(GL10.GL_TEXTURE_2D, texID[0]); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR_MIPMAP_LINEAR); On Jul 15, 12:08 am, Mike mmille...@gmail.com wrote: Well I've come up with a solution, but I'd still like to hear from others if you have a better way of doing it. private int loadTexture(GL10 gl, Bitmap bmp) { int level = 0; int size = bmp.getHeight(); int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); int textureId = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, textureId); while(size = 1) { GLUtils.texImage2D(GL10.GL_TEXTURE_2D, level, bmp, 0); if(size == 1) break; level++; size /= 2; Bitmap bmp2 = Bitmap.createScaledBitmap(bmp, size, size, true); bmp.recycle(); bmp = bmp2; } return textureId; } On Jul 14, 9:20 am, Mike mmille...@gmail.com wrote: I've created a simple heightmap renderer for Android, and am at the point where I'd like to apply textures to the terrain. I've had success with applying a simple texture but there is an unbearable amount of texture aliasing visible, I guess because there are no mipmaps for the texture. I could not find any way of automatically generating mipmaps as all the usual OpenGL methods seem to be unsupported. Have any of you figured out how to generate mipmaps on Android? Do we need to write our own implementation to to it? Thanks, Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Inserting Photo to Contacts
Yes, People.setPhotoData worked, thanks. Here is what I ended up doing - I hope others can also benefit from this. Bitmap photo = myImage.getBitmap(); if (photo != null) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); photo.compress(Bitmap.CompressFormat.JPEG, 75, stream); People.setPhotoData(getContentResolver(), uri, stream.toByteArray ()); } On Jul 24, 1:22 am, quill quill...@163.com wrote: Use Contacts.People.setPhotoData to insert a photo. On Jul 23, 9:21 pm, Serkan Ozel serkano...@gmail.com wrote: Hello Friends, I was wondering if anyone has been able to accomplish this. I'm able to insert entries into contacts (from my app) with name, phone and email however I can't seem to add a photo to these entries. This works: ContentValues values = new ContentValues(); values.put(People.NAME, Serkan Ozel); Uri uri = getContentResolver().insert(People.CONTENT_URI, values); continuing this fails: photoUri = Uri.withAppendedPath(uri, Contacts.Photos.CONTENT_DIRECTORY); values.clear(); values.put(Contacts.Photos.DATA, image.getByteArray()); getContentResolver().insert(photoUri, values); This is the stack trace: java.lang.UnsupportedOperationException: Cannot insert into URL: content://contacts/people/36/photo at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:131) at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:111) at android.content.ContentProviderProxy.insert (ContentProviderNative.java:340) at android.content.ContentResolver.insert(ContentResolver.java:476) Any help would be appreciated. Thanks- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 make andorid plugin does not start everything I launch eclipse
what you are seeing is the android java specific builder kick in to rebuild projects in the workspace.. Fred Grott http://mobilbytes.wordpress.com On Jul 24, 11:08 am, n179911 n179...@gmail.com wrote: Hi, Is it possible to configure android eclipse plugin that it does not start up whenever I launch eclipse? I don't have android perspective enable, and yet android plugin start itself up as part of eclipse launch (i can tell by ddms port is no available). I would like android plugin to start when I click android perspective. Can you please tell me if that is possible? If so, how? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Please assist with sensors.
Glad you feel that way. This is one of those gems that people couldn't live without. Richard On Jul 22, 6:54 pm, Rud k5...@arrl.net wrote: Thanks, Richard for the pointer to my blog. That makes it all worth the effort. Rudhttp://mysticlakesoftware.blogspot.com/ On Jul 22, 6:03 pm, Richard Schilling richard.rootwirel...@gmail.com wrote: Here is a really good example:http://mysticlakesoftware.blogspot.com/2009/07/sensor-accelerometer-m... This will get you pointed in the right direction. Richard Schilling Root Wireless On Jul 22, 2:54 pm, Mike internet...@hotmail.com wrote: Hello, i am in dire need of some assistance. Assume the device is held in landscape position, the display facing to the user, what i'd like to detect is if the device is rotated clock wise or counter clock wise. Sounds pretty simple, but i am trying for two days now without success. Could you please teach me how to archive it. Thanks in advance, Mike- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] expected apps for...
video playback music playback file compression/decompression internet browsing in these categories, are there standard applications that will be part of the OS? if so, what are they and what are the capabilities? i am assuming Chrome will be the browser for internet browsing. but what about file compression/decompression? and of course video and music playback? will Picasa be available for Android? LT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Show notification dialog during incoming call.
Hi Ronald, try to use a builder for the dialog in the onCallStateChanged-method of your PhoneStateListener.It has to know the Context of your Activity the PhoneStateListener runs in. AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setMessage(Are you sure you want to exit?) .setCancelable(false) .setPositiveButton(Yes, new DialogInterface.OnClickListener () { public void onClick(DialogInterface dialog, int id) { Log.d(TAG, onClick(): entered...); } }) .setNegativeButton(No, new DialogInterface.OnClickListener () { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); On Jul 21, 2:57 pm, Ronald Pompa ronald.po...@gmail.com wrote: Hi. I've got a PhoneStateListener to seecallstate changes, when acall isincomingI make my app show a toast notification to display caller data which I retrieve from a search service. Due to toasts limitation, i would like to show a dialog instead which allows me to show the notification longer and customize it with imageviews etc... The problem is that when I implement the dialog and execute the show method in the state listener class, my application crashes. Does anyone know how to implement this and have an example? It seems like WhitePages have solved this with their Caller ID app. http://blog.whitepages.com/2009/02/27/caller-id-by-whitepages-a-new-a... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Floating button ... ?
Hi, I was wondering whether anyone has written any code to implement a customized button that can be placed anywhere on the device screen (probably based on coordinates etc.) which will sit on top of a layout. Say, you have a LinearLayout with a couple of vertical sublayouts drawn on a background and you want to add a button somewhere on the display. Cheers, Emre _ Stay in the loop and chat with friends, right from your inbox! http://go.microsoft.com/?linkid=9671354 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Have ListView and other widgets scroll as a whole
Hello all, I'm trying to achieve the following with my Android search app: - 2 input boxes where the user can enter criteria to search for - 1 search button - when the search button is clicked, a search is performed and on the same page the matches are shown *below* the 2 input boxes and search button. - the results can be quite a few (say up to 50), which won't fit all on the viewable part of the screen, so the user has to be able to scroll down in the results. - when the user scrolls down over the results, the 2 input boxes + search button should of course also scroll up out of sight. Basically the behaviour you get when you for example do a google search on google.com. But, for clarity: I don't want to use the WebView. Note that there should be no scrollbar for the results only (that can be done easily with a standard ListView), the all needs to scroll as a whole. The reason I want this behavior is that I don't want to direct the user to a next screen with the search results; that would be so annoying having to go back to the search screen all the time if you want to enter another search criteria, like if you figured out you made a typo. Now I've read most posts about possible solutions, quite a few people asked for this before, like: http://groups.google.com/group/android-developers/browse_thread/thread/b7d2b7c275ac730f/803f40201920c6d9?lnk=gstq=scrollview+listviewpli=1 http://groups.google.com/group/android-developers/browse_thread/thread/3bfb013704d886fb/a556ab75f22c8dd1?lnk=gstq=scrollview+listview http://groups.google.com/group/android-developers/browse_thread/thread/af85d0ccddfd10d7/b4d705341719382c?lnk=gstq=scrollview+listview http://groups.google.com/group/android-developers/browse_thread/thread/77acd4e54120b777/00fe963ec94d78ad?lnk=gstq=scrollview+listview http://groups.google.com/group/android-developers/browse_thread/thread/a05227c317c8ad8d/86e6f054fba30828?lnk=gstq=scrollview+listview http://groups.google.com/group/android-developers/browse_thread/thread/fd0da00fe94ffed8/1d3bd9b81dd7d3e3?lnk=gstq=scrollview+listview But I haven't been able to find the real solution for my requirements. I've also not seen any apps yet that do implement anything like this, though I haven't seen all apps. This what I already tried on the emulator: a) ListView inside a Scrollview. Thus: Scrollview EditText EditText Button ListView /ScrollView The app looks like I want it; I calculate the total height of the ListView items and set the ListView's height to that. This way there's no scrollbar on the ListView itself, only the Scrollview's scrollbar shows. And I can scroll down in the ListView entries using the down key. Problems: multiple posts mention to NOT do this, scrolling gets confused. And indeed, although the result is exactly how I want it to look, scrolling acts up: stepping through the entries in the list below what's visible, scrolling of the whole (performed by the ScrollView) stops until the last entry is reached! So unless I maybe make my own custom ListView that doesn't perform any scrolling (or whatever fixes this behaviour), this solution is a dead end. Any tips would be most welcome. b) Fixed listviewheader in a ListView (no ScrollView) containing the 2 boxes and searchbutton, more or less like http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ and in the API demo Views/Lists/8. photos. Thus: LinearLayout ListView /LinearLayout In the code I then set the header of the list to this separate view: LinearLayout EditText EditText Button /LinearLayout Problems: Firstly: the user has to scroll a lot more to see all results because the header keeps occupying the top of the screen. Secondly, with the emulator up-key I can't step (focus) onto the Search button or input boxes anymore! If I turn on focusability for the header, I can only step up onto the whole header, not the separate fields. If I turn it off, nothing happens, I can only scroll up to the top entry in the resultlist. Thus this might work (though not completely matching my requirements), but only if is it possible to make the inputboxes + searchbutton part of the scrolling up focus sequence. Is this possible? c) Inputboxes + search button separate from the ListView, having the inputboxes + search button fixed on top, ListView below them, scrollable (e.g. in a FrameLayout). Got this to work, but I don't want the inputfields to be fixed, so just like b) dismissed. - Other solutions mentioned in posts but not tried yet: 1) use a LinearLayout per entry and attach an adapter to it, having listeners on the adapter to reload the layout. Could this give me the behaviour I want? 2) use tabs. Nope that's a completely different look and feel than what I'm trying to achieve. 3) use ViewFlipper or one of its kin and create your own setup for flipping between the list and the rest of the contents of the ScrollView. Sounds interesting, but are there any examples of this or
[android-developers] Security application needs developer.
This application is yours for taking. Phone camera would detect intruder movement, photograph intruder, send photograph to remote storage, send text messages asking help, send current phone GPS position resume camera motion detection after 30 more seconds. Phone would not indicate security app is operative or available. If thief steals phone, owner would continue to get pictures location of thief. Application would include all Find My Iphone functions except needing subscription to external service. Comparable service at fixed location would cost me $1200 plus $45 per month. For $10 per month, I could add a phone to my account use it for 24 hour security anywhere is cellular service. Also could use existing phone while I sleep. Please develop this application so I can use it. Eric li...@ericelliott.us --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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! How can i replace the contact with my own?
I have two questions: 1. What should I do if I want to replace the contact program with my own? 2. If I don't replace it. Can I just add something to it? like a menu item, or something. If possible, how to do it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] about wchar_t to char
Hello developers, ndk in how the char convert wchar_t Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: R.java is not being generated
Maybe your .project has not the nature or the entry for the builder anymore? On Jul 23, 7:23 pm, Daniel Green legendra...@gmail.com wrote: I've been working on a project for several weeks now, and just tonight I started having a problem. The R.java file is no longer being generated. I've attempted to clean the project (the first time I do this it removes the R.java file but doesn't regenerate it) and have tried uninstalling and reinstalling the SDK. I've also tried resetting adb to no avail. This problem does not occur in my other Android projects. They clean just fine and regenerate the R.java file like nothing is wrong. This particular project is the only one suffering from this problem. Does anyone have any insight? Thanks, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Intent to view sms?
Chris, would you please tell me how you fixed that problem? how you can add your app into the notification? Thank you. On 6月29日, 下午9时01分, Seer gilligan.ch...@gmail.com wrote: What i am trying to do is write an app as an alternative to the built in sms viewer when sms are received. I don't want toreplacethe exisiting sms notification but want my app to be one of hte apps that shows up as a choice when you click on the notification to view the sms. Similar to how it is with chomp sms. I have sms sending working and my app pops up there but no matter what i do i can not get my app to popup in hte list of apps to view sms's. I hope one of you guys and girls can help me as i just can't seem to sort this one out. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] about wchar_t to char
ndk in how the char convert wchar_t Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Mobile billing payments
Hi, do any of you know if it is possible to deploy an application for free inthe market and then sell additional features asking for payments through operators billing? I have seen for example the Payforit solution in UK, but it is not clear to me how it works. Do you kwno other ways to sell with mobile phone billing? I guess that a lot of people do not want to setup a Checkout account, but if they wuold simply need to do a click, it would be easier to be paid. Thanks, Giulio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 listen for touch events from *Lock Screen* and *Home Screen*
I want to listen for the touch events from Lock Screen and Home Screen, is there any way i can tap those to my applications. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Developers Guide] Error in Hello, WebView
Hi, there is a typo in the Hello, WebView example in the Android Developers guide ( http://developer.android.com/guide/tutorials/views/hello-webview.html ) In the second section, under 2., the line webview.setWebViewClient(new WebViewClientDemo()); should rather be webview.setWebViewClient(new HelloWebViewClient()); Thanks! Niko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Experimental Bluetooth Library
I've written a simple library that provides access to some Bluetooth features: local device properties, remote device discovering, pairing and client rfcomm connections management. Currently service discovery and other feature are not supported. This library does not require a rooted device: it works with any device with its bundled firmware I've been waiting for someone more knowledgeable than me to do this. Hopefully, I'll be talking to my LEGO robots in no time. Thanks Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Yaffs2 Image Help
Is there a way to get the files out of a yaffs2 image? I am running the Android emulator and see that it creates a userdata-qemu.img which I am assuming is a yaffs2 image containing all my user data. Is it possible to take this image and get the actual content (file structure and files) out of it? I tried the unyaffs tool, but it did not work. 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: run app after installation using PACKAGE_ADDED or other mechanism?
I don't understand what you mean about persistent alarms -- alarms are persistent, until a reboot, at which point yes if you want to have alarms scheduled you need to handle BOOT_COMPLETED. Also the next version of the platform should allow an app to be told when it is updated, though you still will deliberately not be launched when first installed. On Tue, Apr 14, 2009 at 5:39 AM, M. Dodd intern...@gmail.com wrote: All nice and well - if the API for AlarmManager supported persistent alarms. Currently, if you update an application your alarms will go bye bye until the phone reboots - no? Requiring a reboot just to reset a few silly alarms seems quite excessive to me - and definitely prevents us from taking full advantage of the platform. On 25 Feb, 04:58, Dianne Hackborn hack...@android.com wrote: On Tue, Feb 24, 2009 at 3:38 PM, Peter Jeffe pje...@gmail.com wrote: There are many apps that aren't just simple foreground processes, and by limiting what developers can do in this way you're not allowing us to take full advantage of the platform. That seems quite an exaggeration to me. It's the difference between automatically starting things up as soon as the .apk is downloaded, before the user even has a chance to be told of those and launch it, vs. letting the user go and start the app, that first time, when they want. How is this not being able to take full advantage of the platform? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to listen for touch events from *Lock Screen* and *Home Screen*
Sorry, no way without modifying that code. On Thu, Jul 23, 2009 at 10:26 PM, Riyaz goo...@riyaz.otherinbox.com wrote: I want to listen for the touch events from Lock Screen and Home Screen, is there any way i can tap those to my applications. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Have ListView and other widgets scroll as a whole
MarcoAndroid wrote: So my question: has anybody implemented this in some way? Yes. You should be able to use my recently-released MergeAdapter: https://github.com/commonsguy/cwac-merge/tree You would hand the MergeAdapter your initial set of ordinary views, plus an empty Adapter of some form for your search results. When your search is complete, populate your formerly-empty adapter with the results, and they should show up. If that doesn't work, it's a scenario I need to support myself within the next couple of weeks, so we should be able to get it going for you one way or another. I'll be adding more documentation about it in the coming weeks, both in the README and in a blog post on AndroidGuys. Questions about it should go to the cw-android Google Group: http://groups.google.com/group/cw-android -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now 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] Re: Clickable ListView element?
Excellent! Thanks for posting this eags. From all of the postings I've seen from people looking to do something similar, this should be a big help. Just started working through this to adapt it to my project, but I'm getting a bunch of syntax errors. I should probably start a project from scratch and get this one working first. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Yaffs2 Image Help
http://code.google.com/p/unyaffs/ -Dan On Thu, Jul 23, 2009 at 12:50 PM, ashkash ajotwan...@gmail.com wrote: Is there a way to get the files out of a yaffs2 image? I am running the Android emulator and see that it creates a userdata-qemu.img which I am assuming is a yaffs2 image containing all my user data. Is it possible to take this image and get the actual content (file structure and files) out of it? I tried the unyaffs tool, but it did not work. 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: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
As AndAppStore doesn't make a profit there's little I can offer in the way of a prize, but if you want to create a simple/repeatable hack to shut me up you're more than welcome. Al. On Jul 24, 4:10 pm, Disconnect dc.disconn...@gmail.com wrote: Just FYI, Jesusfreke has posted a dex [de]compiler set:http://jf.andblogs.net/(Smali and baksmali). So there are already tools to do that (and Al, if you want to put up a bounty for a simple/repeatable hack, that'd go a lot farther than handwaving. Everyone else, if you want to claim that bounty, that'd go a lot..etc :) ..) On Fri, Jul 24, 2009 at 7:01 AM, Kaj Bjurman kaj.bjur...@gmail.com wrote: As I said previously. I have tried to protected java applications, and I have done what I described with pure java applications, without having the source code (I have even done it in assembler/machine code on non java applications). I don't know much about the dex format and what tools that are available to modify compiled classes, but it's only a matter of time before they are here, if they don't exist right now. Crackers don't think about if a program is expensive or not. They only want to get known for their talents, and they crack all popular applications, even if they are almost for free. So all popular applications get cracked, regardless of price, and time isn't an issue for the cracker. He doesn't think in economical terms. On 24 Juli, 10:44, Al Sutton a...@funkyandroid.com wrote: The confusion arose because your previous post said Replace the code that downloads the certificate and encrypts it, in this post you're talking about the download/decrypt code, the first is a combination of client code (download) and server code (encryption), the latter is client-only code. Referring to the download/decrypt replacement, the problem here is the amount of time it would take to find where the download/decrypt code resides in a compiled app, replace it, and recompile it. If you had the original source code then yes, you could do a drop in replacement, but if you had the source code you could easily strip out any protection mechanism. Seriously, try it on a compiled application, you'll find it takes you a lot longer than you think, and longer than many crackers would be willing to spend on a low-cost app. Al. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: App opens previous activity - but only intermittently
Well, I'd say if you are done with the EditPage activity, then you'd want to call finish() on it. I assume that the way this this works is: User is on HomeList, hits some button (or other trigger) to open EditPage, makes edits on EditPage, hits Back to go back to HomeList? If that is the workflow, I'd say you would want not to use startActivity(i) to go back to HomeList, but rather simply finish() EditPage. On Jul 24, 5:23 am, Anna PS annapowellsm...@googlemail.com wrote: Hi all, This is an intermittent bug in one of my apps. I don't expect anyone to solve it immediately, but I'd appreciate any thoughts on how to start debugging! So, my app lets users edit an item (in the EditPage activity). When they press the Back key, the desired behaviour is that it saves their edits and returns them to the home page (the HomeList activity). The code for this is below. It works fine. Except... The bug is this. Some users report that sometimes when they reopen the application after a pause, they are seeing *not* the home page, where they left the application - but the previous edit activity. Crucially, they are also seeing the edit activity without their saved edits - effectively losing their most recent edits :( I've been able to reproduce this myself. It only happens after the application hasn't been opened for a while. If I save something, minimize the application and reopen it straight away, it shows the HomeList activity just fine, and the edits have all been saved. But if I save something, leave it for a couple of hours and then reopen it, it shows the previous EditPage activity, without the saved edits (i.e. in the state that the EditPage activity was previously launched). Any ideas, anyone? I had wondered whether it was due to the Back button being used to return the user to the HomeList activity - maybe Android thinks that the Back button means that the HomeList is not the most recent activity, instead the EditPage is. I'd like to carry on using the Back button if possible, though. And in particular, I'm puzzled why it only happens after the app has been idle for an hour or so, and not immediately? Is it something to do with Android's memory management? As I say, would appreciate any tips on how to debug - quite baffled at the moment! Thanks very much, Anna -- Code used in the EditPage activity to save edits when the Back key gets pressed. Works fine, apart from bug described above. // Save everything when the Back key gets pressed public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (saveEdits()) { Context context = getApplicationContext(); CharSequence text = ' + title + ' has been saved; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); Intent i = new Intent(EditPage.this, HomeList.class); startActivity(i); } else { // failed to save! showDialog(SAVE_WARNING); } } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Problem of vertical alignment in a RelativeLayout
Very shortly, because I do not have much time. Thanks so much Peli, you saved my life ;) I did not think of the layout_weight option... When I have time, I should post the solution, so that everyone enjoys. Cheers, Édouard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 can i show email notification?
The Android SDK has a feature for notification: http://developer.android.com/reference/android/app/Notification.html That would not only make your job easier, but would make the notification consistent with the standard Android UI. Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. P.S.: I'm happy to assist you with notification, but you're going to have to do your own punctuation. On Jul 23, 10:26 pm, android.vinny vinny.s...@gmail.com wrote: Hi How can i show the email notification when a ne w mail i get to my mail i wan tot show the image when a new main arrived to my inbox. ] can any body give me suggestion regarding this .. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
Al Sutton wrote: As AndAppStore doesn't make a profit there's little I can offer in the way of a prize, but if you want to create a simple/repeatable hack to shut me up you're more than welcome. Clearly, therefore, we need a bounty to raise a bounty for the simple/repeatable hack... *ducks rotten tomatoes thrown in my direction* -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now 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] Re: App opens previous activity - but only intermittently
That's a creative way to work with Android lifecycle management. In fact you don't need to tell Android to go to the Home page when the user presses the back button. If you did nothing special when the user pressed the back button, Android would call onPause() and go to the previous Activity. Activities are like a stack. So when you call startActivity(), you are telling Android put this activity on top of mine. Instead, just wait for Android to tell your Edit activity that it's about to go away (from the back button which pops one activity off the stack, or the home button which pops them all, or other causes), and save your data in onPause(). You can then reload it in onResume() when Android tells your activity to start back up. Incidentally, Android also calls onResume() the very first time your activity is launched. In case you've not seen the activity lifecycle description, here it is: http://developer.android.com/guide/topics/fundamentals.html#actlife Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 24, 5:23 am, Anna PS annapowellsm...@googlemail.com wrote: Hi all, This is an intermittent bug in one of my apps. I don't expect anyone to solve it immediately, but I'd appreciate any thoughts on how to start debugging! So, my app lets users edit an item (in the EditPage activity). When they press the Back key, the desired behaviour is that it saves their edits and returns them to the home page (the HomeList activity). The code for this is below. It works fine. Except... The bug is this. Some users report that sometimes when they reopen the application after a pause, they are seeing *not* the home page, where they left the application - but the previous edit activity. Crucially, they are also seeing the edit activity without their saved edits - effectively losing their most recent edits :( I've been able to reproduce this myself. It only happens after the application hasn't been opened for a while. If I save something, minimize the application and reopen it straight away, it shows the HomeList activity just fine, and the edits have all been saved. But if I save something, leave it for a couple of hours and then reopen it, it shows the previous EditPage activity, without the saved edits (i.e. in the state that the EditPage activity was previously launched). Any ideas, anyone? I had wondered whether it was due to the Back button being used to return the user to the HomeList activity - maybe Android thinks that the Back button means that the HomeList is not the most recent activity, instead the EditPage is. I'd like to carry on using the Back button if possible, though. And in particular, I'm puzzled why it only happens after the app has been idle for an hour or so, and not immediately? Is it something to do with Android's memory management? As I say, would appreciate any tips on how to debug - quite baffled at the moment! Thanks very much, Anna -- Code used in the EditPage activity to save edits when the Back key gets pressed. Works fine, apart from bug described above. // Save everything when the Back key gets pressed public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (saveEdits()) { Context context = getApplicationContext(); CharSequence text = ' + title + ' has been saved; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); Intent i = new Intent(EditPage.this, HomeList.class); startActivity(i); } else { // failed to save! showDialog(SAVE_WARNING); } } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Yaffs2 Image Help
I tried the unyaffs tool you linked to, but it does not seem to work. I compiled it and ran it with userdata-qemu.img as the input, but it just comes back with end of image and does not extract the files. On Jul 24, 1:31 pm, dan raaka danra...@gmail.com wrote: http://code.google.com/p/unyaffs/ -Dan On Thu, Jul 23, 2009 at 12:50 PM, ashkash ajotwan...@gmail.com wrote: Is there a way to get the files out of a yaffs2 image? I am running the Android emulator and see that it creates a userdata-qemu.img which I am assuming is a yaffs2 image containing all my user data. Is it possible to take this image and get the actual content (file structure and files) out of it? I tried the unyaffs tool, but it did not work. Thanks.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Yaffs2 Image Help
./unyaffs2 image-file-name all the files/dirs will be dumped in the same directory .. -Dan On Fri, Jul 24, 2009 at 11:29 AM, ashkash ajotwan...@gmail.com wrote: I tried the unyaffs tool you linked to, but it does not seem to work. I compiled it and ran it with userdata-qemu.img as the input, but it just comes back with end of image and does not extract the files. On Jul 24, 1:31 pm, dan raaka danra...@gmail.com wrote: http://code.google.com/p/unyaffs/ -Dan On Thu, Jul 23, 2009 at 12:50 PM, ashkash ajotwan...@gmail.com wrote: Is there a way to get the files out of a yaffs2 image? I am running the Android emulator and see that it creates a userdata-qemu.img which I am assuming is a yaffs2 image containing all my user data. Is it possible to take this image and get the actual content (file structure and files) out of it? I tried the unyaffs tool, but it did not work. Thanks.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: App opens previous activity - but only intermittently
Thanks for the suggestions both - they sound plausible. Yusuf, I like creative, very polite :) Anyway I'll try using finish() and see if it fixes the problem... Cheers Anna On Jul 24, 7:56 pm, Yusuf T. Mobile yusuf.s...@t-mobile.com wrote: That's a creative way to work with Android lifecycle management. In fact you don't need to tell Android to go to the Home page when the user presses the back button. If you did nothing special when the user pressed the back button, Android would call onPause() and go to the previous Activity. Activities are like a stack. So when you call startActivity(), you are telling Android put this activity on top of mine. Instead, just wait for Android to tell your Edit activity that it's about to go away (from the back button which pops one activity off the stack, or the home button which pops them all, or other causes), and save your data in onPause(). You can then reload it in onResume() when Android tells your activity to start back up. Incidentally, Android also calls onResume() the very first time your activity is launched. In case you've not seen the activity lifecycle description, here it is:http://developer.android.com/guide/topics/fundamentals.html#actlife Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 24, 5:23 am, Anna PS annapowellsm...@googlemail.com wrote: Hi all, This is an intermittent bug in one of my apps. I don't expect anyone to solve it immediately, but I'd appreciate any thoughts on how to start debugging! So, my app lets users edit an item (in the EditPage activity). When they press the Back key, the desired behaviour is that it saves their edits and returns them to the home page (the HomeList activity). The code for this is below. It works fine. Except... The bug is this. Some users report that sometimes when they reopen the application after a pause, they are seeing *not* the home page, where they left the application - but the previous edit activity. Crucially, they are also seeing the edit activity without their saved edits - effectively losing their most recent edits :( I've been able to reproduce this myself. It only happens after the application hasn't been opened for a while. If I save something, minimize the application and reopen it straight away, it shows the HomeList activity just fine, and the edits have all been saved. But if I save something, leave it for a couple of hours and then reopen it, it shows the previous EditPage activity, without the saved edits (i.e. in the state that the EditPage activity was previously launched). Any ideas, anyone? I had wondered whether it was due to the Back button being used to return the user to the HomeList activity - maybe Android thinks that the Back button means that the HomeList is not the most recent activity, instead the EditPage is. I'd like to carry on using the Back button if possible, though. And in particular, I'm puzzled why it only happens after the app has been idle for an hour or so, and not immediately? Is it something to do with Android's memory management? As I say, would appreciate any tips on how to debug - quite baffled at the moment! Thanks very much, Anna -- Code used in the EditPage activity to save edits when the Back key gets pressed. Works fine, apart from bug described above. // Save everything when the Back key gets pressed public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { if (saveEdits()) { Context context = getApplicationContext(); CharSequence text = ' + title + ' has been saved; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); Intent i = new Intent(EditPage.this, HomeList.class); startActivity(i); } else { // failed to save! showDialog(SAVE_WARNING); } } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 simulate a TrackBall Event in emulator?
Hi, Can you please tell me how can I simulate a TrackBall Event in emulator? I just the left/right black button in the middle of the emulator, but i set break point in dispatchKeyEvent() and dispatchTrackBallEvent() of the View.java. But only dispatchKeyEvent() breakpoint get activated. I want to see 'dispatchTrackBallEvent' get breaks. Can you please tell me how to simulate a TrackBall Event? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ALL DEVELOPERS PIRATED APPLICATION ALL OVER!
I will offer a bounty of 5 UK pounds if you can raise me a bounty of 1000 UK pounds :). (don't worry, I'm leaving the stage already) Al. On Jul 24, 6:49 pm, Mark Murphy mmur...@commonsware.com wrote: Al Sutton wrote: As AndAppStore doesn't make a profit there's little I can offer in the way of a prize, but if you want to create a simple/repeatable hack to shut me up you're more than welcome. Clearly, therefore, we need a bounty to raise a bounty for the simple/repeatable hack... *ducks rotten tomatoes thrown in my direction* -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android_ from Apress Now 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] Get contents of EditText to string
Hi all, I have an EditText where I get input from user, but then I show the contents of my EditText in a TextView using the .toString() it returns getClass().getName() + '@' + Integer.toHexString(hashCode()) so it show me the classn...@integervalue not the text which user inputs, please guide me how to get my contents, do I have to override .toString() method ? Thanks -- Bibrak Qamar NUST-SEECS --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Home Screen Sample
Thanks for this solution. On Jul 10, 4:14 am, camandroid pras...@gmail.com wrote: Apparently bindFavorites() aims only to retrieve the favorite application. Since we don't have this file /system/etc/favorites.xml, we are not obliged to manage it. What I did is: - initialize mFavorites at the top and - fill it from favReader only if favReader != null. of course at the step: mApplicationsStack.setFavorites(mFavorites); mFavorites is an empty list. But this will prevent the crash in ApplicationsStackLayout.stackApplications(ListApplicationInfo applications, int childLeft, int childTop) applications (comes from mFavorites) is then not null. private void bindFavorites(boolean isLaunching) { if (!isLaunching || mFavorites == null) { if (mFavorites == null) { mFavorites = new LinkedListApplicationInfo(); } else { mFavorites.clear(); } FileReader favReader = null; // Environment.getRootDirectory() is a fancy way of saying ANDROID_ROOT or /system. final File favFile = new File(Environment.getRootDirectory (), DEFAULT_FAVORITES_PATH); try { favReader = new FileReader(favFile); } catch (FileNotFoundException e) { Log.e(LOG_TAG, Couldn't find or open favorites file + favFile); } if (favReader != null) { final Intent intent = new Intent(Intent.ACTION_MAIN, null); final PackageManager packageManager = getPackageManager(); try { ... } catch (XmlPullParserException e) { Log.w(LOG_TAG, Got exception parsing favorites., e); } catch (IOException e) { Log.w(LOG_TAG, Got exception parsing favorites., e); } } } mApplicationsStack.setFavorites(mFavorites); } This works fine for me. I'd like to simulate the /system/etc/favorites.xml Anyone knows it format ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---