[android-developers] Re: sqllite

2011-01-12 Thread DanH
If you want the exact string you say , in effect: COLUMN_NAME = 'my search string' (single quotes) On Jan 12, 7:07 pm, "Hendrik Greving" wrote: > KEY_STRING is the text column name > > When putting in KEY_STRING + " like " + mystring => I am getting a syntax > exception > KEY_STRING + " like \

[android-developers] Re: What is the name of this widget?

2011-01-12 Thread DanH
> No. You can only modify it so far as it doesn't break existing > applications. That can be very limiting. But you can replace the entire thing with "NumberChooser" when you need to make a "clean break". On Jan 12, 2:12 am, Dianne Hackborn wrote: > On Tue, Jan 11, 2011 at 11:55 PM, mort wrot

[android-developers] Re: What is the name of this widget?

2011-01-11 Thread DanH
> If NumberPicker would have been provided in the SDK, then, someone would > have asked for an alphabet picker, or symbol picker, etc, and the list goes > on. Then, someone would have asked for a On-Off button pattern. Of course, DatePicker already contains a symbol picker, for the month. Having

[android-developers] Re: View HTML in Android browser

2011-01-10 Thread DanH
I'm guessing you'd say myIntent.setDataAndType(myUri, "text/plain"); On Jan 10, 8:18 am, perumal316 wrote: > Hi All, > > I want to open saved HTML pages in default Android browser. But > currently when I open the HTML, it is only showing me the option to > either open in HTML viewer not the brows

[android-developers] Re: HTTPS POST problem

2011-01-07 Thread DanH
Note that if a request goes through once and the identical request doesn't show up on the server when issued a second time it's likely because somewhere along the way the response is being served out of a cache. On Jan 6, 6:52 am, Filiz Gökçe wrote: > Hi, > I try to connect the https connection.

[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-07 Thread DanH
In the general (platform agnostic) case you solve this by having the stream "relay" though a service of some sort (eg, a thread) that is listening for messages from both the HTTP stream handler and whatever entity you have that will send the interrupt message. How you'd do this best on Android I h

[android-developers] Re: Disable Antenna

2011-01-06 Thread DanH
I could see blocking frequencies where there is too much local interference. Or maybe blocking to "prefer" one carrier over another. On Jan 5, 10:29 pm, Bob Kerns wrote: > Well, it wouldn't be working as a phone then. > > But you've got me REALLY curious about what you're doing now. The only > p

[android-developers] Re: Disable Antenna

2011-01-05 Thread DanH
e what's an OP? :) > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com > > On Wed, Jan 5, 2011 at 11:33 PM, Kostya Vasilyev wrote: > > A hammer works too :) > > > ( the OP didn't ask about enabling the antenna back ) > > > 05.01.2011 20:58, Dan

[android-developers] Re: Disable Antenna

2011-01-05 Thread DanH
I thought to disable the antenna all you had to do was put your fingers on the metal ring surrounding the phone. (Or does that only work for iPhone? ;) ) On Jan 4, 11:06 pm, Julius Spencer wrote: > Hi, > > I was wondering if it's possible to disable one or more antennae manually for > example,

[android-developers] Re: last block incomplete in decryption

2011-01-05 Thread DanH
Yep, the encrypted data coming out of the encryption algorithm is not "character" data, but essentially a string of random bits. If you put it into a String or char[] then someone somewhere's going to attempt to do some mapping that will muck things up quite properly. Keep the encrypted data in b

[android-developers] Re: SQLite setup

2011-01-02 Thread DanH
But be wary of the 1MB "gotcha" -- if the file is over 1MB you need to name it ".jpg" or some such to prevent compression. On Jan 2, 9:55 pm, Sarwar Erfan wrote: > Put your pre-created and pre-populated database in assets. Then, copy to > proper place in the first run (or when the db is not found

[android-developers] Re: How to store date and time in database

2010-12-29 Thread DanH
ur software can malfunction anew on every leap > second. > > Do you want medical device, or industrial control, or flight > navigation system, to hiccup on every leap second?  Sometimes a second > is an enormous error. > > On Dec 29, 9:05 am, DanH wrote: > > > It should

[android-developers] Re: How to store date and time in database

2010-12-29 Thread DanH
It should be pointed out that it doesn't matter (much) what time reference is used, so long as it's used consistently, and all conversion algorithms to/from the reference form understand its details. So long as a consistent reference is used dates will sort and compare correctly. On Dec 28, 9:41 

[android-developers] Re: pdf reader

2010-12-29 Thread DanH
Environment.getExternalStorageDirectory(). On Dec 29, 10:26 am, Robin Talwar wrote: > Then what do you suggest? > Should i put the pdf on net and put it's  url ? > > On Wed, Dec 29, 2010 at 9:36 PM, Mark Murphy wrote: > > > On Wed, Dec 29, 2010 at 10:58 AM, Robin Talwar > > wrote: > > > Sorry >

[android-developers] Re: I would like to find a way to load an android OS to my China N96

2010-12-28 Thread DanH
There is a port of Android to one of the Nokia platforms floating around, but I don't recall if it's Maemo or Symbian. On Dec 25, 12:08 am, Ray S wrote: > Does anyone know where to get an OS for china N96 -- You received this message because you are subscribed to the Google Groups "Android Deve

[android-developers] Re: pdf reader

2010-12-28 Thread DanH
Send intent. Tricky. Some PDF readers not respond to some intent. Must learn different. On Dec 27, 6:00 am, Ramesh Solanki wrote: > i am new in android > make pdf reader  in android > any idea then reply me -- You received this message because you are subscribed to the Google Groups "Android

[android-developers] Re: memory problem

2010-12-28 Thread DanH
I used to know how to do this but I forgot. (Uh, maybe you could tell us what you mean by "memory problem"? At least hint at a few symptoms?) On Dec 27, 7:15 am, Ramesh Solanki wrote: > i have developed an application that working perfectly > but sometimes it causes error i thing that is memoy

[android-developers] Re: how to manually free a large array

2010-12-28 Thread DanH
Well, first you need to zero out all pointers to the array, before doing the GC. On Dec 27, 4:11 pm, Steven Nieh wrote: > Hello, I'm new to android app development. Now I need to create a very > large array and write to disk. After I finish it, I need to delete it > immediately. I tried to call S

[android-developers] Re: Encrypted JSON

2010-12-28 Thread DanH
(Oops -- I guess that's what you were saying.) On Dec 28, 2:48 pm, Bob Kerns wrote: > Or, to say the same thing another way -- https: > > *HIGHLY recommended* for anything at all sensitive. > > On Dec 28, 10:11 am, DanH wrote: > > > SSL? > > > On Dec 2

[android-developers] Re: Encrypted JSON

2010-12-28 Thread DanH
Of course, https is just automatic SSL. On Dec 28, 2:48 pm, Bob Kerns wrote: > Or, to say the same thing another way -- https: > > *HIGHLY recommended* for anything at all sensitive. > > On Dec 28, 10:11 am, DanH wrote: > > > SSL? > > > On Dec 28, 10:18 am, Nik

[android-developers] Re: Encrypted JSON

2010-12-28 Thread DanH
SSL? On Dec 28, 10:18 am, Nikola wrote: > Hi, > > I would like to update sql database on android via json. > Is it possible to have encrypted or somehow secure connection to be sniff > proof. > > Thanks. > > -- > God is Real, unless declared Integer. > J. Allan Toogood, FORTRAN programmer -- Yo

[android-developers] Re: How to store date and time in database

2010-12-27 Thread DanH
e / long conversions in > java then selecting in SQL. > > kris > > On Mon, Dec 27, 2010 at 9:07 AM, DanH wrote: > > It should be pointed out that long integer is one of the date formats > > supported by SQLite. > > > On Dec 27, 1:39 am, Kostya Vasilyev

[android-developers] Re: How to store date and time in database

2010-12-27 Thread DanH
Well, you can store time as date-time modulo 24 hours -- fits easily in 32 bits. Otherwise, probably some sort of hours/minutes/seconds triplet (or just hours/minutes). On Dec 27, 7:17 am, "pramod.deore" wrote: > Ok, Now  I have stored date in miliseconds format. from this I can get > year, mont

[android-developers] Re: How to store date and time in database

2010-12-27 Thread DanH
(Though the SQLite long int representation of date is in seconds, not milliseconds.) On Dec 27, 1:39 am, Kostya Vasilyev wrote: > Kris & Pramod, > > With all due respect, there is a much easier way. > > Java date/time stamps are internally represented by "long" values, the > value being the numbe

[android-developers] Re: How to store date and time in database

2010-12-27 Thread DanH
It should be pointed out that long integer is one of the date formats supported by SQLite. On Dec 27, 1:39 am, Kostya Vasilyev wrote: > Kris & Pramod, > > With all due respect, there is a much easier way. > > Java date/time stamps are internally represented by "long" values, the > value being the

[android-developers] Re: How to store date and time in database

2010-12-27 Thread DanH
Store it any way you want. If you want to do selection by date I'd favor long integer (seconds since 1970), unless you need sub-second resolution. But supposedly SQLite can sort out (and select by) a wide variety of date formats, as described in the article someone referenced. On Dec 27, 12:21 a

[android-developers] Re: java.io.file.getfreespace()?

2010-12-26 Thread DanH
If it compiles OK but you get VerifyErrors on running, it usually means that you're running against a different version of the code than the one you compiled against. On Dec 26, 12:34 am, Keith Wiley wrote: > The Android reference for java.io.file lists the 1.6  apis, including > getfreespace().

[android-developers] Re: Which JSON Parser is better

2010-12-26 Thread DanH
nt of heap whether you hold onto the representation or not -- the only difference is the "high-water-mark", and that's much less critical than "churn" in terms of app performance. On Dec 26, 4:54 am, ko5tik wrote: > On Dec 25, 11:51 pm, DanH wrote: > > > Until y

[android-developers] Re: Which JSON Parser is better

2010-12-25 Thread DanH
Until you get up to **at least** 10K of JSON (maybe 1M, depending on the overall app size) there's no point in worrying about pull parsing. Reading and parsing the entire JSON file at once will increase temporarily the amount of heap used, but it's hardly a blip in most environments. On Dec 25, 1

[android-developers] Re: NullPointerException

2010-12-25 Thread DanH
No one's going to spend their time reading 204K of your code to help you find your bug, even if they **are** caught up in the "Christmas Spirit". You need to distill down the problem somehow. Learning how to describe problems and concepts to others is an important part of your technical education

[android-developers] Re: Basic String Array question :(

2010-12-24 Thread DanH
Yeah, if you don't know the size in advance use ArrayList or Vector. On Dec 24, 9:32 pm, Mystique wrote: > Dear King, > > "array indexing is zero-based, so you would start your loop from 0 and > go to 9 (where i  < 10)" > Right sir, I'm aware it's for illustration and I forgot to change it. > > "

[android-developers] Re: Suggestions on sharing code between standard Java & Android

2010-12-24 Thread DanH
I'd create a common CVS project and check it out into two different environments. It does take a little discipline to prevent the two copies from diverging, but if you check in/out on a regular schedule it should work. On Dec 23, 12:56 pm, Eric wrote: > We have a large, complex, Java client/serv

[android-developers] Re: Beginner type question on scope

2010-12-24 Thread DanH
Yep, you don't understand scope very well. It's a concept common to most "modern" languages, and one you need to understand to make any progress. Question: Can "onClick" "see" the variable "scope" that's defined in onCreate? If not, where could you define "scope" so that it would be seen in bot

[android-developers] Re: Which JSON Parser is better

2010-12-24 Thread DanH
JSON is blazingly simple. You can write your own parser in a day using about 600 lines of code. (Another 300 lines of code and maybe 3 hours to write the encoder end.) It should be possible to examine the versions you're considering and see which appears to be more professionally written and bet

[android-developers] Re: Image does't appear from sqlite

2010-12-24 Thread DanH
The addresses vary because they're different objects. You need to dump some of the actual byte arrays to see if they're different. You could even write code to compare input and output. On Dec 21, 6:40 pm, Muhammad Amiral <4mi...@gmail.com> wrote: > Hi all. > > I would like to save an image from

[android-developers] Re: Cannot define a float as a resource?

2010-12-24 Thread DanH
You could always use floatToIntBits/intBitsToFloat. But keep in mind that the resources are actually char data anyway, and you might as well just use parseFloat on a String (though then you have to catch NumberFormatException). On Dec 23, 1:33 am, Zsolt Vasvari wrote: > Thanks, Dianne.  I am now

[android-developers] Re: Image doesn't appear from sqlite

2010-12-24 Thread DanH
What's varying? The data won't be read back into the same address, but into a new byte array, and [...@ is just a byte array at a certain address. Dump a few bytes of the arrays (eg, first and last 10) so you can compare their contents. On Dec 22, 4:46 pm, Amiral <4mi...@gmail.com> wrote

[android-developers] Re: Android - InputStream SQLiteDatabase - How to read more than one xml file

2010-12-24 Thread DanH
If you're doing this to load up the DB, it's simpler/faster to just include the pre-built DB in your app and then copy it to the right place once installed. (Be sure to name it .jpg or some such if larger than 1M to avoid the compression mess.) On Dec 24, 4:39 am, giuseppe wrote: > I'have this c

[android-developers] Re: Cost effectiveness of JSON in Android

2010-12-20 Thread DanH
I don't quite understand what you're asking. By "direct connection" do you mean on the phone or over the web? JSON is a valid (and pretty good) way to represent data regardless of where it is or how it's being transmitted -- much more efficient to generate and parse than XML, better integration w

[android-developers] Re: SQLite Encryption

2010-12-20 Thread DanH
ress (keys management, > > reverse engineering) but overall it seems to be less complicated than > > building your own SQL DB engine (SQLCipher) in native code. > > > On Dec 20, 10:47 am, DanH wrote: > > > > Yeah, that's basically it.  Once you open the

[android-developers] Re: SQLite Encryption

2010-12-20 Thread DanH
ss complicated than > building your own SQL DB engine (SQLCipher) in native code. > > On Dec 20, 10:47 am, DanH wrote: > > > Yeah, that's basically it.  Once you open the DB and set the key the > > DB behaves just like any other SQLite DB.  No extra steps are require

[android-developers] Re: SQLite Encryption

2010-12-20 Thread DanH
ction just > in those steps? (I mean the underlined ones) > > Maybe I did not understand the right way to use SQLCipher. > > Thanks in advance, > > Marco. > > > > On Sun, Dec 19, 2010 at 5:18 AM, DanH wrote: > > The problem with SQLCipher, of course, is that you ne

[android-developers] Re: Android SDK installer can't find Java

2010-12-19 Thread DanH
Add Java to your system path? On Dec 19, 5:14 pm, CasaDelGato wrote: > I'm running Win 7 x64.  I just downloaded the latest Android SDK > installer - installer_r08-windows.exe > When I run it, it tells me that I don't have the Java SDK installed. > I do. > I even re-installed it to make sure. > I

[android-developers] Re: How to block a BufferedReader when no input is available?

2010-12-19 Thread DanH
(Of course, what you need is a loop of !ready ->sleep(nnn)) On Dec 19, 8:09 am, DanH wrote: > ready? > > On Dec 19, 7:38 am, DulcetTone wrote: > > > I have code in a worker thread that needs to efficiently read a > > constantly-growing input stream from a process.

[android-developers] Re: How to block a BufferedReader when no input is available?

2010-12-19 Thread DanH
(But, of course, ready causes the thread to wait -- not something the main thread should do.) On Dec 19, 7:38 am, DulcetTone wrote: > I have code in a worker thread that needs to efficiently read a > constantly-growing input stream from a process. > > The issue is that the present design uses a s

[android-developers] Re: How to block a BufferedReader when no input is available?

2010-12-19 Thread DanH
ready? On Dec 19, 7:38 am, DulcetTone wrote: > I have code in a worker thread that needs to efficiently read a > constantly-growing input stream from a process. > > The issue is that the present design uses a sleep() for a short period > if there is no input presently available, and I'd like the

[android-developers] Re: Encoding/decoding problem

2010-12-18 Thread DanH
Any time you transfer data (anything more than simple ASCII) over the net you need to be aware of data conversion issues. It's a complicated issue, and depends on which specific protocols you're using, what computer languages are involved, how you describe the data, etc. It's a topic for a book,

[android-developers] Re: SQLite Encryption

2010-12-18 Thread DanH
The problem with SQLCipher, of course, is that you need to compile the whole C SQLite implementation and embed it in the phone as native code. Doable, but not for the faint of heart. But it is certainly the most secure and complete approach to data encryption on a phone. On Dec 18, 8:10 pm, gjs

[android-developers] Re: SQLite3 Queries: Order By with Negative numbers backwards?

2010-12-13 Thread DanH
well. I will test with your suggestion tomorrow. > > On Dec 13, 5:46 pm, DanH wrote: > > > You're assuming that the ordering is numeric, when the column is > > likely being interpreted as character data.  You have to work at it a > > bit to get Sqlite to order numeri

[android-developers] Re: SQLite3 Queries: Order By with Negative numbers backwards?

2010-12-13 Thread DanH
You're assuming that the ordering is numeric, when the column is likely being interpreted as character data. You have to work at it a bit to get Sqlite to order numerically -- I don't offhand recall the tricks, but they're probably out there if you Google them. (Try "ORDER BY (sigma + 0)".) (It

[android-developers] Re: Adapter fetches and parses RSS feed to get its data - best practice?

2010-12-12 Thread DanH
; refactoring -- and lack of unit testing. > > Anyway, I just wanted to put this "single responsibility" thing in a > different light. It's really a valid idea, and not the cause of your > problem. Your problem was caused by a failure of the companion rule, > "comp

[android-developers] Re: Last night I posted question in this group and it is gone???

2010-12-12 Thread DanH
Basically, Google Groups sux. Things come and go and change order with considerable randomness. On Dec 12, 9:13 am, bobetko wrote: > Is it gone or actually it never appeared because it was not approved. > Is there some moderation process behind the scene? If it is, I would > love to be let known

[android-developers] Re: Notification assistance.

2010-12-11 Thread DanH
In Android the same basic function is accomplished with "intents". On Dec 11, 10:13 pm, Damien Cooke wrote: > Hi All, > I am crossing from iOS to Android development and am after a small amount of > help with a concept.  In ios I can post notifications that can be listed for > by other objects.

[android-developers] Re: Adapter fetches and parses RSS feed to get its data - best practice?

2010-12-11 Thread DanH
I'm working on (repairing) an application right now where the original developers apparently believed in that "single responsibility" thing. 127K lines in 360-odd modules, when the job could easily have been done in 35K. (We know this because the same function was implemented on another platform i

[android-developers] Re: Decryption key that only works with your phone number?

2010-12-08 Thread DanH
: > Good news.  More info please? > > On 12/08/2010 12:05 PM, DanH wrote: > > > Yep. > > > On Dec 8, 12:19 pm, Tobiah  wrote: > >> Is it possible to encrypt data in such a way, that given a particular > >> phone number, I could distribute a key that wou

[android-developers] Re: How to deal with the SQLite resource that is too large?

2010-12-08 Thread DanH
There is another option: Name the file .jpg or one of the other non- compressed file types. On Dec 8, 5:19 pm, TreKing wrote: > On Tue, Dec 7, 2010 at 1:42 AM, Kenny Chang wrote: > > My project has 3 SQLite database files, and each of them is larger than 2M. > > Given this. > > >  You know, the

[android-developers] Re: Decryption key that only works with your phone number?

2010-12-08 Thread DanH
Yep. On Dec 8, 12:19 pm, Tobiah wrote: > Is it possible to encrypt data in such a way, that given a particular > phone number, I could distribute a key that would decrypt the data, > but only when mixed with that phone number? > > Thanks, > > Tobiah -- You received this message because you are

[android-developers] Re: Best way to store data in database

2010-12-08 Thread DanH
You never compiled it? Never executed it? (Some symptoms would be helpful.) On Dec 7, 9:35 am, nirav sabhaya wrote: > BroadcastExample.java > -- > package com.example.broadcast; > > import android.app.Activity; > import android.content.Context; > import android.o

[android-developers] Re: How to encrypt the database

2010-12-08 Thread DanH
It's possible -- Google for "sqlcipher". But it's C code, so it would have to be built/installed as native code. Not sure how easily that goes down on Android. Otherwise you either encrypt individual fields (slow and not very secure) or you decrypt/encrypt the entire DB when starting/ending the

[android-developers] Re: Adapter fetches and parses RSS feed to get data - best practice?

2010-12-07 Thread DanH
Many an atrocity has been committed in the name of "best practices", "object oriented design", "design patterns", et al. (Not to mention "performance".) Any time someone's throwing around buzzwords like that I tend to run the other direction. Ultimately, the only criteria for good code is that i

[android-developers] Re: Total and free memory information in android phones and emulator

2010-12-06 Thread DanH
the same as the API methods return ? > > If that is the case then its fine for system level information. Can > anyone please tell me for application level? Should > ActivityManager.MemoryInfo suffice ? > > Thanks, > Adithya. > > On Dec 6, 9:59 am, DanH wrote: > > &g

[android-developers] Re: Total and free memory information in android phones and emulator

2010-12-05 Thread DanH
Well, there's always java.lang.Runtime.freeMemory and totalMemory. On Dec 5, 10:08 pm, adithya <24adit...@gmail.com> wrote: > Hi, > > I have gone through the ActivityManager.MemoryInfo and > Debug.MemoryInfo classes and the API's provided by them to get an > insight of the available memory present

[android-developers] Re: Why do the Date/Time controls have "+" on the top and "-" on the bottom?

2010-12-04 Thread DanH
On yet a different phone platform we experimented with several different schemes. We found that people pretty much always felt that pushing a "+" at the top to go up and a "-" below that to go down was most natural. When you introduce a wheel, however, things get a bit more muddled -- usually goi

[android-developers] Re: Localization: no compression... huge APK...

2010-11-28 Thread DanH
You can always use IDs to identify your keys, if you wish. Write a few small utility functions to do the conversion and the editing process to switch over will be fairly simple. (Plus you can leave frequently used items as they are.) On Nov 28, 3:55 pm, Pent wrote: > > You don't have to generat

[android-developers] Re: Localization: no compression... huge APK...

2010-11-28 Thread DanH
You don't have to generate your own resource IDs. Just don't use IDs. Nothing REQUIRES you to use IDs. On Nov 28, 2:47 pm, Pent wrote: > > XML files that aren't > > precompiled should compress quite efficiently. > > The difference is astonishing. Reading the XML from assets is easy. > > However

[android-developers] Re: Localization: no compression... huge APK...

2010-11-28 Thread DanH
Yeah, the stuff in "values" is "precompiled" into an internal XML representation and isn't compressed. XML files that aren't precompiled should compress quite efficiently. On Nov 28, 10:02 am, Pent wrote: > Nevermind, turns out it's easy enough to stick all the .xml values in > assets and load t

[android-developers] Re: SAX- \n \r not recognized

2010-11-26 Thread DanH
Yep, if you're expecting "whitespace" characters to make it through XML encode/decode, don't. In general they're ignored (except perhaps for CDATA), so if you want them preserved you should use some sort of substitution code. On Nov 22, 9:57 pm, Android Humanoid wrote: > Hi All, > > I'm using a

[android-developers] Re: Is that possible to print backtrace when debug native code

2010-11-23 Thread DanH
There's no generic C/C++ facility for that -- it would be system- specific (if it exists at all). On Nov 23, 3:45 am, "A.TNG" wrote: > Hi All, > > When I debug android app, if I work with Java, I can use Log.d("TAG", > "", new Throwable()) to print backtrace of Java code. This is > really han

[android-developers] Re: How to reduce heap size to get space for BitmapFactory.decodeFile()

2010-11-16 Thread DanH
Receive the encrypted files into files on the phone, and then encrypt them in stream fashion. Or decrypt the stream as it arrives. There should be no need to have the entire file in heap while you decrypt it, and decryption itself shouldn't taken that much heap. On Nov 16, 2:31 pm, manayv wrote

[android-developers] Re: sqlite returned: error code = 1, msg = table customer has no column named totalpurchase

2010-11-16 Thread DanH
First thing to do is to VERY CAREFULLY read the code that you use to create the DB and to reference the column. Very likely the problem is a typo in one of the names or in the definition statements. Check carefully the spelling of everything. And it never hurts to do as Kumar suggests and delete

[android-developers] Re: sqlite returned: error code = 1, msg = table customer has no column named totalpurchase

2010-11-16 Thread DanH
Not true. One "simply" needs to implement the database update stuff. On Nov 16, 2:47 am, Kumar Bibek wrote: > You probably have to uninstall and re-install the app if you added the > column later. > > > > On Tue, Nov 16, 2010 at 2:08 PM, Rahul Garg wrote: > > Hi guys, > > > I am facing problem

[android-developers] Re: Game performance degrading over time - any ideas?

2010-11-14 Thread DanH
My guess is that you have a slow memory leak, and GC is taking more and more time (and happening more frequently) as the garbage builds up. You need some traces and profiling to figure out what's going on. On Nov 14, 12:54 pm, kk wrote: > Hi all, > > I've written a game and I've noticed that aft

[android-developers] Re: Do many folks here go to the trouble of copyrighting their program?

2010-11-10 Thread DanH
stering for copyright would be useless but would be > interested to here of any real-life cases where a mobile app dev has > registered for copyright AND they have used that registration at a > later date to some benefit. > > On Nov 10, 10:10 am, DanH wrote: > > > Well, in the US y

[android-developers] Re: ConcurrentModificationException in SQLite

2010-11-09 Thread DanH
It should also be noted that a dump is going on when this happens. Apparently some other error occurred first. On Nov 9, 10:31 am, Bret Foreman wrote: > After looking more closely, I'm starting to think it's not a good idea > to handle this exception. Right after this error occurs, PID 493 goes >

[android-developers] Re: ConcurrentModificationException in SQLite

2010-11-09 Thread DanH
Once again, it's not SQLite that's using the HashMap. SQLite is entirely in C. It's some of the Android support surrounding it. A SQLite operation is not immediately active at the time of the failure, and the database should not be compromised. What one wonders is whether the problem occurs onl

[android-developers] Re: Are res/raw files compressed?

2010-11-09 Thread DanH
Yes, all "compressible" files are compressed. "Uncompressible" files are certain image files, zip files, etc, that are already in a compressed form and wouldn't benefit from compression. Keep in mind the compression can bite you, if you have a file larger than 1M. The file will compress fine and

[android-developers] Re: Do many folks here go to the trouble of copyrighting their program?

2010-11-09 Thread DanH
Well, in the US you get a copyright by simply saying "Copyright 2010 Joe Blow" or some such. (In fact, technically it's copyrighted even without that, so long as you don't take actions perceived as placing it in the public domain.) REGISTERING the copyright is a bit more work, but was fairly stra

[android-developers] Re: How to dump a Sqlite statements txt file into db.

2010-11-05 Thread DanH
Well, you could have a loop, and read lines from a flat file (or a resource array entry). Or you could pre-build the DB on a PC and install it during your initial bring-up. A little bit of a song and dance to do this, but nothing particularly complex or difficult. On Nov 5, 7:44 am, "jlopeznava.

[android-developers] Re: VerifyError: arbitrarily rejecting large method

2010-11-04 Thread DanH
Yep, the Dalvik compiler attempts to assign a "register" to every local variable in the method. It should be able to handle that many, but apparently can't. By making them instance variables you remove the compiler's need/desire to "manage" them (and also make the method a fair amount smaller).

[android-developers] Re: Prevent Rooted phones to access sqlite db and preferences

2010-11-03 Thread DanH
early in establishing frameworks and methodologies, all holes in > technology need to be fleshed out. > > On Nov 2, 4:22 am, DanH wrote: > > > Yeah, my first question would be why do you need a database?  I've > > seen many folks here go through the trouble of bui

[android-developers] Re: counting files in a cache

2010-11-03 Thread DanH
The file size will be rounded up to the "sector" size of the storage medium. I don't offhand know how you find that value. (Could be anywhere from 256 to 16K.) And there is the overhead in the directory itself for storage of the file name and other file info -- probably on the order of file_name_

[android-developers] Re: How to include external files into apk

2010-11-03 Thread DanH
Put the files in assets or raw. But beware the 1M size limit. On Nov 3, 12:32 pm, Eric wrote: > I need to attach several text files with the apk so that these text > files can be stored at SD card when APK is installed. How can I do it? > > Thanks, -- You received this message because you are

[android-developers] Re: certification for android developers

2010-11-03 Thread DanH
I think it's moot -- ALL Android developers are certifiable. On Nov 3, 1:18 pm, Stuart wrote: > Avoid edumobile.org. The virtual training is "outsourced" if you know > what I mean, and although they have video tutorials, its poor quality. > > On Nov 3, 2:42 am, Shalini wrote: > > > is there any

[android-developers] Re: Obtaining Name of Object Reference

2010-11-03 Thread DanH
But using reflections to get field names is much different from (somehow) obtaining the names of auto variables in a method. For the latter you could probably parse the class file to extract the debug symbol table (not an easy task), if working within a regular JVM, but it's likely to be even more

[android-developers] Re: How to unsign the signed apk file?

2010-11-03 Thread DanH
Well it would allow you to do essentially what the OP wants to do -- have some other app monkey in the internals of the subject app. Could be used to smoke out an encryption scheme, eg. But security on a phone (especially an Android) is a myth. On Nov 3, 10:54 am, Chris Stratton wrote: > In wha

[android-developers] Re: SSLContext.getInstance("SSL") throws java.security.NosuchAlgorithmException: SSLContext SSL implementation not found

2010-11-03 Thread DanH
s on Android, but again you can probably do it during session setup. 3) Install the necessary root certificates on the phone. I think this can be done with the "credential storage" in Android, but I haven't figured it out yet. On Nov 3, 11:00 am, gato wrote: > yep! you are right Dan

[android-developers] Re: best reasonable practice for locally storing a password?

2010-11-03 Thread DanH
Yeah, what Haravikk said. Android apparently has no key store feature, so you must encrypt the key and obfuscate the means of encryption/decryption. Generate the key off of some persistent internal value (IMEI is one option) but "mangle" it somehow and "smear" the generation of that key out throu

[android-developers] Re: Obtaining Name of Object Reference

2010-11-03 Thread DanH
You're not making much sense. If you want to know the name of "objRef" you can just include String nameOfObjRef = "objRef"; in your code. Won't do you much good, of course, since there's nothing (outside of some complex debugging scenarios) you can do with it. You CAN find the names of fields

[android-developers] Re: SSLContext.getInstance("SSL") throws java.security.NosuchAlgorithmException: SSLContext SSL implementation not found

2010-11-02 Thread DanH
Was just wondering because you were doing a getInstance on "TSL", not "TLS". On Nov 1, 2:04 pm, gato chlr wrote: > DanH , thanks for the answer, i have read about TLS, and now i know it is a > SSLv3. > > I have tried with TLS , and it works! but, then i get a &

[android-developers] Re: can't install Android platform 2.2 on windows vista 64 bit computer

2010-11-02 Thread DanH
It works. You need to disable the hardware protection thingie to run the emulator reliably, but nothing prevents you from doing install/ build. On Nov 1, 2:20 pm, jane wrote: > Hi, > I'm new for android's developing. I'm using windows vista 64 bit > computer. >  I try a couple of times run SDK m

[android-developers] Re: Prevent Rooted phones to access sqlite db and preferences

2010-11-02 Thread DanH
Yeah, my first question would be why do you need a database? I've seen many folks here go through the trouble of building a database when a HashMap would be perfectly sufficient. On Oct 27, 7:13 pm, swgillan wrote: > Hello, > > I have seen a few discussions on this, but I just wanted to see if >

[android-developers] Re: How to speed up a single simple SQLite INSERT?

2010-11-01 Thread DanH
Start a transaction before you do a bunch of inserts. Commit the transaction when you're done. Otherwise the DB starts/commits a transaction around each insert. The DB waits for "disk" activity to complete on the commit step, so that's the rate-determining step. On Nov 1, 9:50 pm, Mark Carter w

[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread DanH
Actually, I figured #3 was the worst of the lot. On Nov 1, 5:46 pm, Josef Hardi wrote: > On Oct 31, 11:46 pm, DanH wrote: > > > 1) Paint the letters and hash marks under program control > > 2) Have an image that goes, say W..N..E..S..W..N..E and slide it back > > and for

[android-developers] Re: CSS in Android

2010-11-01 Thread DanH
I'd be suspicious that neither "media" attribute is matching for some reason. Try it without the attribute on one of the statements. On Oct 31, 11:43 pm, Ellen wrote: > I want to know how to use CSS to control the style of HTML. > it looks like anything defined in CSS does not apply to HTML. > h

[android-developers] Re: SSLContext.getInstance("SSL") throws java.security.NosuchAlgorithmException: SSLContext SSL implementation not found

2010-11-01 Thread DanH
Have you tried "TLS"? On Nov 1, 9:29 am, gato chlr wrote: > Hi list, > > i want to implement a client for https, all in my localhost (in my apache, > it is configured to ask authentication), with a resource > "https://localhost:443/resources/resource1.xml"; > the server works fine. > > I have a

[android-developers] Re: Devices where install from unknown sources is not allowed.

2010-11-01 Thread DanH
Any device where "Allow installation of non-Market applications" is not checked. On Nov 1, 12:37 pm, MB wrote: > Hi, > > I would really appreciate if someone could point me to a list of > devices/carriers where install from unknown sources is not allowed. > > For e.g. I can confirm that HTC Aria

[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-11-01 Thread DanH
What do you tell the cop when he stops you? On Nov 1, 12:06 pm, "Maps.Huge.Info (Maps API Guru)" wrote: > I'll bet it works a lot like electronic car compasses. The one I have > in my truck (GMC) is fairly accurate but once in a great while it goes > nuts. To recalibrate the thing the manual inst

[android-developers] Re: weird compiler warning

2010-11-01 Thread DanH
It's referring to the attributes inside the class file -- either the compiler screwed up or the class verifier is slightly broken. Since the virtual machine largely ignores the attributes, you can ignore the message. On Nov 1, 6:44 am, ping wrote: > Hey guys, > > i recognized that when i'm build

[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread DanH
In answer to the original query, there are four conceptual ways I can think of to do the job: 1) Paint the letters and hash marks under program control 2) Have an image that goes, say W..N..E..S..W..N..E and slide it back and forth as needed 3) Have images W, N, E, S, and several ".." images of dif

[android-developers] Re: How can I create an aircraft-mounted-liked compass?

2010-10-31 Thread DanH
I do wonder how accurate it could possibly be, however. Your standard compass can be led astray by a steel belt buckle, so it's hard to see how a compass inside a phone, with batteries, printed circuits, electrons whizzing around, etc, could be very accurate at all. On Oct 31, 5:35 pm, Adrian Rom

<    1   2   3   4   5   6   7   8   9   >