[android-developers] What are the filesize limitation imposed by DownloadManager

2011-08-07 Thread dan raaka
The maximum value seems to be  defined
at 
./packages/providers/DownloadProvider/src/com/android/providers/downloads/StorageManager.java



/** the max amount of space allowed to be taken up by the downloads data dir
*/

private static final long sMaxdownloadDataDirSize =


Resources.getSystem().getInteger(R.integer.config_downloadDataDirSize) *
1024 * 1024;

The config value is defined as 100 elsewhere. So if download is larger than
100MB, the request will abort, no progress shows in Download Manager, and it
stuck there for ever. Is this expected behaviour ?


So - what are the max filesize that be downloaded by the DownloadManager at
the following locations

- sdcard

- /cache (assuming the apk has right permissions to do so)

- /data/data/com.android.provider.download/cache


Also - if there any limitation on how big the /data/data/com.myapp.tester
size can get ?


-Dan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Uploading apps on Android Market

2011-08-07 Thread Eric Wong (hdmp4.com)
On Aug 6, 11:20 pm, rich friedel rich.frie...@gmail.com wrote:
 I would hate to have to pay for a tiered data plan and have to update a 4GB 
 app more than once/month!

LOL, I would hate to see app download failed and then restart, etc
when trying to download a 4GB app ;)
I wonder if anyone would post negative feedback because the apk size
is excessively large and they have trouble getting it.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Comms with Intent

2011-08-07 Thread kypriakos
And in fact the onNewIntent (which still compiles if it is
OnNewIntent!)
is never called .. so something is not being set right.

On Aug 7, 1:39 am, kypriakos demet...@ece.neu.edu wrote:
 Actually never mind that - I should have been using addFlags the
 second time and
 not setFlags on both flags. Still the issue seems  to be that the
 preview freezes
 after the first pic is snapped and every additional call to the
 service takes
 pictures the same size as before regardless of where the phone points.
 Interesting ...
 And I don't see the OnNewIntent get called each subsequent time ...

 On Aug 7, 12:33 am, kypriakos demet...@ece.neu.edu wrote:







  Well - the issue I am running into now is this:
  Calling startActivity() from outside of an Activity  context requires
  the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

  I start the activity with the NEW_TASK flag and it works fine. If I
  use the SINGLE_TOP then
  the exception above occurs. Is there a way to combine intent flags in
  Android?

          intent.setClass(androidContext,
  org.mortbay.ijetty.snapPic2.mysnapPic2ServiceImpl.class);

          // intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK);
          intent.setFlags(intent.FLAG_ACTIVITY_SINGLE_TOP);

  On Aug 2, 10:35 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:

   On Tue, Aug 2, 2011 at 11:29 PM, kypriakos demet...@ece.neu.edu wrote:

Actually one more question - since I want the Activity to keep alive
with the camera preview on, would the subsequent Intent launching
(and calls to OnNewIntent) allow me to control the open preview. I
think
yes since the Activity (unless I call finish()) should still be active
right?

   As long as you don't start another activity, your preview activity
   should stay in the foreground. How well that will work with
   controlling the actual preview, I don't know. Try it out.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Comms with Intent

2011-08-07 Thread Nikolay Elenkov
On Sun, Aug 7, 2011 at 4:20 PM, kypriakos demet...@ece.neu.edu wrote:
 And in fact the onNewIntent (which still compiles if it is
 OnNewIntent!)
 is never called .. so something is not being set right.


Obviously. It will compile as OnNeWiNtEnT or anything you
write. You need to override the proper Activity method to
have it called by the framework. I suggest you start with the Activity
class JavaDoc and read it a couple of times before trying to get this
to work:

http://developer.android.com/reference/android/app/Activity.html

Also keep in mind that Java is case-sensitive.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] example of MergeCursor.

2011-08-07 Thread Andrei
Good afternoon.
Please give an example of MergeCursor.
I have 3 cursor: A, B, K
How to join?
I wrote
  MergeCursor mergeCursor = new MergeCursor (mCursors);
What's next?

Ps this example is seen (http://www.java2s.com/Open-Source/Android/
android-core/platform-cts/android/database/cts/
MergeCursorTest.java.htm)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: .apk file is not getting downloaded from HTTPS site

2011-08-07 Thread dilu
My https certificate is a test certificate for one month  from
Verisign.
I do get a warning while opening the page.I can open the normal html
pages but not able to download the .apk files.

On Aug 5, 10:48 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Aug 6, 2011 2:06 AM, dilu discover.dile...@gmail.com wrote:



  Yeah I can download file from PC.

 Do you get any warnings? Who issued your certificate? If it's not trusted by
 Android you won't be able to connect and download the apk.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Comms with Intent

2011-08-07 Thread Kostya Vasilyev

May I also suggest using @Override.

It doesn't change what the code means, but tells the compiler that you 
are overriding a method. The compiler then checks that this is actually 
the case.


-- Kostya

07.08.2011 11:28, Nikolay Elenkov пишет:

On Sun, Aug 7, 2011 at 4:20 PM, kypriakosdemet...@ece.neu.edu  wrote:

And in fact the onNewIntent (which still compiles if it is
OnNewIntent!)
is never called .. so something is not being set right.


Obviously. It will compile as OnNeWiNtEnT or anything you
write. You need to override the proper Activity method to
have it called by the framework. I suggest you start with the Activity
class JavaDoc and read it a couple of times before trying to get this
to work:

http://developer.android.com/reference/android/app/Activity.html

Also keep in mind that Java is case-sensitive.



--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Why is onTouch called 2 times for every touch?

2011-08-07 Thread MobileVisuals
I tested on Android 2.2 and 2.1 on the emulator and it was the same
thing here, 2 motion events with ACTION_DOWN are generated for each
touch. I only have one mobile device to test on. It is Samsung Galaxy
S and it works like it should here.

On Aug 5, 10:57 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 Replying to group, where it belongs.

 Sending me a personal message (twice!) won't really help you.
 The more people see this, the better chance you have of
 getting an answer  MobileVisuals

 On Fri, Aug 5, 2011 at 5:46 PM, MobileVisuals eyv...@astralvisuals.com 
 wrote:
  I debugged the action with event.getAction(). It is 0 in both cases,
  which is ACTION_DOWN. How could it be that 2 MotionEvents with
  ACTION_DOWN is generated for each touch?

 I don't know. Might be a bug. Does it happen on one Android version only
 or on different ones as well? Does it really happen only when using the
 emulator? Don't suspect, try to isolate the conditions that cause this.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Intents

2011-08-07 Thread kypriakos

Hi all,

I start an new intent on an activity:

Intent intent = new Intent();

intent.seClass (..);

intent.setFlags(...NEW_TASK);
intent.addFlags(...SINGLE_TOP);

startActivity(intent).

In the target Activity I have the onNewIntent() that simply has code
for doing some processing.

I see the OnCreate get created but any subsequent executions of the
above block does not call the
OnNewIntent. Does the launcheMode=singleTask need to be defined in
the manifest for this to work?
Is there anything else that is necessary to get this  to work?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Arrays and android

2011-08-07 Thread Tommy
Hi,

I've been trying to create my first android app. Number of functions
and the scripts complexity grow each time I try to finish it, but that
is the way to learn how to develop an android app.

I'm used to develop webpages using PHP and HTML. In my app I need an
array that looks something like this:
   array('Age' - 1, 'Length' - 180). This is no problem with PHP,
but I haven't found out how this can be done in android. Is it
possible or am i constricted to using integers as indexes? And does
anyone have an idea to how this can be accomlished if strings can't be
used as indexes?

--
Regards, Tommy

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Arrays and android

2011-08-07 Thread Romain Guy
What you want is not an array but a map. Look at java.util.HashMap for
instance.

On Sun, Aug 7, 2011 at 2:21 AM, Tommy tommy.myrv...@gmail.com wrote:

 Hi,

 I've been trying to create my first android app. Number of functions
 and the scripts complexity grow each time I try to finish it, but that
 is the way to learn how to develop an android app.

 I'm used to develop webpages using PHP and HTML. In my app I need an
 array that looks something like this:
   array('Age' - 1, 'Length' - 180). This is no problem with PHP,
 but I haven't found out how this can be done in android. Is it
 possible or am i constricted to using integers as indexes? And does
 anyone have an idea to how this can be accomlished if strings can't be
 used as indexes?

 --
 Regards, Tommy

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
romain...@android.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Widgets do not work on all devices!

2011-08-07 Thread guruk
Hi there,

i have the Simulator to test, a Nexus ONE and a G1
on all my coded Widgets appear.

but i get more and more users complain that on their
devices the widgets do not appear even in their
widget list. So do they come filtered or what?

I can't purchase each and any device in the market to test
so why is that.

for example widget prob on HTC Sensation, Wildfire S

Hope anyone can help

greets
chris

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: 3rdParty application icon

2011-08-07 Thread Mark Murphy
On Sat, Aug 6, 2011 at 8:39 PM, John android...@gmail.com wrote:
 Thanks Mark, much appreciated, that works. Just to let you
 com.google.android.gallery3d is the package name, but for some
 reason simply calling setPackage() on the intent works for some
 packages but not others.

That package name might be new to Honeycomb. The source code we have
access to only goes up to Gingerbread, and I notice that you're trying
this on an EEE Pad Transformer (or something else in the EEE Pad
family).

 Now, that I know the issue, I suppose
 Application is not installed makes sense, although it would be nice
 if it could resolve to a more meaningful message.

The problem is, more meaningful to you won't be any more meaningful
to the *user*, most likely. Assuming the shortcut ever worked, the
most likely scenario for a user is that the shortcut points to an
application that wasn't installed. LogCat may have had more details
for you as a developer.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Intents

2011-08-07 Thread Mark Murphy
On Sun, Aug 7, 2011 at 4:25 AM, kypriakos demet...@ece.neu.edu wrote:
 I start an new intent on an activity:

 Intent intent = new Intent();

 intent.seClass (..);

 intent.setFlags(...NEW_TASK);
 intent.addFlags(...SINGLE_TOP);

 startActivity(intent).

 In the target Activity I have the onNewIntent() that simply has code
 for doing some processing.

 I see the OnCreate get created but any subsequent executions of the
 above block does not call the
 OnNewIntent. Does the launcheMode=singleTask need to be defined in
 the manifest for this to work?

No.

Make sure you have the @Override annotation on onNewIntent() so you
are implementing the right method signature.

 Is there anything else that is necessary to get this  to work?

Not that I am aware of.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Mark Murphy
On Sat, Aug 6, 2011 at 8:49 PM, Jim Graham spooky1...@gmail.com wrote:
 So basically, your answer is that there is no best timethat there
 is always someone around somewhere, and weekends vs weekends vs holidays
 become irrelevant?  Or did I read your response incorrectly?

I'll be stunned if anyone has done a decent study.

We know some heuristics about when to post on eBay because some people
post thousands of listings a week, and therefore have enough data
themselves to draw conclusions. The only similar people in Android-dom
are not very nice. When you have 1-2 apps and ship updates every 1-2
months, it takes years to get enough data, and that assumes you were
collecting the data in the first place and ignores the impact of a
changing audience during those years.

Google could publish the results of a study, but it would run afoul of
the Heisenmarket Uncertainty Principle (if you are big enough to learn
something about a market you run and you talk about it, talking about
it changes the behavior of your market and may obviate what you
learned).

I don't think that the pirated Android Market feed has enough
granularity in download counts for a third party to be able to do a
decent study, except perhaps for new apps, where there may be rapid
movement through some of the smaller/earlier download count buckets.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Broadcast Receivers: Can they execute simultaneously or do they always execute consecutively?

2011-08-07 Thread Ali Chousein
Hi,

I have a little confusion with broadcast receivers. I have a broadcast
receiver which is triggered upon TIME_SET and TIMEZONE_CHANGED actions
(the code is given below). What I was wondering is, can
OnDateTimeChanged (see the code below) be triggered simultaneously
(and its execution overlaps) when both TIME_SET and TIMEZONE_CHANGED
actions are triggered or is one always going to be triggered after the
other? Based on some simple experiments I did, I got the impression
that the two executions of OnDateTimeChanged are triggered
consecutively with no time overlap but I cannot be 100% sure of this.
If anyone has an idea I'll be very happy.

!-- Excerpt from manifest --
receiver android:name=.OnDateTimeChanged
intent-filter
action android:name=android.intent.action.TIME_SET/
action android:name=android.intent.action.TIMEZONE_CHANGED/

/intent-filter
/receiver


// Broadcast receiver class
public class OnDateTimeChanged extends BroadcastReceiver
{
  @Override
  public void onReceive(Context context, Intent intent)
  {
// Do some work here
  }
}

BTW, both TIME_SET and TIMEZONE_CHANGED can be triggered when under
Settings - DateTime you switch to the Automatic mode and this changes
both the time and the timezone.

-Ali

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Widgets do not work on all devices!

2011-08-07 Thread Nikolay Elenkov
On Sun, Aug 7, 2011 at 7:27 PM, guruk ilovesi...@gmail.com wrote:
 Hi there,
 i have the Simulator to test, a Nexus ONE and a G1
 on all my coded Widgets appear.
 but i get more and more users complain that on their
 devices the widgets do not appear even in their
 widget list. So do they come filtered or what?

Most probably they moved the app to the SD card.
In that case, Android disables the widgets and they
won't show up in the widget list. Make sure you specify
'internalOnly' as the install location in AndroidManifest.xml
in your next release (that can still be overriden on rooted
phones though). Have your existing users move to internal
storage, and reboot the device to get the widget back.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Nikolay Elenkov
On Sun, Aug 7, 2011 at 7:48 PM, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Aug 6, 2011 at 8:49 PM, Jim Graham spooky1...@gmail.com wrote:
 So basically, your answer is that there is no best timethat there
 is always someone around somewhere, and weekends vs weekends vs holidays
 become irrelevant?  Or did I read your response incorrectly?

 I'll be stunned if anyone has done a decent study.


There is some unscientific  evidence that most users try out and
buy apps on weekends. Especially games. So maybe end of week
(Thu-Fri) is a good time to release. However, since there is no
more a 'Just In' category (bucket?), it's not clear where your app
will be shown. Maybe in 'Top New' if you are lucky. But with
the device Market (the web seems to be OK) randomly switching
location for the past few days, you can never be sure who will see it.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Nikolay Elenkov
On Sun, Aug 7, 2011 at 8:17 PM, Nikolay Elenkov
nikolay.elen...@gmail.com wrote:
 On Sun, Aug 7, 2011 at 7:48 PM, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Aug 6, 2011 at 8:49 PM, Jim Graham spooky1...@gmail.com wrote:
 So basically, your answer is that there is no best timethat there
 is always someone around somewhere, and weekends vs weekends vs holidays
 become irrelevant?  Or did I read your response incorrectly?

 I'll be stunned if anyone has done a decent study.


 There is some unscientific  evidence that most users try out and
 buy apps on weekends. Especially games. So maybe end of week
 (Thu-Fri) is a good time to release. However, since there is no
 more a 'Just In' category (bucket?), it's not clear where your app
 will be shown. Maybe in 'Top New' if you are lucky. But with
 the device Market (the web seems to be OK) randomly switching
 location for the past few days, you can never be sure who will see it.


Another idea: if you have ads or session tracking in your app,
after a while you should have some statistics about when it gets
the most usage (ad requests/session). Then you could target
your releases accordingly.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Broadcast Receivers: Can they execute simultaneously or do they always execute consecutively?

2011-08-07 Thread Mark Murphy
On Sun, Aug 7, 2011 at 7:03 AM, Ali Chousein ali.chous...@gmail.com wrote:
 I have a little confusion with broadcast receivers. I have a broadcast
 receiver which is triggered upon TIME_SET and TIMEZONE_CHANGED actions
 (the code is given below). What I was wondering is, can
 OnDateTimeChanged (see the code below) be triggered simultaneously
 (and its execution overlaps) when both TIME_SET and TIMEZONE_CHANGED
 actions are triggered or is one always going to be triggered after the
 other?

Within the same process, they will execute consecutively, simply
because onReceive() is called on the main application thread.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Widgets do not work on all devices!

2011-08-07 Thread guruk
i thought about,
ALSO i asked several users and they did say they did not moved to sd card!

so its not that. they just installed the update of my app.. and all widgets 
gone
 :(


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Broadcast Receivers: Can they execute simultaneously or do they always execute consecutively?

2011-08-07 Thread Ali Chousein
Thank you Mark, that's great to know and it also simplifies things
very much.
-Ali

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: example of MergeCursor.

2011-08-07 Thread Andrei
My code don't work (
  mergeCursor = new MergeCursor(mCursors);
assertEquals(mCursors[0].getCount() +
mCursors[1].getCount(),
mergeCursor.getCount());

On Aug 7, 11:31 am, Andrei entre...@gmail.com wrote:
 Good afternoon.
 Please give an example of MergeCursor.
 I have 3 cursor: A, B, K
 How to join?
 I wrote
   MergeCursor mergeCursor = new MergeCursor (mCursors);
 What's next?

 Ps this example is seen (http://www.java2s.com/Open-Source/Android/
 android-core/platform-cts/android/database/cts/
 MergeCursorTest.java.htm)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Broadcast Receivers: Can they execute simultaneously or do they always execute consecutively?

2011-08-07 Thread Mark Murphy
On Sun, Aug 7, 2011 at 7:33 AM, Ali Chousein ali.chous...@gmail.com wrote:
 Thank you Mark, that's great to know and it also simplifies things
 very much.

Note that there is no guarantee which order those two broadcasts will
come in, though.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] https://groups.google.com/d/topic/technology-technology/CH9VpoZFq60/discussion

2011-08-07 Thread monir 619
https://groups.google.com/d/topic/technology-technology/CH9VpoZFq60/discussion

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: I need a CamScanner like example

2011-08-07 Thread ricardocunha
So, I want image aligning, I think I will use an affine
transformation, see this example: 
http://www.youtube.com/watch?v=R4wzxy_5TGUfeature=related

On 6 ago, 21:27, rich friedel rich.frie...@gmail.com wrote:
 You did not ask for image aligning anything... you asked for something like 
 GeniusScan... or as you called it scam papper which I can only assume was 
 supposed to mean scan paper. Therefore I suggested searching for android 
 open source ocr... OCR stands for Optical Character Recognition.

 So which one is it? Do you want image aligning knowledge or scan paper 
 knowledge?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread CocoRambo
Hi,

For a new application I try to make weekly data update by downloading 
directly an SQLite file generated in PHP.
So when update is needed I:

   - Download the new SQLite file in ZIP (mydb.zip)
   - Extract to a temporary file (mydb.db)
   - Delete the old one (application.db via 
   deleteDatabase(application.db))
   - Put the new one instead (mydb.db becomes application.db)

But when I go back to any of my listviews, data still come from the old 
SQLite file.

I tried to only delete old SQLite file (All it's ok and I can check thah the 
file is really deleted via DDMS)
but my listviews data are still present...


Each of my ListFragment uses CursorLoader + Custom adapter that extends 
CursorAdapter
It seems that loader is (re)created each time the fragment is created so I 
don't think the problem is from this side...


Does anyone have same experience with SQLite database use?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Broadcast Receivers: Can they execute simultaneously or do they always execute consecutively?

2011-08-07 Thread Ali Chousein
  Thank you Mark, that's great to know and it also simplifies things
  very much.

 Note that there is no guarantee which order those two broadcasts will
 come in, though.

Luckily in my case the order is not important. I'm developing an
application and the correctness of it can be broken when the time and
the time-zone change at the same time. It's an edge case but can
happen when the user is in US, travels across time-zones and still has
internet connectivity.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Jim Graham
On Sun, Aug 07, 2011 at 08:17:14PM +0900, Nikolay Elenkov wrote:

 However, since there is no more a 'Just In' category (bucket?), it's
 not clear where your app will be shown.

Actually, there is.  It's just hidden so you can't find it.  I found out
when I was seeing a force close on the Market (when opening it to process
updates via the notification bar), and sent in a trouble ticket.  I
responded to the response I got, asked a bit more about the new Market
app (including, now that there is no Just In category, where do we go
to look at apps that are just in).

Scroll the list of Paid, Free, etc., to the right and you'll see Top New
Paid and Top New Free (which is really all new paid and all new free, not
just the top x%).  Basically, it's Just In split into free and paid.

Yeah, I'd rather go back to the older version, too.

Later,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

Do not look into waveguide with remaining eye!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread Kostya Vasilyev
What's probably happening is that you are not closing the old database 
file, so the application continues to read from it, and not from the new 
one.


This is entirely possible on Linux (and other Unixes): deleting an open 
file is allowed, the applications don't notice, and the actual file data 
is deallocated when it's finally closed (gracefully or not).


You can see the code here, all it does it deletes the file, there is no 
magic code to handle you switching the database underneath:


http://www.google.com/codesearch#oOy_5JrVRNM/trunk/frameworks/base/core/java/android/app/ApplicationContext.javaq=deleteDatabase%20package:android%20lang:%5Ejava$type=csl=479

An ugly hack of a solution would be to terminate your application's 
process (and immediately restart it), so the new process can open the 
new database file.


A possibly complicated solution would be to close the old database file 
using SQLiteOpenHelper.close, and then open the new one.


As for me, I would do this: keep the existing database open, and run an 
intelligent merge with the new data.


-- Kostya

07.08.2011 16:04, CocoRambo ?:

Hi,

For a new application I try to make weekly data update by downloading 
directly an SQLite file generated in PHP.

So when update is needed I:

  * Download the new SQLite file in ZIP (mydb.zip)
  * Extract to a temporary file (mydb.db)
  * Delete the old one (application.db via
deleteDatabase(application.db))
  * Put the new one instead (mydb.db becomes application.db)

But when I go back to any of my listviews, data still come from the 
old SQLite file.


I tried to only delete old SQLite file (All it's ok and I can check 
thah the file is really deleted via DDMS)

but my listviews data are still present...


Each of my ListFragment uses CursorLoader + Custom adapter that 
extends CursorAdapter
It seems that loader is (re)created each time the fragment is created 
so I don't think the problem is from this side...



Does anyone have same experience with SQLite database use?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Kostya Vasilyev
It's also a good idea to check this page before releasing an update:

http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs

-- Kostya

2011/8/7 Jim Graham spooky1...@gmail.com:
 On Sun, Aug 07, 2011 at 08:17:14PM +0900, Nikolay Elenkov wrote:

 However, since there is no more a 'Just In' category (bucket?), it's
 not clear where your app will be shown.

 Actually, there is.  It's just hidden so you can't find it.  I found out
 when I was seeing a force close on the Market (when opening it to process
 updates via the notification bar), and sent in a trouble ticket.  I
 responded to the response I got, asked a bit more about the new Market
 app (including, now that there is no Just In category, where do we go
 to look at apps that are just in).

 Scroll the list of Paid, Free, etc., to the right and you'll see Top New
 Paid and Top New Free (which is really all new paid and all new free, not
 just the top x%).  Basically, it's Just In split into free and paid.

 Yeah, I'd rather go back to the older version, too.

 Later,
   --jim

 --
 73 DE N5IAL (/4)        MiSTie #49997   Running FreeBSD 7.0 
 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

        Do not look into waveguide with remaining eye!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Nikolay Elenkov
On Sun, Aug 7, 2011 at 9:25 PM, Jim Graham spooky1...@gmail.com wrote:
 On Sun, Aug 07, 2011 at 08:17:14PM +0900, Nikolay Elenkov wrote:

 Scroll the list of Paid, Free, etc., to the right and you'll see Top New
 Paid and Top New Free (which is really all new paid and all new free, not
 just the top x%).  Basically, it's Just In split into free and paid.


I don't think it's exactly the same. Before, if you released an update,
it would show up in 'Just In' (which is sorted by update/release time).
So even apps with 0 ratings would show up at the top of 'Just In'.
AFAIK, 'Top Free/Paid' is a list of the apps released (not sure if updates)
count in the last 30 days, sorted by rank. The lists are now
country-specific as well, whereas that was not the case with 'Just In'.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: multilanguage support on Developer Console

2011-08-07 Thread nadam
Just click the link for each language at the top of the Listing
details. For instance, you can have a title of up to 30 characters
for each language. Similar for the other text fields.

Can't do the same for graphics though, so try to avoid text in
graphics for multi language apps.

On 4 Aug, 15:40, martypantsROK martyg...@gmail.com wrote:
 I thought I was smart and put all the strings I needed for my
 application into strings.xml
 and so I could make it available in multiple languages.  Gee what a
 smart boy I am.

 And then I try to upload it to Market and Developer Console isn't
 smart enough to figure things out.

 It says Set a title for ko_KR or remove that language.

 where, oh where am I to put my Korean title?I have it in the Title
 Space as
  Teacher's Pet |  교사의 애완동물 
 Both English and Korean.   There's only 26 characters, so what the H
 would I do if I want to add Russian, French and Spanish?  Scrunch the
 title down to 2 characters so I can add a title for every language?

 Same with the Description.  Sure I can put it in the same space, but
 it doesn't seem to notice
 and then I have only half the space available.

 Same with the promo graphic.

 Ummm...hey Googlewth?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Error reporting

2011-08-07 Thread nadam
http://stackoverflow.com/questions/5994026/failed-to-install-helloandroid-apk-on-device-emulator-5554

If that doesn't help and you're using Honeycomb for the emulator, try
an earlier version of Android.

On 4 Aug, 07:43, kalaiprabha prabhalingap...@gmail.com wrote:
 I'm getting this error message while running hello world application
 in androidemulator: ERROR: unexpected qemud char. channel close what
 should i do now?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is there a best (or worst) time to release apps?

2011-08-07 Thread Jim Graham
On Sun, Aug 07, 2011 at 09:42:09PM +0900, Nikolay Elenkov wrote:
 On Sun, Aug 7, 2011 at 9:25 PM, Jim Graham spooky1...@gmail.com wrote:
  On Sun, Aug 07, 2011 at 08:17:14PM +0900, Nikolay Elenkov wrote:

 AFAIK, 'Top Free/Paid' is a list of the apps released (not sure if updates)
 count in the last 30 days, sorted by rank. The lists are now
 country-specific as well, whereas that was not the case with 'Just In'.

That's not what the market support guy told me...but then, I just looked
for my new LWP, Bouncing Buckies, which I released Friday evening (CDT),
and I can't find it (oh, and it still shows 0 installs, which is strange
considering that Google Checkout says otherwise).  Apparently, either
you are right and support guy wasn't telling the truth, or a whole ton of
paid apps have been released since Friday at about 2210 UTC.

And while we're on the subject, if you're scrolling through a list, DON'T
use your Home button or anything that takes you out of that list
(including looking at any apps) or you'll start back at the top of the
list instead of where you were.  Nice u, feature, isn't it
Supposedly, they're going to fix that.  As of a minute ago, it isn't
fixed yet, and I'm not holding my breath, either.

Later,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

   Saw something on TV about Psych-os.
 H, Psych OS.  Perhaps the next freeware OS   --me

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread Kostya Vasilyev


07.08.2011 17:11, MARTIN Nicolas пишет:

Thanks for your answer.

A possibly complicated solution would be to close the old database
file using SQLiteOpenHelper.close, and then open the new one.

I also try using SQLiteOpenHelper.close (which is a synchronized 
method) and open the new one but same problem...


Well, something is not working :) Possibly something, somewhere, is 
keeping references to the old SQLiteDatabase object that in turn still 
references the old file.




As for me, I would do this: keep the existing database open, and
run an intelligent merge with the new data.

In my case, there is really no need to keep old data and merge. I 
think an intelligent merge (Which is already done by my server [PHP 
side]) will cost more time (even if my database is small).


What do you think?


If your server is smart and prepares a small, optimized update, all the 
better. How large is your database?


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread MARTIN Nicolas
Thanks for your answer.

A possibly complicated solution would be to close the old database file
 using SQLiteOpenHelper.close, and then open the new one.

I also try using SQLiteOpenHelper.close (which is a synchronized method) and
open the new one but same problem...

As for me, I would do this: keep the existing database open, and run an
 intelligent merge with the new data.

In my case, there is really no need to keep old data and merge. I think an
intelligent merge (Which is already done by my server [PHP side]) will cost
more time (even if my database is small).

What do you think?

2011/8/7 Kostya Vasilyev kmans...@gmail.com

  What's probably happening is that you are not closing the old database
 file, so the application continues to read from it, and not from the new
 one.

 This is entirely possible on Linux (and other Unixes): deleting an open
 file is allowed, the applications don't notice, and the actual file data is
 deallocated when it's finally closed (gracefully or not).

 You can see the code here, all it does it deletes the file, there is no
 magic code to handle you switching the database underneath:


 http://www.google.com/codesearch#oOy_5JrVRNM/trunk/frameworks/base/core/java/android/app/ApplicationContext.javaq=deleteDatabase%20package:android%20lang:%5Ejava$type=csl=479

 An ugly hack of a solution would be to terminate your application's process
 (and immediately restart it), so the new process can open the new database
 file.

 A possibly complicated solution would be to close the old database file
 using SQLiteOpenHelper.close, and then open the new one.

 As for me, I would do this: keep the existing database open, and run an
 intelligent merge with the new data.

 -- Kostya

 07.08.2011 16:04, CocoRambo пишет:

 Hi,

  For a new application I try to make weekly data update by downloading
 directly an SQLite file generated in PHP.
 So when update is needed I:

- Download the new SQLite file in ZIP (mydb.zip)
- Extract to a temporary file (mydb.db)
- Delete the old one (application.db via
deleteDatabase(application.db))
- Put the new one instead (mydb.db becomes application.db)

 But when I go back to any of my listviews, data still come from the old
 SQLite file.

  I tried to only delete old SQLite file (All it's ok and I can check thah
 the file is really deleted via DDMS)
 but my listviews data are still present...


  Each of my ListFragment uses CursorLoader + Custom adapter that extends
 CursorAdapter
 It seems that loader is (re)created each time the fragment is created so I
 don't think the problem is from this side...


  Does anyone have same experience with SQLite database use?
  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


 --
 Kostya Vasilyev

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re : Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread CocoRambo


Well, something is not working :) Possibly something, somewhere, is keeping 
references to the old SQLiteDatabase object that in turn still references 
the old file.


That is what I think but where between: Content provider |  CursorLoader | 
CursorAdapter | something else...


If your server is smart and prepares a small, optimized update, all the 
better. How large is your database?

On device, my database is around 1,20Mo (~100Ko with zip compression)
You are right with an optimized update with only the essential.

All case, I am really want to understand the actual behavior

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Clear draw popup overlay from mapview in android?

2011-08-07 Thread shubh
In my screen i have two button one is two show map and second one two
show list . I am populating an popup on android map using onTap method
of ItemizedOverlay class, and now if I press on second button to
show list , popup message shows as it is, it not cancelled.

pls let me know how can I dismiss this popup message dialog.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: Re : Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread Kostya Vasilyev


07.08.2011 17:53, CocoRambo пишет:

All case, I am really want to understand the actual behavior


At this point, I would copy the source for SQLiteOpenHelper into the 
project (changing the package name, of course) and debug into its close 
and open...


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Clear draw popup overlay from mapview in android?

2011-08-07 Thread shubh
In my screen i have two button one is two show map and second one two
show list . I am populating an popup on android map using onTap method
of ItemizedOverlay class, and now if I press on second button to
show list , popup message shows as it is, it not cancelled.

pls let me know how can I dismiss this popup message dialog.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Market is showing incompatible with phone, but developer console says it is compatible

2011-08-07 Thread Adam Ratana
I had to submit an update for it to be compatible.  No permission or hardware 
requirements changes.  He said this was the case for some other apps as well so 
it might be part of a wider market bug, there's currently an open issue for 
compatibility listings in the console. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to create 3d effects on android application screen items

2011-08-07 Thread dhirendra
Hi,

I am a beginner for animation on android. I have created android
application with normal screens and various items in it. Now i would
like to add 3d animation to the items (like on selection come to front
 on deletion poping out in some good way etc.) in some screens. What
would be easier and fast way of creating it... using OpenGL or some
free game engline like libgdx (Both are new to me). Please suggest me
some references to start with !!!

Regards
Dhirendra

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: I can't show random images in the ImageView

2011-08-07 Thread androidmediadeveloper
also, once you change the bitmap, you need to call invalidate() so
onDraw is called again

On Aug 6, 4:41 pm, Zwiebel hunzwie...@gmail.com wrote:
 Thanks I will try it!

 On aug. 6, 20:04, Kostya Vasilyev kmans...@gmail.com wrote:







  You are calling TextView.setText(int)

  counter_txt_foe.setText(counter_foe);

  which expects an R.string resource ID for the text.

  Do this instead:

  counter_txt_foe.setText(String.valueOf(counter_foe));

  to call TextView.setText(CharSequence)

  -- Kostya

  07.08.2011 0:01, Zwiebel пишет:

   Thanks, I could make it with your helps. But now I'm found a new
   problem. I try to modify my textview with .setText method, but I got
   this error:

   ERROR/AndroidRuntime(3745): android.content.res.Resources
   $NotFoundException: String resource ID #0x1
   ERROR/AndroidRuntime(3745):     at
   android.content.res.Resources.getText(Resources.java:222)
   ERROR/AndroidRuntime(3745):     at
   android.widget.TextView.setText(TextView.java:3011)

   My source:

   public class sc extends Activity{

      ImageView secret;
      public int counter;
      public int counter_foe;
      public TextView txt;
      public TextView counter_txt;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
              // TODO Auto-generated method stub
              super.onCreate(savedInstanceState);
              setContentView(R.layout.sc);

              counter = 0;
              counter_foe = 0;

              txt = (TextView) findViewById(R.id.txt);
              secret = (ImageView) findViewById(R.id.secret);
              counter_txt = (TextView) findViewById(R.id.counter_me);
              final TextView counter_txt_foe = (TextView)
   findViewById(R.id.counter_me_foe);

              Random rand = new Random();
              int rndInt = rand.nextInt(3) + 1;

              Runnable r1 = new Runnable() {

                      @Override
                      public void run() {
                              // TODO Auto-generated method stub
                              int imageArr[] = new int[3];

                              imageArr[0] = R.drawable.r1_mirror;
                              imageArr[1] = R.drawable.s1_mirror;
                              imageArr[2] = R.drawable.p2_mirror;

                              Random rand = new Random();
                              int rndInt = rand.nextInt(3);

                              secret.setImageResource(imageArr[rndInt]);

                              if (rndInt == 0) {
                                      counter_foe += 1;
                                      Log.d(improve, counter_foe 
   improved);
                                      counter_txt_foe.setText(counter_foe);
                              }

                      }
      };

              secret.postDelayed(r1, 5000);
      }

   }

   Thanks for any helps.

   On aug. 6, 19:46, Nikolay Elenkovnikolay.elen...@gmail.com  wrote:
   On Sun, Aug 7, 2011 at 2:38 AM, Zwiebelhunzwie...@gmail.com  wrote:
   I tried it out and sadly n is 0 everytime, but I don't know why.
   Reading the docs usually helps:

   public static double random()

        Returns a double value with a positive sign, greater than or equal
   to 0.0 and less than 1.0.

   You are casting to int, so it's always going to be zero. What you need is
   java.util.Random.nextInt().

  --
  Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: I can't show random images in the ImageView

2011-08-07 Thread Kostya Vasilyev

Nope.

setImageURI / setImageDrawable / setImageResource in ImageView all call 
requestLayout() and invalidate().


07.08.2011 19:28, androidmediadeveloper пишет:

also, once you change the bitmap, you need to call invalidate() so
onDraw is called again

On Aug 6, 4:41 pm, Zwiebelhunzwie...@gmail.com  wrote:

Thanks I will try it!

On aug. 6, 20:04, Kostya Vasilyevkmans...@gmail.com  wrote:








You are calling TextView.setText(int)
counter_txt_foe.setText(counter_foe);
which expects an R.string resource ID for the text.
Do this instead:
counter_txt_foe.setText(String.valueOf(counter_foe));
to call TextView.setText(CharSequence)
-- Kostya
07.08.2011 0:01, Zwiebel пишет:

Thanks, I could make it with your helps. But now I'm found a new
problem. I try to modify my textview with .setText method, but I got
this error:
ERROR/AndroidRuntime(3745): android.content.res.Resources
$NotFoundException: String resource ID #0x1
ERROR/AndroidRuntime(3745): at
android.content.res.Resources.getText(Resources.java:222)
ERROR/AndroidRuntime(3745): at
android.widget.TextView.setText(TextView.java:3011)
My source:
public class sc extends Activity{
ImageView secret;
public int counter;
public int counter_foe;
public TextView txt;
public TextView counter_txt;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.sc);
counter = 0;
counter_foe = 0;
txt = (TextView) findViewById(R.id.txt);
secret = (ImageView) findViewById(R.id.secret);
counter_txt = (TextView) findViewById(R.id.counter_me);
final TextView counter_txt_foe = (TextView)
findViewById(R.id.counter_me_foe);
Random rand = new Random();
int rndInt = rand.nextInt(3) + 1;
Runnable r1 = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
int imageArr[] = new int[3];
imageArr[0] = R.drawable.r1_mirror;
imageArr[1] = R.drawable.s1_mirror;
imageArr[2] = R.drawable.p2_mirror;
Random rand = new Random();
int rndInt = rand.nextInt(3);
secret.setImageResource(imageArr[rndInt]);
if (rndInt == 0) {
counter_foe += 1;
Log.d(improve, counter_foe improved);
counter_txt_foe.setText(counter_foe);
}
}
};
secret.postDelayed(r1, 5000);
}
}
Thanks for any helps.
On aug. 6, 19:46, Nikolay Elenkovnikolay.elen...@gmail.comwrote:

On Sun, Aug 7, 2011 at 2:38 AM, Zwiebelhunzwie...@gmail.comwrote:

I tried it out and sadly n is 0 everytime, but I don't know why.

Reading the docs usually helps:
public static double random()
  Returns a double value with a positive sign, greater than or equal
to 0.0 and less than 1.0.
You are casting to int, so it's always going to be zero. What you need is
java.util.Random.nextInt().

--
Kostya Vasilyev


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] @TreKing: How would I go about implementing a market comment response like you do.

2011-08-07 Thread Raghav Sood
Hi,

This question is kind of specifically to TreKing but other methods and
responses are welcome.

I have 11 apps on the market and plan to release a good amount more. As I am
sure everyone here knows responding to the comments on the market itself is
not an option, sadly. As some of us know as well TreKing has implemented a
sort of response method of his own. My question: How would I do something
like this as well? I am familiar with Android and blogging and a reasonable
amount of web languages (PHP, javascript etc.)

From what I can understand: The app reads some sort of feed from the blog
that is used to respond to comments. The user is then notified about the
response. I am not sure about this as I live in India and cannot use the app
for my self.

So... Could someone (preferably TreKing) tell me or guide me in implementing
something like this?

Thanks

-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Just in section

2011-08-07 Thread bob
I think the Android Market on my phone got updated, and I can't find
the Just in section any more.  Anyone know about this?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: Re : Re: Re : Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread Kostya Vasilyev

It doesn't seem bad to me at all.

Note that getLocalContentProvider is API level 5.

If this was my code, I'd take advantage of the provider being local, and 
keep a reference to the database somewhere (in a static variable). The 
provider would use this static to access the database.


In the update code, I'd get the database from the static, and do the 
close/copy/open song-and-dance with it.


That way, the content provider would run on top of the database 
layer, not the other way around. But that's really just architectural 
nitpicking :)


-- Kostya

07.08.2011 20:22, CocoRambo пишет:

I finally find a solution but I am not proud of it...

My mistake was that I called close() on the wrong SQLiteOpenHelper.
So I add a public method to my ContentProvider to get his 
SQLiteOpenHelper...

Next during update I do this:

MyContentProvider cp = (MyContentProvider) context.getContentResolver()
.acquireContentProviderClient(CONTENT_URI)
.getLocalContentProvider();
if (cp != null) {
cp.getOpenHelper().close();
}


Is there any clean way to do that? (Except your intelligent merge 
solution)

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re : Re: Re : Re: [android-developers] Is SQLite database in cache after first use?

2011-08-07 Thread CocoRambo
I finally find a solution but I am not proud of it...

My mistake was that I called close() on the wrong SQLiteOpenHelper.
So I add a public method to my ContentProvider to get his 
SQLiteOpenHelper...
Next during update I do this:

MyContentProvider cp = (MyContentProvider) context.getContentResolver()
.acquireContentProviderClient(CONTENT_URI)
.getLocalContentProvider();
if (cp != null) {
cp.getOpenHelper().close();
}


Is there any clean way to do that? (Except your intelligent merge solution)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] images overlay on layout

2011-08-07 Thread Eyal Berman
Hi,

I trying to implement a image as background and put images on top of it.
this is my layout. 
Code:

FrameLayout android:id=@+id/my_ph 
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=wrap_content
android:layout_height=wrap_content
ImageView  
android:id=@+id/image
android:layout_width=wrap_content 
android:layout_height=wrap_content 
android:src=@drawable/sketch /
/FrameLayout

and my class
Code:

import android.app.Activity;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.Toast;

public class myActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

FrameLayout rv =(FrameLayout)findViewById(R.id.my_ph);
   
ImageButton im1 = new ImageButton(this);
im1.setBackgroundResource(R.drawable.lamp_off_x);
im1.setMinimumHeight(50);
im1.setMinimumWidth(50);
im1.setOnClickListener(OnLampClickListener());
im1.layout(50,50, 0, 0);
   
rv.addView(im1);
 }

OnClickListener OnLampClickListener(){
  Toast.makeText(getBaseContext(), Lamp,Toast.LENGTH_LONG);
  return null;
}
}

my questions:
1. how to put the images im1 in specific place(x,y) on top of my ImageView.
2. how to implement the click event on the image im1 (i will have more 
images like that) 
3. if i will dynamic load images on my ImageView how to know which image i 
clicked (where and how to save the image id that came from db).

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Jphfgyofjfjhghkloljgjkhilgxbcbghghghy

2011-08-07 Thread Manan wadhwa



Sent from my iPod

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Jphfgyofjfjhghkloljgjkhilgxbcbghghghy

2011-08-07 Thread Kumar Bibek
Your keyboard doesn't work :)

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Tue, Aug 2, 2011 at 11:30 PM, Manan wadhwa manan.wad...@gmail.comwrote:



 Sent from my iPod

 --
 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.comandroid-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Hvjdhvnbkgzchlxcvgkfcsspllopgdzzzgj

2011-08-07 Thread Manan wadhwa



Sent from my iPod

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: I can't show random images in the ImageView

2011-08-07 Thread Zwiebel
Thanks for all, I could make it now!

Thanks for fast helps.

On aug. 6, 22:23, Kostya Vasilyev kmans...@gmail.com wrote:
 Oh, and here is another one:

 nextInt(3) can be one of: 0, 1, 2.

 nextInt(3) +1 then becomes one of: 1, 2, 3.

 This:

 imageArr[rndInt]

 expects values 0, 1, 2

 So, take out the +1, to avoid getting an index-out-of-bounds exception.

 -- Kostya

 07.08.2011 0:01, Zwiebel пишет:

             Random rand = new Random();
             int rndInt = rand.nextInt(3) + 1;

 --
 Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How Can I keep data between my activities?

2011-08-07 Thread Zwiebel
I have an activity what looks like this:

public class s extends Activity{

private static final int REQUEST_CODE = 1;

ImageView secret;
public int counter;
public int counter_foe;
public TextView txt;
public TextView counter_txt;
ImageView pic;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
 this.requestWindowFeature(Window.FEATURE_NO_TITLE);

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.scissors);

counter = 0;
counter_foe = 0;

pic = (ImageView) findViewById(R.id.pic);
final Button next = (Button) findViewById(R.id.next);
txt = (TextView) findViewById(R.id.txt);
secret = (ImageView) findViewById(R.id.secret);
counter_txt = (TextView) findViewById(R.id.counter_me);
final TextView counter_txt_foe = (TextView)
findViewById(R.id.counter_me_foe);

final Runnable r1 = new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
int imageArr[] = new int[3];

imageArr[0] = R.drawable.r1_mirror;
imageArr[1] = R.drawable.s1_mirror;
imageArr[2] = R.drawable.p2_mirror;

Random rand = new Random();
int rndInt = rand.nextInt(3);

secret.setImageResource(imageArr[rndInt]);

if (rndInt == 0) {
counter_foe += 1;
Log.d(improve, counter_foe 
improved);

counter_txt_foe.setText(String.valueOf(counter_foe));
txt.setText(+1 for Me);
}

if (rndInt == 1) {
txt.setText(Draw);
}

if (rndInt == 2) {
counter += 1;
Log.d(improve, counter improved);

counter_txt.setText(String.valueOf(counter));
txt.setText(+1 for You);
}

next.setVisibility(1);
}
};

final Runnable r2 = new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
next.setVisibility(-1);
}
};
next.setOnClickListener(new View.OnClickListener() {


@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i = new Intent(com.z.CHANCES);
startActivityForResult(i, REQUEST_CODE);
}

protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (resultCode == RESULT_OK  requestCode == 
REQUEST_CODE) {
if (data.hasExtra(r)) {

pic.setBackgroundResource(R.drawable.r1);
}
else if (data.hasExtra(p)) {

pic.setBackgroundResource(R.drawable.p2);
}
else if (data.hasExtra(s)) {

pic.setBackgroundResource(R.drawable.s1);
}
}
}

});

secret.postDelayed(r1, 5000);
}

}


And I have another one what looks like this:

public class possibilities extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.possibilities);

Button rock = (Button) findViewById(R.id.r);
Button paper = (Button) findViewById(R.id.p);
Button scissors = (Button) findViewById(R.id.s);

r.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO 

[android-developers] Re: How Can I keep data between my activities?

2011-08-07 Thread Zwiebel
I tried the following too:

public class s extends Activity{

private static final int REQUEST_CODE = 1;

ImageView secret;
public int counter;
public int counter_foe;
public TextView txt;
public TextView counter_txt;
ImageView pic;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
 this.requestWindowFeature(Window.FEATURE_NO_TITLE);

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.scissors);

counter = 0;
counter_foe = 0;

pic = (ImageView) findViewById(R.id.pic);
final Button next = (Button) findViewById(R.id.next);
txt = (TextView) findViewById(R.id.txt);
secret = (ImageView) findViewById(R.id.secret);
counter_txt = (TextView) findViewById(R.id.counter_me);
final TextView counter_txt_foe = (TextView)
findViewById(R.id.counter_me_foe);

final Runnable r1 = new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
int imageArr[] = new int[3];

imageArr[0] = R.drawable.r1_mirror;
imageArr[1] = R.drawable.s1_mirror;
imageArr[2] = R.drawable.p2_mirror;

Random rand = new Random();
int rndInt = rand.nextInt(3);

secret.setImageResource(imageArr[rndInt]);

if (rndInt == 0) {
counter_foe += 1;
Log.d(improve, counter_foe 
improved);

counter_txt_foe.setText(String.valueOf(counter_foe));
txt.setText(+1 for Me);
}

if (rndInt == 1) {
txt.setText(Draw);
}

if (rndInt == 2) {
counter += 1;
Log.d(improve, counter improved);

counter_txt.setText(String.valueOf(counter));
txt.setText(+1 for You);
}

next.setVisibility(1);
}
};

final Runnable r2 = new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
next.setVisibility(-1);
}
};
next.setOnClickListener(new View.OnClickListener() {


@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i = new Intent(com.z.CHANCES);
i.putExtra(counter, counter);
i.putExtra(counter_foe, counter_foe);
startActivityForResult(i, REQUEST_CODE);
}

protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
if (resultCode == RESULT_OK  requestCode == 
REQUEST_CODE) {
if (data.hasExtra(r)) {

pic.setBackgroundResource(R.drawable.r1);
if (data.hasExtra(counter)) {
counter = 
data.getExtras().getInt(counter);

counter_txt.setText(String.valueOf(counter));

}
if (data.hasExtra(counter_foe)) {
counter_foe = 
data.getExtras().getInt(counter_foe);

counter_txt_foe.setText(String.valueOf(counter_foe));
}
}
else if (data.hasExtra(p)) {

pic.setBackgroundResource(R.drawable.p2);
if (data.hasExtra(counter)) {
counter = 
data.getExtras().getInt(counter);

counter_txt.setText(String.valueOf(counter));
}

Re: [android-developers] @TreKing: How would I go about implementing a market comment response like you do.

2011-08-07 Thread TreKing
On Sun, Aug 7, 2011 at 10:39 AM, Raghav Sood raghavs...@gmail.com wrote:

 From what I can understand: The app reads some sort of feed from the blog
 that is used to respond to comments. The user is then notified about the
 response.


Yup - that sums it up quite nicely. It's dirt simple - a poor man's RSS
reader.

Steps:
1 - Post to a blog somewhere that can be subscribed via RSS. Get the url for
this feed.
2 - Start an IntentService that does the checking.
3 - Parse the xml, searching from most recent until last time you last
checked (saved as SharedPreference).
4 - Saved data about each post you find that is new. (Title, URL, etc)
5 - Send notification that links the user to a given post.
6 - Profit

I have a config file that lets me set up multiple feeds, so I use the same
strategy for responding to comments, notifying users about issues, or that a
new version is available. Will probably create a beta feed soon too.

I'm looking to improve this in the future as some people have commented that
the text-message style notification can be annoying, but works well enough
for now.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Just in section

2011-08-07 Thread TreKing
On Sun, Aug 7, 2011 at 11:17 AM, bob b...@coolgroups.com wrote:

 I think the Android Market on my phone got updated, and I can't find the
 Just in section any more.  Anyone know about this?


http://www.google.com/support/forum/p/Android+Market/thread?tid=69c2808d745db504hl=en

First hit on Google for new Market client 'just in'

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Clear draw popup overlay from mapview in android?

2011-08-07 Thread TreKing
On Sun, Aug 7, 2011 at 8:54 AM, shubh shubhampatn...@gmail.com wrote:

 pls let me know how can I dismiss this popup message dialog.


Did you try
http://developer.android.com/reference/android/app/Dialog.html#dismiss()

?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How Can I keep data between my activities?

2011-08-07 Thread TreKing
On Sun, Aug 7, 2011 at 1:01 PM, Zwiebel hunzwie...@gmail.com wrote:

 My problem is the following:
 I want to keep my counter's and my counter_foe's content through the
 activity changes. I don't want them to be the default (0) texts. For
 example:
 If I clicked on the next button of mine activity, then I called
 startActivityForResult, and the another activity started. When I click
 in the second activity on one of the possibilities, the first activity
 created again. But with the main content (what is 0), and not with the
 1, or 2, or 3 etc. How can I keep these contents and return them
 everytime when the s activity resumed?


I didn't look at you code, but look at the docs. The section on Activity
Lifecyle and in particular onSaveInstanceState and onRestoreInstanceState.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Is there a callback that gets called right after onResume() ?

2011-08-07 Thread Jim
Guys,

I was under the impression that measured dimensions were suggestions
that could be overridden at the time drawing occurs. Therefore,
overriding those classes would allow for additional information to be
given to Android, but at draw time, you would need to getWidth and
getHeight in order to know that your measurements in onMeasure were
actually used.

Therefore, to solve the problem that way, you would need to capture
all elements on the screen and get their measurements to know that
your suggested measurements would actually be used for the screen that
is displaying it. That seems like a lot of work to me and it would be
easier to wait until everything is displayed, then get your layout
params so you can then pack it with the views you want according to
the actual, drawn size. That's all I was saying...

Overriding onSizeChanged is a very good point, though, in the event
that a View changes size and Android redraws and changes the size of
the View of interest.

-Jim

On Aug 6, 2:00 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Sure. I'd start here:

 http://developer.android.com/guide/topics/ui/custom-components.html

 The layout process involves these three onXXX overrides, as listed in
 the table halfway down the page:

 ||onMeasure(int, int)
 ||onLayout(boolean, int, int, int, int)
 onSizeChanged(int, int, int, int)

 There is documentation for each of these three methods, as well, such as:

 http://developer.android.com/reference/android/view/View.html#onSizeC...,
 int, int, int)

 -- Kostya

 06.08.2011 22:54, Matt Tatro пишет:









  Kostya,
  Any example I could follow?

  Kind Regards,

  Matt Tatro
  T: +1 (281) 905-1008
  E: mattta...@gmail.com

  -Original Message-
  From: android-developers@googlegroups.com 
  [mailto:android-developers@googlegroups.com] On Behalf Of Kostya Vasilyev
  Sent: Saturday, August 06, 2011 11:51 AM
  To: android-developers@googlegroups.com
  Subject: Re: [android-developers] Re: Is there a callback that gets called 
  right after onResume() ?

  Or one could use the tools already provided by the framework ...

  ... by subclassing a xxxLayout class or a ViewGroup and overriding 
  onMeasure and onLayout ...

  ... or by subclassing the appropriate view and overriding onSizeChanged ...

  -- Kostya

  06.08.2011 20:42, Jim пишет:
  There is no callback - you can set flags in onResume() to know when
  the activity is done with that part of the lifecycle. However, by
  using layout_weight, you're telling Android to decide the size, which
  it can't know until the screen is drawn, so a callback to change the
  size won't work without a Handler to request a redraw or cycling
  through onPause/onResume. So, you're going to need a Handler, which is
  effectively a hack (to avoid layout_weight, you can get screen and
  view dimensions and other data during onCreate/onStart/onResume to
  calculate the available screen space yourself, determine which
  elements will show and then calculate/recalculate certain element
  sizes to get what you want, but that's a lot of work - a hack is
  probably a better approach for this type of job).

  If you want to determine the available size, then start a background
  thread/timer at the end of onResume(), when you know how much space
  you have for your elements, do the size calculations, then
  runOnUIThread the changes and you should be fine. If you want to
  guarantee the user does not see the changes, you're going to have to
  work harder since the background thread/timer is not synchronized with
  the UI.

  -Jim

  On Aug 6, 2:58 am, Zsomborscythe...@gmail.com   wrote:
  Is there a callback that gets a call when everything in the current
  Activity got rendered?

  Because I need to know the exact sizes of some of my ViewGroups
  (their width/height are set using layout_weight in the layout xml),
  so I know how many elements fit inside them without scrolling. But I
  can only measure them after onResume. Is there a way to do this
  without some hack?
  --
  Kostya Vasilyev

  --
  You received this message because you are subscribed to the Google Groups 
  Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: onDraw() causing flicker when drawing new images

2011-08-07 Thread Doug
The logic for onDraw in any given View should be to draw the entire
view every time it's called by the view hierarchy.

Are you calling invalidate with a dirty region on your view to
indicate only which portions of the view have changed from moment to
moment?  That should speed up rendering because Android will try to
optimize away any part of the drawing that lies outside the dirty
rect.  If you're allowing every pixel in view to update on every call
to onDraw, well, that can be expensive.

Doug

On Aug 6, 3:59 pm, Jeffrey jeffisagen...@gmail.com wrote:
 The problem isn't tearing, as the images shouldn't be drawn there yet
 anyway. I don't have my position calculations in a separate thread,
 should I? I have tried locking the array (though because of my limited
 knowledge I've gone about it probably the wrong way, by basically
 having a boolean that tells the draw cycle whether to read the data or
 not) but that didn't work, probably because of the poor quality of my
 attempt. I don't know too much about syncing threads and all that so
 I've been unable to figure this out on my own.

 On Aug 6, 12:19 pm, Miguel Morales therevolti...@gmail.com wrote:







  Perhaps you can try adding a synchronized lock that protects your data 
  array.
  Lock it before going into onDraw() and unlock it when finished, and do
  the same when calculating your array data.
  Do you have a separate thread that calculates positions?

  On Fri, Aug 5, 2011 at 6:23 PM, niko20 nikolatesl...@yahoo.com wrote:
   Hm sounds like a refresh rate issue, with Surface view you probably
   can't sync to vertical refresh, so you get tearing, where you see
   halfway animations for a second as the video buffer changes over to
   the next frame.

   -niko

   On Aug 5, 1:56 pm, Jeffrey jeffisagen...@gmail.com wrote:
   I'm having an issue with drawing on my surface view. At one point I
   was just replacing images with new ones in a grid, but the images
   didn't all draw at the same time. I think that that may have had
   something to do with modifying the array that it was using to
   determine what to draw but I couldn't get it resolved even when
   pausing the drawing. Now I have images that drop down and new ones
   fall in (think slot machine reels) but the images will occasionally
   flicker with what the new image is going to be before the old images
   fall out.

   Basically I guess I'm asking what is a good way to either pause the
   onDraw command while I can edit my arrays and get them all in place or
   what is a good way to sync my array modifications to not take place
   during an onDraw cycle? Or is onDraw just bad at drawing images
   simultaneously and I should be using OpenGL or something?

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  ~ Jeremiah:9:23-24
  Android 2D MMORPG:http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: At what point does android know the exact key that was pressed?

2011-08-07 Thread Doug
On Aug 6, 12:07 pm, Anil anil.r...@gmail.com wrote:
 I built the android source and running it in the Eclipse debugger, am
 trying to understand where is the point in the calling sequence when
 it has all the information about the event.
 So I run the calculator and press key '1'. There is a breakpoint at
 EventListener.onClick()
 In the call stack I see the event being dispatched; ViewRoot calling
 PhoneWindow calling Panel, Layout, Button etc. until the handler is
 reached.
 questions:
 1) At what earliest point in the call hierarchy can I insert a println
 saying, Key was pressed, value is 1?

In one of your view's registered OnKeyListeners, unless you want to
create a custom mod of Android to do something different.  Or if no
view intercepts the key, in the containing activity's onKeyDown()

 2) At what point does it know whether it was a soft key or a physical
 key?

It's a flag in the KeyEvent that was passed to one of the above
mechanisms.  There is no additional waiting for that information.

If you're trying to intercept keys before the normal mechanisms,
that's not allowed.  Otherwise you might have third party apps logging
your keypresses and possibly stealing your passwords.

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: inApp soundgeneration possible without heavy use of CPU ?

2011-08-07 Thread Doug
On Jul 31, 1:35 pm, Peter Pippinger pe...@pippinger.de wrote:
 So my question: is it possible to do some synthesizer-calculation in Java
 for the music with not to much CPU-consumption?
 Maybe you have some links (maybe also to some apps which are doing something
 like this)?

I think if you do a little research on the topic you will find ways of
doing sound synthesis with both pure java and C++ that you could
integrate via JNI. Everything comes at a cost, though, and you just
have to deal with that fact.  In general, audio synthesis is not a
simple thing.  You may even have to drop the sampling rate so your
synthesis can process more information on limited mobile devices.

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How Can I keep data between my activities?

2011-08-07 Thread Zwiebel
So do you think, that if I'm try to do this in the s class, will it be
good?:

@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
savedInstanceState.putInt(counter, counter);
savedInstanceState.putInt(counter_foe, counter_foe);
super.onSaveInstanceState(savedInstanceState);

@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
  super.onRestoreInstanceState(savedInstanceState);
  counter = savedInstanceState.getInt(counter);
 counter_foe = savedInstanceState.getInt(counter_foe);
}




On aug. 7, 18:47, TreKing treking...@gmail.com wrote:
 On Sun, Aug 7, 2011 at 1:01 PM, Zwiebel hunzwie...@gmail.com wrote:
  My problem is the following:
  I want to keep my counter's and my counter_foe's content through the
  activity changes. I don't want them to be the default (0) texts. For
  example:
  If I clicked on the next button of mine activity, then I called
  startActivityForResult, and the another activity started. When I click
  in the second activity on one of the possibilities, the first activity
  created again. But with the main content (what is 0), and not with the
  1, or 2, or 3 etc. How can I keep these contents and return them
  everytime when the s activity resumed?

 I didn't look at you code, but look at the docs. The section on Activity
 Lifecyle and in particular onSaveInstanceState and onRestoreInstanceState.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: onDraw() causing flicker when drawing new images

2011-08-07 Thread Jeffrey
How would I go about doing that? I have no formal programming
education and everything I know is based of examples I've seen, and
I've never seen that done.

On Aug 7, 2:56 pm, Doug beafd...@gmail.com wrote:
 The logic for onDraw in any given View should be to draw the entire
 view every time it's called by the view hierarchy.

 Are you calling invalidate with a dirty region on your view to
 indicate only which portions of the view have changed from moment to
 moment?  That should speed up rendering because Android will try to
 optimize away any part of the drawing that lies outside the dirty
 rect.  If you're allowing every pixel in view to update on every call
 to onDraw, well, that can be expensive.

 Doug

 On Aug 6, 3:59 pm, Jeffrey jeffisagen...@gmail.com wrote:







  The problem isn't tearing, as the images shouldn't be drawn there yet
  anyway. I don't have my position calculations in a separate thread,
  should I? I have tried locking the array (though because of my limited
  knowledge I've gone about it probably the wrong way, by basically
  having a boolean that tells the draw cycle whether to read the data or
  not) but that didn't work, probably because of the poor quality of my
  attempt. I don't know too much about syncing threads and all that so
  I've been unable to figure this out on my own.

  On Aug 6, 12:19 pm, Miguel Morales therevolti...@gmail.com wrote:

   Perhaps you can try adding a synchronized lock that protects your data 
   array.
   Lock it before going into onDraw() and unlock it when finished, and do
   the same when calculating your array data.
   Do you have a separate thread that calculates positions?

   On Fri, Aug 5, 2011 at 6:23 PM, niko20 nikolatesl...@yahoo.com wrote:
Hm sounds like a refresh rate issue, with Surface view you probably
can't sync to vertical refresh, so you get tearing, where you see
halfway animations for a second as the video buffer changes over to
the next frame.

-niko

On Aug 5, 1:56 pm, Jeffrey jeffisagen...@gmail.com wrote:
I'm having an issue with drawing on my surface view. At one point I
was just replacing images with new ones in a grid, but the images
didn't all draw at the same time. I think that that may have had
something to do with modifying the array that it was using to
determine what to draw but I couldn't get it resolved even when
pausing the drawing. Now I have images that drop down and new ones
fall in (think slot machine reels) but the images will occasionally
flicker with what the new image is going to be before the old images
fall out.

Basically I guess I'm asking what is a good way to either pause the
onDraw command while I can edit my arrays and get them all in place or
what is a good way to sync my array modifications to not take place
during an onDraw cycle? Or is onDraw just bad at drawing images
simultaneously and I should be using OpenGL or something?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   ~ Jeremiah:9:23-24
   Android 2D 
   MMORPG:http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: At what point does android know the exact key that was pressed?

2011-08-07 Thread Anil
You guessed correctly. I want to do a custom build. I work for an OEM
and am trying to implement an idea - to log all inputs (keystrokes,
text field input, browser tests including Javascript, plugging/
unplugging SD card etc.) by the testers to have a set of trails that
would be useful.
So I am trying to figure out the minimal set of points in the
framework code at which I can log this text was input, this key was
pressed. Does such a tool to log trails already exist?
Anil

On Aug 7, 3:03 pm, Doug beafd...@gmail.com wrote:
 On Aug 6, 12:07 pm, Anil anil.r...@gmail.com wrote:

  I built the android source and running it in the Eclipse debugger, am
  trying to understand where is the point in the calling sequence when
  it has all the information about the event.
  So I run the calculator and press key '1'. There is a breakpoint at
  EventListener.onClick()
  In the call stack I see the event being dispatched; ViewRoot calling
  PhoneWindow calling Panel, Layout, Button etc. until the handler is
  reached.
  questions:
  1) At what earliest point in the call hierarchy can I insert a println
  saying, Key was pressed, value is 1?

 In one of your view's registered OnKeyListeners, unless you want to
 create a custom mod of Android to do something different.  Or if no
 view intercepts the key, in the containing activity's onKeyDown()

  2) At what point does it know whether it was a soft key or a physical
  key?

 It's a flag in the KeyEvent that was passed to one of the above
 mechanisms.  There is no additional waiting for that information.

 If you're trying to intercept keys before the normal mechanisms,
 that's not allowed.  Otherwise you might have third party apps logging
 your keypresses and possibly stealing your passwords.

 Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: At what point does android know the exact key that was pressed?

2011-08-07 Thread Mark Murphy
On Sun, Aug 7, 2011 at 5:17 PM, Anil anil.r...@gmail.com wrote:
 You guessed correctly. I want to do a custom build. I work for an OEM
 and am trying to implement an idea - to log all inputs (keystrokes,
 text field input, browser tests including Javascript, plugging/
 unplugging SD card etc.) by the testers to have a set of trails that
 would be useful.

In which case, you have the wrong list. Please visit
http://source.android.com, click on the Community tab, and find a more
relevant discussion list. This group is for Android SDK development.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: onDraw() causing flicker when drawing new images

2011-08-07 Thread Jeffrey
Okay, figured it out, syncing the touch event with the draw thread
cleared it up. I am still interested in calling invalidate on dirty
regions if it will increase performance though...

On Aug 7, 3:59 pm, Jeffrey jeffisagen...@gmail.com wrote:
 How would I go about doing that? I have no formal programming
 education and everything I know is based of examples I've seen, and
 I've never seen that done.

 On Aug 7, 2:56 pm, Doug beafd...@gmail.com wrote:







  The logic for onDraw in any given View should be to draw the entire
  view every time it's called by the view hierarchy.

  Are you calling invalidate with a dirty region on your view to
  indicate only which portions of the view have changed from moment to
  moment?  That should speed up rendering because Android will try to
  optimize away any part of the drawing that lies outside the dirty
  rect.  If you're allowing every pixel in view to update on every call
  to onDraw, well, that can be expensive.

  Doug

  On Aug 6, 3:59 pm, Jeffrey jeffisagen...@gmail.com wrote:

   The problem isn't tearing, as the images shouldn't be drawn there yet
   anyway. I don't have my position calculations in a separate thread,
   should I? I have tried locking the array (though because of my limited
   knowledge I've gone about it probably the wrong way, by basically
   having a boolean that tells the draw cycle whether to read the data or
   not) but that didn't work, probably because of the poor quality of my
   attempt. I don't know too much about syncing threads and all that so
   I've been unable to figure this out on my own.

   On Aug 6, 12:19 pm, Miguel Morales therevolti...@gmail.com wrote:

Perhaps you can try adding a synchronized lock that protects your data 
array.
Lock it before going into onDraw() and unlock it when finished, and do
the same when calculating your array data.
Do you have a separate thread that calculates positions?

On Fri, Aug 5, 2011 at 6:23 PM, niko20 nikolatesl...@yahoo.com wrote:
 Hm sounds like a refresh rate issue, with Surface view you probably
 can't sync to vertical refresh, so you get tearing, where you see
 halfway animations for a second as the video buffer changes over to
 the next frame.

 -niko

 On Aug 5, 1:56 pm, Jeffrey jeffisagen...@gmail.com wrote:
 I'm having an issue with drawing on my surface view. At one point I
 was just replacing images with new ones in a grid, but the images
 didn't all draw at the same time. I think that that may have had
 something to do with modifying the array that it was using to
 determine what to draw but I couldn't get it resolved even when
 pausing the drawing. Now I have images that drop down and new ones
 fall in (think slot machine reels) but the images will occasionally
 flicker with what the new image is going to be before the old images
 fall out.

 Basically I guess I'm asking what is a good way to either pause the
 onDraw command while I can edit my arrays and get them all in place 
 or
 what is a good way to sync my array modifications to not take place
 during an onDraw cycle? Or is onDraw just bad at drawing images
 simultaneously and I should be using OpenGL or something?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
~ Jeremiah:9:23-24
Android 2D 
MMORPG:http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Arrays and android

2011-08-07 Thread Nick Risaro
On Sun, Aug 7, 2011 at 6:24 AM, Romain Guy romain...@android.com wrote:

 What you want is not an array but a map. Look at java.util.HashMap for
 instance.

 What he needs is an object :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Intent

2011-08-07 Thread nadam
Check logcat to find the reason for force close. I think you need to
add tel: in front of the phone number.

On 6 Aug, 07:37, jagadeesh mjagadeeshb...@gmail.com wrote:
 Hi see the below code:

 Intent myintent=new Intent(Intent.ACTION_DIAL,Uri.parse(100));

         startActivity(myintent);

 I want to call one no from my intent itself but iam getting like forceclose
 wait code

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re:

2011-08-07 Thread nadam
http://developer.android.com/guide/topics/ui/declaring-layout.html

On 5 Aug, 19:52, adithya holla adithyaho...@gmail.com wrote:
 how to use android id effectively ?? everytime i use it the error flashes in
 eclipse saying id cannot be resolved

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: How Can I keep data between my activities?

2011-08-07 Thread TreKing
On Sun, Aug 7, 2011 at 3:58 PM, Zwiebel hunzwie...@gmail.com wrote:

 So do you think, that if I'm try to do this in the s class, will it
 be good?:


That is the general idea, yes.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Just in section

2011-08-07 Thread Jim Graham
On Sun, Aug 07, 2011 at 01:43:13PM -0500, TreKing wrote:

  I think the Android Market on my phone got updated, and I can't find the
  Just in section any more.  Anyone know about this?
 
 
 http://www.google.com/support/forum/p/Android+Market/thread?tid=69c2808d745db504hl=en
 
 First hit on Google for new Market client 'just in'

I just sent a third trouble ticket in on the new Market. The first one
was answered, but the answers were apparently false---New Free/Paid are
NOT the same asJust In.  For one thing, they don't work.

My LWP app that I released Friday at around 2200 UTC should be near the
top of the New Paid listing, but after scrolling through hundreds of
pages, seeing many apps several times over, mine was still below all of
that (I never found it after all that).  I find it impossible to believe
that THAT MANY NEW APPS have been released since Friday evening.
In the posts in the link above, one (and ONLY ONE) post from a google
not-going-to-support-you support person claims that these lists show all
new apps less than 30 days old.  Clearly, this is not true.

Second, they still haven't fixed the bug that takes you back to the top
of the list instead of returning you to where you were after you do
anything that takes you out of that list, including checking out a new
app.

Third, and this just started today, the screen lock, which I have
disabled via a widget called Unlocked, kept trying to engage while I
was in the Market trying to find my app.  It actually did engage
once.  Completely and utterly unsat...not to mention stupid.

And this last one should come as no surprise  Paid installs for
BB LWP?  I know of at least one, and who knows how many are behind
(just saw this:  known issue as of Friday) by several days.  BUT, the
dev console says 0 installs and 0 active installs.

I now truly understand the frustration (and ANGER!) everyone[1]
has with the market

Later,
   --jim

[1] Well, almost everyone---one whined about my question earlier.
That won't be a problem anymore, though.  ;-}

-- 
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

   Saw something on TV about Psych-os.
 H, Psych OS.  Perhaps the next freeware OS   --me

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: check wakelocked for each process

2011-08-07 Thread Hiko
Dear Kostya,

Thank you very much for your information.

I'll try.

Regards,

On Aug 5, 8:42 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 In the adb shell, type dumpsys power.

 05.08.2011 15:36, Hiko пишет:

  Hi,

  I would like to check/detect which process(s) are waklocked in the
  device.
  if you have any idea for this,please let me know.

 --
 Kostya Vasilyev

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: how to get the resource id of the set wallpaper

2011-08-07 Thread Hiko
Dear Hal,

Right.
That is what I want to ask.

Regards,

On Aug 6, 1:33 pm, Hal Harrison closeenough.bac...@gmail.com wrote:
 Are you asking:

 How can I get the id of my wallpaper graphic in my res/drawable folder
 into my program so I can do something with it?

 Hal Harrison.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Custom contextual menu options don't appear

2011-08-07 Thread Keith Wiley
I am getting bug reports from a very small number of users (two so
far) that my custom contextual menu options don't appear and are
therefore unavailable.  This is in an app that has been around for
several years and has an installed customer base of around 130,000.  I
have only had two such bug reports so far.  Has anyone else ever heard
of such a bug, and in a user-specific manner no less?  I know that in
one case the user's setup is an HTC Desire S (he didn't tell me the OS
version) and in the other case the user's setup is an HTC Incredible S
running Android 2.3.3 with HTC Sense 2.1.

Anyone know anything about this?  I am rather flustered since I can't
replicate or otherwise easily investigate the problem.  I'm worried
this might have something to do with a nonstock Android UI of some
sort, although I thought HTC was generally pretty good about honoring
the Android specs (after all, they built the G1 and the G2 for
heaven's sake).

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] question about other markets

2011-08-07 Thread Jim Graham
Just wonderingare any of the other markets worth posting paid
apps to in addition to the google market?  If so, any suggestions
which one(s)?  I'd like to get as much exposure (and maybe more
reliability) as possible to maximize my chances of making enough
to help out from month to month.

Thanks,
   --jim

-- 
73 DE N5IAL (/4)| This 'telephone' has too many
spooky1...@gmail.com| shortcomings to be seriously considered
 Running FreeBSD 7.0  | as a means of communication.  The device
ICBM / Hurricane:   | is inherently of no value to us.
   30.44406N 86.59909W  | (Western Union internal memo, 1876)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Standalone Java applications?

2011-08-07 Thread Bill Gatliff
Guys:


I am aware that under carefully-controlled circumstances, we can use
the NDK toolchain to produce standalone ASM/C/C++ applications for a
compatible Android target.

What if I want to do a standalone application written in Java for an
Android target?  It seems like I should be able to do this using the
SDK, and I have managed to compile a simple, do-nothing Java class
using the SDK.  (This wasn't a surprise to me).  I'm still looking at
what exactly I would transfer to the target, and then how I would
launch it.

I'm just wondering if I'm wasting my time before going any further on this.


Thanks!


b.g.
-- 
Bill Gatliff
b...@billgatliff.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Standalone Java applications?

2011-08-07 Thread Chris
Will you emulate swing?  If so, I'll buy you a beer.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Standalone Java applications?

2011-08-07 Thread Nikolay Elenkov
On Mon, Aug 8, 2011 at 11:07 AM, Bill Gatliff b...@billgatliff.com wrote:

 What if I want to do a standalone application written in Java for an
 Android target?

Assuming by 'standalone application' you mean a Java program
with a main method, there is an dalvikvm command. If your
class is in a dex file, you should be able to run it from the command
line.

Cf. # dalvikvm -help

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: question about other markets

2011-08-07 Thread Chrystian Vieyra
I think the only other big market is amazon app store. I am not a big fan of 
amazon app store, as amazon gets to set the app price, they take about two 
to three weeks to review the apps and they do not provide error reports.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: question about other markets

2011-08-07 Thread TreKing
On Sun, Aug 7, 2011 at 9:53 PM, Chrystian Vieyra chrys.vie...@gmail.comwrote:

 they take about two to three weeks to review the apps


In my experience it's been two to three *days*. Once I posted an update on
Sunday and it was approved Monday. YMMV.


 and they do not provide error reports


But they test your app and actually provide customer service. The Android
Market error reports are fairly useless anyway as they depend on users being
pro-active and provide no logs. You're best served with your own error
reporting mechanism (like ACRA) in either case.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: question about other markets

2011-08-07 Thread Jim Graham
On Sun, Aug 07, 2011 at 07:53:31PM -0700, Chrystian Vieyra wrote:

 I think the only other big market is amazon app store. I am not a big fan of 
 amazon app store, as amazon gets to set the app price

Ok, then ... three questions:

   1) do I get to set a minimum price?
   2) how much of [price] do they take?
   3) do they have a sign-up fee and/or per-listing fee (as I've heard
  Apple does---I read a comment that they charge $100/app uploaded
  to their market...don't know if it's true or not)?

I'm sitting here looking at a Market that has failed to list Bouncing
Buckies in the new apps list, and [GASP! SURPRISE] only one (known)
paid install...and that one probably came from my listing in the
Android Forums new app announcements page  I made some changes to
all of the pages for it today (added a YouTube video), but still have
yet to see anything ... but, because of a known bug, there could be
another one, or another hundred or more, or . who knows, and from
what the bug listing says, it might be a while before I know about any
of them (if any exist).  I'm getting really, really frustrated.  I don't
even know whether I should work on and release another one, or wait
I have the ideas, but.  (sorry...I'll stop the frustrated rant now)

So I'm seriously considering additional listings on other markets

Thanks,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

   My policy on spammers:
  Castrate first, ask questions later.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: question about other markets

2011-08-07 Thread Chrystian Vieyra
https://developer.amazon.com/help/faq.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: question about other markets

2011-08-07 Thread Jim Graham
On Sun, Aug 07, 2011 at 08:29:59PM -0700, Chrystian Vieyra wrote:
 https://developer.amazon.com/help/faq.html

That'll work ... thanks.

Later,
   --jim

-- 
73 DE N5IAL (/4)|  There it was, right in the title bar:
spooky1...@gmail.com|   Microsoft Operations POS.
 Running FreeBSD 7.0  | 
ICBM / Hurricane:   | Never before has a TLA been so appropriately
   30.44406N 86.59909W  |  mis-parsed. (alt.sysadmin.recovery)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: example of MergeCursor.

2011-08-07 Thread Andrei
help me, please

On Aug 7, 3:46 pm, Andrei entre...@gmail.com wrote:
 My code don't work (
   mergeCursor = new MergeCursor(mCursors);
                 assertEquals(mCursors[0].getCount() +
 mCursors[1].getCount(),
                         mergeCursor.getCount());

 On Aug 7, 11:31 am, Andrei entre...@gmail.com wrote:







  Good afternoon.
  Please give an example of MergeCursor.
  I have 3 cursor: A, B, K
  How to join?
  I wrote
    MergeCursor mergeCursor = new MergeCursor (mCursors);
  What's next?

  Ps this example is seen (http://www.java2s.com/Open-Source/Android/
  android-core/platform-cts/android/database/cts/
  MergeCursorTest.java.htm)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to look and understand @ each of the Test Case in CTS : Please suggest

2011-08-07 Thread gsaipraneeth


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] All apps + developer suddenly disappears from devices

2011-08-07 Thread Raghav Sood
Hi,

I have 11 apps in the android market. Quite suddenly none of them can be
found on my friends Dell XCD 35. The web version of the market states that
it is incompatible. There is nothing in any of the apps that would cause
them to be incompatible. Market bugs once more?

Thanks

-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Intent

2011-08-07 Thread jaggu
Hi
where i need tel: in my code


Thanks
Jagadeesh

On Mon, Aug 8, 2011 at 3:08 AM, nadam a...@anyro.se wrote:

 Check logcat to find the reason for force close. I think you need to
 add tel: in front of the phone number.

 On 6 Aug, 07:37, jagadeesh mjagadeeshb...@gmail.com wrote:
  Hi see the below code:
 
  Intent myintent=new Intent(Intent.ACTION_DIAL,Uri.parse(100));
 
  startActivity(myintent);
 
  I want to call one no from my intent itself but iam getting like
 forceclose
  wait code
 
  Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: question about other markets

2011-08-07 Thread William Ferguson
I'd second TreKing's suggestion to use a separate bug reporting
mechanism.

ACRA handles the reporting mechanism well.
And you can have it deliver the reports to BugSense which seems to do
an excellent job of collating them.

Wililam


On Aug 8, 1:17 pm, Jim Graham spooky1...@gmail.com wrote:
 On Sun, Aug 07, 2011 at 07:53:31PM -0700, Chrystian Vieyra wrote:
  I think the only other big market is amazon app store. I am not a big fan of
  amazon app store, as amazon gets to set the app price

 Ok, then ... three questions:

    1) do I get to set a minimum price?
    2) how much of [price] do they take?
    3) do they have a sign-up fee and/or per-listing fee (as I've heard
       Apple does---I read a comment that they charge $100/app uploaded
       to their market...don't know if it's true or not)?

 I'm sitting here looking at a Market that has failed to list Bouncing
 Buckies in the new apps list, and [GASP! SURPRISE] only one (known)
 paid install...and that one probably came from my listing in the
 Android Forums new app announcements page  I made some changes to
 all of the pages for it today (added a YouTube video), but still have
 yet to see anything ... but, because of a known bug, there could be
 another one, or another hundred or more, or . who knows, and from
 what the bug listing says, it might be a while before I know about any
 of them (if any exist).  I'm getting really, really frustrated.  I don't
 even know whether I should work on and release another one, or wait
 I have the ideas, but.  (sorry...I'll stop the frustrated rant now)

 So I'm seriously considering additional listings on other markets

 Thanks,
    --jim

 --
 73 DE N5IAL (/4)            MiSTie #49997       Running FreeBSD 7.0 
 spooky1...@gmail.com                    ICBM/Hurr.: 30.44406N 86.59909W

                My policy on spammers:
                   Castrate first, ask questions later.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: How to place two buttons side by side at the bottom of the android emulator to get the appropriate shape displayed by clicking on the appropriate buttons

2011-08-07 Thread Ratheesh Valamchuzhy
hi

I didn't get your points correctly ...  i hope you install android correctly
and made the setup ,
do the following

Create a new android project and copy the code
make the xml file corresponding to the resources
and try to run


check  the following

The sources of the Android API are  included in the SDK download

Check your eclipse build path if the folder, that contains you source code
is really on the defined build path.
thanks
Ratheesh

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: map does not displaying in device

2011-08-07 Thread Ratheesh Valamchuzhy
hi TONEZ
thanks for the guidence
Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] http connection to display a webpage

2011-08-07 Thread Ratheesh Valamchuzhy
Hi Arun

While sending an http request we cant get (display the webpage)  we get a
response such as xml or json , we need to parse the response and retrive th
edata as needed.   if u want to display the we page u can use webview.

thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Current location in android

2011-08-07 Thread Ratheesh Valamchuzhy
Hi All

i want to display  the map in my android application and find the current
location(place name) to display or mark in the map, i tried some sample most
of them just viewing  the map in app, not displaying the current place.

plse help me

-- 
-- 
ωιтн яєgαя∂ѕ
Ratheesh **...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: images overlay on layout

2011-08-07 Thread Dinko Chong
I don't know for what purpose you are using FrameLayout

but RelativeLayout is terific



you just need to define how your ImageButton layout to his parent ,
the later Item in XML file will cover the former one .


for example :
LinerLayout 
   textView /
   Button /
LinerLayout /


if the 2 items have some public area , the Button will on the top

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Intent

2011-08-07 Thread jaggu
Hi nadam
Thanks
its working fyn


On Mon, Aug 8, 2011 at 3:08 AM, nadam a...@anyro.se wrote:

 Check logcat to find the reason for force close. I think you need to
 add tel: in front of the phone number.

 On 6 Aug, 07:37, jagadeesh mjagadeeshb...@gmail.com wrote:
  Hi see the below code:
 
  Intent myintent=new Intent(Intent.ACTION_DIAL,Uri.parse(100));
 
  startActivity(myintent);
 
  I want to call one no from my intent itself but iam getting like
 forceclose
  wait code
 
  Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en