[android-developers] Re: Nexus one

2010-03-27 Thread JP

Uhmm nope, that title actually goes to the Nokia 6310i.

On Mar 26, 2:05 pm, Ken H hunt1...@gmail.com wrote:
 The greatest phone ever.

 On Mar 26, 11:20 am, ernie ernest...@gmail.com wrote:

  Just got the Nexus One via FedEx, in Southern California. Thank you
  Google.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread Bob Kerns
TypePad failed to save, leaving me with a draft from 11 hours earlier.
I gritted my teeth and recreated it.

I hope it's not less coherent as a result, but probably.

On Mar 26, 10:22 pm, Kevin Duffey andjar...@gmail.com wrote:
 Good stuff Bob.. hurry up with your blog.. its empty right now. ;)

 I am happy to hear that at lest someone from google has acknowledged that it
 is perfectly fine to do in-app virtual goods, etc. I plan to roll that
 ability into my service soon as I figure out how to handle paypal, credit
 cards and google checkout.



 On Fri, Mar 26, 2010 at 10:10 PM, Bob Kerns r...@acm.org wrote:
  My experience was, I published it, went to my device, located it, and
  downloaded it.

  But I don't know if they have a distributed infrastructure that may
  impose delays before it reaches everyone. I've noticed that it can
  take a while for comments I posted from the Market app to actually
  appear.

  I maintain a comment to (1) try to direct people to contact me for
  assistance rather than post problems -- HAH! and (2) mark in the
  comments where any earlier comments are for earlier versions. So I was
  a bit concerned at first, but my updated comment did show up in the
  right place after a while.

  My comment says:
  Please send any support reuests or problem reports to us at android-
  supp...@sfsmart.com. We aim to give fast, quality support. NEWLY
  UPDATED! 1.0.296
  (And I'll increment the version number every time I repost the
  comment).

  I'm hoping this will help.

  Of course, this means I absolutely cannot reply via the comments, at
  least not without another phone or account and a lot of hassle.

  More on my thoughts and impressions at
 http://bobkerns.typepad.com/bob_kerns_thinking/2010/03/meet-the-users...
  in a few minutes (I'm having a bad case of Chrome vs TypePad...)

  On Mar 26, 9:26 pm, Kevin Duffey andjar...@gmail.com wrote:
   Its within a day usually faster most of the time from what I have read

  --
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread Bob Kerns
Thanks. But it slipped my mind as I was writing it that immediately
deleting the new app is going to be a loser, because it'll refund your
payment.

You'll have to arrange to do that at another time. Or not, and live
with the clutter. Or simply use your .apk as the storage for your
characters. That may actually be reasonably space-efficient, unless
the character data is pretty small.

It's not an issue for free/paid, because it's the older, free one
that's being deleted in that case.

But perhaps some components of my idea may be useful, or the code
snippets.

A really BAD idea would be to use the AlarmManager to initiate the
deletion sequence. In fact, MOST uses of the AlarmManager to launch UI
are bad, but this would be particularly evil.

I'd do well as a prank app author, if I didn't have a conscience!

On Mar 26, 8:43 am, chris harper ch393...@gmail.com wrote:
 We are probably in the running for the most active thread now but that’s
 great because

 this is an important issue that needs to be addressed.

 Bob – Thank you. Your solution is a pretty thought out solution. I admit I
 had to print it out and re-read it a few times. I might have a few questions
 coming your way because I think I like what you are doing. Give me a little
 more time to make sure I understand what you are doing.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: stuck in OnTouchEvent OnClikc method. please help

2010-03-27 Thread satish bhoyar
Guys pls help ...

On Fri, Mar 26, 2010 at 5:02 PM, satish bhoyar getsatonl...@gmail.comwrote:

 Hi all,

 Hi all,
 I am stuck in a situation,where  I have onClick() method  onTouchEvent()
 method. The situation is the my onTouchEvent() is handling the fling
 gestures (like left,right), after each fling i am changing the Layout 
 presenting new one for the user. On each layout i have some buttons  they
 have the onClick() set.

 Now when i do the gesture nothing happens  sometimes the onClick gets
 called.

 how i can make these two methods to work correctly?

 please help


 tahnks,
 sat



-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Timer / threads / reliability

2010-03-27 Thread Neilz
Ok, reviving an older thread.

Is there a way, to have View elements (TextView, Button, whatever)
that are not run on the main UI thread?

What about if I set up a game thread, with its own View (like in the
LunarLander sample, for instance) and then create View elements on the
fly and attach them to the main View? Are these still going to be run
in the main UI thread, or in the game thread?

Thanks.

On Mar 4, 4:20 pm, Mark Murphy mmur...@commonsware.com wrote:
 Neilzwrote:
  Hi all. I have an activity that uses a Timer (java.util.Timer) to
  control the display. I set it off to repeat its run() method every
  second or so. When it runs, it updates some View elements.

  As Timer runs in its own thread, I assumed this would be reliable. But
  I notice that sometimes there is a stutter, or delay, in the views
  updating. It's like they occasionally get stacked up, and all happen
  together. Studying the output from logcat, I notice that this happens
  when the device is doing something else - some system functions, or
  sometimes a garbage collection.

  How can I avoid this?

 You can't.

  I'm not aware I can run the main activity in a
  thread of its own, can I? If the timer has its own thread, why is it
  affected?

 Because the UI is drawn on the main application thread.

 Whenever you make a change to the UI -- such as calling setText() on a
 TextView -- think of it as putting a message on a message queue that is
 processed in a message loop by the main application thread.

 All your Timer is doing is triggering some messages to go into that
 queue on a periodic basis. How quickly those messages will be popped off
 the queue and processed depends on what else is in the queue, how much
 time those other things in the queue take (including time in your
 activity and listener callback methods), what else is being done in
 threads in your application, and what else is being done in other
 processes on the device.

 You can simplify your current implementation by dumping the Timer and
 using postDelayed() to trigger your updates, for what that's worth.

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

 Android App Developer Training:http://commonsware.com/training

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: cannot install radio update

2010-03-27 Thread Nate
Maybe there is somewhere else I can ask?


On Mar 25, 12:57 am, Nate nathan.sw...@gmail.com wrote:
 No one can offer any suggestions?

 On Mar 24, 12:32 am, Nate nathan.sw...@gmail.com wrote:

  I have a G1 Dev Phone. I am unable to install the 1.6 radio update
  from this page:http://developer.htc.com/adp.html
  The file name is:
  ota-radio-2_22_19_26I.zip
  I push it to the phone as update.zip, do a shell sync, wait 5 minutes,
  reboot into recovery mode, press alt+L, then alt+S. I get:

  -- Install from sdcard...
  Finding update package...
  Opening update package...
  Verifying update package...
  Installing update...
  Installation aborted.

  While it says Verifying update package... a progress bar slowly
  grows in the background. When it gets to about 50%, the next 2
  messages appear and then I'm back to the system recovery menu.

  Why are there no error message? What am I supposed to do now?

  I have tried a factory reset. I have tried redownloading the package
  and doing all the steps again. My phone still works, but I no longer
  get 2G (I'm on an ATT carrier with a SIM from an iPhone, so I have
  never gotten 3G). WIFI and making/receiving calls still works, just no
  2G (which is extremely frustrating).

  I have Googled my eyes and fingertips off. Others are having this
  problem, some exactly the same symptoms, some with error messages. No
  one has had any solutions. I can't imagine I broke my phone by
  following the standard instructions. I want my 2G back!

  I'm already pissed that I paid extra for a Dev Phone when a regular
  phone would have been fine for me. I'll accept that as being my fault
  for lack of research, but I certainly wasn't told that I can't
  download paid apps with a Dev Phone. On top of that, now my phone is
  apparently broken and I have no one to turn to because it is a Dev
  Phone!



-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Intent to bring up top-most activity in task?

2010-03-27 Thread westmeadboy
Thanks Dianne. What about if your app has multiple potential Root
Activities and so you cannot be sure (from the Notification) which one
it is?

On Mar 27, 2:26 am, Dianne Hackborn hack...@android.com wrote:
 You use the same intent that original started the task.  Tasks started from
 launcher are ACTION_MAIN, CATEGORY_LAUNCHER, with the component being the
 explicit component corresponding to the icon it has shown.

 You can use adb shell dumpsys activity to see details on the intents used
 to launch each acitivity and task.

 On Fri, Mar 26, 2010 at 4:30 PM, westmeadboy westmead...@yahoo.co.ukwrote:





  If my app is already running, then either Activity1 or Activity2 might
  be currently on top.

  How to construct an Intent so that it will simply show whichever
  Activity is already on top (in the task)? Just like if you touch an
  icon in the Recent list (long-press home).

  At the moment, it looks like (for explicit Intents) you need to be
  explicit about the Activity to launch. But I would rather be explicit
  about the app (package name).

  FWIW, I'm thinking of Intents triggered via Notifications.

  --
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Timer / threads / reliability

2010-03-27 Thread Mark Murphy
Neilz wrote:
 Is there a way, to have View elements (TextView, Button, whatever)
 that are not run on the main UI thread?

No.

 What about if I set up a game thread, with its own View (like in the
 LunarLander sample, for instance) and then create View elements on the
 fly and attach them to the main View? Are these still going to be run
 in the main UI thread, or in the game thread?

Neither. Your application will crash.

You cannot modify the widget-based UI from a background thread.

Now, I cannot speak for 2D (Canvas) or 3D (OpenGL) apps and what their
limitations are vis a vis threads. I am only talking about using Views.

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

_Android Programming Tutorials_ 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Can an app upgrade itself?

2010-03-27 Thread A R
Hello Everyone,

 Is it possible for an app to upgrade itself?

 I am trying it but it doesnt seem to work. My app downloads its
upgrade, starts the upgrade/installation process which finishes
successfully but when I start the app its still the old one.

 When I installed my app normally I was seeing  Not granting
permission android.permission.INSTALL_PACKAGES to package package
name  in logs.

 So based on another thread
http://groups.google.com/group/android-developers/browse_thread/thread/23a94989d964d7fd
I installed the app in /system/app folder so now there is no error
message but result is still same.

 Do I need a separate installer app to upgrade my app?

Kindly advice.

Regards,
Amit.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Gallery android:unselectedAlpha works strangely

2010-03-27 Thread arnouf
Hi all,

I work with a gallery and a BaseAdapter.
In my XML file I specified, on my gallery, android:unselectedAlpha.
When I select an item (using click or pad) image are moved but they
take the alpha defined for (normally) the unselected image.

Do you have any idea ?

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: No Network Connectivity in Service/AlarmManager Process.

2010-03-27 Thread AuxOne
I'm starting the AlarmManager from a BOOT_RECEIVED broadcast and it
works like a charm. I've noticed, however, that it requires a restart
to take effect because it's triggered from a broadcast. In light of
this I also start the AlarmManager from the onCreate() of my activity
so that the user doesn't have to restart their phones, in this case it
doesn't really work.

I've read that Alarms/Services set from the Activity are destroyed
when the Activity is. Is there some way around this? Perhaps have the
Activity bounce a Broadcast off something such that the Service is not
directly created from the Activity and thus doesn't get destroyed?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: No Network Connectivity in Service/AlarmManager Process.

2010-03-27 Thread Mark Murphy
AuxOne wrote:
 I've read that Alarms/Services set from the Activity are destroyed
 when the Activity is.

I don't know where you have seen that, but I am not aware of such a
limitation. Got a link?

The only times I know of when alarms get nuked are:

-- on a reboot, all alarms go poof!

-- if the user has a so-called task killer app and kills your app that
way, your alarms go poof! (though alarms from other un-killed apps
remain in place)

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

Android Training in US: 14-18 June 2010: http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: No Network Connectivity in Service/AlarmManager Process.

2010-03-27 Thread AuxOne
It just occurred to me that if I create it from a static context it
shouldn't really die with the Activity. That's what I used to be
doing, but later I switched it to an instantiated class. I'll see what
happens.

On Mar 27, 9:12 am, AuxOne tyler.thack...@gmail.com wrote:
 I'm starting the AlarmManager from a BOOT_RECEIVED broadcast and it
 works like a charm. I've noticed, however, that it requires a restart
 to take effect because it's triggered from a broadcast. In light of
 this I also start the AlarmManager from the onCreate() of my activity
 so that the user doesn't have to restart their phones, in this case it
 doesn't really work.

 I've read that Alarms/Services set from the Activity are destroyed
 when the Activity is. Is there some way around this? Perhaps have the
 Activity bounce a Broadcast off something such that the Service is not
 directly created from the Activity and thus doesn't get destroyed?

 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: No Network Connectivity in Service/AlarmManager Process.

2010-03-27 Thread Mark Murphy
AuxOne wrote:
 It just occurred to me that if I create it from a static context it
 shouldn't really die with the Activity.

AFAIK, AlarmManager alarms are not dependent upon the particular
component that created them.

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

_The Busy Coder's Guide to Android Development_ Version 3.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: No Network Connectivity in Service/AlarmManager Process.

2010-03-27 Thread AuxOne
Then maybe it's the Service that is dependent? All I know is it works
after reboot, but not after immediately installing (and starting Alarm
from Activity). It's a 1 hour+ timer.

On Mar 27, 9:18 am, Mark Murphy mmur...@commonsware.com wrote:
 AuxOne wrote:
  It just occurred to me that if I create it from a static context it
  shouldn't really die with the Activity.

 AFAIK, AlarmManager alarms are not dependent upon the particular
 component that created them.

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

 _The Busy Coder's Guide to Android Development_ Version 3.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: No Network Connectivity in Service/AlarmManager Process.

2010-03-27 Thread Mark Murphy
AuxOne wrote:
 Then maybe it's the Service that is dependent? All I know is it works
 after reboot, but not after immediately installing (and starting Alarm
 from Activity). It's a 1 hour+ timer.

Like I said, I am not aware of any such limitation. As I wrote, the only
times I know of when alarms get nuked are:

-- on a reboot, all alarms go poof!

-- if the user has a so-called task killer app and kills your app that
way, your alarms go poof! (though alarms from other un-killed apps
remain in place)

Conversely, there are places in Android itself where AlarmManager is
used from an Activity -- alarm clock and calendar, to name two.

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

_The Busy Coder's Guide to Android Development_ Version 3.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] create TextView

2010-03-27 Thread rubeN_vl
Hi,

i'm trying to create a new TextView when a button is clicked.
TextView b = new TextView(this); isnt working cause 'this' refers to
new View.onClickListener.
Been searchin for hours, cant find a 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] ListView scrolls very very slow

2010-03-27 Thread jw
Hi all,

I'm kind of to android development. I'm creating an app containing
several activities, and one of them is an ListActivity. Each row
contains a ImageView (thumbnail) and two TextViews.

When the ListActivity is loaded everything looks fine, but when I
start to scroll it scrolls very slow. I've read some posts and threads
about this, and from what I understand the problem could be that the
UI thread is getting locked up when the getView() method is called in
my adapter class (extends ArrayAdapter).

The getView() is doing some, in this case, heavy processes. It looks
like this

@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null) {
LayoutInflater vi =
(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.row_item, null);
}
Item i = items.get(position);
if (i != null) {
name = (TextView) v.findViewById(R.id.item_name);
timeLeft = (TextView) v.findViewById(R.id.item_time_left);
thumb = (ImageView) v.findViewById(R.id.item_thumb);

name.setText(i.getShortDescription());
timeLeft.setText(Utils.getTimeLeft(i.getEndDate()));
try {

thumb.setImageBitmap(Utils.getBitmap(i.getThumbNailLink()));
} catch(Exception e){};
}
return v;
}

I've tried to speed up the getView() by using an DrawableManager class
that I found in this thread
http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview...
This gets the image (from url) in a seperate thread and handle some
simple cache for the images (HashMap). If I only add the image to the
row in the ListView it's pretty fast, especially due to the caching
done i DrawableManager. But when I fill the two TextViews with text it
still gets very slow. So that didn't help me out. (I also tried to
cache and handle the TextField values in the DrawableManager, but that
didn't help either.)

Do you guys have a good solution for me?

Thanks in advance

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread chris harper
I am sure they will but I wouldn't hold my breath on WHEN. There was a
lengthy thread going about two weeks ago on here about improving the market.
I just skimmed it to follow along but they wanted to do a petition and
everything. I am not sure what happened to that. I would bet money that
google IS working on it. How could they not? Android is googles big thing
right now. But my thoughts are watching how long it's taken for Eclair 2.1
to come out I wouldn't count on  the Market being improved anytime quickly
which is why when a few people suggested that I hold off on doing my app
installs idea until they improve the market well... I don't really want to
wait til 2012 to put my app out.

;-)
-Chris

On Fri, Mar 26, 2010 at 11:10 PM, Kevin Duffey andjar...@gmail.com wrote:

 I believe most apps are available within a few hours to a day at most..
 from what I've read anyway. Not 100% sure tho. I am a little bummed that
 google hasn't made any attempt to better the market app. There is sooo much
 I would do to improve it. It could be far better than the iPhone market app.
 I wonder if they have a forum to post on things like the built-in apps... or
 if we can gain source code to it and mess with it, test it and offer changes
 to them.


 On Fri, Mar 26, 2010 at 8:40 PM, chris harper ch393...@gmail.com wrote:

 That is a great idea and out of the box (which is good) building a .apk
 dynamically.

 The Market place does not yet have the ability to search per app (which I
 agree if add on's start to come more common that will be needed). The way I
 am planning on getting around that (hopefully temporarily) is that within my
 app I still plan to open a page to my website where all my characters are
 and they can select them from there.  Once they select a character it then
 links to the .apk within the market place for that character.

 I admit the downside is they can't select multiple characters for one
 check out which is where you idea would be ideal. But I think its the best I
 can currently do until the Market place changes.

 One question I do have though. I have yet to publish an app on the Market
 (this will be my first one).
 How long is the process take when you submit an app to when it is
 available on the market?
 I really don't know. For your idea that would probably be my first
 question and its not an issue with your idea but more an issue of the Market
 place. Is it immediately? Or does it take a few days?

 If it takes a few days you can see how it would make a user upset if they
 ordered something and they have to wait days to get it.

 If it is immediately than you might have given me an idea for version two
 of my app (if people like version one that is).

 I hope to get my first install app working with my main app by the end of
 the weekend to add/remove my characters.

 -Chris



 On Fri, Mar 26, 2010 at 7:33 PM, Kevin Duffey andjar...@gmail.comwrote:

 I have a sort of twist idea to the market problem... not sure this can be
 done, but I think it could be possible.

 Imagine you have an app that allows for virtual goods. You have dozens of
 goods for sale. Even better, you have an open-ended API that allows OTHER
 developers/users to create goods for your game/app and sell them. Yay..
 revenue streams are good.

 Now, many users will probably buy one good here, one good there... but
 often times, you'll have a lot of users who want to purchase several goods.
 We surely don't want to deter the multi-goods buyer. That's more money in
 our pocket. The problem with the way you're doing it Chris (not a problem as
 in bad..just for this example), is that they would have to search/find/buy
 individual downloads for each good they wanted.

 What if your users could build up a cart full of items they want, check
 out just once, and behind the scenes, your server side builds up a single
 .apk with those goods, put's it out on the market, then sends them an email
 link for them to access from their android device when its deployed to
 market. At that time, they can then purchase the whole pack at once, through
 the market, and then utilize what you are doing Chris, where your main app
 can make use of all the goods from that install, and if not refunded in 48
 hours... uninstall/delete the .apk off the device to avoid taking up room.

 Ok, I don't know that I would implement this, but I imagine it's got to
 be possible.

 On Fri, Mar 26, 2010 at 8:43 AM, chris harper ch393...@gmail.comwrote:

 We are probably in the running for the most active thread now but that’s
 great because

 this is an important issue that needs to be addressed.



 Bob – Thank you. Your solution is a pretty thought out solution. I admit
 I had to print it out and re-read it a few times. I might have a few
 questions coming your way because I think I like what you are doing. Give 
 me
 a little more time to make sure I understand what you are doing.



 String – Congrats on doing what many have failed to do. Get an answer
 

Re: [android-developers] create TextView

2010-03-27 Thread Adrian Vintu
Your code probably looks like this
AlertDialog a = builder.create();

a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
{
 public void onClick(DialogInterface dialog, int which)
 {
  TextView b = new TextView(this);

   ...
}

You need to create the TextView outside the scope of the OnClickListener.
The this has to point to Context, which is your Activity.

BR,
Adrian Vintu

http://adrianvintu.com


On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote:

 Hi,

 i'm trying to create a new TextView when a button is clicked.
 TextView b = new TextView(this); isnt working cause 'this' refers to
 new View.onClickListener.
 Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread chris harper
Yes I know. Warren brought that up. But the game changer was when I found
out that I can remove:

category android:name=android.intent.category.LAUNCHER /

from the manifet.xml which hides the new app's from the user (hides the
clutter) and also doesn't allow the user to start it them on their own.

So then I can just keep the new install apps behind the scenes and they
don't clutter the users drawer. So there is not as much of an importance to
delete them right away.

What I might do is run checks for the install apps after a safe time (like a
week). Then prompt the user and ask them if they want to clean them up (i.e
remove them) letting them know that removing them DOES NOT remove the
character. This way in the long run they don't have a bunch stacked up
behind the scenes that they don't know about.

I do plan to make the character apps as small as I can and put as much of
the logic in the main app as I can.

So many little details we have to deal with...
-Chris

On Sat, Mar 27, 2010 at 2:29 AM, Bob Kerns r...@acm.org wrote:

 Thanks. But it slipped my mind as I was writing it that immediately
 deleting the new app is going to be a loser, because it'll refund your
 payment.

 You'll have to arrange to do that at another time. Or not, and live
 with the clutter. Or simply use your .apk as the storage for your
 characters. That may actually be reasonably space-efficient, unless
 the character data is pretty small.

 It's not an issue for free/paid, because it's the older, free one
 that's being deleted in that case.

 But perhaps some components of my idea may be useful, or the code
 snippets.

 A really BAD idea would be to use the AlarmManager to initiate the
 deletion sequence. In fact, MOST uses of the AlarmManager to launch UI
 are bad, but this would be particularly evil.

 I'd do well as a prank app author, if I didn't have a conscience!

 On Mar 26, 8:43 am, chris harper ch393...@gmail.com wrote:
  We are probably in the running for the most active thread now but that’s
  great because
 
  this is an important issue that needs to be addressed.
 
  Bob – Thank you. Your solution is a pretty thought out solution. I admit
 I
  had to print it out and re-read it a few times. I might have a few
 questions
  coming your way because I think I like what you are doing. Give me a
 little
  more time to make sure I understand what you are doing.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: create TextView

2010-03-27 Thread rubeN_vl
Yeah, figured out that yet, if i do that it works if i push the button
1 time, the second time i push it the application just crashes.
Logcat gives me this error: You must call removeView() on the childs
parent first.
I need some way to 'flush' the textview.

On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
 Your code probably looks like this
 AlertDialog a = builder.create();

 a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
 {
  public void onClick(DialogInterface dialog, int which)
  {
   TextView b = new TextView(this);

    ...

 }

 You need to create the TextView outside the scope of the OnClickListener.
 The this has to point to Context, which is your Activity.

 BR,
 Adrian Vintu

 http://adrianvintu.com

 On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote:
  Hi,

  i'm trying to create a new TextView when a button is clicked.
  TextView b = new TextView(this); isnt working cause 'this' refers to
  new View.onClickListener.
  Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Filtered ListView with custom Adapter derived from ArrayAdapter is not updated

2010-03-27 Thread Thiago Diniz
Why do you want to put an edittext, listview already have an keystroke
filter.

I have a similar problem because my listview is not filtering, even
implementing the toString method os the class from my custom Adapter.
Ialso have a ListView with a custom Adapter that extends ArrayAdapter.
It's a ArrayAdapter of the Type User

On Mar 25, 9:45 am, Anton Pirker an...@ignaz.at wrote:
 Hi!

 Kumar Bibek wrote:
  What exactly are you trying to do? Can you please explain?

 What i am trying to do:

 I want to have a EditText and below my list with about 1200 Artistnames.
 If the user enters something in the EditText i want to filter the
 artists according to the entered text.

 So if the user enters sa only artists with a name that contains sa
 are displayed in the list. The list should be updated on every keystroke.

 I think this is a fairly common problem and i hav read a lot of solution
 on the internet, but it is just not working with my code (see below)
 According to my Log.d() Message the artists are filtered, but the list
 does not change, its not updated! Do you know whats wrong with my code?

 Thanks!
 Anton



  Thanks and Regards,
  Kumar Bibek

  On Mar 25, 3:17 pm, Anton Pirker an...@ignaz.at wrote:

  Hi!

  I have a ListView with a custom Adapter that extends ArrayAdapter. It's
  a ArrayAdapter of Type Artist. (There are about 1200 artists in my list)

  Artist is a very small class that has a name and an id. The Artist Class
  has toString() overridden to return just the name.

  I have an EditText. The EditText has an TextChangeListener where i call
  .getFilter().filter(chars, callback) on my adapter.

  In the Filter.Filterlistener().onComplete() callback i print the count
  and it looks really good. As i type the count decreases. So it seams
  everything works as advertised, but the List stays the same. I tried to
  call artistAdapter.notifyDataSetChanged() to force the list to redraw,
  but nothing happens. [see 2.)]

  I am tinkering around for days now! I am desperate.. Hopefully someone
  can have a look on my code and tell me what i am doing wrong! How can i
  force the list to be redrawn?

  Thanks!

  (I have posted this question also on 
  stackoverflow:http://stackoverflow.com/questions/2505800/filtered-listview-not-updated)

  Here is what i have done:

  1.) Defined a ListView and an EditText like this:

      EditText xmlns:android=http://schemas.android.com/apk/res/android;
          android:id=@+id/list_search_text
          android:layout_width=fill_parent
          android:layout_height=35dip
          android:layout_below=@id/header
      /EditText      
      ListView xmlns:android=http://schemas.android.com/apk/res/android;
          android:id=@+id/list_search
          android:layout_width=fill_parent
          android:layout_height=fill_parent
      /ListView

  2.) Setup my ListView in the Activities onCreate():

      private ListView listView = null;
      private ArtistAdapter artistAdapter = null;

      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.search_artists);

          artistAdapter = new ArtistAdapter(this, R.layout.row, list); //
  'list' is an ArrayListArtist

          listView = (ListView) findViewById(R.id.list_search);
          listView.setAdapter(artistAdapter);
          listView.setFastScrollEnabled(true);
          listView.setTextFilterEnabled(true);

          listView.setOnItemClickListener(new OnItemClickListener() {
              public void onItemClick(AdapterView? av, View v, int
  position, long id) {
                  // do something
              }
          });

          EditText txtSearch = (EditText) 
  findViewById(R.id.list_search_text);
          txtSearch.addTextChangedListener(new TextWatcher() {
              public void afterTextChanged(Editable arg0) { }

              public void beforeTextChanged(CharSequence arg0, int arg1,
  int arg2, int arg3) { }

              public void onTextChanged(CharSequence chars, int start, int
  before, int count) {
                  artistAdapter.getFilter().filter(chars, new
  Filter.FilterListener() {
                      public void onFilterComplete(int count) {
                          Log.d(Config.LOG_TAG, filter complete! count: 
  + count);
                          artistAdapter.notifyDataSetChanged();
                      }
                  });
              }
          });
      }

  3.) This is my ArtistAdapter in short. I added an remove() and add() 
  method:

      public class ArtistAdapter extends ArrayAdapterArtist implements
  SectionIndexer {
          private ListArtist items;

          /* other stuff like overridden getView, getPositionForSection,
  getSectionForPosition and so on */

          @Override
          public void remove(Artist object) {
              super.remove(object);
              items.remove(object);
          }

          @Override
          

Re: [android-developers] Re: create TextView

2010-03-27 Thread Adrian Vintu
you should probably call removeView() :)) sorry, i could not help it :))

how about you just add the textview one time only?

or how about you just post your code?

BR,
Adrian Vintu

http://adrianvintu.com


On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote:

 Yeah, figured out that yet, if i do that it works if i push the button
 1 time, the second time i push it the application just crashes.
 Logcat gives me this error: You must call removeView() on the childs
 parent first.
 I need some way to 'flush' the textview.

 On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
  Your code probably looks like this
  AlertDialog a = builder.create();
 
  a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
  {
   public void onClick(DialogInterface dialog, int which)
   {
TextView b = new TextView(this);
 
 ...
 
  }
 
  You need to create the TextView outside the scope of the OnClickListener.
  The this has to point to Context, which is your Activity.
 
  BR,
  Adrian Vintu
 
  http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com
 wrote:
   Hi,
 
   i'm trying to create a new TextView when a button is clicked.
   TextView b = new TextView(this); isnt working cause 'this' refers to
   new View.onClickListener.
   Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
   To unsubscribe from this group, send email to android-developers+
   unsubscribegooglegroups.com or reply to this email with the words
 REMOVE
   ME as the subject.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] left scrollbar

2010-03-27 Thread emna zeddini
Hello,.
Is there a way to have a scrollbar on the left side?
Thanks in advance

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: create TextView

2010-03-27 Thread rubeN_vl
 checkboxrifle.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Patient p = (Patient) spinner.getSelectedItem();
Service s = new Service(RIFLE);
if (((CheckBox) v).isChecked()) {
p.addService(s,0);
DataAccess.registerService(p,s);
//TableRow tr = new TableRow(this);
//TextView b = new TextView(this);
//tr.removeView(b);
//TableLayout tl =
(TableLayout)findViewById(R.id.dynatabel);
//tl.removeView(tr);

// b.setText(Dynamic tekst);
// tr.addView(b);
//tl.addView(tr);
} else {
p.removeService(0);
DataAccess.unregisterService(p, s);
}
}
});

1st of all tx for ur time.
So, i want to do this, push a checkbox, get an object in a spinner,
add a row to a tabel. Uncheck the checkbox and the row gets removed.
If i create textview outside the scope, i can add 1 new row to the
table. Second time i check the checkbox i get the error described
previously.
The removeView() just removes the view, the application does not
crash, but no new rows are added. It just removes the previously
created View and creates a new one.
If i can create the textview inside the scope the prob would be fixed
i think, just need something else then the 'this' when creatin a new
one.

On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
 you should probably call removeView() :)) sorry, i could not help it :))

 how about you just add the textview one time only?

 or how about you just post your code?

 BR,
 Adrian Vintu

 http://adrianvintu.com

 On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com wrote:
  Yeah, figured out that yet, if i do that it works if i push the button
  1 time, the second time i push it the application just crashes.
  Logcat gives me this error: You must call removeView() on the childs
  parent first.
  I need some way to 'flush' the textview.

  On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
   Your code probably looks like this
   AlertDialog a = builder.create();

   a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
   {
    public void onClick(DialogInterface dialog, int which)
    {
     TextView b = new TextView(this);

      ...

   }

   You need to create the TextView outside the scope of the OnClickListener.
   The this has to point to Context, which is your Activity.

   BR,
   Adrian Vintu

  http://adrianvintu.com

   On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com
  wrote:
Hi,

i'm trying to create a new TextView when a button is clicked.
TextView b = new TextView(this); isnt working cause 'this' refers to
new View.onClickListener.
Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to android-developers+
unsubscribegooglegroups.com or reply to this email with the words
  REMOVE
ME as the subject.

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: create TextView

2010-03-27 Thread Adrian Vintu
It's my pleasure to help :)

I think an easy solution is to use view.setVisibility(View.GONE)

Does this work for you?

BR,
Adrian Vintu

http://adrianvintu.com


On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote:

  checkboxrifle.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Patient p = (Patient) spinner.getSelectedItem();
Service s = new Service(RIFLE);
if (((CheckBox) v).isChecked()) {
p.addService(s,0);
DataAccess.registerService(p,s);
//TableRow tr = new TableRow(this);
//TextView b = new TextView(this);
//tr.removeView(b);
//TableLayout tl =
 (TableLayout)findViewById(R.id.dynatabel);
//tl.removeView(tr);

// b.setText(Dynamic tekst);
// tr.addView(b);
//tl.addView(tr);
} else {
p.removeService(0);
DataAccess.unregisterService(p, s);
}
}
});

 1st of all tx for ur time.
 So, i want to do this, push a checkbox, get an object in a spinner,
 add a row to a tabel. Uncheck the checkbox and the row gets removed.
 If i create textview outside the scope, i can add 1 new row to the
 table. Second time i check the checkbox i get the error described
 previously.
 The removeView() just removes the view, the application does not
 crash, but no new rows are added. It just removes the previously
 created View and creates a new one.
 If i can create the textview inside the scope the prob would be fixed
 i think, just need something else then the 'this' when creatin a new
 one.

 On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
  you should probably call removeView() :)) sorry, i could not help it :))
 
  how about you just add the textview one time only?
 
  or how about you just post your code?
 
  BR,
  Adrian Vintu
 
  http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com
 wrote:
   Yeah, figured out that yet, if i do that it works if i push the button
   1 time, the second time i push it the application just crashes.
   Logcat gives me this error: You must call removeView() on the childs
   parent first.
   I need some way to 'flush' the textview.
 
   On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
Your code probably looks like this
AlertDialog a = builder.create();
 
a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
{
 public void onClick(DialogInterface dialog, int which)
 {
  TextView b = new TextView(this);
 
   ...
 
}
 
You need to create the TextView outside the scope of the
 OnClickListener.
The this has to point to Context, which is your Activity.
 
BR,
Adrian Vintu
 
   http://adrianvintu.com
 
On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com
   wrote:
 Hi,
 
 i'm trying to create a new TextView when a button is clicked.
 TextView b = new TextView(this); isnt working cause 'this' refers
 to
 new View.onClickListener.
 Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
 
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words
   REMOVE
 ME as the subject.
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
   To unsubscribe from this group, send email to android-developers+
   unsubscribegooglegroups.com or reply to this email with the words
 REMOVE
   ME as the subject.

 --
 You 

Re: [android-developers] Re: create TextView

2010-03-27 Thread Adrian Vintu
So toggle the visibility from GONE to VISIBLE. I think this would be a quick
solution :)

BR,
Adrian Vintu

http://adrianvintu.com


On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com wrote:

 It's my pleasure to help :)

 I think an easy solution is to use view.setVisibility(View.GONE)

 Does this work for you?


 BR,
 Adrian Vintu

 http://adrianvintu.com


 On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote:

  checkboxrifle.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Patient p = (Patient) spinner.getSelectedItem();
Service s = new Service(RIFLE);
if (((CheckBox) v).isChecked()) {
p.addService(s,0);
DataAccess.registerService(p,s);
//TableRow tr = new TableRow(this);
//TextView b = new TextView(this);
//tr.removeView(b);
//TableLayout tl =
 (TableLayout)findViewById(R.id.dynatabel);
//tl.removeView(tr);

// b.setText(Dynamic tekst);
// tr.addView(b);
//tl.addView(tr);
} else {
p.removeService(0);
DataAccess.unregisterService(p, s);
}
}
});

 1st of all tx for ur time.
 So, i want to do this, push a checkbox, get an object in a spinner,
 add a row to a tabel. Uncheck the checkbox and the row gets removed.
 If i create textview outside the scope, i can add 1 new row to the
 table. Second time i check the checkbox i get the error described
 previously.
 The removeView() just removes the view, the application does not
 crash, but no new rows are added. It just removes the previously
 created View and creates a new one.
 If i can create the textview inside the scope the prob would be fixed
 i think, just need something else then the 'this' when creatin a new
 one.

 On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
  you should probably call removeView() :)) sorry, i could not help it :))
 
  how about you just add the textview one time only?
 
  or how about you just post your code?
 
  BR,
  Adrian Vintu
 
  http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com
 wrote:
   Yeah, figured out that yet, if i do that it works if i push the button
   1 time, the second time i push it the application just crashes.
   Logcat gives me this error: You must call removeView() on the childs
   parent first.
   I need some way to 'flush' the textview.
 
   On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
Your code probably looks like this
AlertDialog a = builder.create();
 
a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
{
 public void onClick(DialogInterface dialog, int which)
 {
  TextView b = new TextView(this);
 
   ...
 
}
 
You need to create the TextView outside the scope of the
 OnClickListener.
The this has to point to Context, which is your Activity.
 
BR,
Adrian Vintu
 
   http://adrianvintu.com
 
On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com
   wrote:
 Hi,
 
 i'm trying to create a new TextView when a button is clicked.
 TextView b = new TextView(this); isnt working cause 'this' refers
 to
 new View.onClickListener.
 Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
 
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words
   REMOVE
 ME as the subject.
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  

Re: [android-developers] left scrollbar

2010-03-27 Thread Mark Murphy
emna zeddini wrote:
 Hello,.
 Is there a way to have a scrollbar on the left side?

Not with any of the built-in classes. Sorry!

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

Android App Developer Books: http://commonsware.com/books

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: create TextView

2010-03-27 Thread rubeN_vl
Same error,

how can such a simple thing be so difficult :D

if i create those outside the onclick scope, its like i can use them
only one time.
final TableRow tr = new TableRow(this);
final TextView b = new TextView(this);

On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote:
 So toggle the visibility from GONE to VISIBLE. I think this would be a quick
 solution :)

 BR,
 Adrian Vintu

 http://adrianvintu.com

 On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com wrote:
  It's my pleasure to help :)

  I think an easy solution is to use view.setVisibility(View.GONE)

  Does this work for you?

  BR,
  Adrian Vintu

 http://adrianvintu.com

  On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com wrote:

   checkboxrifle.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 Patient p = (Patient) spinner.getSelectedItem();
                 Service s = new Service(RIFLE);
                 if (((CheckBox) v).isChecked()) {
                         p.addService(s,0);
                         DataAccess.registerService(p,s);
                         //TableRow tr = new TableRow(this);
                     //TextView b = new TextView(this);
                         //tr.removeView(b);
                         //TableLayout tl =
  (TableLayout)findViewById(R.id.dynatabel);
                     //tl.removeView(tr);

                     // b.setText(Dynamic tekst);
                     // tr.addView(b);
                         //tl.addView(tr);
                 } else {
                     p.removeService(0);
                     DataAccess.unregisterService(p, s);
                 }
             }
         });

  1st of all tx for ur time.
  So, i want to do this, push a checkbox, get an object in a spinner,
  add a row to a tabel. Uncheck the checkbox and the row gets removed.
  If i create textview outside the scope, i can add 1 new row to the
  table. Second time i check the checkbox i get the error described
  previously.
  The removeView() just removes the view, the application does not
  crash, but no new rows are added. It just removes the previously
  created View and creates a new one.
  If i can create the textview inside the scope the prob would be fixed
  i think, just need something else then the 'this' when creatin a new
  one.

  On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
   you should probably call removeView() :)) sorry, i could not help it :))

   how about you just add the textview one time only?

   or how about you just post your code?

   BR,
   Adrian Vintu

  http://adrianvintu.com

   On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com
  wrote:
Yeah, figured out that yet, if i do that it works if i push the button
1 time, the second time i push it the application just crashes.
Logcat gives me this error: You must call removeView() on the childs
parent first.
I need some way to 'flush' the textview.

On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
 Your code probably looks like this
 AlertDialog a = builder.create();

 a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new OnClickListener()
 {
  public void onClick(DialogInterface dialog, int which)
  {
   TextView b = new TextView(this);

    ...

 }

 You need to create the TextView outside the scope of the
  OnClickListener.
 The this has to point to Context, which is your Activity.

 BR,
 Adrian Vintu

http://adrianvintu.com

 On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com
wrote:
  Hi,

  i'm trying to create a new TextView when a button is clicked.
  TextView b = new TextView(this); isnt working cause 'this' refers
  to
  new View.onClickListener.
  Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com

  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words
REMOVE
  ME as the subject.

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send 

Re: [android-developers] left scrollbar

2010-03-27 Thread emna zeddini
hello, I didn't understand what you meant.Is it impossible?

2010/3/27 Mark Murphy mmur...@commonsware.com

 emna zeddini wrote:
  Hello,.
  Is there a way to have a scrollbar on the left side?

 Not with any of the built-in classes. Sorry!

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

 Android App Developer Books: http://commonsware.com/books

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: create TextView

2010-03-27 Thread Adrian Vintu
A. create one time the container view then use setVisibility() to show or
hide it
or/and
B. you also have alert.getOwnerActivity() which gives you back the...
context :) you can then play around with it as you wish


On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com wrote:

 Same error,

 how can such a simple thing be so difficult :D

 if i create those outside the onclick scope, its like i can use them
 only one time.
 final TableRow tr = new TableRow(this);
 final TextView b = new TextView(this);

 On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote:
  So toggle the visibility from GONE to VISIBLE. I think this would be a
 quick
  solution :)
 
  BR,
  Adrian Vintu
 
  http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com
 wrote:
   It's my pleasure to help :)
 
   I think an easy solution is to use view.setVisibility(View.GONE)
 
   Does this work for you?
 
   BR,
   Adrian Vintu
 
  http://adrianvintu.com
 
   On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com
 wrote:
 
checkboxrifle.setOnClickListener(new View.OnClickListener() {
  public void onClick(View v) {
  Patient p = (Patient) spinner.getSelectedItem();
  Service s = new Service(RIFLE);
  if (((CheckBox) v).isChecked()) {
  p.addService(s,0);
  DataAccess.registerService(p,s);
  //TableRow tr = new TableRow(this);
  //TextView b = new TextView(this);
  //tr.removeView(b);
  //TableLayout tl =
   (TableLayout)findViewById(R.id.dynatabel);
  //tl.removeView(tr);
 
  // b.setText(Dynamic tekst);
  // tr.addView(b);
  //tl.addView(tr);
  } else {
  p.removeService(0);
  DataAccess.unregisterService(p, s);
  }
  }
  });
 
   1st of all tx for ur time.
   So, i want to do this, push a checkbox, get an object in a spinner,
   add a row to a tabel. Uncheck the checkbox and the row gets removed.
   If i create textview outside the scope, i can add 1 new row to the
   table. Second time i check the checkbox i get the error described
   previously.
   The removeView() just removes the view, the application does not
   crash, but no new rows are added. It just removes the previously
   created View and creates a new one.
   If i can create the textview inside the scope the prob would be fixed
   i think, just need something else then the 'this' when creatin a new
   one.
 
   On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
you should probably call removeView() :)) sorry, i could not help it
 :))
 
how about you just add the textview one time only?
 
or how about you just post your code?
 
BR,
Adrian Vintu
 
   http://adrianvintu.com
 
On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com
   wrote:
 Yeah, figured out that yet, if i do that it works if i push the
 button
 1 time, the second time i push it the application just crashes.
 Logcat gives me this error: You must call removeView() on the
 childs
 parent first.
 I need some way to 'flush' the textview.
 
 On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
  Your code probably looks like this
  AlertDialog a = builder.create();
 
  a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new
 OnClickListener()
  {
   public void onClick(DialogInterface dialog, int which)
   {
TextView b = new TextView(this);
 
 ...
 
  }
 
  You need to create the TextView outside the scope of the
   OnClickListener.
  The this has to point to Context, which is your Activity.
 
  BR,
  Adrian Vintu
 
 http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl 
 rvanluch...@hotmail.com
 wrote:
   Hi,
 
   i'm trying to create a new TextView when a button is clicked.
   TextView b = new TextView(this); isnt working cause 'this'
 refers
   to
   new View.onClickListener.
   Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
 
 

Re: [android-developers] Re: create TextView

2010-03-27 Thread Adrian Vintu
in the onClick you also have

v.getContext();
v.getParent();
v.getRootView();


On Sat, Mar 27, 2010 at 4:41 PM, Adrian Vintu adrianvi...@gmail.com wrote:

 A. create one time the container view then use setVisibility() to show or
 hide it
 or/and
 B. you also have alert.getOwnerActivity() which gives you back the...
 context :) you can then play around with it as you wish



 On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com wrote:

 Same error,

 how can such a simple thing be so difficult :D

 if i create those outside the onclick scope, its like i can use them
 only one time.
 final TableRow tr = new TableRow(this);
 final TextView b = new TextView(this);

 On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote:
  So toggle the visibility from GONE to VISIBLE. I think this would be a
 quick
  solution :)
 
  BR,
  Adrian Vintu
 
  http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com
 wrote:
   It's my pleasure to help :)
 
   I think an easy solution is to use view.setVisibility(View.GONE)
 
   Does this work for you?
 
   BR,
   Adrian Vintu
 
  http://adrianvintu.com
 
   On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com
 wrote:
 
checkboxrifle.setOnClickListener(new View.OnClickListener() {
  public void onClick(View v) {
  Patient p = (Patient) spinner.getSelectedItem();
  Service s = new Service(RIFLE);
  if (((CheckBox) v).isChecked()) {
  p.addService(s,0);
  DataAccess.registerService(p,s);
  //TableRow tr = new TableRow(this);
  //TextView b = new TextView(this);
  //tr.removeView(b);
  //TableLayout tl =
   (TableLayout)findViewById(R.id.dynatabel);
  //tl.removeView(tr);
 
  // b.setText(Dynamic tekst);
  // tr.addView(b);
  //tl.addView(tr);
  } else {
  p.removeService(0);
  DataAccess.unregisterService(p, s);
  }
  }
  });
 
   1st of all tx for ur time.
   So, i want to do this, push a checkbox, get an object in a spinner,
   add a row to a tabel. Uncheck the checkbox and the row gets removed.
   If i create textview outside the scope, i can add 1 new row to the
   table. Second time i check the checkbox i get the error described
   previously.
   The removeView() just removes the view, the application does not
   crash, but no new rows are added. It just removes the previously
   created View and creates a new one.
   If i can create the textview inside the scope the prob would be fixed
   i think, just need something else then the 'this' when creatin a new
   one.
 
   On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
you should probably call removeView() :)) sorry, i could not help
 it :))
 
how about you just add the textview one time only?
 
or how about you just post your code?
 
BR,
Adrian Vintu
 
   http://adrianvintu.com
 
On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com
 
   wrote:
 Yeah, figured out that yet, if i do that it works if i push the
 button
 1 time, the second time i push it the application just crashes.
 Logcat gives me this error: You must call removeView() on the
 childs
 parent first.
 I need some way to 'flush' the textview.
 
 On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
  Your code probably looks like this
  AlertDialog a = builder.create();
 
  a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new
 OnClickListener()
  {
   public void onClick(DialogInterface dialog, int which)
   {
TextView b = new TextView(this);
 
 ...
 
  }
 
  You need to create the TextView outside the scope of the
   OnClickListener.
  The this has to point to Context, which is your Activity.
 
  BR,
  Adrian Vintu
 
 http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl 
 rvanluch...@hotmail.com
 wrote:
   Hi,
 
   i'm trying to create a new TextView when a button is clicked.
   TextView b = new TextView(this); isnt working cause 'this'
 refers
   to
   new View.onClickListener.
   Been searchin for hours, cant find a 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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   

[android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Streets Of Boston
You can't 'automatically' upgrade your application. It always need
user approval.

When installing an APK, the user will be informed of the permissions
and he/she can decide to install or upgrade the application.

This is a good thing. If apps could automatically upgrade themselves,
without user consent/confirmation, that would be an enormous security
hole.


On Mar 27, 8:11 am, A R amit.r...@gmail.com wrote:
 Hello Everyone,

  Is it possible for an app to upgrade itself?

  I am trying it but it doesnt seem to work. My app downloads its
 upgrade, starts the upgrade/installation process which finishes
 successfully but when I start the app its still the old one.

  When I installed my app normally I was seeing  Not granting
 permission android.permission.INSTALL_PACKAGES to package package
 name  in logs.

  So based on another 
 threadhttp://groups.google.com/group/android-developers/browse_thread/threa...
 I installed the app in /system/app folder so now there is no error
 message but result is still same.

  Do I need a separate installer app to upgrade my app?

 Kindly advice.

 Regards,
 Amit.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: ListView scrolls very very slow

2010-03-27 Thread jw
I can add that I've also tried the ViewWrapper pattern without any
performance difference.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] popup menu on gmail

2010-03-27 Thread Eric
Hi,

I notice there is popup menu on gmail application once you click on
the left checkbox of each message item. If there is no message
checked, this menu would disappear.  What is that menu? How to
implement it?

Thanks,

-Eric

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] checkboxpreference

2010-03-27 Thread emna zeddini
Hello,
Could you tell me please if I can modify the checkbox preference in order to
inverse the direction from
left to right to right to left.
Best regards.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] left scrollbar

2010-03-27 Thread Mark Murphy
emna zeddini wrote:
 hello, I didn't understand what you meant.Is it impossible?

I mean that none of the built-in classes (e.g., ScrollView) offer
scrollbars on the left side.

You are welcome to examine the 2,400 lines of code that make up
ScrollView.java and HorizontalScrollView.java to see if you can figure
out how to make a ScrollViewWithScrollBarOnTheLeft.java to meet your needs.

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

_Android Programming Tutorials_ 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] checkboxpreference

2010-03-27 Thread Mark Murphy
emna zeddini wrote:
 Hello,
 Could you tell me please if I can modify the checkbox preference in
 order to inverse the direction from
 left to right to right to left.

You would need to write your own Preference subclass for this, perhaps
by cloning CheckBoxPreference and altering its implementation.

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

Android Training in US: 14-18 June 2010: http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: left scrollbar

2010-03-27 Thread skink


On Mar 27, 3:03 pm, Mark Murphy mmur...@commonsware.com wrote:
 emna zeddini wrote:
  hello, I didn't understand what you meant.Is it impossible?

 I mean that none of the built-in classes (e.g., ScrollView) offer
 scrollbars on the left side.

 You are welcome to examine the 2,400 lines of code that make up
 ScrollView.java and HorizontalScrollView.java to see if you can figure
 out how to make a ScrollViewWithScrollBarOnTheLeft.java to meet your needs.


i believe it is android.view.View that draws scrollbars

pskink

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: create TextView

2010-03-27 Thread rubeN_vl
the v.getContext() did it!!!
ty dude

On 27 mrt, 16:48, Adrian Vintu adrianvi...@gmail.com wrote:
 in the onClick you also have

 v.getContext();
 v.getParent();
 v.getRootView();

 On Sat, Mar 27, 2010 at 4:41 PM, Adrian Vintu adrianvi...@gmail.com wrote:
  A. create one time the container view then use setVisibility() to show or
  hide it
  or/and
  B. you also have alert.getOwnerActivity() which gives you back the...
  context :) you can then play around with it as you wish

  On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com wrote:

  Same error,

  how can such a simple thing be so difficult :D

  if i create those outside the onclick scope, its like i can use them
  only one time.
  final TableRow tr = new TableRow(this);
  final TextView b = new TextView(this);

  On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote:
   So toggle the visibility from GONE to VISIBLE. I think this would be a
  quick
   solution :)

   BR,
   Adrian Vintu

  http://adrianvintu.com

   On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu adrianvi...@gmail.com
  wrote:
It's my pleasure to help :)

I think an easy solution is to use view.setVisibility(View.GONE)

Does this work for you?

BR,
Adrian Vintu

   http://adrianvintu.com

On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl rvanluch...@hotmail.com
  wrote:

 checkboxrifle.setOnClickListener(new View.OnClickListener() {
           public void onClick(View v) {
               Patient p = (Patient) spinner.getSelectedItem();
               Service s = new Service(RIFLE);
               if (((CheckBox) v).isChecked()) {
                       p.addService(s,0);
                       DataAccess.registerService(p,s);
                       //TableRow tr = new TableRow(this);
                   //TextView b = new TextView(this);
                       //tr.removeView(b);
                       //TableLayout tl =
(TableLayout)findViewById(R.id.dynatabel);
                   //tl.removeView(tr);

                   // b.setText(Dynamic tekst);
                   // tr.addView(b);
                       //tl.addView(tr);
               } else {
                   p.removeService(0);
                   DataAccess.unregisterService(p, s);
               }
           }
       });

1st of all tx for ur time.
So, i want to do this, push a checkbox, get an object in a spinner,
add a row to a tabel. Uncheck the checkbox and the row gets removed.
If i create textview outside the scope, i can add 1 new row to the
table. Second time i check the checkbox i get the error described
previously.
The removeView() just removes the view, the application does not
crash, but no new rows are added. It just removes the previously
created View and creates a new one.
If i can create the textview inside the scope the prob would be fixed
i think, just need something else then the 'this' when creatin a new
one.

On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
 you should probably call removeView() :)) sorry, i could not help
  it :))

 how about you just add the textview one time only?

 or how about you just post your code?

 BR,
 Adrian Vintu

http://adrianvintu.com

 On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl rvanluch...@hotmail.com

wrote:
  Yeah, figured out that yet, if i do that it works if i push the
  button
  1 time, the second time i push it the application just crashes.
  Logcat gives me this error: You must call removeView() on the
  childs
  parent first.
  I need some way to 'flush' the textview.

  On 27 mrt, 15:44, Adrian Vintu adrianvi...@gmail.com wrote:
   Your code probably looks like this
   AlertDialog a = builder.create();

   a.setButton(AlertDialog.BUTTON_POSITIVE, Ok, new
  OnClickListener()
   {
    public void onClick(DialogInterface dialog, int which)
    {
     TextView b = new TextView(this);

      ...

   }

   You need to create the TextView outside the scope of the
OnClickListener.
   The this has to point to Context, which is your Activity.

   BR,
   Adrian Vintu

  http://adrianvintu.com

   On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl 
  rvanluch...@hotmail.com
  wrote:
Hi,

i'm trying to create a new TextView when a button is clicked.
TextView b = new TextView(this); isnt working cause 'this'
  refers
to
new View.onClickListener.
Been searchin for hours, cant find a 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

Re: [android-developers] Re: create TextView

2010-03-27 Thread Adrian Vintu
Np. There are many ways to get your desired behavior. I will post one of
them, just in case someone needs it. This is actually a toggle layout, so
it's a little bit more than what you asked.

cb.setOnClickListener(new OnClickListener()
{
TableLayouttl;


@Override
public void onClick(View v)
{
if (((CheckBox) v).isChecked())
{
if (tl == null)
{
Context c = v.getContext();

TableRow tr = new TableRow(c);
TextView b = new TextView(c);
tl = new TableLayout(c);
tl.removeView(tr);
b.setText(Dynamic test);
tr.addView(b);
tl.addView(tr);

LinearLayout parent = (LinearLayout) v.getParent();
parent.addView(tl);
}
}
else
{
LinearLayout parent = (LinearLayout) v.getParent();
parent.removeView(tl);
tl = null;
}
}
});


BR,
Adrian Vintu

http://adrianvintu.com



On Sat, Mar 27, 2010 at 5:00 PM, rubeN_vl rvanluch...@hotmail.com wrote:

 the v.getContext() did it!!!
 ty dude

 On 27 mrt, 16:48, Adrian Vintu adrianvi...@gmail.com wrote:
  in the onClick you also have
 
  v.getContext();
  v.getParent();
  v.getRootView();
 
  On Sat, Mar 27, 2010 at 4:41 PM, Adrian Vintu adrianvi...@gmail.com
 wrote:
   A. create one time the container view then use setVisibility() to show
 or
   hide it
   or/and
   B. you also have alert.getOwnerActivity() which gives you back the...
   context :) you can then play around with it as you wish
 
   On Sat, Mar 27, 2010 at 4:36 PM, rubeN_vl rvanluch...@hotmail.com
 wrote:
 
   Same error,
 
   how can such a simple thing be so difficult :D
 
   if i create those outside the onclick scope, its like i can use them
   only one time.
   final TableRow tr = new TableRow(this);
   final TextView b = new TextView(this);
 
   On 27 mrt, 16:16, Adrian Vintu adrianvi...@gmail.com wrote:
So toggle the visibility from GONE to VISIBLE. I think this would be
 a
   quick
solution :)
 
BR,
Adrian Vintu
 
   http://adrianvintu.com
 
On Sat, Mar 27, 2010 at 4:14 PM, Adrian Vintu 
 adrianvi...@gmail.com
   wrote:
 It's my pleasure to help :)
 
 I think an easy solution is to use view.setVisibility(View.GONE)
 
 Does this work for you?
 
 BR,
 Adrian Vintu
 
http://adrianvintu.com
 
 On Sat, Mar 27, 2010 at 4:10 PM, rubeN_vl 
 rvanluch...@hotmail.com
   wrote:
 
  checkboxrifle.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Patient p = (Patient) spinner.getSelectedItem();
Service s = new Service(RIFLE);
if (((CheckBox) v).isChecked()) {
p.addService(s,0);
DataAccess.registerService(p,s);
//TableRow tr = new TableRow(this);
//TextView b = new TextView(this);
//tr.removeView(b);
//TableLayout tl =
 (TableLayout)findViewById(R.id.dynatabel);
//tl.removeView(tr);
 
// b.setText(Dynamic tekst);
// tr.addView(b);
//tl.addView(tr);
} else {
p.removeService(0);
DataAccess.unregisterService(p, s);
}
}
});
 
 1st of all tx for ur time.
 So, i want to do this, push a checkbox, get an object in a
 spinner,
 add a row to a tabel. Uncheck the checkbox and the row gets
 removed.
 If i create textview outside the scope, i can add 1 new row to
 the
 table. Second time i check the checkbox i get the error described
 previously.
 The removeView() just removes the view, the application does not
 crash, but no new rows are added. It just removes the previously
 created View and creates a new one.
 If i can create the textview inside the scope the prob would be
 fixed
 i think, just need something else then the 'this' when creatin a
 new
 one.
 
 On 27 mrt, 15:58, Adrian Vintu adrianvi...@gmail.com wrote:
  you should probably call removeView() :)) sorry, i could not
 help
   it :))
 
  how about you just add the textview one time only?
 
  or how about you just post your code?
 
  BR,
  Adrian Vintu
 
 http://adrianvintu.com
 
  On Sat, Mar 27, 2010 at 3:52 PM, rubeN_vl 
 rvanluch...@hotmail.com
 
 wrote:
   Yeah, figured out that yet, if i do that it works if i push
 the
   

Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Greg Donald
Droid, Nashville TN.


-- 
Greg Donald
destiney.com | gregdonald.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread niko20
Damnit, got a DROID today in Madison WIum I already have a DROID.
I doubt anyone is ever gonna wanna trade a Nexus one for this..lol

-

On Mar 27, 11:21 am, Greg Donald gdon...@gmail.com wrote:
 Droid, Nashville TN.

 --
 Greg Donald
 destiney.com | gregdonald.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Tao
Droid, Bloomington, IN.

But, it automatically reboots with battery put in, COME ON.

Already sent email to android-market-seed...@google.com for
replacement.

Here are the symptons:

If I plugin the usb cable and boot the phone without battery, it works
perfectly.
If I put the battery back in and the usb cable, the phone starts for
about 2 minutes(I can see the droid
logo and locking screen) and then reboot automatically.

Any droid users around know what's happening here?

On Mar 27, 12:23 pm, niko20 nikolatesl...@yahoo.com wrote:
 Damnit, got a DROID today in Madison WIum I already have a DROID.
 I doubt anyone is ever gonna wanna trade a Nexus one for this..lol

 -

 On Mar 27, 11:21 am, Greg Donald gdon...@gmail.com wrote:

  Droid, Nashville TN.

  --
  Greg Donald
  destiney.com | gregdonald.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Modifying audio in real time

2010-03-27 Thread Gabriel Simões
After calling play you need to keep calling write so you can feed
AudioTrack´s internal buffer and keep the audio playing. Then, before
you call read you can process your stream the way you want.

About upsampling, downsamplig: it´s a tecnique for changing the
samplerate of a signal trying to modify it as little as possible. When
you downsample you lose information; when you upsample you interpolate
to try to figure out what the information would be since you dont have
it.

For example, if you have a stream sampled at 10khz and want to
downsample it to 5khz (which will play faster at your AudioTrack 10khz
object) you just need to use the even or odd samples, and discard the
rest.

Hope it helps,
Gabriel

On 26 mar, 08:57, Simone Russo simone.russ...@gmail.com wrote:
 Hi, thank you very much for your answer.
 The problem I have is that I got an audio stream, say 5 seconds long.
 I want the user to be able to change the volume and the playbackrate while
 the sound is being played.
 I'm able to modify those parameters before i call the play() method, but I
 need to change them
 while the stream is being played as well
 What do you mean by you can upsample/downsample your streams to get
 the desired efect?
 Thanks again
 Simone

 2010/3/26 Gabriel Simões gsim...@gmail.com



  Hello Simone.

  What problems have you been facing with AudioTrack?

  Besides the fact that you will need to handle all the overhead of time/
  streams controling everything should work fine with AudioTrack, even
  using the Emulator.

  For the volume change for example, try to each position of your audio
  streams for a float between 0.0f (no sound) and 1.0f (volume at 100%)
  and cast back to short before playing. Should give you the results you
  want.

  For the SampleRate, once AudioTrack is created you cannot change it´s
  samplerate value, but you can upsample/downsample your streams to get
  the desired efect.

  Hope it helps,
  Gabriel

  On 23 mar, 17:57, Simone simone.russ...@gmail.com wrote:
   Hi everyone, I'll try to explain briefly what I need to do.
   I need to load an audio resource and play it, but I also need to be
   able to modify some parameters (like the volume, or the playback rate)
   while the audio is being played.
   For example, I might want to play a 10 seconds audio stream, and
   change the volume only after 3 seconds.
   Is there a way to do it? I've been experimenting a little with
   AudioTrack without results.
   Thanks,
   Simone

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.- Ocultar texto das mensagens anteriores -

 - Mostrar texto das mensagens anteriores -

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How to handle imaged background and buttons on different size/proportion displays

2010-03-27 Thread Gabriel Simões
Hello,

Right now I´m working on the UI of my first app and I´d like it to
work on as many different devices as possible.
I´ve read on the net about Android´s rule not to resize bitmaps on
views (background, buttons, etc), is it true? Does android rescale
skinned views sizes the same way it resizes the default ones?
Also, if not, how can I handle the more than 5 display sizes using a
background image and skinned buttons and scrollers (horizontal bar)?

Thanks,
Gabriel

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Jonas Petersson

Hi Tao,

Tao wrote:

Droid, Bloomington, IN.
[...]
If I plugin the usb cable and boot the phone without battery, it works
perfectly.
If I put the battery back in and the usb cable, the phone starts for
about 2 minutes(I can see the droid
logo and locking screen) and then reboot automatically.

Any droid users around know what's happening here?


No droid, but I have the EU equivalent Milestone. It had some USB issues 
under 2.0, but most of them were cured with 2.0.1 - which one did your 
Droid come with? The remaining issues I experience are:


1) Occasionally (say after about a week of use) the it will fail to 
recognize the USB cabel, and hence no charge indicator etc. Reboot 
helps. I *THINK* this only ever happens after I've been debugging and 
unplugged the cable while still having the debugger connected. Possibly 
a bad habit, but I never had a problem doing that on the G1.


2) It also seems that my extended USB cable will often glitch (the sound 
indication makes it very obvious) - since it isn't the original I guess 
I can't complain, but again I never had this problem with any of the 
cables I used with the G1.


Best / Jonas

--
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Re: [android-developers] How to handle imaged background and buttons on different size/proportion displays

2010-03-27 Thread Mark Murphy
Gabriel Simões wrote:
 I´ve read on the net about Android´s rule not to resize bitmaps on
 views (background, buttons, etc), is it true?

I do not know what you are referring to here. Some bitmaps (e.g.,
nine-patch PNGs) are designed to be resized.

 Does android rescale
 skinned views sizes the same way it resizes the default ones?

What is a skinned view?

 Also, if not, how can I handle the more than 5 display sizes using a
 background image and skinned buttons and scrollers (horizontal bar)?

In some cases, you will need multiple images for different screen sizes
or densities. In some cases, you can use nine-patch PNGs for resizing.
In some cases, Android's built-in bitmap scaling will be adequate. In
some cases, you will want to switch to creating Drawable resources in
XML (e.g., define your gradients that way, rather than doing so in a
bitmap).

Here is the documentation on multiple screen sizes:

http://developer.android.com/guide/practices/screens_support.html

Here are several blog posts on the subject:

http://www.androidguys.com/2010/02/16/handling-multiple-screen-sizes-part/
http://www.androidguys.com/2010/02/18/handling-multiple-screen-sizes-part-2/
http://www.androidguys.com/2010/02/23/handling-multiple-screen-sizes-part-3/
http://www.androidguys.com/2010/03/01/handling-multiple-screen-sizes-part-4/
http://www.androidguys.com/2010/03/02/handling-multiple-screen-sizes-part-5/

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread Kevin Duffey
Got an idea for the deletion of add-on toons for you. Use a simple sqllite
db on the device... when your main app finds/installs a toon, log a little
date in the db (or some other way). Every time your main app starts up, just
scan for any rows.. if any are there, check the timestamps... if it's after
2 days (maybe 3 or 4 to be safe), uninstall the .apks at that time.

HOWEVER, something occurred to me. Programmatically uninstalling .apks
without the user knowing may not be advisable. Even tho the toon still works
in the app for them, I would suspect most users, if they wanted to delete it
(or otherwise look at stats on it), they would go thru the settings/manage
applications route, and if they can't find it they may wonder what happened.
Trying to explain to your end users that after a few days the .apk they
bought/downloaded/installed will be uninstalled to free up room, may be
too much text for a simple toon purchase/install. Maybe not.

Another thought..doubt it's possible.. and I still haven't paid for an app
on android yet so not entirely sure how this works. I thought you'd set up a
google checkout account.. being android and google and all. If that is the
case, then like you said, it's likely that a user will have an account
already.. or at least is more willing to submit their personal info setting
up a gogle checkout account over some in-game form you provide. Now, I don't
know how viable this is, but if the user already has a google checkout, is
there a way to obtain their checkout info... in-app/game, without requiring
them to fill anything out? This way, you could avoid the .apk market route,
you earn the extra .30 per toon, you host it, you keep stats on downloads,
which toons are more popular than others, etc. Tons of stuff you can control
from this aspect of it. If a user already set up a google checkout account,
how hard is it to utilize this in-app/game so that you can use it to charge
and then download in-app/game right away? If they haven't set up an account
to buy anything on market, they are going to have to fill in that info
anyway to buy anything. Actually.. come to think of it.. if you charge for
your main app..they already set it up. I would have thought the info would
be in some way available..not their private stuff, but the google checkout
info, so that you could utilize it somehow? I'll have to look into it more
as this is how I would do it.

Another thought..perhaps to get more virtual toon sales, give your game away
(if you aren't already), with 1 toon, and put your own little splash-screen
ads for other toons as the app loads up. This may interest users in
supporting your app and buying even more toons than if they already paid for
the app. Also, look at custom creation of toons/avatars.. for perhaps a $2
charge for example. Again, not at all clear on your app and it's ideas, but
just some food for thought on how you might make a little more from it.



On Sat, Mar 27, 2010 at 7:46 AM, chris harper ch393...@gmail.com wrote:

 Yes I know. Warren brought that up. But the game changer was when I found
 out that I can remove:

 category android:name=android.intent.category.LAUNCHER /

 from the manifet.xml which hides the new app's from the user (hides the
 clutter) and also doesn't allow the user to start it them on their own.

 So then I can just keep the new install apps behind the scenes and they
 don't clutter the users drawer. So there is not as much of an importance to
 delete them right away.

 What I might do is run checks for the install apps after a safe time (like
 a week). Then prompt the user and ask them if they want to clean them up
 (i.e remove them) letting them know that removing them DOES NOT remove the
 character. This way in the long run they don't have a bunch stacked up
 behind the scenes that they don't know about.

 I do plan to make the character apps as small as I can and put as much of
 the logic in the main app as I can.

 So many little details we have to deal with...
 -Chris


 On Sat, Mar 27, 2010 at 2:29 AM, Bob Kerns r...@acm.org wrote:

 Thanks. But it slipped my mind as I was writing it that immediately
 deleting the new app is going to be a loser, because it'll refund your
 payment.

 You'll have to arrange to do that at another time. Or not, and live
 with the clutter. Or simply use your .apk as the storage for your
 characters. That may actually be reasonably space-efficient, unless
 the character data is pretty small.

 It's not an issue for free/paid, because it's the older, free one
 that's being deleted in that case.

 But perhaps some components of my idea may be useful, or the code
 snippets.

 A really BAD idea would be to use the AlarmManager to initiate the
 deletion sequence. In fact, MOST uses of the AlarmManager to launch UI
 are bad, but this would be particularly evil.

 I'd do well as a prank app author, if I didn't have a conscience!

 On Mar 26, 8:43 am, chris harper ch393...@gmail.com wrote:
  We are probably in the 

Re: [android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread Kevin Duffey
Hmm.. just looked up google checkout.. turns out paypal and google checkout
charge .30 + 2.9%.. so you're still stuck losing 30% for a $1 fee.. actually
2.9% more. So what, .33 per toon. Still.. not a big deal if it's utilized..
making 67% or so is great, especially if more and more people buy virtual
goods.

On Sat, Mar 27, 2010 at 7:46 AM, chris harper ch393...@gmail.com wrote:

 Yes I know. Warren brought that up. But the game changer was when I found
 out that I can remove:

 category android:name=android.intent.category.LAUNCHER /

 from the manifet.xml which hides the new app's from the user (hides the
 clutter) and also doesn't allow the user to start it them on their own.

 So then I can just keep the new install apps behind the scenes and they
 don't clutter the users drawer. So there is not as much of an importance to
 delete them right away.

 What I might do is run checks for the install apps after a safe time (like
 a week). Then prompt the user and ask them if they want to clean them up
 (i.e remove them) letting them know that removing them DOES NOT remove the
 character. This way in the long run they don't have a bunch stacked up
 behind the scenes that they don't know about.

 I do plan to make the character apps as small as I can and put as much of
 the logic in the main app as I can.

 So many little details we have to deal with...
 -Chris


 On Sat, Mar 27, 2010 at 2:29 AM, Bob Kerns r...@acm.org wrote:

 Thanks. But it slipped my mind as I was writing it that immediately
 deleting the new app is going to be a loser, because it'll refund your
 payment.

 You'll have to arrange to do that at another time. Or not, and live
 with the clutter. Or simply use your .apk as the storage for your
 characters. That may actually be reasonably space-efficient, unless
 the character data is pretty small.

 It's not an issue for free/paid, because it's the older, free one
 that's being deleted in that case.

 But perhaps some components of my idea may be useful, or the code
 snippets.

 A really BAD idea would be to use the AlarmManager to initiate the
 deletion sequence. In fact, MOST uses of the AlarmManager to launch UI
 are bad, but this would be particularly evil.

 I'd do well as a prank app author, if I didn't have a conscience!

 On Mar 26, 8:43 am, chris harper ch393...@gmail.com wrote:
  We are probably in the running for the most active thread now but that’s
  great because
 
  this is an important issue that needs to be addressed.
 
  Bob – Thank you. Your solution is a pretty thought out solution. I admit
 I
  had to print it out and re-read it a few times. I might have a few
 questions
  coming your way because I think I like what you are doing. Give me a
 little
  more time to make sure I understand what you are doing.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Kevin Duffey
I am curious tho.. can your app download a .jar file and dynamically load it
and use the code in it? I would guess not, but not sure how Android
prevents? I am thinking along the lines of virtual goods. Not that virtual
goods have to be written code.. ideally they would be some sort of
description/rules/images, but I have been thinking of how you can download,
say plugins to a browser for example... is that even possible or does
Android's classloader hierarchy completely prevent this ability to
dynamically load classes from .jar files?


On Sat, Mar 27, 2010 at 8:50 AM, Streets Of Boston
flyingdutc...@gmail.comwrote:

 You can't 'automatically' upgrade your application. It always need
 user approval.

 When installing an APK, the user will be informed of the permissions
 and he/she can decide to install or upgrade the application.

 This is a good thing. If apps could automatically upgrade themselves,
 without user consent/confirmation, that would be an enormous security
 hole.


 On Mar 27, 8:11 am, A R amit.r...@gmail.com wrote:
  Hello Everyone,
 
   Is it possible for an app to upgrade itself?
 
   I am trying it but it doesnt seem to work. My app downloads its
  upgrade, starts the upgrade/installation process which finishes
  successfully but when I start the app its still the old one.
 
   When I installed my app normally I was seeing  Not granting
  permission android.permission.INSTALL_PACKAGES to package package
  name  in logs.
 
   So based on another threadhttp://
 groups.google.com/group/android-developers/browse_thread/threa...
  I installed the app in /system/app folder so now there is no error
  message but result is still same.
 
   Do I need a separate installer app to upgrade my app?
 
  Kindly advice.
 
  Regards,
  Amit.

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Mark Murphy
Kevin Duffey wrote:
 I am curious tho.. can your app download a .jar file and dynamically
 load it and use the code in it? I would guess not, but not sure how
 Android prevents? I am thinking along the lines of virtual goods. Not
 that virtual goods have to be written code.. ideally they would be some
 sort of description/rules/images, but I have been thinking of how you
 can download, say plugins to a browser for example... is that even
 possible or does Android's classloader hierarchy completely prevent this
 ability to dynamically load classes from .jar files?

See DexClassLoader.

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

Android Training in NYC: 1-2 May 2010: http://guruloft.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Timer / threads / reliability

2010-03-27 Thread Kevin Duffey
The stutter, from what I've picked up on other threads, is as Mark said, due
to various other tasks, apps, and more likely garbage collection kicking in
randomly. One thing that seems to be a common thread for most real-time
like UI updating games is to do some sort of time based setup. I forget the
details, but basically on each iteration, you figure out the current time,
subtract the last time that was stored, that tells you how much elapsed
time has passed. You use this value to adjust all your UI elements so that
rather than seeing a hiccup with the UI, they UI elements themselves speed
up at various times. Or..maybe speed up isn't the right word. But lets say
you have a UI element moving from left to right, 1 pixel per second. A GC
hits and causes a 3 second delay. Your UI element hasn't moved for 3
seconds. In the time based method, you would instead move the UI element 3
pixels so that it would be where it should be. The hiccup would still be
noticeable.. but at least your UI elements will be where they should be,
rather than lagging behind where they should be causing more problems.

There are some threads, and Robert Green and some others have info on here
on how to do it. I've yet to really figure out how to apply the difference
between two frames time stamps and apply it to the world-coordinate system
of a View, for example to make sure a UI element moves to the right
position.

If you are making a sort of game, one of the other important things to do is
do NO creation of objects in the loop. Do all pre-allocation of elements,
objects etc before your loop starts.. or between levels, etc. That makes
game levels generally small in size based on the very limited 16MB ram (or
is it 24MB) you can use for game + images + code... but at least if you can
avoid any sort of object allocation/deallocation during the loop, you can
put off the GC process longer. At least for your game. There was a thread
that was pretty deep on the issue of background services running that could
also trigger a GC and cause your game to hiccup.. and the general solution
to come of that was Google needs to make some sort of real-time game mode
so that games that we see on iPhone will be possible on Android. Right now
there seems to be no way to guarantee smooth real-time-ish games on Android.
Some do a very good job tho.


On Sat, Mar 27, 2010 at 4:00 AM, Mark Murphy mmur...@commonsware.comwrote:

 Neilz wrote:
  Is there a way, to have View elements (TextView, Button, whatever)
  that are not run on the main UI thread?

 No.

  What about if I set up a game thread, with its own View (like in the
  LunarLander sample, for instance) and then create View elements on the
  fly and attach them to the main View? Are these still going to be run
  in the main UI thread, or in the game thread?

 Neither. Your application will crash.

 You cannot modify the widget-based UI from a background thread.

 Now, I cannot speak for 2D (Canvas) or 3D (OpenGL) apps and what their
 limitations are vis a vis threads. I am only talking about using Views.

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

 _Android Programming Tutorials_ 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Tao
Hi Jonas,

Thanks for the tips.

I just went to a local Verizon store, they have confirmed for me that
the battery is dead.
I have sent emails to Google to see what they want me to do, quite
disappointing though.

On Mar 27, 1:31 pm, Jonas Petersson jonas.peters...@xms.se wrote:
 Hi Tao,

 Tao wrote:
  Droid, Bloomington, IN.
  [...]
  If I plugin the usb cable and boot the phone without battery, it works
  perfectly.
  If I put the battery back in and the usb cable, the phone starts for
  about 2 minutes(I can see the droid
  logo and locking screen) and then reboot automatically.

  Any droid users around know what's happening here?

 No droid, but I have the EU equivalent Milestone. It had some USB issues
 under 2.0, but most of them were cured with 2.0.1 - which one did your
 Droid come with? The remaining issues I experience are:

 1) Occasionally (say after about a week of use) the it will fail to
 recognize the USB cabel, and hence no charge indicator etc. Reboot
 helps. I *THINK* this only ever happens after I've been debugging and
 unplugged the cable while still having the debugger connected. Possibly
 a bad habit, but I never had a problem doing that on the G1.

 2) It also seems that my extended USB cable will often glitch (the sound
 indication makes it very obvious) - since it isn't the original I guess
 I can't complain, but again I never had this problem with any of the
 cables I used with the G1.

                         Best / Jonas

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Kubecz3k
Look over here:
http://sites.google.com/site/developermarketandroidgiveaway/faq
point 8: My phone was not working when I received it OR it stopped
working while under warranty. Can I request a replacement?
If you received a Droid, then please go to 
http://phones.verizonwireless.com/motorola/droid/.
(...)

On Mar 27, 8:00 pm, Tao grea...@gmail.com wrote:
 Hi Jonas,

 Thanks for the tips.

 I just went to a local Verizon store, they have confirmed for me that
 the battery is dead.
 I have sent emails to Google to see what they want me to do, quite
 disappointing though.

 On Mar 27, 1:31 pm, Jonas Petersson jonas.peters...@xms.se wrote:

  Hi Tao,

  Tao wrote:
   Droid, Bloomington, IN.
   [...]
   If I plugin the usb cable and boot the phone without battery, it works
   perfectly.
   If I put the battery back in and the usb cable, the phone starts for
   about 2 minutes(I can see the droid
   logo and locking screen) and then reboot automatically.

   Any droid users around know what's happening here?

  No droid, but I have the EU equivalent Milestone. It had some USB issues
  under 2.0, but most of them were cured with 2.0.1 - which one did your
  Droid come with? The remaining issues I experience are:

  1) Occasionally (say after about a week of use) the it will fail to
  recognize the USB cabel, and hence no charge indicator etc. Reboot
  helps. I *THINK* this only ever happens after I've been debugging and
  unplugged the cable while still having the debugger connected. Possibly
  a bad habit, but I never had a problem doing that on the G1.

  2) It also seems that my extended USB cable will often glitch (the sound
  indication makes it very obvious) - since it isn't the original I guess
  I can't complain, but again I never had this problem with any of the
  cables I used with the G1.

                          Best / Jonas

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Streets Of Boston
JARs can be downloaded (see Mark's post earlier), loaded by the class
loader and run.
However, i think that these JARs must oblige by the permissions given
to the APK that downloads and executes them.

On Mar 27, 2:46 pm, Kevin Duffey andjar...@gmail.com wrote:
 I am curious tho.. can your app download a .jar file and dynamically load it
 and use the code in it? I would guess not, but not sure how Android
 prevents? I am thinking along the lines of virtual goods. Not that virtual
 goods have to be written code.. ideally they would be some sort of
 description/rules/images, but I have been thinking of how you can download,
 say plugins to a browser for example... is that even possible or does
 Android's classloader hierarchy completely prevent this ability to
 dynamically load classes from .jar files?

 On Sat, Mar 27, 2010 at 8:50 AM, Streets Of Boston
 flyingdutc...@gmail.comwrote:



  You can't 'automatically' upgrade your application. It always need
  user approval.

  When installing an APK, the user will be informed of the permissions
  and he/she can decide to install or upgrade the application.

  This is a good thing. If apps could automatically upgrade themselves,
  without user consent/confirmation, that would be an enormous security
  hole.

  On Mar 27, 8:11 am, A R amit.r...@gmail.com wrote:
   Hello Everyone,

    Is it possible for an app to upgrade itself?

    I am trying it but it doesnt seem to work. My app downloads its
   upgrade, starts the upgrade/installation process which finishes
   successfully but when I start the app its still the old one.

    When I installed my app normally I was seeing  Not granting
   permission android.permission.INSTALL_PACKAGES to package package
   name  in logs.

    So based on another threadhttp://
  groups.google.com/group/android-developers/browse_thread/threa...
   I installed the app in /system/app folder so now there is no error
   message but result is still same.

    Do I need a separate installer app to upgrade my app?

   Kindly advice.

   Regards,
   Amit.

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.- Hide quoted text -

 - Show quoted text -

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Mark Murphy
Streets Of Boston wrote:
 However, i think that these JARs must oblige by the permissions given
 to the APK that downloads and executes them.

Agreed. AFAIK, permissions are applied to the application as a whole,
whether that is existing code, code loaded dynamically, or code created
directly on the device by butterflies.

http://xkcd.com/378/

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

_Beginning Android 2_ from Apress Now 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: ListView scrolls very very slow

2010-03-27 Thread Paul Turchenko
Well, it's obvious that these 2 methods are blocking your UI thread
which makes it starve:
1. i.getShortDescription()
2. Utils.getTimeLeft(i.getEndDate())

If you'd explain in more details what these methods do, perhaps there
could be come kind of solution to your problem.

On Mar 27, 5:52 pm, jw jwilner...@gmail.com wrote:
 I can add that I've also tried the ViewWrapper pattern without any
 performance difference.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How to upgrade my Android dev Phone 1 to 2.x release?

2010-03-27 Thread Joe
Is it possible to upgrade Android dev phone (the first version) to
latest release (either 2.0 or 2.1)?

I appreciate if you can point me right links.

Thanks
Joe

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread chris harper
We must be on the same wave length because I am ready doing what you just
explained. :-)

When in install app (I started calling them modules in my code) is download
I  check the db, if that character is there then it updates that character
in the DB if it is not then inserts the character info. It also inserts it's
time stamp and its package name. On start up for the MAIN app it will cycle
though the package names of the installed modules and if one is over a
week old from install it will ask the user if they wish to remove it (but
make it clear this will NOT uninstall the character if they do). If they
decline it will state that no more notifications will ask to remove it and
it will remain installed until the user deletes the character (which also
removes the module for that character at the same time). I will NEVER
uninstall a module without checking with the user.

Yep the main app is free and it will come with TWO characters because two
characters can be loaded at the same time and interact with each other which
I want the user to experience this to make getting additional characters
more appealing. In the app itself where the installed characters are I have
a little mini webview set up which I links to one of my webpages where I
plan to post new characters. So when they use the app even without going
to search for new ones they will know of any new characters that I just put.
If you want my code snippet I can send it to you.
i.e. my own banner I guess.

I agree the main thing about going though Market place is that it has the
highest chance that the user probably has an account (compared to maybe a
paypal etc). Which is what we developers want.

It would be great if we could get their checkout info but I would say that
is a HUGE security risk and I don't see that happening.  Besides why would
Google do that? They get 30% if people go though them? They have no
incentive. What could be done is what was suggested is that they provide an
API so people can use to check out THOUGH Market Place. But honestly I don't
see that happening either at least not for awhile.
 Heck 2.1 took forever to come out. So going the route I am is the only way
I see how me (or someone) else can go through Market place, for awhile at
least.

I think I can get my character stats. I can keep track from my site where
they browse the characters, when they click the link to buy one (which links
to Market Place) I can track that I am thinking. Also Flurry can probably
help. I just started learning it.
www.flurry.com

If (big IF) mine is a success then maybe you can gain from my experience?
Although I probably have about another month to two before I can finish code
and test.

Speaking of which, I need to do serious testing in starting in about two
weeks. Has anyone used Device Anywhere? They seem to have a special setup
for  independent developers.

https://www.deviceanywhere.com/Independent%20Developer/Independent%20Developer_virtual_developer_lab.html

I watched the video and seems like a great idea for testing:
https://www.deviceanywhere.com/onlinedemos/

I just wanted to get some feedback on anyone that tired it?


Thank you
-Chris



On Sat, Mar 27, 2010 at 12:20 PM, Kevin Duffey andjar...@gmail.com wrote:

 Got an idea for the deletion of add-on toons for you. Use a simple sqllite
 db on the device... when your main app finds/installs a toon, log a little
 date in the db (or some other way). Every time your main app starts up, just
 scan for any rows.. if any are there, check the timestamps... if it's after
 2 days (maybe 3 or 4 to be safe), uninstall the .apks at that time.

 HOWEVER, something occurred to me. Programmatically uninstalling .apks
 without the user knowing may not be advisable. Even tho the toon still works
 in the app for them, I would suspect most users, if they wanted to delete it
 (or otherwise look at stats on it), they would go thru the settings/manage
 applications route, and if they can't find it they may wonder what happened.
 Trying to explain to your end users that after a few days the .apk they
 bought/downloaded/installed will be uninstalled to free up room, may be
 too much text for a simple toon purchase/install. Maybe not.

 Another thought..doubt it's possible.. and I still haven't paid for an app
 on android yet so not entirely sure how this works. I thought you'd set up a
 google checkout account.. being android and google and all. If that is the
 case, then like you said, it's likely that a user will have an account
 already.. or at least is more willing to submit their personal info setting
 up a gogle checkout account over some in-game form you provide. Now, I don't
 know how viable this is, but if the user already has a google checkout, is
 there a way to obtain their checkout info... in-app/game, without requiring
 them to fill anything out? This way, you could avoid the .apk market route,
 you earn the extra .30 per toon, you host it, you keep stats on downloads,
 which toons are more 

Re: [android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Wayne Wenthin
But there is no drive platter on my phone!  And dammit I need to renew my
sub now.


 http://xkcd.com/378/

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

 _Beginning Android 2_ from Apress Now Available!

 --
Writing code is one of few things
that teaches me I don't know everything.

Make Call Girl Manager great!
Join the forums.
http://www.fuligin.com/forums

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread chris harper
Good point Kevin

Although we can't just look at this from the coder implementation point of
view (my website, using paypal, market place etc). We have to think how
people buy crap.
If the highest chance that they will have an account with Market place then
that will makes a big difference for how many people buy additional content
for your game. For the simple fact of impulse buying.

If all they have to do is click ok, there is a lot lower chance that they
actually think much about it (especially if you charge like .99). They are
caught up in your game its a two second click. Trasaction done.

If they have to stop to pull out their cc or look up a paypal account then
they actually start to think about that transaction. Do I REALLY want to
pay .99 for this? Eh...maybe not.

Its not being sneaky, it's just how people shop.

I know. I have done it.

;-)

On Sat, Mar 27, 2010 at 12:23 PM, Kevin Duffey andjar...@gmail.com wrote:

 Hmm.. just looked up google checkout.. turns out paypal and google checkout
 charge .30 + 2.9%.. so you're still stuck losing 30% for a $1 fee.. actually
 2.9% more. So what, .33 per toon. Still.. not a big deal if it's utilized..
 making 67% or so is great, especially if more and more people buy virtual
 goods.

 On Sat, Mar 27, 2010 at 7:46 AM, chris harper ch393...@gmail.com wrote:

 Yes I know. Warren brought that up. But the game changer was when I
 found out that I can remove:

 category android:name=android.intent.category.LAUNCHER /

 from the manifet.xml which hides the new app's from the user (hides the
 clutter) and also doesn't allow the user to start it them on their own.

 So then I can just keep the new install apps behind the scenes and they
 don't clutter the users drawer. So there is not as much of an importance to
 delete them right away.

 What I might do is run checks for the install apps after a safe time (like
 a week). Then prompt the user and ask them if they want to clean them up
 (i.e remove them) letting them know that removing them DOES NOT remove the
 character. This way in the long run they don't have a bunch stacked up
 behind the scenes that they don't know about.

 I do plan to make the character apps as small as I can and put as much of
 the logic in the main app as I can.

 So many little details we have to deal with...
 -Chris


 On Sat, Mar 27, 2010 at 2:29 AM, Bob Kerns r...@acm.org wrote:

 Thanks. But it slipped my mind as I was writing it that immediately
 deleting the new app is going to be a loser, because it'll refund your
 payment.

 You'll have to arrange to do that at another time. Or not, and live
 with the clutter. Or simply use your .apk as the storage for your
 characters. That may actually be reasonably space-efficient, unless
 the character data is pretty small.

 It's not an issue for free/paid, because it's the older, free one
 that's being deleted in that case.

 But perhaps some components of my idea may be useful, or the code
 snippets.

 A really BAD idea would be to use the AlarmManager to initiate the
 deletion sequence. In fact, MOST uses of the AlarmManager to launch UI
 are bad, but this would be particularly evil.

 I'd do well as a prank app author, if I didn't have a conscience!


 On Mar 26, 8:43 am, chris harper ch393...@gmail.com wrote:
  We are probably in the running for the most active thread now but
 that’s
  great because
 
  this is an important issue that needs to be addressed.
 
  Bob – Thank you. Your solution is a pretty thought out solution. I
 admit I
  had to print it out and re-read it a few times. I might have a few
 questions
  coming your way because I think I like what you are doing. Give me a
 little
  more time to make sure I understand what you are doing.

 --

 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words
 REMOVE ME as the subject.


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


  --
 You received this message because you are subscribed to the Google
 Groups 

Re: [android-developers] Re: Can an app upgrade itself?

2010-03-27 Thread Mark Murphy
Wayne Wenthin wrote:
 But there is no drive platter on my phone! 

You need to upgrade your butterflies to 1.3.7 or higher to write dex
bytecodes to flash.

And watch out -- some unscrupulous individuals are trying to pawn off
moths as being white-label (OEM) butterflies.

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

Android App Developer Books: http://commonsware.com/books

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread JasonC
Got mine in Las Vegas today so it should be by Monday for you :)

I am really loving this Nexus one. Had it for about 2 hours so far and
it is really impressing me. Apps install run and download SO FAST its
crazy!

On Mar 25, 8:20 am, g1bb corymgibb...@gmail.com wrote:
 Anyone in or around Colorado receive anything yet?

 FedEx had no information for me.

 On Mar 25, 8:10 am, mscwd01 mscw...@gmail.com wrote:

  I'm in the UK too and still waiting. Are you sure FedEx will be used
  in the UK? It could be Royal Mail, Parcel Force, DPD etc...

  On Mar 25, 2:06 pm, David Horn pga...@gmail.com wrote:

   I was about to say that I'm very grateful to be offered a free Nexus
   One and would suggest that you wait until after the deadline before
   whining- uh, asking where it is.

   Dave.

   On Mar 25, 1:57 pm, Thomas Riley tomrile...@googlemail.com wrote:

Good point, will send an email their way.

On Mar 25, 1:45 pm, Arnon arnonse...@gmail.com wrote:

 I think you can contact the Android Market Seeding email and ask about
 it,
 In my opinion, four business days left for your deadline is a
 reasonable time to approach them

 On Mar 25, 3:37 pm, Thomas Riley tomrile...@googlemail.com wrote:

  Just spoken to FedEx UK... no sign of any parcel for me in their
  system :(

  The 4 week estimate is this Tuesday for me.

  On Mar 25, 8:35 am, Arnon arnonse...@gmail.com wrote:

   Same here.
   Got online with FedEx Italy, they searched from March 18 till 
   today
   and found no package.
   I hope they will start with Italy distribution soon.
   4 Weeks from form submittion date for me are next friday.

   If anyone from EU recieves the phone, please let us know who 
   shipped
   it and where from

   Thanks!

   On Mar 24, 9:07 pm, Markus tamet...@gmail.com wrote:

I called them too (Switzerland).
Guy did the search but told me there's no package on the way 
for me.
So either it has not been sent yet or they don't use Fedex over 
here.

On Mar 24, 8:02 pm, Thomas Riley tomrile...@googlemail.com 
wrote:

 I tried live chat (in the UK) and it's not much use (same 
 applies on
 phone actually)

 To be able to track they want to know dispatch date, which I 
 of course
 don't know!

 On Mar 24, 6:40 pm, Bryan Allen browne.al...@gmail.com 
 wrote:

  Live chat with FedEx works great. Your address, the shipper 
  name, and you're
  golden. I spent about 4 minutes on it and found out it's 
  arriving today!
  Better than a 20 minute hold on the phone.

  -Bryan

  On Wed, Mar 24, 2010 at 1:14 PM, abowman 
  abow...@gmail.com wrote:
   If you trust your neighbors, just leave a note for them 
   to leave the
   package at your door.

   On Mar 24, 1:19 pm, JasonC jcohe...@gmail.com wrote:
Ya Rocco, they will give you the info even without a 
tracking number.
I called FedEx yesterday and waited on hold for 20 
minutes. Gave them
my name address and phone number and I found out that 
my phone will be
delivered tomorrow between 8am and 6pm, unfortunately i 
will be at
work so I will have to drive out to the hub on friday 
to pick it up.

Jason

On Mar 23, 9:18 pm, Rocco optikalsa...@gmail.com 
wrote:

 If you're in the US and Google sent you a 
 confirmation number and you
 want to know when you're getting your handset, just 
 give FedEx a call
 from the number you provided Google with when you 
 filled out the form.
 Even without your tracking number, as long as you 
 contact them from
 that number and give the customer service rep your 
 delivery address
 they will be able to tell you when they expect to 
 deliver it. They
 might have you verify the name of the shipper as well 
 which in this
 case is Brightpoint.

 I just did this earlier and found out I should expect 
 my phone between
 the hours of 8am-6pm on Friday March 26th, 2010. Now 
 I no longer have
 to play the guessing game or check this message 8 
 times a day to see
 if anyone in Oregon got their handset ;)

   --
   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
   

Re: [android-developers] Obtaining the selected index of a spinner

2010-03-27 Thread ~ TreKing
http://developer.android.com/reference/android/widget/AdapterView.html#getSelectedItemPosition()

On Mar 26, 2010 6:10 PM, oddgeir.kv...@gmail.com oddgeir.kv...@gmail.com
wrote:

I want to obtain the index of the selected item in a spinner.

I am aware of the method getSelectedItem() which returns the item
selected (which might be a String). But i want the index of the
selected item.

Something equivalent to the setSelection(index) to set the selected
item.

Of course I can get the selected item and compare it against the array
of items to obtain the index, but I hope there is a better way of
doing this.

Thnx.

--
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.comandroid-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to android-developers+
unsubscribegooglegroups.com or reply to this email with the words REMOVE
ME as the subject.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Layouts

2010-03-27 Thread emna zeddini
Hello everybody,
After surfing in the source code of the android OS, I made out
that you are using preference_screens.Could you please tell me where is the
root
preference_screen that you are using for almost all layouts.
Thanks in advance.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Tao
I did see that and tried to find a link for replacement. No luck so
far.
That link will just redirect you to the Droid Ads page. \

Local Verizon representative refused to replace the battery for me
since she cannot find
the number of the phone in their system. And she asked me to check
this with Google.


On Mar 27, 3:03 pm, Kubecz3k kubec...@gmail.com wrote:
 Look over here:http://sites.google.com/site/developermarketandroidgiveaway/faq
 point 8: My phone was not working when I received it OR it stopped
 working while under warranty. Can I request a replacement?
 If you received a Droid, then please go 
 tohttp://phones.verizonwireless.com/motorola/droid/.
 (...)

 On Mar 27, 8:00 pm, Tao grea...@gmail.com wrote:

  Hi Jonas,

  Thanks for the tips.

  I just went to a local Verizon store, they have confirmed for me that
  the battery is dead.
  I have sent emails to Google to see what they want me to do, quite
  disappointing though.

  On Mar 27, 1:31 pm, Jonas Petersson jonas.peters...@xms.se wrote:

   Hi Tao,

   Tao wrote:
Droid, Bloomington, IN.
[...]
If I plugin the usb cable and boot the phone without battery, it works
perfectly.
If I put the battery back in and the usb cable, the phone starts for
about 2 minutes(I can see the droid
logo and locking screen) and then reboot automatically.

Any droid users around know what's happening here?

   No droid, but I have the EU equivalent Milestone. It had some USB issues
   under 2.0, but most of them were cured with 2.0.1 - which one did your
   Droid come with? The remaining issues I experience are:

   1) Occasionally (say after about a week of use) the it will fail to
   recognize the USB cabel, and hence no charge indicator etc. Reboot
   helps. I *THINK* this only ever happens after I've been debugging and
   unplugged the cable while still having the debugger connected. Possibly
   a bad habit, but I never had a problem doing that on the G1.

   2) It also seems that my extended USB cable will often glitch (the sound
   indication makes it very obvious) - since it isn't the original I guess
   I can't complain, but again I never had this problem with any of the
   cables I used with the G1.

                           Best / Jonas

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Darshan
Can someone who received a Droid in the US let us know who/where it
was shipped from?  Several people have mentioned that the Nexuses are
coming from Brightpoint in Indiana, but I'm not sure if the Droids are
coming from there or elsewhere.

Thanks,
Darshan

On Mar 27, 9:21 am, Greg Donald gdon...@gmail.com wrote:
 Droid, Nashville TN.

 --
 Greg Donald
 destiney.com | gregdonald.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Mark Murphy
Tao wrote:
 I did see that and tried to find a link for replacement. No luck so
 far.
 That link will just redirect you to the Droid Ads page. \
 
 Local Verizon representative refused to replace the battery for me
 since she cannot find
 the number of the phone in their system. And she asked me to check
 this with Google.

It may be less expensive for you to just buy a battery than to waste
time trying to get one from Google, who may not exactly have a bucket of
batteries on hand for these sorts of problems. They're $11.47 on Amazon.

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

Android Training in US: 14-18 June 2010: http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: ListView scrolls very very slow

2010-03-27 Thread jw
I don't think that's the problem, unfortunately. Cause even if I set
static texts to the TextViews it still scrolls very very slow. These
operations does not affect the performance.

On Mar 27, 9:05 pm, Paul Turchenko paul.turche...@gmail.com wrote:
 Well, it's obvious that these 2 methods are blocking your UI thread
 which makes it starve:
 1. i.getShortDescription()
 2. Utils.getTimeLeft(i.getEndDate())

 If you'd explain in more details what these methods do, perhaps there
 could be come kind of solution to your problem.

 On Mar 27, 5:52 pm, jw jwilner...@gmail.com wrote:

  I can add that I've also tried the ViewWrapper pattern without any
  performance difference.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Greg Donald
On Sat, Mar 27, 2010 at 5:07 PM, Darshan darshan.ish...@gmail.com wrote:
 Can someone who received a Droid in the US let us know who/where it
 was shipped from?

Mine came from

1251 South Perry Rd.
Plainfield, IN 46168


-- 
Greg Donald
destiney.com | gregdonald.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Tao
My droid was from Indianapolis, IN, dead battery though.

Good luck with yours.

On Mar 27, 6:07 pm, Darshan darshan.ish...@gmail.com wrote:
 Can someone who received a Droid in the US let us know who/where it
 was shipped from?  Several people have mentioned that the Nexuses are
 coming from Brightpoint in Indiana, but I'm not sure if the Droids are
 coming from there or elsewhere.

 Thanks,
 Darshan

 On Mar 27, 9:21 am, Greg Donald gdon...@gmail.com wrote:

  Droid, Nashville TN.

  --
  Greg Donald
  destiney.com | gregdonald.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread Tao
Thanks Mark.
I am thinking of the same thing.

Just feel quite frustrating this week.

Bought a new DELL studio 15, ends up motherboard, hard Drive replaced.

Received a free Droid(thanks to Google), ends up dead battery.

..

On Mar 27, 6:09 pm, Mark Murphy mmur...@commonsware.com wrote:
 Tao wrote:
  I did see that and tried to find a link for replacement. No luck so
  far.
  That link will just redirect you to the Droid Ads page. \

  Local Verizon representative refused to replace the battery for me
  since she cannot find
  the number of the phone in their system. And she asked me to check
  this with Google.

 It may be less expensive for you to just buy a battery than to waste
 time trying to get one from Google, who may not exactly have a bucket of
 batteries on hand for these sorts of problems. They're $11.47 on Amazon.

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

 Android Training in US: 14-18 June 2010:http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How to read Gmail programmatically?

2010-03-27 Thread Ali Chousein
Hi,

I'm trying to query the e-mails from my Gmail account in source code.
I've tried various combinations for the URI but the cursor returned is
always null. Has anyone managed to retrieve emails programmatically
from Gmail?

Some combinations I tried for the URI are below (as I mentioned above,
the cursor which is returned is always null):

Cursor cur = this.getContentResolver().query(Uri.parse(content://
gmail-ls/conversations/my_email@gmail.com), null, null, null,
null);
Cursor cur = this.getContentResolver().query(Uri.parse(content://
gmail-ls/inbox/my_email@gmail.com), null, null, null, null);
Cursor cur = this.getContentResolver().query(Uri.parse(content://
gmail-ls/my_email@gmail.com), null, null, null, null);
Cursor cur = this.getContentResolver().query(Uri.parse(content://
gmail-ls), null, null, null, null);

I'd appreciate any experience you could share.

-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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-27 Thread niko20
Hi,

My DROID was delivered by FedEx and was shipped by BrightPoint just as
some people's N1's were.

-

On Mar 27, 5:18 pm, Tao grea...@gmail.com wrote:
 Thanks Mark.
 I am thinking of the same thing.

 Just feel quite frustrating this week.

 Bought a new DELL studio 15, ends up motherboard, hard Drive replaced.

 Received a free Droid(thanks to Google), ends up dead battery.

 ..

 On Mar 27, 6:09 pm, Mark Murphy mmur...@commonsware.com wrote:

  Tao wrote:
   I did see that and tried to find a link for replacement. No luck so
   far.
   That link will just redirect you to the Droid Ads page. \

   Local Verizon representative refused to replace the battery for me
   since she cannot find
   the number of the phone in their system. And she asked me to check
   this with Google.

  It may be less expensive for you to just buy a battery than to waste
  time trying to get one from Google, who may not exactly have a bucket of
  batteries on hand for these sorts of problems. They're $11.47 on Amazon.

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

  Android Training in US: 14-18 June 2010:http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: In-App Purchasing and the Market Agreement

2010-03-27 Thread Bob Kerns
Let me point out that the code that I posted doesn't delete without
user confirmation. It just takes the user to the system's delete this
application screen under Manage applications, where they can choose
to delete or not.

I don't know of a standard way to delete an application without user
confirmation! Even if you can do it, I'm not sure you wouldn't screw
up the package manager, so I wouldn't recommend it.

That's on top of your user-experience reason, which is the main reason
to do it this way, if at all.

On Mar 27, 11:20 am, Kevin Duffey andjar...@gmail.com wrote:
 HOWEVER, something occurred to me. Programmatically uninstalling .apks
 without the user knowing may not be advisable. Even tho the toon still works
 in the app for them, I would suspect most users, if they wanted to delete it
 (or otherwise look at stats on it), they would go thru the settings/manage
 applications route, and if they can't find it they may wonder what happened.
 Trying to explain to your end users that after a few days the .apk they
 bought/downloaded/installed will be uninstalled to free up room, may be
 too much text for a simple toon purchase/install. Maybe not.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: create TextView

2010-03-27 Thread Bob Kerns
Actually, the first part is not true -- you just have to use the right
'this'. Just use MyOuterClassName.this and all will be fine.  You
could also copy it to a final variable but there's no need since Java
provides this mechanism for just this situation.

On Mar 27, 7:44 am, Adrian Vintu adrianvi...@gmail.
 You need to create the TextView outside the scope of the OnClickListener.
 The this has to point to Context, which is your Activity.

 BR,
 Adrian Vintu

 http://adrianvintu.com



 On Sat, Mar 27, 2010 at 3:28 PM, rubeN_vl rvanluch...@hotmail.com wrote:
  Hi,

  i'm trying to create a new TextView when a button is clicked.
  TextView b = new TextView(this); isnt working cause 'this' refers to
  new View.onClickListener.
  Been searchin for hours, cant find a 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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] MapView map elements size (e.g. street labels)

2010-03-27 Thread JP
Comparing a MapView as used in an app through Google Maps API against
the Google Maps app, I found that the granularity of all elements,
most visibly, street labels, in Google Maps is bigger than the street
labels in MapView. This is on a Nexus One, presumably other devices
show a similar behavior.
I did not find any hint in the documentation how to dial this for a
MapView. Anybody know where this can be dialed 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: left scrollbar

2010-03-27 Thread Dianne Hackborn
But why do you want to put a scroll bar on the left?  Scroll bars on Android
are on the right.  Making that different just makes things gratuitously
different for the user, for no reason I can see.

On Sat, Mar 27, 2010 at 9:09 AM, skink psk...@gmail.com wrote:



 On Mar 27, 3:03 pm, Mark Murphy mmur...@commonsware.com wrote:
  emna zeddini wrote:
   hello, I didn't understand what you meant.Is it impossible?
 
  I mean that none of the built-in classes (e.g., ScrollView) offer
  scrollbars on the left side.
 
  You are welcome to examine the 2,400 lines of code that make up
  ScrollView.java and HorizontalScrollView.java to see if you can figure
  out how to make a ScrollViewWithScrollBarOnTheLeft.java to meet your
 needs.
 

 i believe it is android.view.View that draws scrollbars

 pskink

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How to send at command

2010-03-27 Thread saru
Hey i need to send AT command to modem in android phone.
But by searching android i could not find any API to send AT command.
Please can any did it or can any one share any idea regarding AT
command.
Please it is very much important for 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: API for my map

2010-03-27 Thread janaki
Hey monica

   were you able to create Map in My Maps.
   what is google star??

Thanks



On Mar 11, 6:49 pm, monica chen.h2...@gmail.com wrote:
 Thank you for the information!
 Do you ever found there is APIs for Google star such as for my maps?

 2010/3/11 janaki janakime...@gmail.com



  You can use Google map data api for retreving,creating and updating my
  maps.
  I think android does not support gdata for creating the maps so we
  have to use http protocol,
  here is the link

 http://code.google.com/apis/maps/documentation/mapsdata/developers_gu...
  Thanks

  On Mar 4, 7:48 pm, monica chen.h2...@gmail.com wrote:
   My map is a feature of google map.
   you can login with google account and create your maps, and starring some
   places.

   2010/3/5 Mark Murphy mmur...@commonsware.com

monica wrote:
     Is there any google map api for my map?

What is my map?

     Any possible to get my map data after authorization?

What authorization?

   http://developer.android.com/guide/topics/location/index.html

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

Android Online Training: 26-30 April 2010:http://onlc.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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2bunsubs­cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en-Hide quoted
  text -

   - Show quoted text -

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Maths behind the Android orientation calculation algorithm

2010-03-27 Thread DD
Hi,

I know Android calculates the orientation of the phone by fusing the
acceleration and magnetic field readings. The related APIs are
getRotationMatrix() and getOrientation(). I looked into the source
code of these two APIs
http://www.netmite.com/android/mydroid/cupcake/frameworks/base/core/java/android/hardware/SensorManager.java

But I couldn't really figure out where exactly the implementation came
from... Could anybody tell me where I can find the theory of this
algorithm and detailed mathematical background of it? I'm currently
implementing exactly the same algorithm offline in MATLAB, and trying
to write some mathematical analysis about it.

Thank you very much!

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.