I surprised this works :)
Anyway, this method doesn't work for you when a progressdialog, i.e. an
alertdialog, is showing.
A solution could be to *not* use progressdialogs or any other dialogs in
your app. Instead use DialogFragments or Activities having the theme
Theme.Dialog.
--
You
What happens if you put this
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
into the *onCreate *of you Activity?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
If you control both the development of both the Android app and the server,
i would suggest REST.
Google SOAP vs REST to see why I suggest REST for mobile development :-)
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this
I've seen the log message W/SharedBufferStack( 78):
waitForCondition(LockCondition) timed out (identity=5, status=0). CPU may be
pegged. trying again. plenty of times on my Galaxy 10.1 and Xoom tablets.
However, it was never hung (as far as I know); just a few of these messages
in a row and
In your onCreateView callback of your fragment, you could do something like
this:
*Button myButton = (Button)view.findViewByid(R.id.mybutton);*
*myButton.setOnClickListener(new OnClickListener() {*
* public void onClick(View view) {*
*// put some code here that handles the click event.*
*
Yes,
The 'Home key' is very much like the 'truth'
:-)
--
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
I found this out the hard way too a while ago :)
I worked around it by just having the first AsyncTask class reference being
handled on the main UI thread. If you do that, all other instances of
AsyncTask in your app can be created from any thread.
E.g. in your Application object's *onCreate
AsyncTasks could indeed be overkill for what you want. Also, the
implementation of AsyncTask is at the mercy of Google. Currently, from
version 1.6 and up, it uses a thread-pool of more than one thread. However,
there is talk of reducing this thread-pool to only one thread. This may
cause
You'd have to contact the complaining 3rd parties first to resolve the
copyright/trademark-infringement issues. When these are resolved, you can
begin re-instating the apps or your account.
It isn't impossible, but it'll be an uphill battle...
--
You received this message because you are
You cannot just use a reference(be it explicit or implicit to an inner
class definition) to an Activity in the doInBackground of an AsyncTask (or
in any method that is executed on a background thread). You'll get the
problem you see right now.
First, i would suggest trying not to use an
Sorry, you'll not be able to get help here to get your app or account
re-instated.
At best we can be help you try to figure out *why *you got suspended. But
since we don't know anything about your app(s), that'll be difficult.
--
You received this message because you are subscribed to the
Yep,
If that's indeed his set of apps, Sy's using images and artwork that are
copyrighted That's a big no-no, even if he wasn't charging for it.
Sy,
unless you can forge a deal with all these companies (Marvel, bunch of
photographers, etc) or unless you create your own artwork, your
Even using the word 'Marvel' in one of your app's names could be ground for
a DMCA...
I'm a 'pro-sumer' photographer. If my (lower-res) pics show up in Google
search result, i don't mind, because people will click on it and this will
take them to my galleries. And they can possibly buy my pics
Not possible.
You can't execute any View/Window/Activity related code (that modifies such
objects) from any other thread but the main UI thread.
Sublcass AsyncTask instead and call publisProgress on certain intervals
from doInBackground. Implement onProgressUpdate to call
Same problem here.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For
Xav: Any news on this issue?
--
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
Thank you!
I added some extra info to the tracked issue... I hope it helps somewhat. :)
--
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,
What is the problem?
The PNG is still the same size (in pixels).Only some piece of meta-data
(the PPI) has changed.
Why must the PPI of the image stay the same?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send
What if you use *Bundle *instead (which is basically a Map implementation
that implements Parcelable as well).
--
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
- If you want just to send a message to another app, *without expecting *a
result, use Intents on one app (and a BroadcastReciever on the other app).
- If you want to send a message to another app, while *expecting *a
result, but this result could be sent back later
Maybe not a separate app, but his app could still benefit of having
multiple processes.
--
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,
That means you tie this image up with only one given PPI, in your case
printing on paper. Anywhose, this is your app's requirements. :)
This means you must change the Exif (metadata) of your image after you
saved it to 'disk'. Use ExifInfo class. I think it not only works for JPEGs
but for PNGs
Say you show a ImageViewFragment (which is a subclass of a Fragment) for
each page in your ViewPager.
Your ViewPager uses a FragmentPagerAdapter to handle the in-and-out swiping
of ImageViewFragments.
Implement these methods for your ImageViewFragment class:
* @Override*
* public void
That is actually my project, one of my old projects :)
I use it in one of my apps (before ExifInterface became available).
You can use it. :)
But you can use ExifInterface as well, i think:
You can't use one of the predefined tags (ExifInterface.TAG_), but you
can call 'setAttribute' and
I just changed the license for SanselanAndroid to MIT. You're basically
free to use it any way you like (read up on MIT License details for more
info).
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
shutDownNow will cancel all the pending tasks and make the Executor
unavailable for any future task submissions.
Instead, you'd have to keep track to any Future you have scheduled (the
value returned by an executor.submit(...) call). Call 'cancel(boolean)' on
all the Futures that are still
I assume this is on pre honeycomb device.
Do you have any bitmaps in your app or memory that is just in native
(C/C++) code? Bitmaps take up process memory (that may contribute to
OutOfMemory (OOM) errors) but the memory is native and isn't known to the
DalvikVM.
This means that it looks like
I experienced similar issues with gluUnProject. I wrote my own
implementation. I posted it on this board a few years ago:
https://groups.google.com/d/msg/android-developers/nSv1Pjp5jLY/wX9QEe6jzwcJ
--
You received this message because you are subscribed to the Google
Groups Android Developers
In your 3D model, you have two Z values (for depth). Z-near (the 'location'
of your screen) and Z-far (the furthest z-plane of your 3D model).
The user touches the screen and Xs, Ys.
Now call gluUnProject twice:
gluUnProject(xWin, ((float)screenH)-yWin, *zNear*, modelMatrix, 0,
projMatrix, 0,
And what about when the user rotates his or her device...?
In short:
Create an object that your will return in your
activity's onRetainNonConfigurationInstance method.
This object can be gotten in the onCreate, by
calling getLastNonConfigurationInstance. Store this object in a
field/reference
Nothing comes easy. :-)
Google it. Open up your geometry books. Do whatever is necessary to make it
happen. The information is out there and you can learn it and apply it to
your app.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post
Then you'd have to do two things:
- Make Receiver1 a static class: public *static *class Receiver1 extends
BroadcastReceiver
If not, instances of Receiver1 cannot be instantiated without an
enclosing BroadcastActivity instance.
- Change the name in your manifest to
Use Intents. Put data in the Intent's 'extras'.
Put this Intent in the startService call. The Service's onStartCommand will
be called with this Intent and you can handle it there.
Or you can define an AIDL that your service implements. Bind to the service
and communicate with the service
For a crude Threshold effect, you can use a ColorMatrixColorFilter with the
right values put in it. I implemented a Threshold filter this way, I don't
have the implementation at hand right now. But you can google it. :)
--
You received this message because you are subscribed to the Google
What Mark said below :)
And note that when the onStart is called, the activity becomes visible.
When the onResume is called, the activity is about to receive focus
(becomes for target user interaction).
E.g. when a dialog-style activity (an activity with a partial transparent
background) is
I've been able to put regulars views on top of a Surface view. That's easy.
Just create a layout with that has many views with one Surface view.
However, putting multiple surface views in one Window (one activity), e.g.
a video view on top of an opengl view... no success. The seconds surface
In general, have the containing activity handle the communication between
the fragments.
Let the containing Activity implement an interface that will tell it when
important user interactions take place (e.g. item clicked in a fragment
with a list-view).
In the fragment's onAttach, cast the
I haven't checked if the downloader services comes with the sources. But if
so, just change the sources for the Notifications to your liking.
(we did that for our app, using the DownloadManager (and DownloadProvider)
from the ICS source code and adding compatibility code ourselves
Don't put your files on the directory (or sub-directories) that is returned
by getExternalStorageDirectory().
Instead use getExternalFilesDir(String type) (where type can be null).
On Monday, March 19, 2012 10:53:00 AM UTC-4, Sergey Okhotny wrote:
Clear data option from application settings
Don't load your images in full (100%) size. Load them no larger (or maybe
slightly larger) than the size of the screen (in pixels).
Take a look at this link:
http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html
and look at the 'inSampleSize' parameter: Set this to
I use this one for XML Drawables:
http://idunnolol.com/android/drawables.html
On Tuesday, April 3, 2012 2:59:01 PM UTC-4, Spooky wrote:
Working on my current project, one thing I am really missing is a good,
solid, and *complete* reference covering Android XML layouts, widgets
(from the XML
What about not validating the incoming XML?
Since i don't know what type of app you need the validating SAX parser for,
but if your app just needs to read bits and pieces of incoming XML, you
really don't need a validating XML. Just read the data and present it to
the user. If the incoming data
10:36:34 AM UTC-4, RedBullet wrote:
That's sort of what I am doing now. Seems kind of unsatisfying ;-)
Just wanted to know what my options were...
It is confusing because the docs seem to imply that one can do
validation...
On Wednesday, April 4, 2012 9:39:07 AM UTC-4, Streets Of Boston
The size of the JPG/PNG file has almost nothing to do with the size of the
corresponding image in memory.
An RGB_565 takes 2 bytes per pixel (5+6+5=16bits=2bytes). An ARGB_
takes 4 bytes per pixel.
This means a 5MPixel image will take 5M*2 = 10MByte in RAM when using
RGB_565 or 5M*4=20MByte
Dealing with ARGB_ full-sized images may just not be possible for
certain devices (e.g. 5MPixel images taking 20Mbyte of memory, not leaving
much room for anything else).
Unless you can decode the byte[] data from the Camera yourself... this
would mean writing your own JPG decoder that
/android/graphics/Bitmap.html
source,
int x, int y, int width, int height)
On Wednesday, April 18, 2012 6:40:51 PM UTC-4, Spooky wrote:
On Wed, Apr 18, 2012 at 03:28:11PM -0700, Streets Of Boston wrote:
The size of the JPG/PNG file has almost nothing to do with the size
(saving the raw
data in chunks) or by calling Bitmap.copyPixelsToBuffer.
On Wednesday, April 18, 2012 7:58:36 PM UTC-4, Spooky wrote:
On Wed, Apr 18, 2012 at 03:59:23PM -0700, Streets Of Boston wrote:
Dealing with ARGB_ full-sized images may just not be possible for
certain devices
After you call bitmap.recycle(), you can no longer use that bitmap at all.
After calling recycle(), the bitmap still occupies a tiny little bit of
memory in the DalvikVM. All its raw pixel data memory has been released,
though. To release that tiny little bit of memory in the DalvikVM as well,
localBitmap to a field (instance field or class field) or you need to
return localBitmap as the return-value of someMethod().
On Thursday, April 19, 2012 9:49:23 AM UTC-4, Spooky wrote:
On Thu, Apr 19, 2012 at 06:32:15AM -0700, Streets Of Boston wrote:
After you call bitmap.recycle(), you can
.
On Thursday, April 19, 2012 9:38:28 AM UTC-4, Spooky wrote:
On Thu, Apr 19, 2012 at 06:25:12AM -0700, Streets Of Boston wrote:
First, ignore this sentence below from my previous answer entirely:
Save the byte[] data from the camera into file directly (this is your
JPG file).
(It was a left
. However,
camera quality of some devices is starting to catch up. But for now, people
taking pics with their phones would need no better than RGB_565 processing.
On Thursday, April 19, 2012 11:03:11 PM UTC-4, Spooky wrote:
On Thu, Apr 19, 2012 at 03:22:39PM -0700, Streets Of Boston wrote
Yes, sharing data by using plain 'static' or 'global' classes and members
is possible.
Be careful what you keep referenced in these static or global
classes/members: don't hold on to activities and such, keeping them
alive/references beyond the end of their lifecycle (e.g. after an
activity's
I'm debugging on a device.
When setting a breakpoint in a process that runs a Service or a
BroadcastReceiver on a spot in the code that is run on the main (UI)
thread, the phone's watch-dog service kills the process, because I'm
stepping through the code slowly.
Is there a way, when in
to point
out how to do it as well!
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Fri, Apr 27, 2012 at 2:46 PM, Streets Of Boston wrote:
I'm debugging on a device.
When setting a breakpoint in a process that runs a Service or a
BroadcastReceiver
/magouyaware
On Fri, Apr 27, 2012 at 2:46 PM, Streets Of Boston wrote:
I'm debugging on a device.
When setting a breakpoint in a process that runs a Service or a
BroadcastReceiver on a spot in the code that is run on the main (UI)
thread, the phone's watch-dog service kills the process
The same happened to mine. I was hoping a firmware update by me would fix
it. However, the GoogleIO version of the tablet seemed to have a different
boot-loader than the standard ones.
I contacted Samsung and they told me the only way to flash it with a proper
firmware and fix it was to send it
Enjoy your 'new' tablet.
You were kind-of lucky. :)
A factory reset didn't work for me. Only a fresh flash would do the trick
(which had to be done by Samsung).
On Tuesday, May 1, 2012 4:02:17 PM UTC-4, Nathan wrote:
I managed to do a factory reset with the help of Samsung over the
phone so
Yep, both threads are in Canvas.native_drawBitmap and clobbering each other
(or least the background thread is clobbering the UI one).
This is a tough one to fix or to work-around.
On Tuesday, May 1, 2012 7:27:00 PM UTC-4, Ab wrote:
I hadn't, but I just did on your suggestion.
The call
*Every *app can be cracked and pirated. It doesn't matter how much layers
of protection you add to your app; your app can always be cracked. If
someone is willing to spend time to reverse engineer your app and has
enough determination, they will succeed.
If i may be so bold to say, the only
I have plenty of these types of constructs in my code and I've never ever
seen static variables becoming un-initialized. The only times they are
uninitialized is when the process (DalvikVM) has been killed and restarted.
Are you sure that the code in your onDestroy (or some other life-cycle
You are right that the enum has been initialized a second time.
But the second time is a different process (26202 != 26607).
In other words, the first process (26202) did not see this enum being
initialized twice. The process was killed and the new process had its enum
initialized instead.
(such as the
system's time), then the contents/value of someObject is depending on the
first-time access of this method for this particular process.
}
On Thursday, May 3, 2012 7:24:23 PM UTC-4, blake wrote:
On May 3, 4:15 pm, Streets Of Boston flyingdutc...@gmail.com wrote:
You are right
Easy peasy, Make it thread safe by adding the synchronized keyword.
public static *synchronized* C getInstance() throws YourException {
if (mInstance == null ) {
mInstance = new C(); //it throws YourException
}
On Friday, May 4, 2012 10:17:37
How did you implement the onCreate method of your TestsFragment
implementation? Did you call setRetainInstance(true)? If so, try to call
setRetainInstance(false) instead.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this
Maybe you could use this:
https://groups.google.com/d/msg/android-developers/OGuoxpX20Ag/pr2FSeDYfigJ
--
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
Just try it out!
Use (x,y) and (w,h) to render only a portion of your screen into a bitmap.
--
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
Looks like colors are inversed.
Probably an issue with this part:
int pb = (pix 16) 0xff;
int pr = (pix 16) 0x00ff;
int pix1 = (pix 0xff00ff00) | pr | pb;
Try swapping the red and blue channels:
int p*r* = (pix 16) 0xff;
int p*b* = (pix 16) 0x00ff;
int pix1 = (pix
There is a huge amount of data to be found on the internet.
Just google
android sample broadcastreceiver
and you'll find plenty of info.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
This will work if you just want to get rid of the null pointer exceptions.
However, you just should never do any background work in an activity, i.e.
run code in an Activity on the stack of a background thread (in your case,
calling Activity.doBackgroundRequest()). It will set you up for
Starting *eclipse.exe -clean *got rid of this problem... but only
temporarily! As soon as I moved from a library project to a sub-project or
vice-versa, the same problem occurs. Doing the *-clean *again, would get
rid of it again, but temporarily :-)
--
You received this message because you
I have the same problem and haven't found a solution yet.
Instead, i query the attributes by name (note that this means that they
need to be set directly on the view in the XML layout). Here is an example:
// called by the custom view's constructors
private void init(Context context,
My answer below is a general answer and i would advise this even if it
weren't for Android but for mobile (connection limited devices) in general:
I would vote for a RESTful/HATEOAS web-service exchange of information. The
format of the RESTful data can be JSON. It's a good choice.
If you
Thanks for the heads up!
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
Are you trying to write JUnit tests for apps you write?
If so, take a look at Robotium.
--
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,
I don't understand.
A ListView is just for that purpose. If items don't fit, it'll show a
scrollbar so that you can scroll up or down to reach the controls you want
to see.
1. Make your list-items smaller or use fewer list-items.
or
1. Don't use a ListView or a ListActivity. Just use a
There is a whole lot to Services and the different ways it behaves when
using 'bind' vs 'startService' (and the the return-value of the Service's
onStartCommand callback).
It would be too much to describe right here. Try this:
http://developer.android.com/reference/android/app/Service.html
--
*42!*
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options,
To access that directory and its sub-directories (data/data/**), you'll
need to root your device.
Create (and prefill) you database in the app (the app with id/name *
package_name*) itself through SQL.
--
You received this message because you are subscribed to the Google
Groups Android
I agree with the others.
Killing your app in DDMS is like a crash on your phone.
Using the Force Stop in the Applications Manager is different. Your app's
processes (activities, services) won't be restarted.
However, the fact that there at to Activities B on top of each other and B
is
Hi Mukesh,
I looked at your async-task-in-android blog post...
But registering an Activity instance as a listener (WebServiceListener),
you set yourself up for trouble.
E.g. if you click the 'Login' button (in your example) and your rotate the
device and the login returns after that, the
Sorry Treking,
But the example you provided won't work. He asked for Urgent*ly* ... slight
typo on your part, can happen to the best of us
:-D
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
First, what are 'attributes' of the JSON string?
Secondly,
You create a String out of the JSON-array 'fruits' and then write code to
get each and every character of this String. I don't understand why you are
surprised that your code works and actually do get characters...
In other words,
I think it is possible to have two singleTop activities of the same class
on top of each other, if they each one of them is part of a different
target *task*. Maybe this is what happens?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To
It's great you got it to work.
But why do you need a separate class (LanguagePack) to get localized
strings/resources?
In a method of your activity or another context, you could just do:
getString(R.string.some_string)?
If you want to access localized resources/strings in code that does not
Don't use a ListActivity. You only have a small and fixed amount of
elements (8). Use a regular Activity with a layout that has a vertical
LinearLayout or a TableLayout as the top element. These two don't scroll.
--
You received this message because you are subscribed to the Google
Groups
http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
This link suggests and advises identifying accounts, not specific devices.
However, sometimes you can't get around it. E.g. if you have an app that
publishes digital content under DRM, you usually have to be able
http://developer.android.com/reference/android/graphics/BitmapFactory.html
--
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
We use the generated device-id for DRM purposes. The generated device-id is
not used as-is. The DRM code creates encrypts it and creates a hash. The
hash is used for identifying the device on the DRM server.
It is true that an upgrade from 2.2. to 2.3 can trigger a different result
if the
Look at the android.sax package: RootElement and Element, which are based
upon SAX parsers and allow to maintain a context easily of your XML
elements being parsed (e.g. being able to distinguish the
differences/location of a child element in /parent1/child or
/parent2/child).
--
You
But if that is not possible for your design or the intents needs to pass
Parcelables that you have created, use this construct:
Say you need to pass a Parcelable inside an extra of an Intent from an
Activity to a remote Service. As soon as the remote Service touches the
extras (i.e. the
http://urbanairship.com/
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
Don't get hung up on 'pure' architectures/frameworks. Android supports
somewhat of a MVC framework by having plain objects (M), Views and
Fragments (V), and Activities (C and a bit of V if you're not using
Fragments). Go to http://developer.android.com to learn more.
--
You received this
That happens on Honeycomb as well.
I had this happen when i tried to create/add a fragment while the
onActivityResult was executing (which is just before an onResume is called).
I got around this by deferring the creation/adding the fragment until the
onResume is called: just set a boolean
Don't worry, we've all been there at least once :-)
--
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
You'd have to show more of the code.
Where does *j*bitmap come from?
But at least you need to copy the pixels (pixel by pixel) into the buffer
of 'bitmap' after you locked it and make sure that pixels copied into there
are in the correct format (RGB_565).
Look at one of the examples in the API
Problems in 'fill_plasma':
1. The raw data of the *pxl*-array can not contain JPEG encoded data.
Instead it must be encoded as RGB_565, each 2 bytes having 5 bits of red, 6
bits of green and 5 bits of blue.
2. You can not assign the bitmap's raw-data array address (*pxl*) to
See my answer in 'android-developers' group.
Please, don't cross-post.
--
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
The cross-posting remark wasn't targeted at you, Stephen. It was for the
original poster :-)
BTW: All the answers that we post on one forum will automatically be
cross-posted on the other two forums as well (i guess because the original
message was cross-posted) unless you uncheck some Cc
Which is indeed a big problem and a cause of many crashes or force-closes.
If something needs to run in the background (as a Thread or a
Task/AsyncTask/Future) and it will possibly survive the destruction of an
activity:
- Avoid making your (anonymous or inner) Thread/AsyncTask/etc
Every 10 seconds? That'll drain the battery quite quickly.
Why don't you want to use C2DM (or Urban Airship or other such
technologies)?
But yes, without a server-push technology (like C2DM or Urban Airship),
you're left with client-polling and you're doing that. Just don't do it
every 10
1101 - 1200 of 1463 matches
Mail list logo