Re: [android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Jason Proctor
> To ask a dumb question, as someone who hasn't used chunked uploading before: how can I indicate to the server the order in which to glue the chunks back together? (Tell me to go away and ask a Java forum if you want.) If you're designing your own protocol, you do it however you want. You'

Re: [android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-08 Thread Jason Proctor
> It is my Web server, so I can rewrite it to accept a PUT request. Are you suggesting that I do something like this, for each 1MB of the data? HttpPut httpPut = new HttpPut(url); httpPut.setEntity(new StringEntity(data)); I'd use ByteArrayEntity. what about streaming it with Inpu

Re: [android-developers] Re: Game Developers: Some general questions about high scores, achievements, multi player support and in game ads.

2010-03-17 Thread Jason Proctor
i'm in complete agreement. Rails has a lot of good ideas and is very quick to get started, but Ruby is a disaster of a language IMHO. the Groovy/Grails thing almost gets there, but then they had to go and make a new Ruby-like language, sigh. however, if you adopt RESTful URLs and JSON, then t

Re: [android-developers] dns failing in broadcast receivers?

2010-03-17 Thread Jason Proctor
yes -- i think it will just gradually fix itself. but it was mighty inconvenient when working code just suddenly started breaking in time for a big demo yesterday. No idea - it the problem has only started manifesting itself since DST - then it's likely to be the cause. But it's something

Re: [android-developers] dns failing in broadcast receivers?

2010-03-17 Thread Jason Proctor
out-of-sync clocks caused DNS errors. On 17 March 2010 02:06, Jason Proctor <<mailto:jason.android.li...@gmail.com>jason.android.li...@gmail.com> wrote: hey all, something weird just started happening. my app has a broadcast receiver which may access the network when invoked.

[android-developers] dns failing in broadcast receivers?

2010-03-16 Thread Jason Proctor
hey all, something weird just started happening. my app has a broadcast receiver which may access the network when invoked. the code has been solid for ages, but in the last few days it has started getting DNS errors on perfectly fine hosts. these are hosts which can be reached without proble

Re: [android-developers] ImageButton icon transparency

2010-03-03 Thread Jason Proctor
Jason Proctor wrote: >> Jason Proctor wrote: >>> why is the transparency for drawables attached to ImageButtons not >>> honoured? i have to change them to ImageViews so they look right. >> >> I have no such problems. You can see them working just fine h

Re: [android-developers] ImageButton icon transparency

2010-03-03 Thread Jason Proctor
Jason Proctor wrote: why is the transparency for drawables attached to ImageButtons not honoured? i have to change them to ImageViews so they look right. I have no such problems. You can see them working just fine here: http://github.com/commonsguy/cw-android/tree/master/Resources/Images

[android-developers] ImageButton icon transparency

2010-03-03 Thread Jason Proctor
why is the transparency for drawables attached to ImageButtons not honoured? i have to change them to ImageViews so they look right. tx -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this grou

[android-developers] Re: What does the prefix 'm' stand for ?

2010-02-24 Thread Jason Proctor
that's a *great* feature. There is an option in Eclipse to force the use of 'this.' for members. I have that option set and don't use the prefix. -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To po

Re: [android-developers] stay inside webview?!

2010-02-23 Thread Jason Proctor
did you read the documentation? read a little more about shouldOverrideUrlLoading() and find out what it does. you can do a little more than tell the web view to load the URL. well, the webview now only shows my pages. thats nice and works fine. right now I want to correspond to some speci

Re: [android-developers] from webview to activity

2010-02-23 Thread Jason Proctor
all this is very possible. check the documentation for WebView and WebViewClient to find out how. dear developer, is it possible that a user clicks inside a webview on a link like and then my activity is opened? I need this for sms, email, telephone and some specials. Lets say the user br

Re: [android-developers] Re: What does the prefix 'm' stand for ?

2010-02-22 Thread Jason Proctor
with all due respect, it's not quite just a subjective matter :-) i *really* like visual clues to denote the scope of variables etc, so i used to use the "m" prefix. however, i stopped, and now i use an explicit "this" to denote a reference to a data member. why? well, if you use a prefix, th

Re: [android-developers] Re: Can't show ProgressDialog during listview update

2010-02-18 Thread Jason Proctor
Fire new instances of the AsyncTask. It uses a thread pool. It is designed for the specific purpose we are telling you to put it to. or you could use AsyncTasks's progress reporting mechanism to communicate the loading of each list entry. AsyncTask is *fab* -- jason.vp.engineering.particle

Re: [android-developers] mail to group

2010-02-18 Thread Jason Proctor
if you have a gmail address, you won't see the copy coming back. gmail swallows it thinking it's its own copy it uses for conversation tracking. at least i *think* that's what's going on, i've never heard a peep out of google after asking many times. this used to work properly up until last apr

[android-developers] Re: 9-patch background image affects margins?

2010-02-16 Thread Jason Proctor
9patches affect padding (see bottom & right black control lines) pskink great - thanks! -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegro

[android-developers] 9-patch background image affects margins?

2010-02-15 Thread Jason Proctor
i have list views with image views and text views etc in them, and i'm trying to fix up a situation where the background image of a list element changes in the "pressed" state. if there's a straightforward way of doing that, please let me know! right now, i override onTouchEvent() in the topmo

[android-developers] Re: Hey Mr or Ms Moderator...

2010-02-15 Thread Jason Proctor
this list is really amazing. first the gmail change in april stopped the list copy of the message reaching gmail recipients, so people don't know whether their post made it. i think gmail assumes that any message from the same address is its own copy that it uses for conversation tracking. eit

Re: [android-developers] gridview to scroll horizontally and

2010-02-12 Thread Jason Proctor
would Gallery work in this situation? often described as a horizontal scrollview. Hi I am just wondering if the children of gridview can be shown horizontally instead of vertical view. Also I have question on performance issues on how horizontal scroll view works. I have to show 1000 ob

Re: [android-developers] saving shortcuts etc to the desktop?

2010-02-12 Thread Jason Proctor
); i.setAction(INSTALL_SHORTCUT); sendBroadcast(i); This will create a shortcut so that when the icon is clicked, the intent_to_execute_when_clicked will be launched. -Tope On Wed, Feb 10, 2010 at 11:48 AM, Jason Proctor wrote: perhaps i'm not being clear :-) supposing my app was an audio p

[android-developers] Re: FileNotFoundException on FileOutputStream when writing on sdcard, no idea why

2010-02-11 Thread Jason Proctor
since 1.6, IIRC also, use Environment.getExternalStorageDirectory() instead of hardwiring the /sdcard path, as the location may change in future Yeah thanks guys, I forgot to write the WRITE_EXTERNAL_STORAGE permission, it's all good now. It's weird because it's the first time I ever h

[android-developers] Re: trouble getting string resources by name

2010-02-10 Thread Jason Proctor
and as a final corollary to this, IMHO, Resources.getValue() should be passing context.getPackageName() instead of null, or the AssetManager should default it this way. fixed in 2.x? aha, it seems that i do have to provide a fully qualified package name for the call to work. interestingly

[android-developers] Re: trouble getting string resources by name

2010-02-10 Thread Jason Proctor
aha, it seems that i do have to provide a fully qualified package name for the call to work. interestingly i find that in the source, getValue() calls getIdentifier() with a null package name, explaining a few things. i'm still on 1.6, is this a problem, and has it been fixed in later version

Re: [android-developers] saving shortcuts etc to the desktop?

2010-02-10 Thread Jason Proctor
(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, resource file); i.setAction(INSTALL_SHORTCUT); sendBroadcast(i); This will create a shortcut so that when the icon is clicked, the intent_to_execute_when_clicked will be launched. -Tope On Wed, Feb 10, 2010 at 11:48 AM, Jason Proctor wrote: perhaps i'm not

[android-developers] trouble getting string resources by name

2010-02-10 Thread Jason Proctor
ISTR this working without problems, but i don't know what's going on here. i was using getValue(), but then after that couldn't find the resource i started using getIdentifier() followed by getString(). well, resources.getIdentifier (resourceName, "string", null); returns 0 for my named resou

Re: [android-developers] pause

2010-02-10 Thread Jason Proctor
and then you'll get an ANR. use a timer with a callback so that your app stays responsive -- CountdownTimer or at a push, java.util.Timer. however, i think the most pressing issue here is that the OP's app is crashing. perhaps he should take a look in the ddms log to get a stack trace and se

Re: [android-developers] saving shortcuts etc to the desktop?

2010-02-10 Thread Jason Proctor
en select whatever options you want to add. I am not sure about your other question. On Wed, Feb 10, 2010 at 11:27 AM, Jason Proctor wrote: i was asked today whether it's possible to save out "shortcuts" to the desktop, the way the iPhone can save bookmarks and contacts. AFAIK, it&#x

[android-developers] saving shortcuts etc to the desktop?

2010-02-10 Thread Jason Proctor
i was asked today whether it's possible to save out "shortcuts" to the desktop, the way the iPhone can save bookmarks and contacts. AFAIK, it's not possible to programmatically create apps or widgets. but is there another way to do this? thanks -- jason.vp.engineering.particle -- You received

[android-developers] Re: launch activity from on-screen Camera/Capture button?

2010-02-10 Thread Jason Proctor
are you calling the Camera activity from your application with the intent of being called back when the user takes a picture? the conventional way to do this is to start the Camera with startActivityForResult() instead of the regular startActivity(). override onActivityResult() to receive the

Re: [android-developers] How can I draw a simple shape with shapedrawable?

2010-02-09 Thread Jason Proctor
one way is to override your View's draw() and then do stuff with the Canvas instance passed in. the drawLine() etc methods are in Canvas. I've looked for a tutorial on it, but I can't figure out how to do it... For starters, and I can dig some more from there, how do I have a simple program d

Re: [android-developers] Google Map Error

2010-02-09 Thread Jason Proctor
stack traces are human readable, i suggest you read them rather than just posting them. such is the way that wisdom is gained. i draw your attention to this line, close to the bottom (ie close to the *top* of the caller stack) 02-09 18:36:40.694: ERROR/AndroidRuntime(300): Caused by: java.la

[android-developers] Re: Sqlite Error

2010-02-08 Thread Jason Proctor
n steps if no throw is done. So always just try for the cleanest code. On Feb 8, 10:12 am, Jason Proctor wrote: well, like the error says, the cursor is being garbage collected but it hadn't been closed or deactivated. you must close your cursors! and do it in a finally block so that they sti

[android-developers] Re: Modal Dialogs: the definitive solution

2010-02-08 Thread Jason Proctor
Android Dialogs are a little awkward to handle because (long story short) clicking on one of the ok/cancel/etc buttons auto-dismisses the dialog. so you can't validate while the dialog is up, you have to re-show the dialog. after the 10th dialog i found this to be a pain so i wrote a wrapper

Re: [android-developers] Sqlite Error

2010-02-08 Thread Jason Proctor
well, like the error says, the cursor is being garbage collected but it hadn't been closed or deactivated. you must close your cursors! and do it in a finally block so that they still get closed even if other code throws an exception. for example -- Cursor c = null; try { c = resolver.qu

[android-developers] scrollview dropshadow attributes available?

2010-02-05 Thread Jason Proctor
can i affect the look of the dropshadow that the scroll view shows when there's "more" available via scrolling? i'm not seeing anything in the scrollview docs. thanks much -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups "Android Dev

[android-developers] setting margins causing clipping

2010-02-04 Thread Jason Proctor
following on from my previous question :-) i have text view and an image view inside a linear layout which is itself inside another linear layout. the inner linear has android:gravity set to center_horizontal, and that seems to work fine. however i'd like the inner layout to have some white sp

Re: [android-developers] setUserAgentString not affecting browser user agent

2010-02-04 Thread Jason Proctor
i wouldn't necessarily advise replacing the user agent string completely, as other pieces in the chain might become confused. it's also possible that at request time WebKit is rejecting your string and sending the default one. if i'm reading it correctly, the standard for user agent strings s

Re: [android-developers] lost in the maze of align/gravity/layout

2010-02-03 Thread Jason Proctor
try to center things vertically, chances are it won't work, since there won't be space left in which to center the children. On Wed, Feb 3, 2010 at 5:51 PM, Jason Proctor wrote: i have a LinearLayout with some dynamically shown/hidden items, and i'm trying to centre it

[android-developers] lost in the maze of align/gravity/layout

2010-02-03 Thread Jason Proctor
i have a LinearLayout with some dynamically shown/hidden items, and i'm trying to centre it horizontally in a RelativeLayout or LinearLayout. seems like there are more than a few ways of specifying alignment and centring etc. i've tried layout_centerHorizontal and layout_gravity, nothing's wo

[android-developers] Re: Galley of thumbnails from the web running out of memory

2010-02-03 Thread Jason Proctor
, but if I can't beat my memory issues the I'll use it as a last resort. I checked out the thumbnails, they're already sized to 100x100 jpgs of roughly 4k in size, seems like I should be able to hold them in memory 4x12 = 48k, so there must be something else going on. On Feb 3,

Re: [android-developers] Test upgrade between versions

2010-02-03 Thread Jason Proctor
at a guess, market upgrades work by replacing the APK. the application then handles upgrade issues when it first launches after the replacement. as you've seen, the uninstall/install cycle will wipe out preferences, not really what you want. i simulate upgrades by doing adb reinstall. i see th

Re: [android-developers] Galley of thumbnails from the web running out of memory

2010-02-03 Thread Jason Proctor
do all the thumbnails have to be on the screen at once? if not, consider keeping the images as their compressed equivalents (JPEG byte arrays, etc), then use a ListView as it will recycle views that's not currently visible, allowing you to inflate JPEGs into Bitmaps and then throw the Bitmaps a

Re: [android-developers] alphabetic scrollview navigator

2010-02-02 Thread Jason Proctor
the intl/zh-CN) kinda irritating... http://developer.android.com/reference/android/widget/AbsListView.html#setFastScrollEnabled(boolean) On Tue, Feb 2, 2010 at 5:37 PM, Jason Proctor wrote: is the scrollview with the alphabetic list on the right and annotated scrolling a standard component

[android-developers] alphabetic scrollview navigator

2010-02-02 Thread Jason Proctor
is the scrollview with the alphabetic list on the right and annotated scrolling a standard component? or is there any support for implementing it? sorry i've not had chance to take a look in the 2.0 API... thanks -- jason.vp.engineering.particle -- You received this message because you are su

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-02-01 Thread Jason Proctor
an even write one-liners: new URL("http://www.example.com/myresource";).getContent(); On Jan 28, 1:28 pm, Jason Proctor wrote: the main HttpClient showstopper for me was its buggy cookie implementation - i needed to share cookies between WebKit and HttpClient, and HttpClient wouldn

[android-developers] Re: Use of final for locals on Dalvik

2010-01-29 Thread Jason Proctor
If you compile this with javac, it will complain: Blah.java:6: local variable x is accessed from within inner class; needs to be declared final private int i = x; ^ 1 error If you change the declaration to "final int x = 27", it succeeds. yes, i understa

Re: [android-developers] Re: Use of final for locals on Dalvik

2010-01-29 Thread Jason Proctor
yeah i'm clear on why final's more conventional uses, but does it really change the scope of a variable so that it sticks around for an anonymous class to use it at an unspecified later time -- onClick() etc? doesn't seem right somehow. maybe i should read the documentation! lol... I am a b

[android-developers] Re: Use of final for locals on Dalvik

2010-01-29 Thread Jason Proctor
The only time you need to use it is when the variable is referenced by an anonymous inner class (the compiler will let you know). is this a documented feature of Java? seems like a bit of a hack override of "final" to me. much nicer to use a class member, IMHO. -- jason.vp.engineering.partic

Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor
On Thu, Jan 28, 2010 at 6:30 PM, Jason Proctor wrote: XML parsers require closed tags. No, not all of them do. This is exactly the point you can't seem to grasp. There are many XML parsers that close tags for you. Whether you still consider them to actually be XML parsers doesn

Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor
Browsers contain XML parsers (whatever you choose to call them, they still parse XML). Those parsers look for and close unclosed tags before rendering. My point stands. There is also HTML Tidy which parses XML for errors. It can and does close unclosed tags if you ask it to. So that's another

Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor
On Thu, Jan 28, 2010 at 4:34 PM, Jason Proctor wrote: there ain't no XML parser in the world that will let an unclosed tag pass. You mean aside from every web browser ever built? ah good -- nice knee-jerk, miss-the-point, off-topic post, as usual. see, now i'm feeding the t

Re: [android-developers] Parsing HTML

2010-01-28 Thread Jason Proctor
DocumentBuilder uses an XML parser, and there ain't no XML parser in the world that will let an unclosed tag pass. if you really need to parse potentially badly formed HTML, take a look at some of the free/shareware HTML parsers around. Google etc. hth I am trying to parse an HTML document

Re: [android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Jason Proctor
Jan 28, 2010 at 1:28 PM, Jason Proctor <<mailto:jason.android.li...@gmail.com>jason.android.li...@gmail.com> wrote: the main HttpClient showstopper for me was its buggy cookie implementation - i needed to share cookies between WebKit and HttpClient, and HttpClient wouldn't pl

Re: [android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Jason Proctor
EST calls with Basic Auth, various headers, xml/json body, etc. On Thu, Jan 28, 2010 at 1:01 PM, Jason Proctor <<mailto:jason.android.li...@gmail.com>jason.android.li...@gmail.com> wrote: i hope not, because the code makes a new HttpClient instance per ArtRetrievalTask. i su

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Jason Proctor
btw, i know this isn't directly connected to the issue at hand, but i'd recommend closing the FileInputStream in a finally block so you don't leak file descriptors. Here's the code: public class ProcessFiles extends AsyncTask { protected Void doInBackground(Void unused) {

Re: [android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Jason Proctor
i hope not, because the code makes a new HttpClient instance per ArtRetrievalTask. i suppose it could be trying to be clever, realising that the requests are going to the same place, and utilising HTTP 1.1 to bundle the requests into the same connection. if that's really what's happening (and

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Jason Proctor
can you post the real code then? :-) Hi Jason. Thanks for requesting the clarification. My code is actually calling AsycnTask.execute(). I should have made that clearer in my pseudo-code. The description above shows all threaded portions of the app. I stripped down to a basic test implemen

[android-developers] Re: AsyncTask and simultaneous network downloads

2010-01-28 Thread Jason Proctor
call execute() to allow AsyncTask to properly schedule a call to your doInBackground() in an appropriate thread. calling doInBackground() yourself will just invoke the code you intended to be run in the background thread all right, but it will do it synchronously in your current thread. or p

Re: [android-developers] Re: list - need suggestion

2010-01-27 Thread Jason Proctor
first off, use String.equals() to compare the contents of strings, not ==. the == operator checks for object reference equality. this isn't what you want, unless you use intern() throughout, which i wouldn't recommend. Hi, The basic list that I want to view is working. In my first list act

Re: [android-developers] How to run a i-jetty on a G1

2010-01-26 Thread Jason Proctor
depends. if the phone is on wi-fi, then it will have a real IP number. however, if the phone is on 3G/Edge/etc, then its IP traffic is proxied over that network, and might not/won't be visible as a regular IP peer. one reason for this being that there are a LOT of phones in active use right n

Re: [android-developers] Re: First HTTP/S requests are slow. [Android 1.5]

2010-01-26 Thread Jason Proctor
.HttpsURLConnection.getInputStream(HttpsURLConnection.java:257) It seems like an ssl version error... Maybe I have to specify explicitly this version somewhere? Or maybe some certificates? :S If anyone has an idea please let me know :) Thanks everyone! Yuvi On Tue, Jan 26, 2010 at

[android-developers] Re: First HTTP/S requests are slow. [Android 1.5]

2010-01-26 Thread Jason Proctor
SSL requires a good chunk of crypto code. maybe its initialisation & code-loading time is causing the delay on first use? one way to find out is to write something as bare-bones as possible (ie without the Apache HTTP library, which is large and complex) and profile it to see where the time is

[android-developers] Re: Deleting all files

2010-01-20 Thread Jason Proctor
might want to use the file constructor meant for parent + child -- new File (dir, filename) filepath + filename might not work for all platforms. the reserved constructor is safest. hth This works for me: private void deleteFiles() { File dir = new File(); String[] child

Re: [android-developers] findViewById doesnt work directly after inflate() !! Why?

2010-01-19 Thread Jason Proctor
override onFinishInflate() and cache your subviews there. the view constructor is too early for findViewById(). I have an activity defined as: public class FlipperDemo extends Activity { @Override public void onCreate( Bundle savedInstanceState ) { sup

Re: [android-developers] getting clicks on a map view

2010-01-14 Thread Jason Proctor
retty well.. why would you need to be able to control clicks directly on the map at any point, instead of providing overlayitems? On Thu, Jan 14, 2010 at 3:28 PM, Jason Proctor <<mailto:jason.android.li...@gmail.com>jason.android.li...@gmail.com> wrote: Kevin Duffey wrote: Us

[android-developers] Re: What's best way to resume activity and play audio file after spawned thread completes download?

2010-01-14 Thread Jason Proctor
what's going on while the mp3 is being downloaded? is the user waiting for it, with a progress bar? is the user to be presented with the media player when the download completes, regardless of what else they might be doing? as always i would recommend AsyncTask for doing this stuff, it has ni

Re: [android-developers] getting clicks on a map view

2010-01-14 Thread Jason Proctor
Kevin Duffey wrote: Using Mark Murphy's online books, he describes how to do this. I don't know if it is the only way, but basically you extend ItemizedOverlay, in the constructor you do the items.add(OverlyaItem) method call. This will add overlayitem's to the map. These items are clickable

[android-developers] getting clicks on a map view

2010-01-14 Thread Jason Proctor
i'm looking to get called when the user taps on any part of a map view and i'm having no luck so far. mapView.setOnClickListener() overlay.onTap() overlay.onTouchEvent() none of these produces as much as a peep when the map view is clicked. i did some googling and found this thread -- http://

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread Jason Proctor
eal. the app is asking webkit to load resources which the author of the app packaged into the apk. what's the problem?? Nope, that does not work either. On Jan 14, 2:50 pm, Jason Proctor wrote: it's in the deep past for me and i can't remember how much success i had with this

[android-developers] Re: Display locally stored html webpage using webview

2010-01-14 Thread Jason Proctor
it's in the deep past for me and i can't remember how much success i had with this approach, but try URLs of the form -- file:///android_asset/test.gif accessing local files from webkit was a mess way back when, i've not looked into it recently so i can't tell whether it's been fixed up.

[android-developers] clicks on views inside scroll views

2010-01-13 Thread Jason Proctor
i have a scroll view which has lots of goodies in it, one of which is a map view. i'm noticing that if i enable clicks on the map view, then horizontal drags act like you'd expect, but vertical ones scroll the scroll view instead. is there a way of getting the scroll view to defer touch behavio

Re: [android-developers] @Override tag error between dev environments

2010-01-13 Thread Jason Proctor
fabulous. always thought that was a bad situation in 1.5. thanks @Override can be used on interface methods in Java 1.6 but not in 1.5. Just set your environment to use Java 1.6. On Wed, Jan 13, 2010 at 12:06 PM, Mark Wyszomierski wrote: Hi, I'm using eclipse 3.4/3.5 to compile a project.

Re: [android-developers] @Override tag error between dev environments

2010-01-13 Thread Jason Proctor
the @Override is optional, it's just a check to see whether you are actually overriding something as opposed to just implementing a similar method :-) what happens if you qualify that OnClickListener to View.OnClickListener? any difference? btw fwiw and maybe i am old-fashioned, but i hardly

Re: [android-developers] Re: Missing HashSet find

2010-01-11 Thread Jason Proctor
AFAICT, the class libraries running on Android (as opposed to the ones you link against on your computer) come from Apache Harmony. I'm a bit confused by the OP. I thought it was in reference to Andorid's java.util.HashSet. However it seems to be in reference to the Apache Harmony project.

Re: [android-developers] Dialog on Lock Screen

2010-01-11 Thread Jason Proctor
let's not get into all that again :-) there was a thread before the holidays entitled "Block Switch App" where this was discussed at length. I thought you could replace the lock screen? On Mon, Jan 11, 2010 at 3:08 PM, Mark Murphy <mmur...@commonsware.com>

[android-developers] Re: Removing the stack of Activity

2010-01-11 Thread Jason Proctor
i think maybe you're not understanding the question! Beena -- if SINGLE_TOP and CLEAR_TOP don't work for you, as the activities don't have co-operating classes or something, then you could set a flag somewhere global. the intervening activities would then check this flag and finish() appropria

[android-developers] android install sdk fail

2010-01-11 Thread Jason Proctor
so i tried to install an android sdk on my home machine yesterday. encountered failures. this used to be easy! procedure -- 1 - installed the SDK tools, version 4, from developer.android.com 2 - ran up the android tool as instructed 3 - failed to get repository contents via SSL - the tool said

Re: [android-developers] keep webview in one activity

2010-01-11 Thread Jason Proctor
dai wrote: Does some please let me know how to use webview? I want to make a webview keep to work wthin in a layout without opening new web browser when clicking a link tag. You need to attach a WebViewClient to the WebView and implement shouldOverrideUrlLoading(). In there, load the replace

[android-developers] developer reference html problem

2010-01-11 Thread Jason Proctor
seems like my bookmarked class reference links, of the form -- http://developer.android.com/reference/package/Class.html are now being redirected to URLs of the form -- http://developer.android.com/intl/zh-CN/reference/package/Class.html which is fine albeit a bit weird. however, the links to

Re: [android-developers] Nexus bug

2010-01-08 Thread Jason Proctor
Could you tell us what is in your Camera.Parameters? it would be really nice if the piece of code that got annoyed said *what* had annoyed it! otherwise it's "can you guess the number Android is thinking of" all over again. #bettererrormessagesplease #soapbox -- jason.vp.engineering.parti

Re: [android-developers] intents

2010-01-08 Thread Jason Proctor
if app B needs to be called via an intent, but has no UI, consider making it a Service? i have two applications A and B (in different packages,but it doesn't matter).Application B is an sms application that i have made and contains one activity.This activity has a method called sendSMS(Strin

[android-developers] Re: AudioRecord works with short but static with byte

2010-01-08 Thread Jason Proctor
ok, but why must you address the samples as bytes? why not just deal with them in their native format? at a guess, the hardware doesn't support 8 bit recording. you could scale the 16 bit samples down to 8 bit, but watch out for the fact that 16 bit samples are signed, and 8 bit samples are no

[android-developers] Andrometer crash info

2010-01-08 Thread Jason Proctor
as suspected, it's the camera -- java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters(Camera.java:611) at com.highwaynorth.andrometer.CameraPreviewSurfaceView.surfaceChanged(CameraPrev

[android-developers] Re: App crashes on Droid, works fine on G1

2010-01-08 Thread Jason Proctor
there's a Droid user sitting right here, i will try to get him to install the app and log the crash to my ddms. then i'll send it on. At 1:34 PM -0800 1/8/10, Matt Kanninen wrote: Do you specify a target SDK in your manifest? Do you use any Droid specific layouts? What firmwares do you supp

[android-developers] Re: AudioRecord works with short but static with byte

2010-01-08 Thread Jason Proctor
AudioRecorder is copying each *sample* into the buffer you provide, element by element. if you don't give it enough space for the sample, you get truncation. and static. the read(byte[]) method is there for the situation where you set up AudioRecorder to give you 8-bit samples. i'd confirm t

[android-developers] Re: Removing the stack of Activity

2010-01-08 Thread Jason Proctor
depending on the class of these activities, it might be possible to achieve this flow with the intent flags FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_SINGLE_TOP. works for me :-) Have you tried simply calling finish() for every activity you want to remove from stack? On Jan 7, 8:54 am, Beena

Re: [android-developers] AudioRecord works with short but static with byte

2010-01-08 Thread Jason Proctor
knee-jerk answer: because the individual samples are 16 bits wide, and by reading just a byte each time, you're only getting half the sample. Any idea why reading bytes from AudioRecord would cause an error while reading shorts would not? The sound comes through great with short but I get o

[android-developers] Re: this is just too much

2009-12-18 Thread Jason Proctor
i flagged it as prohibited, as should others. hth -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, se

[android-developers] how to send an IM?

2009-12-17 Thread Jason Proctor
i'm striking out trying to send an IM from an activity. email & sms were easy, but i can't get IM to work for some reason. i googled around and found a method which used "imto" Uris, but the Uris so constructed crash HierarchicalUri.writeToParcel(), which is a long-standing bug IIRC - at least

[android-developers] Re: ListView

2009-12-16 Thread Jason Proctor
take a look in the apidemos sample application included in the sdk? lots of list examples in there. >Some extra help: > >watchlist.xml => http://pastebin.com/f738bc9d6 >episode_row.xml => http://pastebin.com/f27442ce7 >the activity: http://pastebin.com/f53a0df > >kind regards, > >Dirk > >-- >Yo

[android-developers] Re: Scaling images in WebView (interactively?)

2009-12-15 Thread Jason Proctor
javascript. if the content you want to manipulate is inside a web view, good luck doing it any other way! :-) >*bump* > >On Sun, Nov 29, 2009 at 6:59 PM, Mariano Kamp ><mariano.k...@gmail.com> wrote: > >Hi, > > I use WebView a lot to display web pages with emb

[android-developers] Re: Write a file to sdcard...

2009-12-14 Thread Jason Proctor
yer welcome. ideally the runtime would throw a permissions exception so you'd get an idea of what went wrong. file not found can and does mean anything :-) >Ah thanks Jason, that seems to have fixed it, > >Thanks > >On Dec 14, 3:33 pm, Jason Proctor >wrote: >>

Re: [android-developers] Write a file to sdcard...

2009-12-14 Thread Jason Proctor
does your manifest declare WRITE_EXTERNAL_STORAGE permission? also please use Environment.getExternalStorageDirectory() instead of /sdcard directly. on future platforms the location might change. >Hi, > >I'm trying to create a file on the sd card. Using this: > > OutputStream out = new FileO

Re: [android-developers] Re: Immediate Need for Multiple Requirements

2009-12-14 Thread Jason Proctor
i've tried a few times to get this guy to stop posting and it's pointless. he just blasts away without reading anything, AFAICS. here's hoping that if enough people mark it as spam it won't get through to the list address, not just individual mailboxes. >Thanks! >Sincerely >Jose C Gomez > >

Re: [android-developers] Re: Large data file: how to deal with it?

2009-12-11 Thread Jason Proctor
could you please change your sig so it doesn't include a graphic? everyone has plenty of copies by now. thanks. >another option i've seen is to bundle your data in a different .apk. >when the data.apk installs, it just copies the bundled data from the >apk to say the sdcard ... then asks the

[android-developers] Re: Camera intent - what's safe to use?

2009-12-10 Thread Jason Proctor
DEBUG = false; > >if(DEBUG){ >doStuff(); >} > >javac will strip the doStuff call since it's known to be unreachable >at compile time. > >On Dec 10, 4:59 pm, Jason Proctor >wrote: >> it would be nice to - >> >> #ifdef DEBUG >> #d

[android-developers] Re: Camera intent - what's safe to use?

2009-12-10 Thread Jason Proctor
it would be nice to - #ifdef DEBUG #define Log.i() ... etc, but OTOH, preprocessors are very easily abusable. >On Android I'd say java or javac is basically a preprocessor for >dalvik. > >On Dec 10, 4:39 pm, Jason Proctor >wrote: >> >On a similar note, what do y

[android-developers] Re: Camera intent - what's safe to use?

2009-12-10 Thread Jason Proctor
>On a similar note, what do yall use for your log tags? I go back and >forth between static final Strings and this.getClass().getCanonicalName >(). The CONSTANT strings annoy me, since I'm always adding and >removing them to reduce my compiler warnings for unused variables, as >I add and remove l

[android-developers] Re: Help with @Override problems

2009-12-10 Thread Jason Proctor
ut of ideas, as there are no listeners for ActivityManager >to stop the call log, or anything else >The last thing that i can think of is creating an activity to replace >call log in android(except i would have to have an entire phone app) >that would do what i want. >help? > > > &

Re: [android-developers] Re: Block Switch App

2009-12-10 Thread Jason Proctor
>On Thu, Dec 10, 2009 at 3:52 PM, Jason Proctor > wrote: >> Android is not closed because Google see fit to close security holes >> in their distro. > >Not allowing some components to be swapped out is not in the true >spirit of open source. > >Claiming it t

  1   2   3   4   5   >