[android-developers] No onEditorAction on Xperia Tablet
Dear All, I am testing some code on a sony xperia z2 tablet. I am having some problems with the sony software keyboard. Its not calling onEditorAction(). I don't think its a problem with my code. Since when I switch the keyboard, to for example the hackers keyboard app, my code receives onEditorAction() calls. What the sony software keyboad does is the following: When pressing enter, it just inserts the newline in the multi-line text field of my app. But it does not invoke onEditorAction(). Is there some special trick to instruct the sony xperia software keyboard to call onEditorAction()? Some hidden ime options? Or some other route like an InputChannel? Best Regards P.S.: For onKey the android doc says: Do not assume a software input method has to be key-based; .. there is no way to reliably catch soft input key presses. Is there a similar no guarantee for editor actions? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: .apk File Link
Hi, Some mobiles do not always send cookies, especially when switching from the mobile web browser to the download manager. So if your JSP assumes a session, this might fail. I even tried the ;jsessionid= trick, but this confused the download manager. Dunno if this has been fixed. Bye Rahul Kaushik schrieb: Hello Team I have created a link Click Here Link in my jsp file by clicking on it will download and save the file to mobile .am opening the jsp file thru my website in my mobile browser BUt it showing dowanload in pregress but after sometime download progress is not shown and file do not download File is uploaded at tyomcat serevr PLease suggest -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com mailto:android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: ContentResolver obtaining java.io.File instead java.io.FileDescriptor
Hi, Yes, this is exactly the problem I am facing. Maybe I should request multiple columns when starting the intent. One column with some timedate, and another column with the data blob. Still not sure how to fabrikate the intent and how to obtain the result, so that I get both the data and the timedate. Bye Doug schrieb: That's because a FileDescriptor doesn't necessarily reference an actual file on a filesystem. It's an abstraction for a stream of bytes that could be coming from a file or some other source (such as stdin, stdout). You're not supposed to know or care what it is, you just read or write it. Doug On Saturday, March 8, 2014 4:51:02 AM UTC-8, jb wrote: Dear All, I am using an intent to invoke a file chooser. Some of the file chooser applications return an Uri of scheme file others return an Uri of scheme content. I need to obtain the last modified date of the chosen object. How do I do that? I didn't find an appropriate API. There is some API that returns a FileDescriptor. But I don't get the last modified date from a FileDescriptor. Any help appreciate. Best Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com mailto:android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] ContentResolver obtaining java.io.File instead java.io.FileDescriptor
Dear All, I am using an intent to invoke a file chooser. Some of the file chooser applications return an Uri of scheme file others return an Uri of scheme content. I need to obtain the last modified date of the chosen object. How do I do that? I didn't find an appropriate API. There is some API that returns a FileDescriptor. But I don't get the last modified date from a FileDescriptor. Any help appreciate. Best Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Network Class Loader
Dear All, I am just read: Provides a simple ClassLoader implementation that operates on a list of files and directories in the local file system, but does not attempt to load classes from the network. Android uses this class for its system class loader and for its application class loader(s). http://developer.android.com/reference/dalvik/system/PathClassLoader.html Does this mean I cannot use the URLClassLoader on Android with URLs that have for example the schema http:// ? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Who is plusing an App?
Dear All, Is there a way to browse who is plusing an app? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Override OnKeyPreIme of an EditText getted from a View
tete schrieb: I want to override the OnKeyPreIme method of a EditText got from a findByView(int id), to make the activitiy finish() when user press back key. You can override the back key of your activity(*), and make the finish call dependent on the focused view, i.e. check whether the user is inside the edit text. Bye (*) public void onBackPressed () Added in API level 5 Called when the activity has detected the user's press of the back key. The default implementation simply finishes the current activity, but you can override this to do whatever you want. http://developer.android.com/reference/android/app/Activity.html#onBackPressed%28%29 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Performance analysis of Android...
ehsan azimzadeh schrieb: Feel free to contact me if you have any questions. Any free preprint 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: Does an onDraw() get called if I don't do invalidate() but did the requestLayout()?
Satya Komatineni schrieb: For a UI action in the same thread: //On my view I call requestLayout() ViewRoot schedules a traversal //I don't call invalidate() on my view So, no rectangle is invalid (I am assuming that is the assertion because I didn't call invalidate) Is it possible that the layout phase may invalidate() some of the views? I suppose for those views that don't change their position or size, I am assuming onDraw() won't be called. Wondering if someone could comment on this. Thanks a lot. Satya Maybe you are not dealing with GridView? But in case: I recently wanted to refresh a GridView. And tried first requestLayout(). Nothing happened. I then tried invalidate(). Again nothing happened. So finally I went for invalidateViews(), which was fine. But this is AbsListView specific (*): public void invalidateViews () Causes all the views to be rebuilt and redrawn. And I would be more happy if I could invalidate a single grid element separately, when I know that only the appearance changed. But I did not yet have time to figure this out. Bye P.S.: Some source code for GridView says: /** * Causes all the views to be rebuilt and redrawn. */ public void invalidateViews() { mDataChanged = true; rememberSyncState(); requestLayout(); invalidate(); } And in AdapterView: /** * True if the data has changed since the last layout */ boolean mDataChanged; -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Changing a CharacterStyle
Dear All, I am using a single character style in multiple text locations. I simply did the following: output = new ForegroundColorSpan(OUTPUT_COLOR); And then whenever a portion of my text has to have the above character style, I simply use the wrap() method to share the style: getEditableText().setSpan(CharacterStyle.wrap(output), start, start + str.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); Now I don't find a method setForgroundColor in the ForgroundColorSpan class. How can I change the color? How can I notify my text? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Changing a CharacterStyle
Mark Murphy schrieb: On Thu, Oct 18, 2012 at 5:35 AM, Jan Burse janbu...@fastmail.fm wrote: How can I change the color? Use getSpans(), find all occurrences of your span, remove the old span, and replace it with a span with the new color. It's possible that there is a more efficient alternative than this, but I am not aware of one. I went for a custom class: public class MyForegroundColorSpan extends CharacterStyle implements UpdateAppearance { private int color; public int getForegroundColor() { return color; } public void setForegroundColor(int c) { color = c; } public void updateDrawState(TextPaint ds) { ds.setColor(color); } } Then using the setter and calling invalidate() on the text view works like a charm. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Changing a CharacterStyle
Mark Murphy schrieb: SuggestionSpan), meaning that creating your own equivalents would be at least partially ignored by the rendering code. I'm glad to hear that this works at least for foreground colors, though. It works, since characterstyle is supposed to be extensible in that the method updateDrawState() is implemented. But I don't know yet whether the invalidate() also works for spans that are UpdateLayout and not only UpdateAppearance. Maybe somebody knows more. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Does Android cache http-requested data?
Keith Wiley schrieb: I am quite flummoxed. I am aware that Android is requesting and receiving a GZipInputStream, and I can see the input stream's type in the debugger, but that seems irrelevant to my issue. Caching of web server chains can be very elaborate. See for example here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html 14.9 Cache-Control So eventually setUseCache() to false can help, but might slowdown your requests. It could be also an issue on the server side, that for example the server emits a wrong Expires header, this header is also described in the above RFC. If you re-access the same file multiple times and if you can remember the modified date, then the setIfModifiedDate() comes very handy. If the data on the server doesn't have a newer modified date, you will get: HTTP_NOT_MODIFIED = 304; Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Issues with local/device concerning return key
Dear All, Has somebody observed that the return key on the soft keyboard does something else emit than: KeyEvent.ACTION_DOWN and KeyEvent.KEYCODE_ENTER. But nevertheless cause a text component to go to the next line? Could this be device/local dependent? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: runtime compilation of dalvik bytecode
Ross Bamford schrieb: No, it goes directly to Dex. The original interpreter runs on any Java platform (Deelang was originally intended as a generic scripting language for embedded devices) but the compiler is strictly Dalvik. It wouldn't be difficult to transform the Dee VM bytecode to Java bytecode (they're both stack machines so the biggest challenge would be the static linking) but there are no plans for this at the moment. Thanks for explaining. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Key, Gesture, Menu, etc.. für History Up/Down
Jan Burse schrieb: Dear All, Assume I have a terminal app for Android. How would I implement history up/down? (*) On the classical PC one would use the up arrow and the down arrow, but on Android. Hints welcome. Bye (*) The up and down already works under the hood, question is what in the GUI should signal an up and down. Using Hackers Keyboard App does it. It has arrows, and I get the following events: Up Arrow: KeyEvent.ACTION_DOWN + KeyEvent.KEYCODE_DPAD_UP Down Arrow: KeyEvent.ACTION_DOWN + KeyEvent.KEYCODE_DPAD_DOWN Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: runtime compilation of dalvik bytecode
Ross Bamford schrieb: You'll find the project at http://deelang.googlecode.com/ . To get the native compiler, you'll need to check the DEXCOMPILER branch out of subversion (a file release is planned soon, but not yet). Does it take a detour over Java bytecode? If yes, is this bytecode also executable on non Android platforms? If yes, already done some double deployment (modulo having a GUI/console)? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Key, Gesture, Menu, etc.. für History Up/Down
Dear All, Assume I have a terminal app for Android. How would I implement history up/down? (*) On the classical PC one would use the up arrow and the down arrow, but on Android. Hints welcome. Bye (*) The up and down already works under the hood, question is what in the GUI should signal an up and down. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Key, Gesture, Menu, etc.. für History Up/Down
Harri Smått schrieb: While struggling with somewhat similar problematics I ended up utilizing long-press triggered menu. Don't know if this is an option for you though. Not sure whether I can use this inside a text component. Doesn't it trigger the copy/paste function? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Key, Gesture, Menu, etc.. für History Up/Down
Mark Murphy schrieb: Volume up/down. Sound good! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: print integer value in logcat.
Raghav Sood schrieb: Why would you use that when you have a perfectly working LogCat class? What's wrong with Log.i(value = + intName);? Raghav Sood Sent from my Galaxy Nexus Nothing wrong, except that it will not compile. I guess you would need to put: Log.i(TAG, value = + intName); Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: print integer value in logcat.
Lew schrieb: That is not an advantage, and the concomitant loss of information is a disadvantage. Oh, you made it from comp.lang.java.programmer to here? Not enough troll opportunities anymore there? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Question about SurfaceView and Threads
Harri Smått schrieb: That's not true. Android supports basic Java Threads and there's no reason for not to use them when appropriate. But the thing is, you can not alter UI components outside of UI Thread. In your case it would be updating the textual contents of TextView. See method named runOnUiThread , it gives easy access for executing UI code from Threads. Thanks, I guess runOnUiThread() corresponds to the SwingUtilities invokeLater(), plus some smarts to bypass posting if already in UiThread (*). I guess there are situations where the smarts is not needed and where one wants a invokeAndWait(). I built myself AndroidUtilties which provide the later. The code reads as follows: public class AndroidUtilities { public static void invokeLater(View v, Runnable r) { if (!v.post(r)) throw new RuntimeException(looper missing); } public static void invokeAndWait(View v, Runnable r) throws InterruptedException { WaitAdapter wa = new WaitAdapter(r); AndroidUtilities.invokeLater(v, wa); wa.doneJob(); } } class WaitAdapter implements Runnable { private Runnable job; private volatile boolean donejob; private final Object donelock = new Object(); WaitAdapter(Runnable j) { job = j; } public void run() { job.run(); synchronized (donelock) { donejob = true; donelock.notifyAll(); } } void doneJob() throws InterruptedException { synchronized (donelock) { while (!donejob) donelock.wait(); } } } The annoying thing is that one has to remember and/or pass around a view all the time. The above code could of course also be adapted so that it takes an activity parameter instead of a view parameter, but still the annoyance will be there. Bye (*) http://stackoverflow.com/a/9350672/502187 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: print integer value in logcat.
Most simple approach: int x; System.err.println(x=+x); Will show in LogCat. mohammed Nuhail schrieb: How to print integer value in LogCat ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ANN: Jekejeke Prolog 0.9.5 (runtime console, google play)
Jan Burse schrieb: - Runtime Library (free) III: The Android version is now also available on Google Play. Update: Since now, also live on Amazone Appstore for Android. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ANN: Jekejeke Prolog 0.9.5 (runtime console, google play)
Dear All, This is an out of band release of Jekejeke Prolog. It is mainly an infrastructure update. The highlights are: - Runtime Library (free) I: The Swing version has now a console. - Runtime Library (free) II: The Android version has now a console. - Runtime Library (free) III: The Android version is now also available on Google Play. But the Development Environment and the Minlog Module are currently not on Google Play. - Minlog Module (Chart Parser, CLP(FD)): There is now an Android version. Happy coding! http://www.jekejeke.ch/ Jan Burse Sep 3. 2012 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multiple Package name in a Single Applicaiton
Mark Murphy schrieb: On Tue, Aug 28, 2012 at 8:10 AM, karuna vikas kvk2551...@gmail.com wrote: thanks Murphy,, I got the point what you are saying... In a Single Android Package, we can use multiple java packages ... Right ? You can use 1,000 Java packages within an Android app, if the mood strikes you, and you like typing. You can also distribute the 1000 java packages across multiple APK. Then see to it that these APK share process ID and user ID. Then one APK can access the other APK withou getting file read errors. You can then use a PathClassLoader in one of the APKs to load the classes from the other APKs. This is a more tight coupling than calling a service of the other APK. If you don't assign an intent to an APK, it will not be listed in the application panel, but it will be still listed in the table of your downloaded applications. I am currently experimenting with such a setup to deliver a framework, where I can load plugins one after the other (*). Works fine so far, but not sure whether this is canonical for Android. It is simply a port of a concept used in a Swing application. Maybe for Android there is a different way to deliver libraries to an existing APK, preferably from a store. Comments welcome Bye (*) You can see a screenshot here: https://plus.google.com/u/0/10325981227445618/posts/Lhiqu79xutr Jekejeke Minlog is an APK without an intent Jekejeke Runtime is an APK with a main intent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multiple Package name in a Single Applicaiton
Mark Murphy schrieb: On Tue, Aug 28, 2012 at 8:56 AM, Jan Burse janbu...@fastmail.fm wrote: You can also distribute the 1000 java packages across multiple APK. Then see to it that these APK share process ID and user ID. Then one APK can access the other APK withou getting file read errors. sharedUserId is not recommended for SDK apps. Not recommended in general or for SDK apps? Why for SDK apps, you refer to some particular issue? I found this: http://java-hamster.blogspot.ch/2010/05/androids-shareduserid.html In the above some issues are listed. Do you mean these? I guess they are SDK independent... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multiple Package name in a Single Applicaiton
Mark Murphy schrieb: custom signature-level permission I was googling a little bit and found the following definition: A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval. But the same certificate is also a prerequesite for sharedUserId to work. So I don't see any harm in using sharedUserId. What is exactly the threat of sharedUserId, except for the bug issues already mentioned? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multiple Package name in a Single Applicaiton
Jan Burse schrieb: Mark Murphy schrieb: custom signature-level permission I was googling a little bit and found the following definition: A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval. But the same certificate is also a prerequesite for sharedUserId to work. So I don't see any harm in using sharedUserId. What is exactly the threat of sharedUserId, except for the bug issues already mentioned? Bye The same error, i.e. not providing a certificate, can be done for both methods custom signature-level permission and sharedUserId: https://groups.google.com/d/topic/android-framework/GvdEIMlaOVg/discussion 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: Sharing data between Android framework and app
You can store key/value pairs in Accounts, via the Account Manager. I never did it, but I guess it could fit your needs, since you anyway seem to plug-in into some Account validation, right? http://developer.android.com/reference/android/accounts/AccountManager.html See getUserData(), setUserData() Sihan Goi schrieb: Hi, Is it possible to share data between the Android framework and an app? I'm modifying the Android framework login component so that a variable will be saved upon login, and then later retrieved by another app. I'm trying to use SharedPreferences, and my code looks like this: In com.android.internal.policy.impl.PasswordUnlockScreen.java, I have the following code to write to the SharedPreferences. SharedPreferences prefs = getContext().getSharedPreferences(mypref, Context.MODE_WORLD_READABLE); SharedPreferences.Editor editor = prefs.edit(); editor.putString(mypref, my data editor.commit(); In my other app, I have the following code to read from it. Context con; String data; try { con = this.createPackageContext(com.android.internal.policy.impl, 0); SharedPreferences pref = con.getSharedPreferences(mypref, Context.MODE_PRIVATE); data = pref.getString(mypref, 0) } catch (NameNotFoundException e) { data = 0; Log.e(No data shared, e.toString()); } When I run the code, I keep getting the NameNotFoundException, as it claims the application package com.android.internal.policy.impl is not found, so my data is always 0. How can I share data between these 2 components? Thanks. -- - Goi Sihan gois...@gmail.com mailto:gois...@gmail.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cursor Blinking Management (TabHost/ActivityGroup)
Dear All, Got a little progress in the blinking issue. Made the following observation. The method: tabHost.clearAllTabs(); Does not clear the selected status of the tabs in the tab widget. As a result one can provoke multiple selected tabs: +--+--+--+--+ | Tab1 | Tab2 | Tab3 | Tab4 | +--+--+--+--+ Tab2 selected and Tab3 selected I found the following work-around which mittigates a little bit the problem. Insert a tabHost.setCurrentTab(0) in front of the tabHost.clearAllTabs(): tabHost.setCurrentTab(0); tabHost.clearAllTabs(); tabHost.addSpec(spec1) .. tabHost.addSpec(specn) This works since after tabHost.clearAllTabs() the selected index is set to -1. And then tabHost.addHost(), when it sees selected index = -1, will set the selected index to 0. So that after the first tabHost.addHost() the invariant that the selected index corresponds with the select status of the tabs is guaranteed. But still the blinking is not yet perfect. I now got most of the time the first tab not blinking, but the other tabs will now blink. Sometimes even more tabs than only the first tabs don't blink. But the situation is already better. And since I do visualize the tab selection status now, with the above fix, this visualization is now always consistent, no more multiple selected tabs seen. But still working on it... Best Regards P.S.: Work around so far inspired by this discussion: http://code.google.com/p/android/issues/detail?id=2772 Jan Burse schrieb: The blinker runs in the UI thread. And it is kept alive and it keeps itself aliver in posting delayed messages. You find the source code here: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/TextView.java#TextView.Blink There is a condition isFocused() inside the Blink. I have checked my application, the TextView I am using gets correctly focused. There shouldn't be a problem with focusing. Here is the result of some debugging code: 02-20 10:21:47.362: WARN/System.err(579): text = xxx.TerminalArea@412f8368 text.isFocused = false 02-20 10:21:47.362: WARN/System.err(579): text = xxx.TerminalArea@414044c8 text.isFocused = true 414044c8 Blinks! OK After switching the tab: 02-20 10:22:57.445: WARN/System.err(579): text = xxx.TerminalArea@412f8368 text.isFocused = true 02-20 10:22:57.445: WARN/System.err(579): text = xxx.TerminalArea@414044c8 text.isFocused = false 412f8368 Does not Blink! NOK So I guess a problem with focusing can be ruled out. What other cause could be identified for the frozen cursor? Bye lbendlin schrieb: i guess you are not a good thinker, and are unwilling to try my suggestions because they don't seem to make sense. Fair enough. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cursor Blinking Management (TabHost/ActivityGroup)
The blinker runs in the UI thread. And it is kept alive and it keeps itself aliver in posting delayed messages. You find the source code here: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/TextView.java#TextView.Blink There is a condition isFocused() inside the Blink. I have checked my application, the TextView I am using gets correctly focused. There shouldn't be a problem with focusing. Here is the result of some debugging code: 02-20 10:21:47.362: WARN/System.err(579): text = xxx.TerminalArea@412f8368 text.isFocused = false 02-20 10:21:47.362: WARN/System.err(579): text = xxx.TerminalArea@414044c8 text.isFocused = true 414044c8 Blinks! OK After switching the tab: 02-20 10:22:57.445: WARN/System.err(579): text = xxx.TerminalArea@412f8368 text.isFocused = true 02-20 10:22:57.445: WARN/System.err(579): text = xxx.TerminalArea@414044c8 text.isFocused = false 412f8368 Does not Blink! NOK So I guess a problem with focusing can be ruled out. What other cause could be identified for the frozen cursor? Bye lbendlin schrieb: i guess you are not a good thinker, and are unwilling to try my suggestions because they don't seem to make sense. Fair enough. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cursor Blinking Management (TabHost/ActivityGroup)
Hi, Kostya Vasilyev schrieb: IIRC, view focusing is only applied if the enclosing window is in activated state (not sure about the exact name), you might want to look into this. Well I checked the state of isFocused() of the text view I am interested in and which should blink. I don't see false - false. I see true - false or false - true. So what are you talking about? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
Hi, Farhan Tariq schrieb: quiet irrelevant though but ... can you please cut out on your 'bye's ... don't know about others but, i'm sure its irritating to them too You should see a mental health professional. Maybe your epilepsy medication doesn't work. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
Here is a picture what happens: The two tabs were made via: tabHost.addSpec(spec1); tabHost.clearAllTabs(); tabHost.addSpec(spec1); tabHost.addSpec(spec2); Situation 1: The TabHost: +-+--+ | Tab 1 | Tab 2| +---+ | | | Text 2| | | +---+ Tab 1.isSelected = false Tab 2.isSelected = true Text 1.isFocused = false Text 2.isFocused = true Text 2.cursor blinking visible !OK! Situation 2: The TabHost: +-+--+ | Tab 1 | Tab 2| +---+ | | | Text 1| | | +---+ Tab 1.isSelected = true Tab 2.isSelected = false Text 1.isFocused = true Text 2.isFocused = false Text 1. no cursor blinking visible !NOK! What is going wrong? Bye Kostya Vasilyev schrieb: Ruled out? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
Jan Burse schrieb: +-+--+ | Tab 1 | Tab 2| +- P.S.: The tabs do not stretch to the screen width, since I have placed the tabwidget inside a HorizontalScrollView. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
Jan Burse schrieb: tabHost.addSpec(spec1); tabHost.clearAllTabs(); tabHost.addSpec(spec1); tabHost.addSpec(spec2); More precisely: tabHost.addSpec(spec1); tabHost.clearAllTabs(); tabHost.addSpec(spec1); tabHost.addSpec(spec2); tabHost.setCurrentTab(1); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
lbendlin schrieb: You could even refine the approach by first taking the focus away and then setting it again. http://developer.android.com/reference/android/view/View.html#requestFocus%28%29 I guess you are not a good listener, didn't grasp how I described my application. Since my application is a tab host, if I switch to another tab, this is exactly what happens underneath, the tab that comes to front also receives a request focus. You can lookup the source code of the tab host. The tab host will first try to focus inside the tab widget, but if there are no focusable elements it will next focus inside the fragment. The fact is that some of the tabs that receives the focus nevertheless don't switch on the cursor blinking whereas some switch on the cursor blinking. Basically those tabs that where first removed via clearAllTabs() and then re-added via addTab() lose the blinking. Tabs that were freshly added don't lose the blinking. The clearAllTabs() / addTab() thing is a workaround to the fact that the tab host does not provide removeTab() or insertTab(). Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Workaround NullPointerException TabWidget?
Dear All, Is there some workaround for a null pointer exception in TabWidget. It basically happens in the following code: tabHost.clearAllTabs(); tabHost.addTab(spec); The clearAllTabs sets the mSelectedTab to -1. The problem is some sloppy code in the Android 2.3.7 version of TabWidget: 337public void setCurrentTab(int index) { [...] 342getChildTabViewAt(mSelectedTab).setSelected(false); The crash is in 342 since getChildTabViewAt returns null when mSelectedTab == -1. This was fixed in the Android 4.0.3 version or maybe before of TabWidget: 386public void [More ...] setCurrentTab(int index) { [...] 391if (mSelectedTab != -1) { 392getChildTabViewAt(mSelectedTab).setSelected(false); 393} How would one go about to workaround the problem in Android 2.3.7? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Workaround NullPointerException TabWidget?
Hi, Just did this. Actually the problem was not a mSelectedTab = -1, but rather a mSelectedTab = 1 and a getChildCount = 1. This problem I do not seen on Android 4.0.3. The workaround code that works for me is: public class TabWidgetFix extends TabWidget { private final View dummy; /** * pCreate a tab widget fix./p * @param c The context. */ public TabWidgetFix(Context c) { super(c); dummy = new View(c); } /** * pRetrieve a child tab view./p * * @param i The index. * @return The child tab view. */ public View getChildAt(int i) { if (i 0 || i = getChildCount()) return dummy; return super.getChildAt(i); } } But there remains one minor problem. I use the clearAllTabs() based code: tabHost.clearAllTabs(); tabHost.addTab(spec); Since there is no removeTab API available. But now some of the sub activities in the activity loose their blinking cursor. Bye Kostya Vasilyev schrieb: You could try extending the framework class and overriding relevant methods. 16 февраля 2012 г. 15:58 пользователь Jan Bursejanbu...@fastmail.fm написал: Dear All, Is there some workaround for a null pointer exception in TabWidget. It basically happens in the following code: tabHost.clearAllTabs(); tabHost.addTab(spec); The clearAllTabs sets the mSelectedTab to -1. The problem is some sloppy code in the Android 2.3.7 version of TabWidget: 337public void setCurrentTab(int index) { [...] 342getChildTabViewAt(mSelectedTab).setSelected(false); The crash is in 342 since getChildTabViewAt returns null when mSelectedTab == -1. This was fixed in the Android 4.0.3 version or maybe before of TabWidget: 386public void [More ...] setCurrentTab(int index) { [...] 391if (mSelectedTab != -1) { 392getChildTabViewAt(mSelectedTab).setSelected(false); 393} How would one go about to workaround the problem in Android 2.3.7? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Cursor Blinking Management (TabHost/ActivityGroup)
Dear All, To manage tabs I use the following code: tabHost.clearAllTabs(); tabHost.addTab(spec); /* for multiple specs */ I can add and remove tabs this way. Since the specs contain a tag, sub activities are refound. When I remove a tab, I also call: getLocalActivityManager().destroyActivity(tag,true); Now there is a slight problem. My tabs are mostly text editors. Now for example when I add a tab, then cursor blinking works on the new tab. But for the existing tabs, which have been cleared and then re-added, the cursor blinking stops. What could be done to correctly restore cursor blinking? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
lbendlin schrieb: Have you tried setting the focus? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en Problem is not in the tab that is added and that then becomes visible. This tab has focus and the cursor blinks. But when I then switch to one of the previous tabs they gain focus. This is seen in that they receive typing. But the cursor does not blink anymore on these tabs. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)
What do you mean by manually set the focus? For the new tab I call setCurrentTab() when I add it. The old tabs are focused via the TabHost/TabWidget interaction, which I do not intercept. Both the old and the new tab receive the focus. But the cursor is not blinking for the old tab. You can type in something, the cursor moves but does not blink anymore, so if you type abc, you will see: abc| The vertical is the cursor, but it does not blink anymore. By chance it can also happen that the cursor is not visible at all. If the old tab would not receive focus, you could not type abc in the first place. Abc is displayed independent of whether the cursor is on or off. Bye lbendlin schrieb: so, have you tried to manually set the focus? (who knows, that might get your cursor back?) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cursor Blinking Management (TabHost/ActivityGroup)
Mostlikely some pause/resume problem I guess... Jan Burse schrieb: What do you mean by manually set the focus? For the new tab I call setCurrentTab() when I add it. The old tabs are focused via the TabHost/TabWidget interaction, which I do not intercept. Both the old and the new tab receive the focus. But the cursor is not blinking for the old tab. You can type in something, the cursor moves but does not blink anymore, so if you type abc, you will see: abc| The vertical is the cursor, but it does not blink anymore. By chance it can also happen that the cursor is not visible at all. If the old tab would not receive focus, you could not type abc in the first place. Abc is displayed independent of whether the cursor is on or off. Bye lbendlin schrieb: so, have you tried to manually set the focus? (who knows, that might get your cursor back?) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Are you kidding me? EMS = LineHeight
Dear All, I was using setEms() to set the width of a text field. But the text field looks much to wide for me. So I went into the source code and looked what is really happening there, and it seems that Ems is equated with LineHeight: android.widget.TextView: if (mMaxWidthMode == EMS) { width = Math.min(width, mMaxWidth * getLineHeight()); } else { width = Math.min(width, mMaxWidth); } How would one go about, and use a more reliable measure. For example to display a text field with a fixed count of digits? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Customizing Select-All / Cut after InputFilter
Dear All I have an EditText with an InputFilter. The InputFilter restricts the editable area of the edit text to everything above inputoffset: public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { if (dstart = inputoffset) { return null; } else { return dest.subSequence(dstart, dend); } } The above works fine, I can indeed not edit anything above inputoffset. But the system edit action bar still thinks the full edit text is editable. Namely: - Cut Action is enabled, even if selection is above input offset. - Select All Action selects full text, in the present case it is desired that only the range inputoffset - text.length is selected. How can I programmatically customize the select all action and the cut action? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Customizing Select-All / Cut after InputFilter
Jan Burse schrieb: - Cut Action is enabled, even if selection is above input offset. Corr.: - Cut Action is enabled, even if selection is below input offset. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Strange Cipher Result Java SE vs Android
Dear All, I see a strange cipher result. I am using the following code with a public RSA key: System.err.println(res = + toHex(res, p, RSA_OUTPUT)); byte[] temp = cipher.doFinal(res, p, RSA_OUTPUT); System.err.println(temp = + toHex(temp, 0, temp.length)); When I run the code on Java SE, I get: res = - cipher 64 bytes - temp = - plain 32 bytes - When I run the code on Android, I get: res = - cipher 64 bytes - temp = 01ff00 - plain 32 bytes - Where does the 01ff...ff00 come from? Can I get rid of it? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Strange Cipher Result Java SE vs Android
Problem resolved: http://stackoverflow.com/questions/8885261/is-it-possible-for-android-application-to-implement-rsa-none-pkcs1padding-rsa Jan Burse schrieb: Dear All, I see a strange cipher result. I am using the following code with a public RSA key: System.err.println(res = + toHex(res, p, RSA_OUTPUT)); byte[] temp = cipher.doFinal(res, p, RSA_OUTPUT); System.err.println(temp = + toHex(temp, 0, temp.length)); When I run the code on Java SE, I get: res = - cipher 64 bytes - temp = - plain 32 bytes - When I run the code on Android, I get: res = - cipher 64 bytes - temp = 01ff00 - plain 32 bytes - Where does the 01ff...ff00 come from? Can I get rid of it? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multiple APKs installed to the same location
BT schrieb: Can I create multiple .apk's that install ADDITIVELY to the same /data/ apps/MyApp location? In my particular case I have add-on modules that are built as C++ NDK share objects: Feature1.so, Feature2.so, Feature3.so, etc. I don't know what these will be ahead of time and the user must be able to selectively install only those features they want. I'm pretty sure iOS does this with in-app purchases, but not sure how to do it on Android? Thanks, BT Theoretically: android:sharedUserId The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process. http://developer.android.com/guide/topics/manifest/manifest-element.html#uid android:process The name of a process where all components of the application should run. Each component can override this default by setting its own process attribute. By default, Android creates a process for an application when the first of its components needs to run. All components then run in that process. The name of the default process matches the package name set by the manifest element. By setting this attribute to a process name that's shared with another application, you can arrange for components of both applications to run in the same process — but only if the two applications also share a user ID and be signed with the same certificate. If the name assigned to this attribute begins with a colon (':'), a new process, private to the application, is created when it's needed. If the process name begins with a lowercase character, a global process of that name is created. A global process can be shared with other applications, reducing resource usage. http://developer.android.com/guide/topics/manifest/application-element.html#proc I didn't try (yet) ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: javax.management
Dear All, I found the following substitute for what I needed from javax.management. There is: void onLowMemory() This is called when the overall system is running low on memory, and would like actively running process to try to tighten their belt. http://developer.android.com/reference/android/app/Application.html And: public longthreshold The threshold of availMem at which we consider memory to be low and start killing background services and other non-extraneous processes. http://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html There seem also to be more APIs since Level 14, for example onTrimMemory in Application, but I will try level 10 for the moment. I also found SystemClock useful, but I am still missing an API that would give me some statistics about how much time spent in GC. Best Regards Jan Burse schrieb: Mark Murphy schrieb: You are missing the point. If I am understanding the documentation for MemoryPoolMXBean, there cannot be some other lib. I believe that you will be needing to remove the ties to javax.management, not replace them. Since I only need the memory threshold functionality I could easily implement the functionality in Android by myself by polling Runtime.freeMemory() in a thread. The later is available in Android. But it would be more handy if there is some existing lib or even an API in Android that I did not yet see. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] javax.management
Dear All, Just noticed that javax.management is not available on Android. Any substitute recommendation? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: javax.management
Jan Burse schrieb: Dear All, Just noticed that javax.management is not available on Android. Any substitute recommendation? Bye I would need: - javax.management.ListenerNotFoundException; - javax.management.NotificationEmitter; - java.lang.management.ManagementFactory; - java.lang.management.MemoryPoolMXBean; - javax.management.Notification; - javax.management.NotificationListener; - java.lang.management.MemoryNotificationInfo; Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: javax.management
Mark Murphy schrieb: On Thu, Jan 19, 2012 at 6:42 PM, Jan Bursejanbu...@fastmail.fm wrote: I would need: - javax.management.ListenerNotFoundException; - javax.management.NotificationEmitter; - java.lang.management.ManagementFactory; - java.lang.management.MemoryPoolMXBean; - javax.management.Notification; - javax.management.NotificationListener; - java.lang.management.MemoryNotificationInfo; MemoryPoolMXBean, in particular, should require firmware-level changes, as I understand it. If this is third-party code you are attempting to use, it is unlikely that it is designed with Android in mind and likely will need to be rewritten. I was originally using JDK 1.7 from Oracle and openjdk 1.7 on various platforms (Windows, Mac, Linux). Both provide javax.management.* and java.lang.management.* and the application loaded fine. I am now trying to port the application to android, but the android version doesn't load, since the classes are missing. I can freely change the application for android, and use some other lib if its 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: javax.management
Mark Murphy schrieb: You are missing the point. If I am understanding the documentation for MemoryPoolMXBean, there cannot be some other lib. I believe that you will be needing to remove the ties to javax.management, not replace them. Since I only need the memory threshold functionality I could easily implement the functionality in Android by myself by polling Runtime.freeMemory() in a thread. The later is available in Android. But it would be more handy if there is some existing lib or even an API in Android that I did not yet see. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Honeycomb (Android 3.2) emulator slow
Original Title of Thread was: Honeycomb (Android 3.2) emulator slow And it was then hitchhiked by Christopher Van Kirk, maybe unknowingly, i.e. not mastering his mail tool. Dianne Hackborn schrieb: I am an engineer on the core Android frameworks (android.app, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Honeycomb (Android 3.2) emulator slow
Dear All, Is it me or is it the system? I just installed the Android SDK and were running a virtual device for Android 3.2. I am using a Windows 7 box. It seems to me that the emulator has some problems in building the screen in time. I didn't have the feeling of smooth interaction. Android 2.3 did work fine. But Android 3.2 looks not smooth to me. I read something about OpenGL on the net, and one of the sample codes, a textured triangle said 100ms per frame. Which is pretty slow. Is this a known problem? What can be done? Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Honeycomb (Android 3.2) emulator slow
Mark Murphy schrieb: Set the Device RAM size to 1024. Yes, why not, would it help? Replace the home screen with something faster. What do you mean by that? I tried already window scale 96dpi Which makes the window smaller. But I have the feeling the whole graphics is broken, font look small and ugly then. I have already seen small fonts that weren't ugly. And buy a Core i7 with Turbo Boost to 3.4GHz. No, doesn't help. I have already 4 cores, and one core goes up with the emulator. The emulator does not use multiple cores. Or, buy a Honeycomb tablet Were just looking at the prices. They still feel a little bit high. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Honeycomb (Android 3.2) emulator slow
Mark Murphy schrieb: I have already 4 cores, and one core goes up with the emulator. The emulator does not use multiple cores. I did not say it uses multiple cores. I said: buy a Core i7 with Turbo Boost to 3.4GHz. Actually I have already turbo boost. Here are the specs: HP EliteBook 8560p Intel® Core™ i7-2620M @ 2.70GHz But it is of absolutely no use here. The emulator just sucks. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Honeycomb (Android 3.2) emulator slow
Mark Murphy schrieb: On Sat, Sep 3, 2011 at 7:26 PM, Jan Bursejanbu...@fastmail.fm wrote: Actually I have already turbo boost. Here are the specs: HP EliteBook 8560p Intel® Core™ i7-2620M @ 2.70GHz But it is of absolutely no use here. The emulator just sucks. It would suck worse with a slower CPU. I find that the emulator works tolerably with the configuration I described, and I have the same CPU in a Dell notebook. Just trying a MacBook Pro specs: 2.4GHz Intel Core i5, works also very bad. Bye -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Honeycomb (Android 3.2) emulator slow
Mark Murphy schrieb: It would suck worse with a slower CPU. I find that the emulator works tolerably with the configuration I described, and I have the same CPU in a Dell notebook. It also works ok here for android 2.3. The issue is mainly it does not scale to android 3.2. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en