[android-developers] Accessing Photos Taken with Camera

2011-07-14 Thread DanH
>From the little bit of info I have gathered, In order to access photos taken by the camera (from the default camera app) from an a Custom App, you must go through the ContentProvider API's. What I haven't seen is an example of using the ContentProvider apps to do this. Is there such a example/tu

[android-developers] Re: Alternatives to SQLite for static data

2011-06-09 Thread DanH
Not clear: Do you want to simply be able to query the data different ways, or do you want to be able to rearrange the order of the data and save that? If you know all the different ways that the data might be queried, it's a simple matter to build static side tables for them. If you want to be a

[android-developers] Re: Delete a variable

2011-06-09 Thread DanH
The usual problem on Android and other phones is not the program heap but rather the heap (often separate) used for images. In particular on Android this is a problem that requires some special programming techniques if you're using a lot of images. In Java, local variables "go out of scope" when

[android-developers] Re: any experience in time to port ios app to android

2011-06-03 Thread DanH
This is done some in our shop (not by me personally), but I don't think that there are any formulae one can use. Basically, it's a rewrite, of course. The logic at the very least must be transliterated from Objective C to Java. Thankfully there is a lot of similarity between the two (though it m

[android-developers] Re: JSON OR SOAP ?

2011-06-03 Thread DanH
I would guess that, if XML parsing is faster than JSON parsing, it's largely because the XML parsers are more highly optimized (due to it being a more mature technology). From a purely mechanical standpoint the amount of work that either needs to do is pretty much equivalent on a per-byte basis.

[android-developers] Re: Is there any way to run small bits of code from a console to check simple results?

2011-06-01 Thread DanH
Open a command window and type "java". (Well, you'll probably have to navigate to the correct directory and do a "javac" first, but it's not much more complicated than that.) On Jun 1, 5:45 pm, Spooky wrote: > Ok, maybe that didn't make sense  What I'm looking for, *IF* it > exists for Andro

[android-developers] Re: JSON OR SOAP ?

2011-06-01 Thread DanH
more or less to use plain Sockets at the end. But as > said, just wanted to hear your opinion. SOAP is something I never really took > the trouble to learn it and understand its possibilities. So hey, keep up the > good work and hope to catch you here more frequently. > > On May

[android-developers] Re: JSON OR SOAP ?

2011-05-31 Thread DanH
Note that it's perfectly feasible to do "pull parsing" with JSON, and I believe there are packages to do that. It's not done very often, though, since the "in-core" representation of JSON is generally several times more compact than the equivalent representation of XML, so there's no need for it.

Re: [android-developers] Re: How to search & find the way between 2 point in google maps api?

2011-05-30 Thread Cong Danh Pham
Thanks for your reply, Spiral. One more question. How to make voice command to search in my app? I don't know speech recognizability that cans help to make voice command? For example: I have many tabs: tab1, tab2,...tabn. I want to make voice command to navigate to tab that i need. And make voice c

[android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread DanH
Of course, if you're only going to read a small part of an XML representation from a REST query, why did you have the unwanted info transmitted in the first place?? On May 30, 8:28 pm, Streets Of Boston wrote: > I would make this argument instead: REST or SOAP? > > A big part of creating a seamle

[android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread DanH
My "9 out of 10" comment was more with regard to XML -- there are occasions where the ability to have tag attributes in XML makes for a neater, more coherent interface than using JSON. On May 30, 8:29 am, "Jonas Petersson" wrote: > On 2011-05-30 15:16, DanH wrote: &g

[android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread DanH
and SOAP much better than I do, > I'm wondering is there really need for both? I mean JSON was very > flexible and easy to use. Only thing I can come up with is the lack of > binary data transferring, otherwise I preferred JSON for database > queries. > > -- > H > >

[android-developers] Re: JSON OR SOAP ?

2011-05-30 Thread DanH
Some web services may give you the choice between "SOAP" and "JSON" remote APIs. In such a case, whereas SOAP defines much of the structure of requests and responses, and the conceptual protocols involved, JSON (by itself) does not (it only defines the basic data format), so additional info is req

[android-developers] Re: SQLite DataStorage write frequency?

2011-05-30 Thread DanH
It writes on every commit. Unless you explicitly start/end transactions, a commit occurs after each insert/update. On May 29, 12:24 pm, Andrew Pamment wrote: > Hi > > I'm writing a game that uses SQLite storage to keep the game objects > persistent through restarts etc. I'm wondering how frequen

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-29 Thread DanH
he message correctly > or deliberately marketing it with empty promises, has the risk to > backfire and maybe it's not worth taking that risk. Software > development cannot be 100% automated. Period. > > -Ali > > On May 29, 6:07 am, DanH wrote: > > > Yeah, Bob, I

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-29 Thread DanH
ways, and you will always learn more, be worth more, and have more > fun. > > I only meant to illustrate the that there can be a trade-off between > work-for-hire and your own work, in terms of how freely you can innovate. > > On Saturday, May 28, 2011 9:07:57 PM UTC-7, DanH wro

[android-developers] Re: Lifetime of static [instance] variables

2011-05-28 Thread DanH
Static and instance variables are two different things. A static variable "lives" for the lifetime of the loaded class (which may be shorter than the lifetime of the JVM). An instance variable "lives" for the lifetime of the object (instance of the class) that contains it. I have no idea what yo

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-28 Thread DanH
ean quicker > time-to-market, faster feedback, etc. > > For a number of reasons, it isn't my primary career. There are a lot of my > skills it does not leverage, and going the solo route or small company route > doesn't meet my needs for things like health insurance, which n

[android-developers] Re: java.lang.ArrayStoreException on Honeycomb device (Acer Iconia A500)

2011-05-27 Thread DanH
Offhand it looks like some sort of system bug, but hard to tell where -- Map source code, interface method resolution, heap management -- could be anywhere. (But one thing to beware of is multithreading -- Only HashTable is thread-safe, and HashMap/HashSet can be tied in a knot if modified asynchr

[android-developers] Re: What is the best way to upgrade database version with loosing stored data in database?

2011-05-27 Thread DanH
http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html#onUpgrade%28android.database.sqlite.SQLiteDatabase,%20int,%20int%29 Every tutorial I've seen on Android SQLite has mentioned this. On May 27, 5:32 am, Pranav wrote: > Hi all, > > I have created a database file(m

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-26 Thread DanH
> "Agile development" just means not complaining when the specs change. > > It's a mind game managers play with developers to keep them thinking > moving targets are "normal" and "good" when in practice they are not. There's some truth to that. But basically any development methodology can be cor

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-26 Thread DanH
erry/"Probably more to come" does not guarantee you to establish > your own business and become rich. > > On May 26, 9:09 pm, DanH wrote: > > > Yeah, that's more or less what I said first, and the "legs" comment > > was just an aside.  To be successf

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-26 Thread DanH
Yeah, that's more or less what I said first, and the "legs" comment was just an aside. To be successful as an independent developer, selling your own stuff (even if you have Android and Amazon markets) it a one in a million shot (literally). To put food on the table and the kids through college y

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-26 Thread DanH
> Iterative approach to software > development might seem as lack of "good initial design" to some > people, but I'm not aware of a better alternative. Actually, "iterative approach", as typically practiced, is a misunderstanding of "agile". Agile is "incremental", where each step builds on the p

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-26 Thread DanH
It doesn't have to live for 30 years, but 5-10 would be nice. One might invest 2 years in developing and enhancing a complex application, by which time, if the platform is weak, it may no longer be runnable, or there may no longer be any customers. Not every application is a game knocked out in a

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-25 Thread DanH
> This apporach of initially designing everyhting, trying to think of > every little detail, forecasting in the future etc. is dead in > software development. It works in some classical industries like > avionics, but in consumer electronics, forget it, you cannot build any > decent product with th

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-25 Thread DanH
r emulation), are able to advance their platforms while still maintaining compatibility with apps that are 30 years old. But I don't see the basis for either in Android. On May 25, 10:17 am, Chris Stratton wrote: > On Tuesday, May 24, 2011 11:29:03 AM UTC-4, DanH wrote: > > A

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-25 Thread DanH
You don't believe everyone else is talking religion? Look how people jumped on me. On May 24, 9:55 pm, Ady Y wrote: > So it is clear then that your reasons are religious and not technical, as > you tried to had people think. -- You received this message because you are subscribed to the Google

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-24 Thread DanH
One bit of wisdom you pick up after that long is that there's no point in arguing religion. On May 24, 8:06 pm, Greg Donald wrote: > On Tue, May 24, 2011 at 7:39 PM, DanH wrote: > > No ulterior motive, just my judgment based on 40+ years in the > > industry. > > Gi

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-24 Thread DanH
No ulterior motive, just my judgment based on 40+ years in the industry. On May 24, 6:42 pm, Zsolt Vasvari wrote: > I suspect an ulterior motive.  Whether Android, as is, suitable for > every kind of application, is debatable.  But the statement that it > doesn't have "legs" has already been prov

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-24 Thread DanH
I figured you would, and I'm not interested in getting into a p***ing match, so I'm not going to elaborate. On May 24, 11:09 am, Dianne Hackborn wrote: > On Tue, May 24, 2011 at 8:29 AM, DanH wrote: > > Additionally, Android, as it's currently designed, does not have

[android-developers] Re: Career as an Andoid developer. Is there any point?

2011-05-24 Thread DanH
The basic problem is that you've got millions of high school students and college dropouts who fancy themselves programmers, and they're all writing Android apps, hoping to come up with the next big hit. A very small number will develop into decent programmers, and an even smaller (microscopic) nu

[android-developers] Re: Regarding encryption and decryption

2011-05-23 Thread DanH
Secure socket layer. On May 20, 1:49 am, Viswanath wrote: > I created an android app which consumes web service, which passes > string(kind of authentication) to the webservice it authenticates and > returns its validity. > > Now my concern is, how to make this secured . i mean to say, i want > t

[android-developers] Re: Connecting to https server from java

2011-05-22 Thread DanH
Assuming the server is legitimate, you basically see this problem because the certificate presented by the HTTPS server doesn't have a certificate chain that can be verified against one of the root certificates on the phone. It may be possible to download and install a new (additional) root author

[android-developers] Re: ERROR: Unable to open class file C:

2011-05-22 Thread DanH
Probably the blank after "C:". On May 22, 10:45 am, J Handal wrote: > Hi > > After installing 3.1 and updated tools,clean is delating gen file . > > I tried changing gen-property-derivated uncheck. > > And clean don't delete gen file,so far OK. > > At launching time project error stops the show.

[android-developers] Re: Stack overflow

2011-05-22 Thread DanH
ng that the person who posted the question > > agreed that an answer solved their problem. Not all people who ask > > questions accept answers, so the percentage of questions getting > > correct answers is probably somewhere in the 50-60% range, if I had to > > guess. > >

[android-developers] Re: Stack overflow

2011-05-20 Thread DanH
You post your questions. Use the right keywords, the right title, explain yourself well, and you'll get some reasonable responses. On May 20, 9:27 pm, Julius Spencer wrote: > Hi, > > After attending IO and talking to the engineers, I was told to put questions > on stack overflow.  I was wonderi

[android-developers] Re: Syntax error: Unterminated quoted string

2011-05-19 Thread DanH
Did you, perhaps, put a quote symbol into one of the configuration fields when you were setting things up? On May 19, 5:11 pm, Daniel Mack wrote: > I'm following the basic instructions for setting up an Android > application with Eclipse and just after creating a new project, > without modifying

[android-developers] Re: unable to sort ut Dalvik VM error "Conversion to Dalvik format failed with error 1"

2011-05-19 Thread DanH
It sounds like you have a corrupted zip file. On May 19, 2:18 am, Sundi wrote: > Hi I am trying create a new android project frm an existing (working > demo), as soon as I import there comes an error > "[2011-05-19 12:45:59 - > com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] >

[android-developers] Re: what's the mean of "one os everywhere"?

2011-05-17 Thread DanH
Windoze as far as the eye can see. On May 16, 8:44 pm, alvinli wrote: > what's the mean of "one os everywhere"? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To un

[android-developers] Re: Appending nodes to an existing XML file

2011-05-17 Thread DanH
Well, you can just ask the user to remember his scores. Or you can use a database. Or you can write some other sort of file. [Please help save electrons -- don't read this post unless absolutely necessary.] On May 17, 9:57 pm, surya tej wrote: > Dear All , > > is there a alternative way instea

[android-developers] Re: Xml parsing using SAX parser

2011-05-17 Thread DanH
is in the wrong place. If present it must be the very first thing in the file. On May 16, 11:07 pm, Mobility Android wrote: > http://ws.apache.org/axis2";> >         >                 >                         1 >                         11 >                         Soap >                  

[android-developers] Re: Appending nodes to an existing XML file

2011-05-16 Thread DanH
me file.  But that's only if it's small. > > > If it's larger, probably stream de-serialize the file, look for the tag and > > append the node there. (and don't store to memory any tags you don't care > > about.) > > > Obviously any de

[android-developers] Re: JSON deserialization - MVC Web Service

2011-05-16 Thread DanH
Also, I'm assuming that whatever you're using to print the string is supplying the "\" escape characters, and they don't actually exist in the string. On May 15, 3:50 pm, Patrick Cornish wrote: > I have a test web MVC web service that is returning JSON data.   I am > not able to deserialze the da

[android-developers] Re: JSON deserialization - MVC Web Service

2011-05-16 Thread DanH
Well, it's not clear what you're trying to do or how you're feeding the data to the JSON parser. The first example should work (based on very brief examination) if the starting/ending quotes you display have been supplied in printing the string and don't actually exist IN the string. Otherwise, w

[android-developers] Re: Newbie question: What is "this" in the code?

2011-05-16 Thread DanH
Yeah, the concept of "this" is fundamental to object-oriented programming, and pretty much all OO languages will have something similar. It means the object whose instance method is currently executing. It's called "this" in Java and C++, "self" in Objective C, and probably a few other terms in o

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
ogramming? Help me. :-( Thanx On May 15, 9:41 pm, Spooky wrote: > On May 15, 2:17 pm, DanH wrote: > > > If you look around, about half those posting here (and on other forums > > for other platforms) are kids who have essentially no programmer > > training but have mana

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
It's one thing to be a kid at 15, playing around with programming. It's entirely another to be a college student (or dropout) at 22 who believes that he's going to "strike it rich" with apps. Programming is HARD WORK, and you don't learn how to do it well without considerable effort (and practice)

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
I'm sorry to tell you that Android development is not a "career path". Android, as you know it, probably won't exist in 10 years, and likely will be headed downhill in 5. And even if it does survive it will be a "dead end job". If you want a job in software development (and not in management or

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
The better programmers have an engineering background, IMO (or at least an "engineering way of thinking"). On May 15, 2:43 pm, Harri Smått wrote: > On May 15, 2011, at 10:17 PM, DanH wrote: > > > If you look around, about half those posting here (and on other forums > &

[android-developers] Re: Appending nodes to an existing XML file

2011-05-15 Thread DanH
Another alternative is a journaled approach. Write the updates to a journal, then merge them with the main file from time to time in a "batch" processing step. On May 15, 4:57 pm, Bob Kerns wrote: > Simple, yes, but it performs as O(n^2). As your file gets longer and longer, > your application w

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
If you look around, about half those posting here (and on other forums for other platforms) are kids who have essentially no programmer training but have managed to modify a few example projects to do interesting (to them) things and hence consider themselves to be programmers. They all believe th

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
airly easily write a program to translate between them for "business logic". The harder part is the environment/OS and, to a lesser extent, the UI. On May 15, 10:56 am, Harri Smått wrote: > On May 15, 2011, at 3:09 PM, DanH wrote: > > > A skilled programmer with no Android e

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
For several years our JVM (IBM Series i) held the worldwide performance record. On May 15, 8:04 am, Kostya Vasilyev wrote: > 15.05.2011 16:12, DanH пишет: > > > I started with Java 1.0.x -- writing a virtual machine for it. > > I did start with Java 1.0 as well, integrating

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
One hint. Look around locally for a business that could use some sort of business-specific app. Eg, an inventory tool of some sort -- like one that will help a warehouseman find a specific item int the warehouse. Negotiate whatever deal you can to do an app for them (eg, first two installs free,

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
I started with Java 1.0.x -- writing a virtual machine for it. On May 13, 11:25 pm, Brill Pappin wrote: > haha, particularly since 25 years ago, hardly anyone knew java (if it was > even released). > I have something between 15 or 16 years of experience with java now now > (exact numbers are fuzz

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
A smart hiring manager knows that programming skill is far more important than being "up" on a specific technology. A skilled programmer with no Android experience will take about 2 weeks to begin earning his keep, and a month or two to become comfortable with the technology. A wet-behind-the-ear

[android-developers] Re: How did you get into Android development

2011-05-15 Thread DanH
I got laid off with 35 years of programming experience, got hired at 1/4 the salary by a small phone app outfit, and drew the short straw to do some Android work. On May 13, 5:24 am, "Knutsford Software" wrote: > How did people on this list get from learning about Android to getting paid > work

[android-developers] Re: Appending nodes to an existing XML file

2011-05-14 Thread DanH
Can't be done. (Well, could be done, but would require some file calisthenics. You'd need to scan through the file to find the closing tag, figure out what record that begins with -- it might actually span records -- then write your new tags in place of the closing tag and restore the closing tag

[android-developers] Re: String Array help

2011-05-14 Thread DanH
System.arraycopy? On May 14, 12:39 am, Big Al wrote: > I need help with my programme. I am creating an epandable list from an > xml file that contains data that can change at anytime. My question is > the data in the xml file is stored in a string-array and I need to > transfer it to a multi dime

[android-developers] Re: Passing unsigned char* from JNI/C++ to Java

2011-05-13 Thread DanH
return env->NewStringUTF((const char*)digest); expects a null-terminated string. Any non-text data could have embedded nulls and isn't guaranteed to be terminated by a null, so the function could walk off the end of the string or stop short. More to the point, though, you can't convert arbitrary

[android-developers] Re: hash functions

2011-05-11 Thread DanH
choose your iteration count > accordingly, and you will limit the attacker to 10 attempts per second per > CPU, which certainly beats 1000 attempts per second per CPU. > > On Tuesday, May 10, 2011 8:35:00 PM UTC-7, DanH wrote: > > > Of course, hashing a password, per s

[android-developers] Re: hash functions

2011-05-10 Thread DanH
Of course, hashing a password, per se, doesn't really make it any stronger. And doing things like using a salt don't do much if the concern is simple trial-and-error cracking of a single encrypted message (unless you're relying on "security by obscurity"). Salting does help prevent known plaintex

[android-developers] Re: hash functions

2011-05-10 Thread DanH
For your purposes any standard hash algorithm that produces the desired number of bits should be fine. The "weakness" of hash algorithms has to do mostly with the ability to "counterfeit" data that produces a given hash value -- this is an important consideration when the hash is being used in a "

[android-developers] Re: help for database ?

2011-05-09 Thread DanH
> how can i use this with my for loop. > > can anybody help me? http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#beginTransaction%28%29 On May 9, 10:29 am, Hitendrasinh Gohil wrote: > hi, > > currently i am using below to add data to table but it takes too much

[android-developers] Re: exception catch sequence

2011-05-05 Thread DanH
Well, you can't close any of those since you don't have their addresses in the catch block. If you declared the variables outside of the try (be sure to assign null to them) then you could test each for null in the catch block and close those that were non-null. On May 5, 5:20 am, a a wrote: > D

[android-developers] Re: noclassdeffounderror

2011-05-05 Thread DanH
The most common reason for NoClassDefFoundError is a exception in the static initializer for the class. On May 5, 6:57 am, ragupathi ragupathi wrote: > hi im developing google application it focus some problem like > noclassdeffounderror exception. Any one knows post the solutions. when > this pr

[android-developers] Re: encryption decryption in android

2011-05-03 Thread DanH
Thread safety would be outside the purview of the FIPS. In general there's nothing special about a software encryption algorithm that would make it not thread-safe, so long as the user did not attempt to invalidly share the objects involved or some such. On May 3, 7:14 am, pasamblue1 wrote: > Hi

[android-developers] Re: How to debug NPE when stack trace does not show any reference to my app code?

2011-05-03 Thread DanH
In general, you try to figure out what the code was doing, and what objects that you directly or indirectly defined/created/modified that it might be referencing. Then study the code that creates/modifies those objects to see if you can intuit which values might be set to null when they shouldn't

[android-developers] Re: how to accelerate the performance of my phone?

2011-05-02 Thread DanH
Simple -- just up the voltage. The more voltage the faster the electrons move. On Apr 30, 10:02 am, Fadil Kamal wrote: > how to accelerate the performance of my phone? > sometimes my phone lags even force close > how to fix it? -- You received this message because you are subscribed to the Goo

[android-developers] Re: Encrypt Sqlite database in android..

2011-05-02 Thread DanH
Do you want it to be legal for export from the US, et al, or are you just doing this for your own amusement? To be legal to export from the US (and possibly some European countries) you unfortunately can't use your own self-compiled version of OpenSSL. (At least not without jumping through some h

[android-developers] Re: Not able to write a file completely with fileinputstream and fileoutputstream?

2011-04-29 Thread DanH
You don't have to call flush for every write. You don't have to call flush at all. You do need to close the output stream, though. On Apr 28, 9:23 am, Daniel Drozdzewski wrote: > Hitendrasinh, > > you have to call FileOutputStream.flush() after every write, but > before you get there, you have

[android-developers] Re: Not able to write a file completely with fileinputstream and fileoutputstream?

2011-04-29 Thread DanH
Don't forget to close the output stream. On Apr 28, 11:29 pm, Vishwas Undre wrote: > Hi, > > use next code > >  FileOutputStream fileOutput = new FileOutputStream(filepath); > >  InputStream inputStream = urlConnection.getInputStream(); > >  int[] key = {123,456}; >  int totalRead = 0; > int read

[android-developers] Re: How can I handle Exception message internationalization

2011-04-29 Thread DanH
Base your response on the class of the message (e.getClass().getName(), or e instanceof SomeClass). On Apr 26, 2:56 pm, Guilherme Matsumoto wrote: > Hi Everyone, > > Here is an example of my problem: > > try { >     // code that throws an exception} catch (Exception e) { > >     Toast.makeText(ge

[android-developers] Re: encryption give different result in android and jsp

2011-04-28 Thread DanH
Have you tried simply running the same string through the same algorithm on the same platform more than once? It appears to me that you're calculating a new key every time, so obviously the results would be different. On Apr 26, 10:58 pm, me mine wrote: > Hi all, > I use encryption method like a

[android-developers] Re: Android OOM exception and SoftReferences

2011-04-27 Thread DanH
One does need to keep in mind that naively loading, say, an 8 megapixel image will take about 16mb of storage. And on some platforms (not sure about Android) simply having 6mb of heap available does not mean that there's 6mb CONTIGUOUS, as would be needed for a large object. On Apr 27, 1:24 pm, d

[android-developers] Re: which is the fastest encryption scheme that i can use with android?

2011-04-27 Thread DanH
I did some timings on a different platform, and encryption (AES-256 in that case) was virtually immeasurable in most cases -- swamped by I/ O. I don't see why it would be much different on Android. On Apr 27, 5:23 am, Hitendrasinh Gohil wrote: > hi, > > can anyone tell me which the fast encrypti

[android-developers] Re: Encrypt database file

2011-04-26 Thread DanH
You can always encrypt/decrypt the DB file each time you end/start the application. But if the app dies suddenly the file is left unencrypted. You could compile your own version of SqlCipher (I've done it twice for other platforms -- not exactly rocket science, but it is jet engine science). Yo

[android-developers] Re: Search from Database

2011-04-26 Thread DanH
There are also extensions to SQLite to do full text search: http://www.sqlite.org/fts3.html But these would presumably require you to C compile and load the extensions. On Apr 26, 7:56 am, Brad Stintson wrote: > How to make a database field searchable? -- You received this message because you

[android-developers] Re: Search from Database

2011-04-26 Thread DanH
http://www.sqlite.org/lang_expr.html#like On Apr 26, 7:56 am, Brad Stintson wrote: > How to make a database field searchable? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegr

[android-developers] Re: java

2011-04-23 Thread DanH
e input, output, expected behaviour etc and one can > focus on the Java itself while coding it. > > Best regards, > Filip Havlicek > > 2011/4/23 DanH > > > I'd suggest you get a decent book on Java and play around with it a > > bit before tackling Android.  Shouldn&#

[android-developers] Re: java

2011-04-23 Thread DanH
I'd suggest you get a decent book on Java and play around with it a bit before tackling Android. Shouldn't take a lot with your background, but a few days doing that would be time well spent. (Trying to think of an application to implement, but nothing coming to mind at present. Maybe someone el

[android-developers] Re: This is True / False or a bug!?

2011-04-21 Thread DanH
Also, if one will be doing a lot of repeated compares of the same String values, String.intern() can be used to get a pointer that can be compared to other pointers to interned Strings. Some Strings (I'm thinking all String literals in a program) are defined to be already interned. So, eg, if Cla

[android-developers] Re: String to Float Performance Ideas

2011-04-18 Thread DanH
Convert the floats to "int bits" before storing them, then convert back from "int bits" when you read them. Store the numbers as either hex or decimal integers. On Apr 14, 11:01 am, Paul wrote: > I've got a bit of code in an app that reads XML String input (from the > SD Card), and creates Andro

[android-developers] Re: facebook integration

2011-04-17 Thread DanH
There's no real need for Android support for Facebook, since the interface is so simple: http://developers.facebook.com/docs/guides/mobile/#android On Apr 16, 5:16 pm, Kristopher Micinski wrote: > No. You can try to look for a facebook library, but there's no built in > Android support for it. >

[android-developers] Re: First insert didn't work when I using SQLiteDatabase.insert method.

2011-04-13 Thread DanH
I would guess that you screwed up somewhere. Check your code for bugs. On Apr 13, 11:24 am, Gustavo Costa wrote: > In my app I inserted a row since a button in main screen and recover > this row in a Service process. But, when I clicked in the button that > execute the SQLiteDatabase.insert, the

[android-developers] Access to phone's built-in OpenSSL?

2011-04-09 Thread DanH
As I understand it, OpenSSL is a part of the standard build for Android phones. Is there any way for an NDK app to access the OpenSSL encryption interfaces? I understand that one could simply compile a separate copy of OpenSSL with the app, but, in addition to being stupid from a storage point of

[android-developers] Re: SQLCipher for Android?

2011-04-07 Thread DanH
They need to be customized for the device file system and encryption facilities. On Apr 7, 2:06 pm, lbendlin wrote: > Not sure I understand. You include them in your source and use them. This > has nothing to do with Android. -- You received this message because you are subscribed to the Google

[android-developers] Re: SQLCipher for Android?

2011-04-07 Thread DanH
I don't see where any of those have been ported to Android. On Apr 7, 11:04 am, Kostya Vasilyev wrote: > A couple more: > > http://www.sqlite-encrypt.com/ > > http://sqlite-crypt.com/ > > Both of these are commercial. > > -- Kostya > > 07.04.2011 19:42, lbendlin пишет: > > > Have you looked at th

[android-developers] SQLCipher for Android?

2011-04-07 Thread DanH
Has anyone done this? Is there a commercial version 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-d

[android-developers] Re: Android sqlite and multithreading

2011-04-07 Thread DanH
The problem is that when you "hold the cursor open" the database is locked. That feature is not really applicable to a multi-threaded SQL environment. On Apr 7, 1:01 am, Evgeny Nacu wrote: > Hi again! > > DanH, I use thread synchronization. It works well. > But, as I

[android-developers] Re: Android sqlite and multithreading

2011-04-01 Thread DanH
A content provider won't provide any function over what you have now -- it's just a different way to accomplish the same synchronization. With SQLite you basically can't have two transactions going on at the same time, so you must either use semaphores or some such to prevent "collisions" or use a

[android-developers] Re: How to fix the java.lang.UnsupportedOperationException

2011-03-29 Thread DanH
Obviously, you need to support the operation. I'd suggest duct tape. On Mar 28, 5:22 am, amfine wrote: > Hello > please help me .the trouble is: > java.lang.UnsupportedOperationException >         at android.graphics.Path.addRoundRect(Path.java:514) >         at > android.graphics.drawable.shape

[android-developers] Re: encryption and decryption DES

2011-03-29 Thread DanH
I've only been programming in Java for about 15 years, so I'm a bit of a novice. So please someone tell me what the heck this means: byte [] plainText ss.getBytes = (); On Mar 29, 9:20 am, jaafar zbeiba wrote: > hello I tried encryption of any errors I ecplise but the problem when > I run the e

[android-developers] Re: Is it possible to slow system clock by an app? or it is a system bug?

2011-03-28 Thread DanH
By causing it to miss interrupts. On Mar 26, 9:26 am, Marcin Orlowski wrote: > > How to check the usage of CPU? > > https://market.android.com/details?id=com.eolwral.osmonitor > or read /proc/loadavg > > > 2011/3/26 DanH > > >> If your app is running 100%

[android-developers] Re: Unique Random numbers

2011-03-28 Thread DanH
There are random number generators in Java (java.util.Random) and in the crypto support. Or you can dig up a reference and write your own. Or you can use the millisecond bits of the system clock. If you use a good pseudo-random generator (and I assume that java.util.Random is reasonably good) th

[android-developers] Re: Encrypt Files

2011-03-26 Thread DanH
I see a bunch of errors reported, but none with "the exception code" (whatever that means). If you want people to look at your problem you've got to adequately describe it. On Mar 26, 7:30 am, jaafar zbeiba wrote: > which ? -- You received this message because you are subscribed to the Google

[android-developers] Re: Encrypt Files

2011-03-26 Thread DanH
There is a solution. On Mar 26, 6:30 am, jaafar zbeiba wrote: > hello I tried this code but I have a problem with the exception > code > import java.security.*; > import javax.crypto.*; > > // > // encrypt and decrypt using the DES private key algorithm > > public class PrivateExample { > >    pu

[android-developers] Re: Is it possible to slow system clock by an app? or it is a system bug?

2011-03-26 Thread DanH
If your app is running 100% CPU (ie, looking rather than waiting for events) it's conceivable that it would affect the clock. On Mar 25, 9:47 pm, San Zhang wrote: > I found a strange problem. On my Nexus One, since upgrading to Android > 2.3.3, the system clock would be slowed about one or two mi

[android-developers] Re: SQLiteDatabase or XML(saving)?

2011-03-23 Thread DanH
4 encode the image bytestream > and store it in xml, alternatively one could store the image files > themselves and just store their path in the xml file. > > Jonathan > > On Mar 23, 3:59 am, DanH wrote: > > > Well, you can't put images in XML. > > > If this is

  1   2   3   4   5   6   7   8   9   >