[android-developers] Re: XML Adapter sample from SDK not compiling

2011-08-23 Thread droidin.net
Is there a reason why Android team fails to address this? I posted the same 
question on the stackoverflow.com to no avail. There are also compilation 
problems in Adapters.java. Please refer to 
http://stackoverflow.com/questions/7139299/android-broken-xml-parsing-example

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


[android-developers] Re: Enable imported account contacts programmatically

2011-05-01 Thread droidin.net
Anybody? Hints? Thoughts?

On Apr 29, 9:46 am, droidin.net dr...@hireadroid.com wrote:
 I'm successfully importing external contacts into the newly created
 account using this tutorialhttp://goo.gl/sLJeN. The account is setup
 to re-sync programmatically and yet to be able to see the synced
 contact, unless the contact dupe is found, I need to do 
 Contacts-Menu-Display options-Find account-Check All Contacts. I'm 
 already

 dreading angry users enabling contact sync and not being able to see
 anything so the question is: is it possible to set display option for
 includingimportedaccount contacts programmatically? So when user opt
 for account creation he doesn't need to do anything else to 
 seeimportedcontacts?

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


[android-developers] Enable imported account contacts programmatically

2011-04-29 Thread droidin.net
I'm successfully importing external contacts into the newly created
account using this tutorial http://goo.gl/sLJeN. The account is setup
to re-sync programmatically and yet to be able to see the synced
contact, unless the contact dupe is found, I need to do Contacts-Menu-
Display options-Find account-Check All Contacts. I'm already
dreading angry users enabling contact sync and not being able to see
anything so the question is: is it possible to set display option for
including imported account contacts programmatically? So when user opt
for account creation he doesn't need to do anything else to see
imported contacts?

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


[android-developers] Re: After extracting code to lib widget is no longer working

2010-11-30 Thread droidin.net
Anyone? This is really makes my life miserable where's my Google
knight in shiny armor?

On Nov 29, 11:57 am, droidin.net dr...@hireadroid.com wrote:
 I had a perfectly working widget as part of my project. Then I decided
 to extract common code (including the widget) into the library
 project. After doing this everything works except the widget. It
 appears in the list of widgets available for addition but when I place
 it on the desktop all I get is this toast message: Application is not
 installed on your phone. Can someone shed light on this? Nether
 configuration nor code has changed. Widget definition exists in both
 meta files (project and lib) with project metafile containing absolute
 (including path) names and all permissions

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


[android-developers] After extracting code to lib widget is no longer working

2010-11-29 Thread droidin.net
I had a perfectly working widget as part of my project. Then I decided
to extract common code (including the widget) into the library
project. After doing this everything works except the widget. It
appears in the list of widgets available for addition but when I place
it on the desktop all I get is this toast message: Application is not
installed on your phone. Can someone shed light on this? Nether
configuration nor code has changed. Widget definition exists in both
meta files (project and lib) with project metafile containing absolute
(including path) names and all permissions

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


[android-developers] Re: Source code fro Genie Widget

2010-04-22 Thread droidin.net
Dianne,

Thanks for your confirmation. What would be a suitable replacement? I
need an example on how to implement widget functionality where with
given list of entries widget continuously displays these in a loop
just like a News widget does?

Bo

On Apr 20, 6:25 pm, Dianne Hackborn hack...@android.com wrote:
 Sorry that isn't the code for the news and weather app.  I don't think the
 code for that app has been made available at this point.



 On Tue, Apr 20, 2010 at 6:18 PM, a a harvey.a...@gmail.com wrote:
  Dear Stone,

 http://android-sky.googlecode.com/svn/trunk/Sky/

  2010/4/20 droidin.net bost...@gmail.com:
   Hi guys,

   Can anyone help me find source code for Android's Weather and News app
   (Genie Widget). It doesn't look like it can be found at
 http://android.git.kernel.org/
   and Google's Code Search does not return any results ether

   Thanks,

   Bo Stone

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

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

 --
 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 
 athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Source code fro Genie Widget

2010-04-21 Thread droidin.net
Nice widget, but no cigar I'm affraid. I'm actually after different
functionality, namely I want to see how they implemented rotating list
of items where headlines constantly rotating in the widget's one at
the time

On Apr 20, 6:18 pm, a a harvey.a...@gmail.com wrote:
 Dear Stone,

 http://android-sky.googlecode.com/svn/trunk/Sky/

 2010/4/20 droidin.net bost...@gmail.com:



  Hi guys,

  Can anyone help me find source code for Android's Weather and News app
  (Genie Widget). It doesn't look like it can be found 
  athttp://android.git.kernel.org/
  and Google's Code Search does not return any results ether

  Thanks,

  Bo Stone

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

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

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


[android-developers] Source code fro Genie Widget

2010-04-19 Thread droidin.net
Hi guys,

Can anyone help me find source code for Android's Weather and News app
(Genie Widget). It doesn't look like it can be found at 
http://android.git.kernel.org/
and Google's Code Search does not return any results ether

Thanks,

Bo Stone

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


[android-developers] SQLite transactions when using ContentResolver

2010-02-09 Thread droidin.net


The goal: refresh database from XML data

The process:

* Start transaction
* Delete all existing rows from the tables
* Per each main element of parsed XML insert row into main table
and get PK
* Per each child of the main element insert record into 2nd table
providing FK from the previous step
* Commit transaction

Pretty standard stuff as far as db operations. The problem is that
CRUD operations are not done within ContentProvider but rather using
ContentResolver so the insert for example looks like
resolver.insert(CONTENT_URI, contentValues). The ContentResolver API
doesn't seem to have anything pertained to transaction and I cannot
use bulkInsert since I'm inserting in 2 tables intermittently (plus I
want to have delete inside the transaction as well).

I was thinking of registering my customized ContentProvider as
listener by using registerContentObserver but since
ContentResolver#acquireProvider methods are hidden how do I obtain the
right reference?

Am I out of luck?

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


[android-developers] ExpandableListView change background for child items

2009-12-14 Thread droidin.net
I'm using ExpandableListView in my app and one of the complains is
that when expanded it's hard to visually distinguish where the child
item ends and next group item begins. So I would like to change
background of the child list item to the different shade. Brutal
attempts that I've made so far were based on directly changing
background color and text of the elements inside the child view item
but that leads to loss of hovers and highlights. So my question is -
what is a good strategy to achieve the above? I tried styles and
selectors but what really bums me out - that if I change one thing
then I need to add selectors for all combinations of focus/enabled
etc. when all I'm trying to do it to overwrite a single thing. Is
there a way to inherit parent style and set just a background for non-
focused, enabled child item?

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


[android-developers] Android - NPE in BrowserFrame

2009-11-19 Thread droidin.net
I get this exception triggered by users occasionally that I cannot
reproduce. Since it's issued from looper I suppose it is result of
Handler-type callback. I found similar bug on Google code but putting
the solution into code didn't solve it. The problem is at this line of
code in BrowserFrame:

WebAddress uri = new WebAddress(
mCallbackProxy.getBackForwardList().getCurrentItem()
   .getUrl());

Which throws this Exception because I suppose mCallbackProxy is null

java.lang.NullPointerException
at android.webkit.BrowserFrame.handleMessage(BrowserFrame.java:348)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:471)
at java.lang.Thread.run(Thread.java:1060)

And the questions are - will this forclose the app? And how do I work
around this bug?

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


[android-developers] Re: Android market .... what's happening?

2009-11-18 Thread droidin.net
All my 3 apps are affected and I bet there's no single App on the
marked that is intact. Interesting that I have more reviews than
ratings. They screwed the database alright. The dev concole still
shows old numbers but then it is always lagging due to caching

On Nov 18, 10:24 pm, Pieter pie...@gamesquare.nl wrote:
 I bet some engineers at Google are sweating profusely at this point.
 If any of your happen to read this (which I doubt), good luck in
 fixing this issue!

 On Nov 19, 5:30 am, nubin...@gmail.com nubin...@gmail.com wrote:

  My app's total downloads dropped from 48000 to 789? Did Google just
  invent time machine?

  I have another app that has -8 active installs now.

  What's happening!

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


[android-developers] CheckBox blocks ExpandableListView.OnGroupClickListener

2009-11-05 Thread droidin.net
I'm trying to put a checkbox into ExpandableListView. I noticed that
doing that disables basic functionality of displaying child list when
group row is clicked. Furthermore when I click outside of checkbox the
click is detected by nether checkbox nor by OnGroupClickListener. Can
someone help me to resolve this?
The CheckBox works fine though including detecting clicks when
clicking directly on the box

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


[android-developers] Re: ALT key for a virtual keyboard

2009-11-04 Thread droidin.net
Thanks you... Real bummer

On Nov 4, 3:48 am, Dianne Hackborn hack...@android.com wrote:
 No, an IME doesn't provide any modifiers, it inserts the final UTF-16
 characters into the text.



 On Tue, Nov 3, 2009 at 9:37 PM, droidin.net bost...@gmail.com wrote:
  Basically I want to capture Alt-key combination to provide some
  customized alternative text input. For example Alt-f would put FOO
  into the text field. However there doesn't seem to be ALT key on the
  virtual keyboard in ether portrait or landscape. Is it possible to
  fake Alt key on the virtual keyboard somehow?

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

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


[android-developers] ALT key for a virtual keyboard

2009-11-03 Thread droidin.net
Basically I want to capture Alt-key combination to provide some
customized alternative text input. For example Alt-f would put FOO
into the text field. However there doesn't seem to be ALT key on the
virtual keyboard in ether portrait or landscape. Is it possible to
fake Alt key on the virtual keyboard somehow?

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


[android-developers] Change backround of the view embedded in the ListView item

2009-10-22 Thread droidin.net

I have a ListView backed by customized ArrayAdapter where each item
has 2 LinearLayouts - one I call head, and the other one - body. The
body is hidden (gone) until user clicks on the row at which time it
slides out. The second click (on the head) will hide the body. However
if user clicks on the body it brings another activity. All of this
works just fine, here comes the problem:

When user presses on body I want a visual indication of the action
just the same way as regular list item will flicker an orange
background when pressed. I'm not getting this by default since (my
theory) the onPress event is intercepted by body's view and not
processed by the list item.

The first thing I tried was to execute body.setBackground('#ff00ff')
(never mind the color) in onPress event. That didn't work since (I
suspect) there's no repainting after the call. Then I dig a little bit
more and decided to use selector/-based background. I defined
body_background.xml in drawable folder and assigned that to the body's
background property.

There I noticed that background will only change if the even is
processed by the list. For example if I set item
android:state_selected=true android:drawable=@drawable/selected/
then when I press on the head - the background of both elements (head
and body) will change, however when I press on body - nothing.

So to summarize my question - how do I change background of the child
element in the list item if I assign custom onClick handler to it? Any
hints will be greatly appreciated

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



[android-developers] Re: Change backround of the view embedded in the ListView item

2009-10-22 Thread droidin.net

Are you actually getting control in your onClick()? If yes, then
calling
setBackgroundColor() should work fine. 

Yes, I can setup a breakpoint and see how I'm executing this line. I
think the problem may be that in two lines after that I'm doing
startActivity(Intent) so maybe Android thinks - Ah - hell with this,
I'm not going to repaint existing Activity since the new one is coming
up. THe problem is - new Activity takes its sweet time since it's
making a network call, meanwhile user is left without any visual clue
if that click did really occur.

Here's a snippet

body.setOnClickListener(new OnClickListener() {
@Override
public void onClick(final View v) {
final Object u = v.findViewById(R.id.e).getTag();
if (u != null) {
v.setBackgroundColor(R.color.item_highlight);
final Uri uri = Uri.parse(u.toString());
final Intent i = new Intent(summary, uri,
SearchResultsView.this, SearchSummaryView.class);
startActivity(i);
} else {
Toast.makeText(SearchResultsView.this, Unable
to display details for this listing,
Toast.LENGTH_LONG).show();
}
}
});


On Oct 22, 2:50 pm, Mark Murphy mmur...@commonsware.com wrote:
 droidin.net wrote:
  So to summarize my question - how do I change background of the child
  element in the list item if I assign custom onClick handler to it? Any
  hints will be greatly appreciated

 Are you actually getting control in your onClick()? If yes, then calling
 setBackgroundColor() should work fine.

 Here is an example project that changes the background of View in a row
 based upon list selection (D-pad/trackball):

 http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Selec...

 This differs from your scenario only by the trigger mechanism (onClick()
 versus an item selected listener).

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

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



[android-developers] Re: Change backround of the view embedded in the ListView item

2009-10-22 Thread droidin.net

Sorry - what I'm saying is no - setting background has no effect

On Oct 22, 9:18 pm, droidin.net bost...@gmail.com wrote:
 Are you actually getting control in your onClick()? If yes, then
 calling
 setBackgroundColor() should work fine. 

 Yes, I can setup a breakpoint and see how I'm executing this line. I
 think the problem may be that in two lines after that I'm doing
 startActivity(Intent) so maybe Android thinks - Ah - hell with this,
 I'm not going to repaint existing Activity since the new one is coming
 up. THe problem is - new Activity takes its sweet time since it's
 making a network call, meanwhile user is left without any visual clue
 if that click did really occur.

 Here's a snippet

             body.setOnClickListener(new OnClickListener() {
                 @Override
                 public void onClick(final View v) {
                     final Object u = v.findViewById(R.id.e).getTag();
                     if (u != null) {
                         v.setBackgroundColor(R.color.item_highlight);
                         final Uri uri = Uri.parse(u.toString());
                         final Intent i = new Intent(summary, uri,
 SearchResultsView.this, SearchSummaryView.class);
                         startActivity(i);
                     } else {
                         Toast.makeText(SearchResultsView.this, Unable
 to display details for this listing,
                                 Toast.LENGTH_LONG).show();
                     }
                 }
             });

 On Oct 22, 2:50 pm, Mark Murphy mmur...@commonsware.com wrote:

  droidin.net wrote:
   So to summarize my question - how do I change background of the child
   element in the list item if I assign custom onClick handler to it? Any
   hints will be greatly appreciated

  Are you actually getting control in your onClick()? If yes, then calling
  setBackgroundColor() should work fine.

  Here is an example project that changes the background of View in a row
  based upon list selection (D-pad/trackball):

 http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Selec...

  This differs from your scenario only by the trigger mechanism (onClick()
  versus an item selected listener).

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

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



[android-developers] Re: Change backround of the view embedded in the ListView item

2009-10-22 Thread droidin.net

Ha! That's interesting thought! Let me try, thanks a bunch!

On Oct 22, 8:54 pm, Nirav niravshah1988s...@gmail.com wrote:
 Looking at your problem, the solution is that you can use expandable
 list view to do the your task.
 It will solve your all prooblem and can change your background using
 selector also
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ListView - duplicate onScroll events

2009-10-13 Thread droidin.net

In my app I have a ListView backed by ArrayAdapter. In it I'm
detecting events in OnScrollListener#onScroll method to find end of
the list. I noticed that on the phone (MyTouch) both track-ball and
gesture/touch scrolling will trigger the event twice. On the emulator
I get the same behavior with a scrolling wheel and click-and-drug
scrolling. However in emulator if I use down-arrow button to scroll
the event is fired only once.

Here's the code:

this.view.setOnScrollListener(new OnScrollListener() {
@Override
public void onScroll(final AbsListView view, final int first,
final int visible, final int
total) {
// detect if last item is visible
if (visible  total  (first + visible == total)) {
Log.d(OnScrollListener - end of list, fvi:  +
   first + , vic:  + visible + , tic:  + total);
// this line gets called twice
onLastListItemDisplayed(total, visible);
}
}
}

How do I suppress or handle this behavior? I need just a single event
and trying not to revert to silly hacks such as boolean field.

As far as I can tell - both events have identical stacktrace

Thread [3 main] (Suspended (breakpoint at line 116 in
SearchResultsView$4))
 SearchResultsView$4.onScroll(AbsListView, int, int, int) line:
116
 ListView(AbsListView).invokeOnItemScrollListener() line: 655
 ListView.arrowScrollImpl(int) line: 2256
 ListView.arrowScroll(int) line: 2172
 ListView.commonKey(int, int, KeyEvent) line: 1977
 ListView.onKeyMultiple(int, int, KeyEvent) line: 1929
 KeyEvent.dispatch(KeyEvent$Callback) line: 899
 ListView(View).dispatchKeyEvent(KeyEvent) line: 3647
 ListView(ViewGroup).dispatchKeyEvent(KeyEvent) line: 744
 ListView.dispatchKeyEvent(KeyEvent) line: 1909
 FrameLayout(ViewGroup).dispatchKeyEvent(KeyEvent) line: 746
 LinearLayout(ViewGroup).dispatchKeyEvent(KeyEvent) line: 746
 PhoneWindow$DecorView(ViewGroup).dispatchKeyEvent(KeyEvent) line:
746
 PhoneWindow$DecorView.superDispatchKeyEvent(KeyEvent) line: 1708
 PhoneWindow.superDispatchKeyEvent(KeyEvent) line: 1197
 SearchResultsView(Activity).dispatchKeyEvent(KeyEvent) line:
1967
 PhoneWindow$DecorView.dispatchKeyEvent(KeyEvent) line: 1684
 ViewRoot.deliverKeyEventToViewHierarchy(KeyEvent, boolean) line:
2329
 ViewRoot.handleFinishedEvent(int, boolean) line: 2299
 ViewRoot.handleMessage(Message) line: 1621
 ViewRoot(Handler).dispatchMessage(Message) line: 99
 Looper.loop() line: 123
 ActivityThread.main(String[]) line: 4203
 Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
 Method.invoke(Object, Object...) line: 521
 ZygoteInit$MethodAndArgsCaller.run() line: 791
 ZygoteInit.main(String[]) line: 549
 NativeStart.main(String[]) line: not available [native method]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: for Google attention

2009-10-13 Thread droidin.net

With sales so dismal I think freeing up your app and figuring out an
alternative way of making money from it (not ads ether) is the best
way to fight Chinese (or Russians, or whomever).
Or build-in license activation which validates that license is valid
for the particular device. Litigation is simply silly in this
particular instance

On Oct 13, 11:56 am, WoodManEXP woodman...@gmail.com wrote:
 Hi Dan,

 We have added copy protection per Google's instructions (application
 release checklist). Is there more copy protection we can/should use?

 On Oct 13, 2:41 pm, Dan Sherman impact...@gmail.com wrote:

  I'm not so sure you've fully grasped the idea of white-hat...

  Why not just be done with this and add copy protection to your own app?

  On Tue, Oct 13, 2009 at 2:23 PM, WoodManEXP woodman...@gmail.com wrote:

   Maybe a white-hatted person will show up and target some serious DoS
   efforts on these sites!

   On Oct 13, 1:52 pm, Fan Zhang fredplusp...@gmail.com wrote:
There are many more sites like this.
I am a developer and my stuff gets pirated all the time...
If google decides to take any actions on those website, here is a list
of them:www.hiapk.comwww.androidin.netwww.android123.com

and basically all chinese forums that talks about Android system has
some degree of piracy issue =(

On Oct 13, 1:39 pm, Andrei gml...@gmail.com wrote:

 People with rooted phone buy app, copy package, distribute it
 Google offers really no package protection

 On Oct 13, 1:33 pm, WoodManEXP woodman...@gmail.com wrote:

  Well this is just great!

  How should developers attempt to combat this?

  Does the app copy protection help in any way?

  How is the owner of this site getting the apps?

  On Oct 13, 1:00 pm, Andrei gml...@gmail.com wrote:

   There is a Chinese web site where u can download packages for paid
   appshttp://www.91android.com/bbs/attachmentList.php?action=search
   Can Google do something about this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView - duplicate onScroll events

2009-10-13 Thread droidin.net

Since good people of Google are saying that this is `as intended`
here's an ugly brutal way of dealing with this problem that works for
me. Basically the assumption here is that as events are issued I
compare last saved first item index with one that is passed in the
`onScroll` call. I will only process event if these do not match:

this.view.setOnScrollListener(new OnScrollListener() {
private int lastSavedFirst = -1;
@Override
public void onScroll(final AbsListView view, final int
first, final int visible, final int total) {
// detect if last item is visible
if (visible  total  (first + visible == total)) {
// only process first event
if (first != lastSavedFirst) {
lastSavedFirst = first;
Log.d(OnScrollListener - end of list, fvi:
 + first + , vic:  + visible + , tic: 
+ total);
onLastListItemDisplayed(total, visible);
}
}
}

@Override
public void onScrollStateChanged(final AbsListView view,
final int scrollState) {
// Log.d(OnScrollListener, state:  + scrollState);
}
});


On Oct 13, 11:58 am, droidin.net bost...@gmail.com wrote:
 In my app I have a ListView backed by ArrayAdapter. In it I'm
 detecting events in OnScrollListener#onScroll method to find end of
 the list. I noticed that on the phone (MyTouch) both track-ball and
 gesture/touch scrolling will trigger the event twice. On the emulator
 I get the same behavior with a scrolling wheel and click-and-drug
 scrolling. However in emulator if I use down-arrow button to scroll
 the event is fired only once.

 Here's the code:

     this.view.setOnScrollListener(new OnScrollListener() {
         @Override
         public void onScroll(final AbsListView view, final int first,
                                     final int visible, final int
 total) {
             // detect if last item is visible
             if (visible  total  (first + visible == total)) {
                 Log.d(OnScrollListener - end of list, fvi:  +
                    first + , vic:  + visible + , tic:  + total);
                 // this line gets called twice
                 onLastListItemDisplayed(total, visible);
             }
         }
     }

 How do I suppress or handle this behavior? I need just a single event
 and trying not to revert to silly hacks such as boolean field.

 As far as I can tell - both events have identical stacktrace

     Thread [3 main] (Suspended (breakpoint at line 116 in
 SearchResultsView$4))
      SearchResultsView$4.onScroll(AbsListView, int, int, int) line:
 116
      ListView(AbsListView).invokeOnItemScrollListener() line: 655
      ListView.arrowScrollImpl(int) line: 2256
      ListView.arrowScroll(int) line: 2172
      ListView.commonKey(int, int, KeyEvent) line: 1977
      ListView.onKeyMultiple(int, int, KeyEvent) line: 1929
      KeyEvent.dispatch(KeyEvent$Callback) line: 899
      ListView(View).dispatchKeyEvent(KeyEvent) line: 3647
      ListView(ViewGroup).dispatchKeyEvent(KeyEvent) line: 744
      ListView.dispatchKeyEvent(KeyEvent) line: 1909
      FrameLayout(ViewGroup).dispatchKeyEvent(KeyEvent) line: 746
      LinearLayout(ViewGroup).dispatchKeyEvent(KeyEvent) line: 746
      PhoneWindow$DecorView(ViewGroup).dispatchKeyEvent(KeyEvent) line:
 746
      PhoneWindow$DecorView.superDispatchKeyEvent(KeyEvent) line: 1708
      PhoneWindow.superDispatchKeyEvent(KeyEvent) line: 1197
      SearchResultsView(Activity).dispatchKeyEvent(KeyEvent) line:
 1967
      PhoneWindow$DecorView.dispatchKeyEvent(KeyEvent) line: 1684
      ViewRoot.deliverKeyEventToViewHierarchy(KeyEvent, boolean) line:
 2329
      ViewRoot.handleFinishedEvent(int, boolean) line: 2299
      ViewRoot.handleMessage(Message) line: 1621
      ViewRoot(Handler).dispatchMessage(Message) line: 99
      Looper.loop() line: 123
      ActivityThread.main(String[]) line: 4203
      Method.invokeNative(Object, Object[], Class, Class[], Class, int,
 boolean) line: not available [native method]
      Method.invoke(Object, Object...) line: 521
      ZygoteInit$MethodAndArgsCaller.run() line: 791
      ZygoteInit.main(String[]) line: 549
      NativeStart.main(String[]) line: not available [native method]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Autogrow ListView is not working

2009-10-12 Thread droidin.net

I look at some posts from the past and it seems that if I add items to
the ListView adapter it should update itself and user should be able
to scroll to the newly appended items. Unfortunately it's not what I
observe. If I append new items to my existing ArrayAdapter I only will
see updated results if I rerun ListView#setAdapter again. Doing
nothing, invalidating view etc. doesn't do anything. Here's a snippet:

SearchItemsAdapter a = (SearchItemsAdapter) listview.getAdapter();
ListSearchItem values = fetchNextSetOfItems();
a.append(values);
// unless I do this - I will not see the update, but if I do - I'll
jump to the top
listview.setAdapter(a);

Here's append method:

public void append(ListSearchItem values) {
this.items.addAll(values);
}

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



[android-developers] Re: Autogrow ListView is not working

2009-10-12 Thread droidin.net

Nevermind... Basically I should not add items to the internal list
directly but instead, use ArrayAdapter#add(Object) method. Thanks to
Mark Murphy for pointing that out

On Oct 12, 1:59 pm, droidin.net bost...@gmail.com wrote:
 I look at some posts from the past and it seems that if I add items to
 the ListView adapter it should update itself and user should be able
 to scroll to the newly appended items. Unfortunately it's not what I
 observe. If I append new items to my existing ArrayAdapter I only will
 see updated results if I rerun ListView#setAdapter again. Doing
 nothing, invalidating view etc. doesn't do anything. Here's a snippet:

 SearchItemsAdapter a = (SearchItemsAdapter) listview.getAdapter();
 ListSearchItem values = fetchNextSetOfItems();
 a.append(values);
 // unless I do this - I will not see the update, but if I do - I'll
 jump to the top
 listview.setAdapter(a);

 Here's append method:

 public void append(ListSearchItem values) {
         this.items.addAll(values);

 }

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



[android-developers] MOTODEV Studio vs. Google plugin

2009-10-05 Thread droidin.net

Is anybody have any advice, experience, suggestions? I'm pretty
comfortable with Google plugin - what would make me change to MOTODEV?
Needless to say - I will download and play with it but I'm also
interested in fellow developer's feedback.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] UI background task

2009-09-29 Thread droidin.net

Here's scenario:
1. Client makes remote call to the service (returns void) and provides
a callback object
2. Service executes some long running logic on the background thread
and then uses callback object to trigger ether success or failure
which (since these manipulate visual elements) execute in
Activity#runOnUiThread block

The scenario runs fine. The question is - can I use AsyncTask to make
code less verbose (how?) and would be there any advantages in doing it
that way?

Or should I just get away from client callbacks alltogether and
execute remote service calls retrofitted to return some value within
AsyncTask#doInBackground?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Mangled PreferenceActivity

2009-09-24 Thread droidin.net

I have pretty unassuming preferences screen based on
PreferenceActivity. (You can see it in DroidIn app) I'm having some
problems with it that I think have to do with redrawing the screen
after updates. Here are the symptoms:
1. OnPreferenceChangeListener#onPreferenceChange if I change summary
of the preference by doing Preference#setSummary the new value is
painted over the old one creating unsightly effect
2. My preferences screen is large enough that user has to scroll.
While scrolling, the whole screen get all messed up, again it looks
like view is redrawn (when scrolled) without erasing the background
first.

Preferences are defined in XML file - nothing funky just some
categories and preferences nested within PreferenceScreen/

Do I need to explicitly redraw the view? That seem excessive - why
wouldn't that happen by default?
Since this is an existing app - it's build and distributed with v. 1.5
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mangled PreferenceActivity

2009-09-24 Thread droidin.net

Problem solved!

Turned out that for whatever reason (probably just copying some
example code without much thinking) I had this line in my theme.xml
item name=android:windowBackground@null/item. Once I removed it
- my redrawing problem was gone

On Sep 24, 2:06 pm, droidin.net bost...@gmail.com wrote:
 I have pretty unassuming preferences screen based on
 PreferenceActivity. (You can see it in DroidIn app) I'm having some
 problems with it that I think have to do with redrawing the screen
 after updates. Here are the symptoms:
 1. OnPreferenceChangeListener#onPreferenceChange if I change summary
 of the preference by doing Preference#setSummary the new value is
 painted over the old one creating unsightly effect
 2. My preferences screen is large enough that user has to scroll.
 While scrolling, the whole screen get all messed up, again it looks
 like view is redrawn (when scrolled) without erasing the background
 first.

 Preferences are defined in XML file - nothing funky just some
 categories and preferences nested within PreferenceScreen/

 Do I need to explicitly redraw the view? That seem excessive - why
 wouldn't that happen by default?
 Since this is an existing app - it's build and distributed with v. 1.5
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView - disallow breaking out

2009-09-21 Thread droidin.net

I'm using WebView#loadUrl() to load page inside my app. Unfortunately,
the original URL redirects to some other URL and that 2nd redirect
(302) basically opens external browser and loads final page into it. I
really don't want to do anything with the page I'm loading and don't
want to add any code e.g. load page with HttpClient and use
WebView#loadDataWithBaseURL since then I have to deal with relative
vs. absolute URL
BTW - I don't think that it's JS that breaks out of original WebView,
it seem to be a byproduct of redirect. How can I stay within the
original WebView?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView - disallow breaking out

2009-09-21 Thread droidin.net

Jason - I do want to redirect. What I also want is to stay in the
original WebView window, right now it starts there but then app pops-
up mobile browser and page is displayed in that browser rather than
the app

On Sep 21, 3:45 pm, Jason Proctor jason.android.li...@gmail.com
wrote:
 do you have a WebViewClient installed in this WebView instance?

 (personally i think that WebView should follow redirects, as that's
 usually the intent of the user/caller, but defeating the default
 behaviour ain't so bad, so...)

 I'm using WebView#loadUrl() to load page inside my app. Unfortunately,
 the original URL redirects to some other URL and that 2nd redirect
 (302) basically opens external browser and loads final page into it. I
 really don't want to do anything with the page I'm loading and don't
 want to add any code e.g. load page with HttpClient and use
 WebView#loadDataWithBaseURL since then I have to deal with relative
 vs. absolute URL
 BTW - I don't think that it's JS that breaks out of original WebView,
 it seem to be a byproduct of redirect. How can I stay within the
 original WebView?

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



[android-developers] Restore last viewed Activity

2009-09-19 Thread droidin.net

I have 3 different Activities that user navigates between in no
particular order. My goal it twofold:

   1. When user switches to something else when app is resumed I want
to start where user left even if app was terminated. Specifically I
want to display last viewed activity, not the default one
   2. When last activity is resumed I want to restore it to the last
viewed state (this one I think I have a pretty good idea on how to
achieve)

I think the problem is not start/stop - where I pretty much get what I
need, but onCreate() if app was terminated. In that case - it picks
Activity that I configured in the manifest. I suppose I can put
something in onCreate method of that default activity but is there a
better way that I'm maybe missing?

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



[android-developers] Re: WebView data caching

2009-09-19 Thread droidin.net

My problem is that data I'm loading/reloading into WebView takes long
time to process since it's full blown HTML + JS + CSS. I noticed that
when cached, same code loads way faster.
What I'm trying to do is to minimize loading hiccup when user reloads
already cached content

On Sep 3, 4:42 pm, Jason Proctor jason.android.li...@gmail.com
wrote:
 i'm not sure i follow you. why would webkit cache data loads, when
 they're coming from local strings anyway?

 say some more about what you're trying to achieve and maybe i can help out.

 hth
 j



 This really stinks (not caching data loads). Is it possible to code it
 in?

 On Sep 2, 4:07 pm, Jason Proctor jason.android.li...@gmail.com
 wrote:
   the loadData() methods don't enter anything into the history and
   rather more awkwardly don't set the current URL. so if you call
   loadData() and then getUrl() you'll find that they don't match up.

   it's not really clear what WebKit is supposed to do in these
   circumstances, but i think as a minimum it might want to insist on a
   base URL for string loads (like other versions of embedded WebKit do)
   and then put that URL in the current URL and history.

   AFAIK the WebKitcacheis persistent across Activity lifecycles. if
   you find that a page load is taking a long time however you can do
   what i do and put content: URLs to infrequently changed resources
   (like external Javascript etc) so they come from the APK instead of
   across the network.

   there's some extra hassle associated with content: URLs accessed from
   WebKit, but eventually it worked for me. search the archives for more
   stuff.

   hth
   J

   1. I load HTML data intoWebViewwith loadDataWithBaseURL
   2. Do it one more time
   3. Execute the following code and instead of going back to the 1st
   page - whole app exits. What am I doing wrong here?

        public boolean onKeyDown(final int keyCode, final KeyEvent event)
   {
            if (keyCode == KeyEvent.KEYCODE_BACK  this.browser.canGoBack
   ()) {
                this.browser.goBack();
                return true;
            }
            return super.onKeyDown(keyCode, event);
        }

   Also - is it possible forWebViewcacheto survive Activity#onStop?
   Basically - if I close app and reopen - I wantWebViewto display last
   data that was loaded, currently - I'll get a blank screen and then
   have to reload same data again

   --
   jason.vp.engineering.particle

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



[android-developers] Re: WebView data caching

2009-09-19 Thread droidin.net

Indra - I would suggest asking separate question. It's hard to answer
2 questions on a single thread however related these may be

On Sep 18, 4:10 am, indra indrad...@gmail.com wrote:
 Hi Guys,

 I am doing google search and I want to receive the data without
 loading the webView.
 Just like a query to google db, but don't know the content uri of the
 db.
 I have done a similar thing in google suggestion provider, where
 content uri is content://com.android.googlesearch.SuggestionProvider
 I will appreciate your help.
 Thanks
 Indra

 On Sep 4, 4:42 am, Jason Proctor jason.android.li...@gmail.com
 wrote:

  i'm not sure i follow you. why would webkit cache data loads, when
  they're coming from local strings anyway?

  say some more about what you're trying to achieve and maybe i can help out.

  hth
  j

  This really stinks (not caching data loads). Is it possible to code it
  in?

  On Sep 2, 4:07 pm, Jason Proctor jason.android.li...@gmail.com
  wrote:
    the loadData() methods don't enter anything into the history and
    rather more awkwardly don't set the current URL. so if you call
    loadData() and then getUrl() you'll find that they don't match up.

    it's not really clear what WebKit is supposed to do in these
    circumstances, but i think as a minimum it might want to insist on a
    base URL for string loads (like other versions of embedded WebKit do)
    and then put that URL in the current URL and history.

    AFAIK the WebKitcacheis persistent across Activity lifecycles. if
    you find that a page load is taking a long time however you can do
    what i do and put content: URLs to infrequently changed resources
    (like external Javascript etc) so they come from the APK instead of
    across the network.

    there's some extra hassle associated with content: URLs accessed from
    WebKit, but eventually it worked for me. search the archives for more
    stuff.

    hth
    J

    1. I load HTML data intoWebViewwith loadDataWithBaseURL
    2. Do it one more time
    3. Execute the following code and instead of going back to the 1st
    page - whole app exits. What am I doing wrong here?

         public boolean onKeyDown(final int keyCode, final KeyEvent event)
    {
             if (keyCode == KeyEvent.KEYCODE_BACK  this.browser.canGoBack
    ()) {
                 this.browser.goBack();
                 return true;
             }
             return super.onKeyDown(keyCode, event);
         }

    Also - is it possible forWebViewcacheto survive Activity#onStop?
    Basically - if I close app and reopen - I wantWebViewto display last
    data that was loaded, currently - I'll get a blank screen and then
    have to reload same data again

    --
    jason.vp.engineering.particle

  --
  jason.vp.engineering.particle- 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
-~--~~~~--~~--~--~---



[android-developers] Re: Http server at localhost

2009-09-04 Thread droidin.net

WebView#loadUrl(http://10.0.0.2:8080/index.html;)

On Sep 4, 3:57 am, Thomas (geomancer) tbirchm...@usa.net wrote:
 Hi:
 Like Duh on  my part, but what would a local server listen for?
 Tom B

 On Sep 3, 11:28 pm, dilli rao dilliraomca...@gmail.com wrote:

  you can set a http server running in the local machine (Android)and you can
  uset it as a simple server

  try to port the server in android (as it is ) no modifications required

 http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcor...

  http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcor...in
  android

  and use it it works for my requirements very well

  may be it will use full for you

  Thank you

  Dilli

  On Fri, Sep 4, 2009 at 5:19 AM, droidin.net bost...@gmail.com wrote:

   Is it possible to do something like WebView#loadUrl(http://10.0.0.2/
   index.html) with service acting as local http server? Where would one
   start? Will I need at least partial http server implementation that
   would listen on the socket?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Http server at localhost

2009-09-04 Thread droidin.net

Oh my God! Access your phone from the browser - I'm going to be
sick... Beyond brilliant!

On Sep 4, 6:48 am, Neil neilb...@gmail.com wrote:
 I think jetty is the thing you're looking 
 for:http://code.google.com/p/i-jetty/

 Neil

 http://l6n.org/android/

 On Sep 4, 3:11 pm, Haravikk harav...@gmail.com wrote:

  Does Android include support for Servlets? As you could possibly just
  use an HTTP servlet to serve-up pages, using JSP as well if that's
  supported, both are pretty neat ways to do that. Unless you're hoping
  to use PHP or something for fancy pages, but I'd steer well clear of
  that personally, and go for the all java solution (JSP served using an
  HTTP servlet).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: need help on https (code for http included)

2009-09-04 Thread droidin.net

Try to init your HttpClient as follows (worked for me)
final HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, UTF-8);
final SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme(http,
PlainSocketFactory.getSocketFactory(), 80));
final SSLSocketFactory sslSocketFactory =
SSLSocketFactory.getSocketFactory();
sslSocketFactory.setHostnameVerifier
(SSLSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);
registry.register(new Scheme(https, sslSocketFactory, 443));
final ThreadSafeClientConnManager manager = new
ThreadSafeClientConnManager(params, registry);
DefaultHttpClient httpclient =  new DefaultHttpClient(manager,
params);

On Sep 4, 6:51 am, Marco Schmitz netzprofi.ma...@googlemail.com
wrote:
 I tried to work with something I've found on the web. I think I am
 quite near. But nothing is printed...

 package hyper.hyper;

 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.InetAddress;
 import java.net.Socket;
 import java.net.URL;
 import java.net.UnknownHostException;
 import java.security.KeyManagementException;
 import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
 import java.security.UnrecoverableKeyException;
 import java.security.cert.X509Certificate;

 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSocketFactory;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;

 import org.apache.log4j.Appender;
 import org.apache.log4j.AppenderSkeleton;
 import org.apache.log4j.Layout;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PatternLayout;
 import org.apache.log4j.spi.LoggingEvent;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;

 /**
  * Hyper
  */
 public class Hyper extends Activity {

         private static Logger logger = Logger.getLogger(Hyper.class);

         private static final String HTTPS = https://www.commerzbanking.de;;

         @Override
         public void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.main);
                 logger.debug(START);

                 try {
                         URL url = new URL(HTTPS);
                         HttpsURLConnection.setDefaultHostnameVerifier(new 
 MyHostnameVerifier());
                         HttpsURLConnection.setDefaultSSLSocketFactory(new 
 MySSLSocketFactory());
                         HttpsURLConnection connection = (HttpsURLConnection) 
 url.openConnection();
                         connection.setDoOutput(true);
                         connection.setDoInput(true);

                         BufferedReader br = new BufferedReader(new
 InputStreamReader(connection.getInputStream()));
                         StringBuffer sb = new StringBuffer();
                         while (br.ready()) {
                                 sb.append(br.readLine());
                         }
                         logger.debug(InputStream:  + sb.toString());

                         logger.debug(END);
                 } catch (Exception e) {
                         logger.error(e);
                 }
         }

         /**
          * MyHostnameVerifier
          */
         public class MyHostnameVerifier implements HostnameVerifier {

                 public boolean verify(String hostname, SSLSession session) {
                         logger.debug(hostname:  + hostname);
                         logger.debug(session.getPeerHost:  + 
 session.getPeerHost());
                         return true;
                 }
         }

         /**
          * MyTrustManager
          */
         public class MyTrustManager implements X509TrustManager {

                 public X509Certificate[] getAcceptedIssuers() {
                         return (null);
                 }

                 public void checkClientTrusted(X509Certificate[] chain, 
 String authType) {
                 }

                 public void checkServerTrusted(X509Certificate[] chain, 
 String authType) {
                 }
         }

         /**
          * MySSLSocketFactory
          */
         public class MySSLSocketFactory extends SSLSocketFactory {

                 private SSLSocketFactory factory;

                 public MySSLSocketFactory() throws KeyManagementException,
                         NoSuchAlgorithmException, KeyStoreException, 
 UnrecoverableKeyException {
                         try {
                                 SSLContext sc = SSLContext.getInstance(TLS);
                                 sc.init(null, new TrustManager[] { new 
 MyTrustManager() }, null);
                                 factory = 

[android-developers] Re: need help on https (code for http included)

2009-09-04 Thread droidin.net

If you need a stream why don't you just use HttpEntity?
 // Get hold of the response entity
 HttpEntity entity = response.getEntity();

 // If the response does not enclose an entity, there is no need
 // to worry about connection release
 if (entity != null) {
 InputStream instream = entity.getContent();
 try {

 BufferedReader reader = new BufferedReader(
 new InputStreamReader(instream));
 // do something useful with the response
 System.out.println(reader.readLine());

 } catch (IOException ex) {
...
}

On Sep 4, 11:10 am, Marco Schmitz netzprofi.ma...@googlemail.com
wrote:
 thank you droidin,

 unfortunately I didnt need the httpclient but the stream.

 well, I found a solution :)

 btw: this is sdk 1.1 r1 code:

 greetings,
 marco

 
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.net.URL;
 import java.security.SecureRandom;
 import java.security.cert.X509Certificate;

 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;

 import lgpl.haustein.Base64Encoder;

 import org.apache.log4j.Appender;
 import org.apache.log4j.AppenderSkeleton;
 import org.apache.log4j.Layout;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PatternLayout;
 import org.apache.log4j.spi.LoggingEvent;

 import android.app.Activity;
 import android.os.Bundle;
 import android.util.Log;

 /**
  * Hyper
  */
 public class Hyper extends Activity {

         private static Logger logger = Logger.getLogger(Hyper.class);

         private static final String HTTP = http://www.gmx.de;;
         private static final String HTTPS = https://www.verisign.com/;;

         @Override
         public void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);
                 setContentView(R.layout.main);
                 logger.debug(START);

                 try {
                         SSLContext sc = SSLContext.getInstance(TLS);
                         scinit(null, new TrustManager[] { new 
 MyTrustManager() }, new
 SecureRandom());
                         
 HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
                         HttpsURLConnection.setDefaultHostnameVerifier(new 
 MyHostnameVerifier());
                         HttpsURLConnection con = (HttpsURLConnection) new
 URL(HTTPS).openConnection();
                         con.setDoOutput(true);
                         con.setDoInput(true);
                         con.connect();

                         BufferedReader br = new BufferedReader(new
 InputStreamReader(con.getInputStream()));
                         StringBuffer sb = new StringBuffer();
                         String line;
                         while ((line = br.readLine()) != null)
                                 sb.append(line);

                         logger.debug(InputStream:  + sb.toString());

                         logger.debug(END);
                 } catch (Exception e) {
                         logger.error(e);
                 }
         }

         /**
          * MyHostnameVerifier
          */
         private class MyHostnameVerifier implements HostnameVerifier {

                 @Override
                 public boolean verify(String hostname, SSLSession session) {
                         return true;
                 }
         }

         /**
          * MyTrustManager
          */
         private class MyTrustManager implements X509TrustManager {

                 @Override
                 public void checkClientTrusted(X509Certificate[] chain, 
 String authType) {
                 }

                 @Override
                 public void checkServerTrusted(X509Certificate[] chain, 
 String authType) {
                 }

                 @Override
                 public X509Certificate[] getAcceptedIssuers() {
                         return null;
                 }
         }

 }

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



[android-developers] Re: WebView data caching

2009-09-03 Thread droidin.net

This really stinks (not caching data loads). Is it possible to code it
in?

On Sep 2, 4:07 pm, Jason Proctor jason.android.li...@gmail.com
wrote:
 the loadData() methods don't enter anything into the history and
 rather more awkwardly don't set the current URL. so if you call
 loadData() and then getUrl() you'll find that they don't match up.

 it's not really clear what WebKit is supposed to do in these
 circumstances, but i think as a minimum it might want to insist on a
 base URL for string loads (like other versions of embedded WebKit do)
 and then put that URL in the current URL and history.

 AFAIK the WebKitcacheis persistent across Activity lifecycles. if
 you find that a page load is taking a long time however you can do
 what i do and put content: URLs to infrequently changed resources
 (like external Javascript etc) so they come from the APK instead of
 across the network.

 there's some extra hassle associated with content: URLs accessed from
 WebKit, but eventually it worked for me. search the archives for more
 stuff.

 hth
 J





 1. I load HTML data intoWebViewwith loadDataWithBaseURL
 2. Do it one more time
 3. Execute the following code and instead of going back to the 1st
 page - whole app exits. What am I doing wrong here?

      public boolean onKeyDown(final int keyCode, final KeyEvent event)
 {
          if (keyCode == KeyEvent.KEYCODE_BACK  this.browser.canGoBack
 ()) {
              this.browser.goBack();
              return true;
          }
          return super.onKeyDown(keyCode, event);
      }

 Also - is it possible forWebViewcacheto survive Activity#onStop?
 Basically - if I close app and reopen - I wantWebViewto display last
 data that was loaded, currently - I'll get a blank screen and then
 have to reload same data again

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



[android-developers] Http server at localhost

2009-09-03 Thread droidin.net

Is it possible to do something like WebView#loadUrl(http://10.0.0.2/
index.html) with service acting as local http server? Where would one
start? Will I need at least partial http server implementation that
would listen on the socket?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Http server at localhost

2009-09-03 Thread droidin.net

Oh boy, there's java web server 4 kilos in size http://is.gd/2Rfl2. I
wonder though what would be faster - doing WebView#loadUrl from such
server or WebView#loadDataWithBaseUrl from value stored in the
preferences. In any event - first one will be cached by browser, with
history provided which is not a small gain, plus - I can store files
for that webserver on the card.
I will try this tonight,

Thanks Chris!

On Sep 3, 6:24 pm, Chris Stratton cs07...@gmail.com wrote:
 Yes and you have the right idea about needing something that will
 listen on a socket, but you will probably need to put it on a higher
 port number and include that in the URL, since on most linuxes non
 privileged processes cannot claim low port numbers such as 80.   Port
 8080 was often used in the old days...

 You could do this by porting some compact embedded linux http server
 by abusing the ndk toolchain, but the android folks would say it's
 better done in java

 On Sep 3, 7:49 pm, droidin.net bost...@gmail.com wrote:

  Is it possible to do something like WebView#loadUrl(http://10.0.0.2/
  index.html) with service acting as local http server? Where would one
  start? Will I need at least partial http server implementation that
  would listen on the socket?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] WebView data caching

2009-09-02 Thread droidin.net

1. I load HTML data into WebView with loadDataWithBaseURL
2. Do it one more time
3. Execute the following code and instead of going back to the 1st
page - whole app exits. What am I doing wrong here?

public boolean onKeyDown(final int keyCode, final KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_BACK  this.browser.canGoBack
()) {
this.browser.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}

Also - is it possible for WebView cache to survive Activity#onStop?
Basically - if I close app and reopen - I want WebView to display last
data that was loaded, currently - I'll get a blank screen and then
have to reload same data again

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



[android-developers] Service lifecycle and in-memory caching

2009-09-01 Thread droidin.net

If I have a service that contains Map with some cached objects that
I'm serving on demand to the Activity, then how reliable that cache
is and what are the chances that server object (and my cache) may be
dropped?
The server runs in its own thread (AIDL) and Activity binds/unbinds
from it as needed. The server also is running  periodical updates
thread which refreshes the cache (can vary from every 15 min to once/
24h). Can I expect this cache to disappear at any moment?
Also - the cache (at it's fullest) is about 100K and consists of UTF-8
String data (generally HTML), what would be a good strategy to persist
it so it can be repopulated on service's onCreate?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Services - best way to bind

2009-08-31 Thread droidin.net

When using AIDL-based async services I've seen various examples when
the service is bound/unbound on Activity's oncreate/ondestroy, onstart/
onstop and even on onpause/onresume. Which one is right? And what is
acceptable recovery strategy when attempt using the service fails?

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



[android-developers] Re: Alternative Android Markets

2009-08-17 Thread droidin.net

I also got this reply from megachan on Android Market Forum, I think
he has some excellent points:

Re:
I would be very cautious in dealing with Chinese app distributor.  I
sold plenty of apps through my distributor but the problem isn't
selling your app it is collecting the money.  It is impossible to
collect your money, and I dealt with big public company not just your
small mom and pop.  Don't even think about litigation, it's hopeless.
So in China either DIY or have a partner that you can leverage.  I
finally worked out a 2 way deal in the end where I sell their apps and
they sell ours.  That's the only way to ensure proper payment.

megachan

On Aug 17, 5:36 am, gunnar-medial gunnar0...@gmail.com wrote:
 Might not be a scam. I'm thinking of launching an appstore myself for
 nordic countries in Europe. I would offer to translate as well. But I
 rather prefer Google be diligent about expanding merchant checkout
 (seller) accounts to more countries as to fight all those alternate
 stores popping up.

 On 16 Aug, 18:15, droidin.net bost...@gmail.com wrote:

  Sorry reposting here. It seems that I'm not able to post to Android
  Discuss r my posts are getting ignored

  I have 2 apps (DroidIn) on Market for some time now. Lately I start
  getting offers from Taiwanese/Chinese mobile leaders companies
  offering to host and resell the app. They are offering to help with
  translation and provide links to some Chinese-language sites like
  thishttp://android.sj.91.com/. I followed up with one of the offers
  and got bunch of documents and generally my cut would be 40% before
  taxes. Now, 40% to 2 billion people is not such a bad deal but I'm
  wondering if someone already has similar experience and is this
  possible some sort of scam?

  I'm not implying anything these may be legit offers, but one cannot be
  too careful these days


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



[android-developers] Re: Alternative Android Markets

2009-08-17 Thread droidin.net

Yes it's fantastic! But can you get paid? That's whole different
question

On Aug 17, 10:25 am, Electron pcedb0...@gmail.com wrote:
 Here is an another Market, Name is eoeMarket

 everyone can visit thehttp://www.eoemarket.com/
 it's so awesome!

 it's just same as the Android Market.

 On Aug 17, 9:34 pm, cs_post...@hotmail.com cs_post...@hotmail.com
 wrote:

  On Aug 16, 12:15 pm, droidin.net bost...@gmail.com wrote:

   I have 2 apps (DroidIn) on Market for some time now. Lately I start
   getting offers from Taiwanese/Chinese mobile leaders companies
   offering to host and resell the app. They are offering to help with
   translation and provide links to some Chinese-language sites like
   thishttp://android.sj.91.com/. I followed up with one of the offers
   and got bunch of documents and generally my cut would be 40% before
   taxes. Now, 40% to 2 billion people is not such a bad deal but I'm
   wondering if someone already has similar experience and is this
   possible some sort of scam?

  Personally, I would ask one of my Chinese speaking friends to check
  out the China-facing web presence of the company, to see if it's as
  represented in the marketing proposals being sent to developers.
  Even preferable if it's possible to find someone with enough ties to
  have a sense of what is actually popular there at present.


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



[android-developers] Alternative Android Markets

2009-08-16 Thread droidin.net

Sorry reposting here. It seems that I'm not able to post to Android
Discuss r my posts are getting ignored

I have 2 apps (DroidIn) on Market for some time now. Lately I start
getting offers from Taiwanese/Chinese mobile leaders companies
offering to host and resell the app. They are offering to help with
translation and provide links to some Chinese-language sites like
this http://android.sj.91.com/. I followed up with one of the offers
and got bunch of documents and generally my cut would be 40% before
taxes. Now, 40% to 2 billion people is not such a bad deal but I'm
wondering if someone already has similar experience and is this
possible some sort of scam?

I'm not implying anything these may be legit offers, but one cannot be
too careful these days
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Parse or not to parse?

2009-08-16 Thread droidin.net

I guess to definitely answer this, one needs to run some benchmarks
but I'll ask anyway. In you opinion/experience what would work faster
after initial HTML is grabbed from the remote source. (The HTML is
group of one or two level nested OL or UL within body tag and some
DIVs)

1. Using WebView/JS/CSS to customize and render HTML into list-like UI
2. Parse HTML into ListAdapter and then use ListView to render it

My experience with #1 shows that it is actually pretty slow. Weird
thing is - once rendered - JS works quite well and fast it's really
initial parsing and loading that produces the delay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Parse or not to parse?

2009-08-16 Thread droidin.net

Say it's clean enough to write a SAX handler with few possible
exception handling lines. I really don't want 3rd party jars. With
that aside - will it be faster to use ListView?

Bo

On Aug 16, 4:58 pm, Mark Murphy mmur...@commonsware.com wrote:
 droidin.net wrote:
  I guess to definitely answer this, one needs to run some benchmarks
  but I'll ask anyway. In you opinion/experience what would work faster
  after initial HTML is grabbed from the remote source. (The HTML is
  group of one or two level nested OL or UL within body tag and some
  DIVs)

  1. Using WebView/JS/CSS to customize and render HTML into list-like UI
  2. Parse HTML into ListAdapter and then use ListView to render it

  My experience with #1 shows that it is actually pretty slow. Weird
  thing is - once rendered - JS works quite well and fast it's really
  initial parsing and loading that produces the delay

 #2 will be limited by how clean your HTML is, unless you use TagSoup or
 something to parse it, and I have no idea if TagSoup or kin run on Android.

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

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



[android-developers] Unable to debug on HTC MyTouch

2009-08-15 Thread droidin.net

All right - I admit my defeat. Can anyone walk me trough successfully
debugging with MyTouch? Here's what I tried:
1. Plugged in the phone - my XP Prfessional never asked me for
anything - just simply told me that Hardware is ready to use
2. In the phone - mounted USB - no problem accessing phone's SD which
is mounted as a drive
3. Disconnected phone and in developer setting enabled Settings-
Applications-Development-USB debugging
4. Connected phone back - not a pip from the OS, didn't asked me to
install any drivers
5. Trying to update drivers for HTC Android phone USB device by
uninstalling the driver and then forcing x86 located USB drivers for
Android - the system response is specified location does not contain
information about your hardware
6. Do I need to root the phone? I would rather not do it but I
desperately need it for debugging
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to debug on HTC MyTouch

2009-08-15 Thread droidin.net

Hallelujah! Removing registry keys did it for me. Big fat warning: do
not stop at first key you going to find. I had to repeat all steps and
ended up removing 4 different registry folders. In one instance I had
to update permissions. Anyway - it's working: thank you, thank you,
thank you! Easiest way to get to the driver, btw is to right click on
the removable drive folder and select Properties-Hardware-Driver


On Aug 15, 6:07 pm, Mark Murphy mmur...@commonsware.com wrote:
 droidin.net wrote:
  All right - I admit my defeat. Can anyone walk me trough successfully
  debugging with MyTouch? Here's what I tried:
  1. Plugged in the phone - my XP Prfessional never asked me for
  anything - just simply told me that Hardware is ready to use
  2. In the phone - mounted USB - no problem accessing phone's SD which
  is mounted as a drive
  3. Disconnected phone and in developer setting enabled Settings-
  Applications-Development-USB debugging
  4. Connected phone back - not a pip from the OS, didn't asked me to
  install any drivers
  5. Trying to update drivers for HTC Android phone USB device by
  uninstalling the driver and then forcing x86 located USB drivers for
  Android - the system response is specified location does not contain
  information about your hardware
  6. Do I need to root the phone? I would rather not do it but I
  desperately need it for debugging

 I'm not sure if there are any steps in here beyond what you tried:

 http://wiki.andmob.org/faq-magic

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

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



[android-developers] Vertical label

2009-08-10 Thread droidin.net

I need 2 ways of showing a vertical label:
1. Horizontal label turned 90 degrees counterclockwise (letters on the
side)
2. Horizontal label with letters one under the other (like a store
sign)

Do I need to develop custom widgets for both cases (one case), can I
make TextView to render that way, and what would be a good way to do
something like that if I need to go completely custom?

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



[android-developers] T-Mobile MyTouch Emulator Skin

2009-08-09 Thread droidin.net

I tried to Google for it to no avail. I really need it to make some
promos - any hint will be appreciated

Thanks,

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



[android-developers] Re: T-Mobile MyTouch Emulator Skin

2009-08-09 Thread droidin.net

Thanks Casper,

That does look nice - but I really-really need one that says T-Mobile
and preferably in maroon or black

Bo

On Aug 9, 10:34 am, Casper Bang casper.b...@gmail.com wrote:
 Not sure if it will suit your need, but I did a generic white HTC
 Magic skin a few months 
 ago:http://coffeecokeandcode.blogspot.com/2009/06/htc-magic-skin-for-andr...

 /Casper

 On 9 Aug., 18:50, droidin.net bost...@gmail.com wrote:

  I tried to Google for it to no avail. I really need it to make some
  promos - any hint will be appreciated

  Thanks,

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



[android-developers] Service lifecycle and persistent objects

2009-08-06 Thread droidin.net

I need to retain a complex object in my service, so I can reliably
come back to it (it holds updates). Initially I coded it just as a
class filed in my Service implementation but I'm observing that the
updates object is periodically reset to null which tells me that
server class itself is recreated. Can someone recommend lightweight
reliable strategy to save and recreate such updates object (I can make
it serializable)

Thanks,

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



[android-developers] Re: Activity timeout on WebView load

2009-08-04 Thread droidin.net

Well I have background threads to load HTML content the way you guys
describe it - I use HttpClient to grab HTML and then I use Handler to
display that with WebView#loadData. But this is a special case - I
want to load URL directly into the WebView#loadURL, so how do I do it
on a background thread?

On Aug 4, 3:12 am, Christine christine.kar...@gmail.com wrote:
 I take it you don't already have a bg thread, or you wouldn't have the
 problem?

 The cute way of loading data in the background is to use a service.
 The simple way is to use a Handler, as Peter suggested. In the handler
 task, you create a new thread that does the http stuff. If the user
 needs to wait for the data to display anyway, I think  you can prevent
 the timeout from happening by using a progress bar.

 On Aug 4, 1:07 am, droidin.net bost...@gmail.com wrote:

  In my app I have to load external page into WebView-based activity.
  Some of my users with slower connections are reporting screen timeout
  while waiting for the page to load. What would be a good way of
  loading the page on backgorund thread and then refreshing the screen?
  Use HttpClient to fetch it and then use WebView#loadData? My fear is -
  the page I'm loading is pretty complicated there's some JS that
  happens on load - wouldn't I just mess it up? Is there an alternative
  way of doing what I need?

  Thanks,

  Bo


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



[android-developers] Re: Spinner - don't display selection

2009-08-04 Thread droidin.net

Peter, thanks a bunch. Here's code snippet:
// d is a dialog
Spinner spin = (Spinner) d.findViewById(R.id.searchCriteria);
spin.setOnItemSelectedListener(new OnItemSelectedListener() {
  public void onItemSelected(AdapterView? parent, View view, int
position, long id) {
// hide selection text
((TextView)view).setText(null);
// if you want you can change background here
  }
  public void onNothingSelected(AdapterView? parent) {}
});


On Aug 4, 2:13 am, peter heywoodpres...@gmail.com wrote:
 set your Sipinner onItemSelectedLisnter
 and implement the inteface method :
 onItemClick(AdapterView? arg0, View arg1, int arg2,long arg3)
 the parameter of arg1 is your selected view, and you could pick
 textview form it.
 then set the backgroud color as your like of textview

 On Aug 4, 1:10 pm, droidin.net bost...@gmail.com wrote:

  I'm trying to use Spinner as a button with selection pop-up. Basically
  I want an icon and when user clicks it - the popup list is displayed
  and user can make a selection.
  The Spinner happily accepts icon image as drawable background.
  Unfortunately when I select a value the text overlays the background.
  Is it possible to set selection text color as a transparent? Or maybe
  there's a better way?

  Thanks,

  Bo


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



[android-developers] Spinner: text vs value

2009-08-04 Thread droidin.net

I declare my Spinner in the following manner (it's very static so I
have 2 string arrays in array.xml for titles and values)

Spinner android:id=@+id/searchCriteria android:entries=@array/
searchBy android:entryValues=@array/searchByValues
/Spinner

I expect spinner.getSelectedItem() to return an array [title, value]
but in fact it returns just a title String. Is it ignoring
android:entryValues? How do I get a value, not a title from it? Is
this doable with XML only or do I need to create adapter and do it
programmatically?

Thanks,

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



[android-developers] Activity timeout on WebView load

2009-08-03 Thread droidin.net

In my app I have to load external page into WebView-based activity.
Some of my users with slower connections are reporting screen timeout
while waiting for the page to load. What would be a good way of
loading the page on backgorund thread and then refreshing the screen?
Use HttpClient to fetch it and then use WebView#loadData? My fear is -
the page I'm loading is pretty complicated there's some JS that
happens on load - wouldn't I just mess it up? Is there an alternative
way of doing what I need?

Thanks,

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



[android-developers] Spinner - don't display selection

2009-08-03 Thread droidin.net

I'm trying to use Spinner as a button with selection pop-up. Basically
I want an icon and when user clicks it - the popup list is displayed
and user can make a selection.
The Spinner happily accepts icon image as drawable background.
Unfortunately when I select a value the text overlays the background.
Is it possible to set selection text color as a transparent? Or maybe
there's a better way?

Thanks,

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



[android-developers] Re: LinearLayout fill the middle

2009-08-01 Thread droidin.net

By golly! This does work! Mark what's the theory - is this by design
(weight vs fill_parent)? Are my expectations wrong? I mean - why then
not really fill the whole parent but fill from the current position to
the bottom?

Bo

On Aug 1, 7:54 am, Mark Murphy mmur...@commonsware.com wrote:
 droidin.net wrote:
  I have a vertical, set height (300px)LinearLayout(LL) with 3 nested
  LLs. 1 and 3rd are set with android:layout_height=wrap_content and
  the middle one with android:layout_height=fill_parent. To my dismay,
  3rd LL get's pushed out with 2nd one filling parent layout right to
  the bottom. How do I achieve desired effect since I want potentially
  resize the outside container with the middle portion expending and
  contracting to accommodate the change

 Use layout_height=0px and layout_weight=1.

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

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



[android-developers] Search in the Market

2009-08-01 Thread droidin.net

I don't know if my question belongs to this group but I'll ask it
anyway:

I noticed that when I search for my app (DroidIn) on the market using
keyword linkedin the app is not coming up in the results.I tried
different combinations, currently I have 2 apps titled: DroidInLite
linkedin + twitter and DroidIn - linkedin twitter. Both will not
come up when searching by single word linkedin. If I search for
DroidIn (and who will?) or by linkedin twitter then I see both.
There are only 3 apps on the market right now that are related to
LinkedIn and not having app appearing in the search by the main term
is I'm sure costing me some users. I'm reluctant to call the app
LinkedIn anything since I'm not affiliated with the company and I
also have name for the app I like to keep.

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



[android-developers] Re: App not showing up in Android Market??

2009-08-01 Thread droidin.net

I have a thread http://is.gd/1XVPG complaining about same thing. I
think there's something screwy with market search

Bo (DroidIn - LinkedIn + Twitter on Android)

On Aug 1, 9:07 am, rcs rsar...@gmail.com wrote:
 We just got an email from someone on an HTC Magic searching for our
 app and saying that it's not showing up on Android Market. Every now
 and then, we'll see that our app just disappears for a little while.
 What gives?  Anyone else see that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Terminating Application (Activity)

2009-08-01 Thread droidin.net

This unfortunately has a huge drawback that when exit() is executed
your debugging session goes kaput. When app restarts it's no longer in
debugger :(

On Jul 31, 5:22 am, Mark Murphy mmur...@commonsware.com wrote:
 droidin.netwrote:
  Mark! You are a genius!

 Somebody else pointed out the technique many months ago, and it stuck in
 my head. I certainly can't take credit for the concept.

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

 Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Full browser vs WebView view

2009-08-01 Thread droidin.net

I'm trying various ways of Twitter authorization which requires
roundtrip to the browser. When I load auth URL into standalone browser
everything works well. However if I call same URL but into embedded
WebView (separate Actions, same app) the page loads but it is not
fully functional (I cannot click in the fields, or buttons). I suspect
that it's because JS is ether disabled or broken. Here are steps

1. Execute intent with
startActivity(new Intent(auth, Uri.parse(authUrl), this,
Browser.class));

2. Init browser
private void initBrowser() {
this.browser = (WebView) findViewById(R.id.browser);
this.browser.getSettings().setJavaScriptEnabled(true);
this.browser.getSettings
().setJavaScriptCanOpenWindowsAutomatically(true);
this.browser.getSettings().setPluginsEnabled(true);
this.browser.getSettings().setLoadsImagesAutomatically(true);
this.browser.addJavascriptInterface(this, MainScreen);
}

3. Load url
this.browser.loadUrl(getIntent().getData().toString());

Thanks,

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



[android-developers] Re: Full browser vs WebView view

2009-08-01 Thread droidin.net

Been there, done that. It's simple. I use OAuth since that gives me
ability to mark each of messages posted with my app as from DroidIn
not with from API. It's my app, I want my glory :) Plus it's much
more user friendly since I don't have to keep or even know user name/
password. I actually have a working implementation (see my write-up on
http://is.gd/1Yhh7)

The trick is - when OAuth is done, browser will execute the callback
which will call my activity through intent-filter (works like a charm
in the standalone browser)

Now - back to my problem. I tried to load auth URL into desktop
browser on which JS is disabled. It works. So my problem is that when
page comes up in WebView view buttons are clickable but form fields
are not. I click on user name and it behaves as disabled field. What
gives?

Regards,

Bo

On Aug 1, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote:
 droidin.net wrote:
  I'm trying various ways of Twitter authorization which requires
  roundtrip to the browser.

 Why not use their API?

  1. Execute intent with
  startActivity(new Intent(auth, Uri.parse(authUrl), this,
  Browser.class));

 On a side note, since Intent actions are device-global in scope, you may
 wish to use something a bit more unique than auth. I usually namespace
 mine (com.commonsware.android.app.MY_ACTION), just to be safe.

  2. Init browser
      private void initBrowser() {
          this.browser = (WebView) findViewById(R.id.browser);
          this.browser.getSettings().setJavaScriptEnabled(true);
          this.browser.getSettings
  ().setJavaScriptCanOpenWindowsAutomatically(true);
          this.browser.getSettings().setPluginsEnabled(true);
          this.browser.getSettings().setLoadsImagesAutomatically(true);
          this.browser.addJavascriptInterface(this, MainScreen);
      }

  3. Load url
  this.browser.loadUrl(getIntent().getData().toString());

 I suspect you don't want to go down this path.

 Let's suppose the form worked. The result will be...a new Browser
 window. Links and such from within a WebView do not stay in the WebView
 by default.

 OK, so you add a WebViewClient and implement shouldOverrideUrlLoading().
 Then what?

 And, of course, your first problem would be to get the form working.

 So, I'll go back to the beginning: why not use their API? I've used
 JTwitter in a handful of book examples, and it works swimmingly, or at
 least as swimmingly as Twitter's API lets you (it seems to be the first
 to fail, before any whale sightings).

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

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



[android-developers] Re: Full browser vs WebView view

2009-08-01 Thread droidin.net

In fact - it works with internal WebView! Here's caveat -  on the
emulator I cannot click in the field but I can use arrow keys to gain
the focus. Once I'm able to type the information in - redirect works
just fine. Unfortunately, right now I don't have G1 to check how this
will manifest itself in the real device. Well - I'll check it on
Monday

Bo

On Aug 1, 5:09 pm, droidin.net bost...@gmail.com wrote:
 Been there, done that. It's simple. I use OAuth since that gives me
 ability to mark each of messages posted with my app as from DroidIn
 not with from API. It's my app, I want my glory :) Plus it's much
 more user friendly since I don't have to keep or even know user name/
 password. I actually have a working implementation (see my write-up 
 onhttp://is.gd/1Yhh7)

 The trick is - when OAuth is done, browser will execute the callback
 which will call my activity through intent-filter (works like a charm
 in the standalone browser)

 Now - back to my problem. I tried to load auth URL into desktop
 browser on which JS is disabled. It works. So my problem is that when
 page comes up in WebView view buttons are clickable but form fields
 are not. I click on user name and it behaves as disabled field. What
 gives?

 Regards,

 Bo

 On Aug 1, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote:

  droidin.net wrote:
   I'm trying various ways of Twitter authorization which requires
   roundtrip to the browser.

  Why not use their API?

   1. Execute intent with
   startActivity(new Intent(auth, Uri.parse(authUrl), this,
   Browser.class));

  On a side note, since Intent actions are device-global in scope, you may
  wish to use something a bit more unique than auth. I usually namespace
  mine (com.commonsware.android.app.MY_ACTION), just to be safe.

   2. Init browser
       private void initBrowser() {
           this.browser = (WebView) findViewById(R.id.browser);
           this.browser.getSettings().setJavaScriptEnabled(true);
           this.browser.getSettings
   ().setJavaScriptCanOpenWindowsAutomatically(true);
           this.browser.getSettings().setPluginsEnabled(true);
           this.browser.getSettings().setLoadsImagesAutomatically(true);
           this.browser.addJavascriptInterface(this, MainScreen);
       }

   3. Load url
   this.browser.loadUrl(getIntent().getData().toString());

  I suspect you don't want to go down this path.

  Let's suppose the form worked. The result will be...a new Browser
  window. Links and such from within a WebView do not stay in the WebView
  by default.

  OK, so you add a WebViewClient and implement shouldOverrideUrlLoading().
  Then what?

  And, of course, your first problem would be to get the form working.

  So, I'll go back to the beginning: why not use their API? I've used
  JTwitter in a handful of book examples, and it works swimmingly, or at
  least as swimmingly as Twitter's API lets you (it seems to be the first
  to fail, before any whale sightings).

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

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



[android-developers] Re: Terminating Application (Activity)

2009-07-31 Thread droidin.net

Mark! You are a genius! It did exactly what I need. I'll put it as a
tip into my blog (http://dev.bostone.us) with due diligence, it's a
great testing tool

On Jul 30, 3:09 pm, Mark Murphy mmur...@commonsware.com wrote:
 droidin.net wrote:
  For the test purposes I need to terminate my app from within my code.
  Doing Activity#finish() doesn't do it. Doing
  Activity#getMainLooper#quit fails with exception. Here's sequence of
  steps I'm trying to do:

  1. Activity calls another application
  2. Original application terminates (basically I'm trying to simulate
  very busy phone)
  3. 2nd app calls the original app
  4. Original app restarts from scratch and processes callback

  Any hints for achieving step #2 are much appreciated

 System.exit() should work. I don't necessarily recommend it for
 production apps, but for a simulation in a test case it is (probably) OK.

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

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



[android-developers] LinearLayout fill the middle

2009-07-31 Thread droidin.net

I have a vertical, set height (300px) LinearLayout (LL) with 3 nested
LLs. 1 and 3rd are set with android:layout_height=wrap_content and
the middle one with android:layout_height=fill_parent. To my dismay,
3rd LL get's pushed out with 2nd one filling parent layout right to
the bottom. How do I achieve desired effect since I want potentially
resize the outside container with the middle portion expending and
contracting to accommodate the change
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Vertical tab - possible?

2009-07-25 Thread droidin.net

I tried to search discussions and couldn't find definite answer or
example in old thread. I want my tabs to realign vertically in the
landscape mode. Currently I have to use buttons which is sorta silly
when there is a tab control.
If it is possible short hint would be greatly appreciated
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---