[android-developers] Any way to find out the current running activity from a service?

2009-08-03 Thread Paul Drummond
Hi,

I have been looking for this for a while but I can't find any way of doing
it.  A contrived example would be a service that simply displays the name of
the current running activity as an Ongoing Notification.  For instance, when
the user is reading a particular email, the name of the activity (hopefully
the email title!) would appear in the notifications window and when the user
switches to read a text message, the notification would change to show the
name of the new activity.

Is there a way to do this in Android?

Thank you,
Paul Drummond
-- 
Iode Software Ltd, registered in England No. 6299803.

Registered Office Address: 12 Sancroft Drive, Houghton-le-Spring, Tyne &
Wear, DH5 8NE.

This message is intended only for the use of the person(s) ("the intended
recipient(s)") to whom it is addressed. It may contain information which is
privileged and confidential within the meaning of applicable law. If you are
not the intended recipient, please contact the sender as soon as possible.
The views expressed in this communication may not necessarily be the views
held by The Company.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: listactivity problems

2009-08-03 Thread Carl

Great! That works.

I would like to show a textview at the top of the list (saying
something like "Select the item"). I followed an example, but I can
only see it say "No data".
I have changed my code by adding setContentView(R.layout.mylistact),
and this is what mylistact.xml looks like:


http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="8dp"
android:paddingRight="8dp">







 


Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Device keyboard backlight

2009-08-03 Thread Shang Hao

Hi,

I want to create a menu which would help to alter the timeout of the
back-light of the device keyboard.. So, if i know where exactly we
are setting the device-keyboard value most of my problem can be
solved PLease let me know if any clues u have.

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



[android-developers] AutoCompleteTextView with SimpleAdapter

2009-08-03 Thread kostmo

Hello,
I am trying to use a SimpleAdapter to populate my
AutoCompleteTextView.  I observe that the Filter runs after the third
keystroke as specified in my layout, and "suggestion_list" is being
populated with at least five elements.  After the filter runs, the
completionHint drops down from the AutoCompleteTextView, but the there
are no rows underneath (which should contain suggestions).

The underlying datastore is an ArrayList of HashMaps.  The HashMap key
to the value desired in the suggestion rows is "vernacular_name".
Since I have specified this in the super() SimpleAdapter constructor,
I assume that it should be calling setViewText with the correct
arguments behind the scenes.

Can anyone see what is wrong with this code, and why the Views
corresponding to suggestions are absent from the AutoCompleteTextView
dropdown?

Thanks,
Karl

public class VernacularAutoComplete extends Activity {

final static String TAG = "VernacularAutoComplete";
ArrayList> suggestion_list = new
ArrayList>();

@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);

this.setContentView(R.layout.autocomplete);
SuggestionListAdapter autocomplete_adapter = new
SuggestionListAdapter(
this);

AutoCompleteTextView textView = (AutoCompleteTextView) 
findViewById
(R.id.userText);
textView.setAdapter(autocomplete_adapter);
}

// XXX compiler bug in javac 1.5.0_07-164, we need to implement
Filterable
// to make compilation work
public class SuggestionListAdapter extends SimpleAdapter implements
Filterable {

VernacularFilter vernacular_filter = new VernacularFilter();

public SuggestionListAdapter(Context context) {

super(context, suggestion_list,
android.R.layout.simple_list_item_1,
new String[] { "vernacular_name" },
new int[] { android.R.id.text1 });
}

class VernacularFilter extends Filter {

@Override
protected FilterResults performFiltering(CharSequence 
constraint) {

FilterResults f = new FilterResults();
if (constraint != null) {
// Log.d(TAG, "Running filter...");

ItisMirrorResponseParser imrp = new 
ItisMirrorResponseParser(
(String) constraint);
ArrayList> 
filter_result = imrp
.parse();

f.values = filter_result;
f.count = filter_result.size();
}
return f;
}

@Override
protected void publishResults(CharSequence constraint,
FilterResults results) {

VernacularAutoComplete.this.suggestion_list =
(ArrayList>) results.values;

SuggestionListAdapter.this.notifyDataSetChanged();
}
}

@Override
public Filter getFilter() {
return vernacular_filter;
}
}
}


~~ autocomplete.xml ~~


http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>






--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] about the hardware acceleration of Skia drawing

2009-08-03 Thread Zhiguo Ge
Hi, I would like to know whether Android currently supports the hardware
accelleration for SKia 2D drawing.
Thanks!

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



[android-developers] Re: Catching memory exception

2009-08-03 Thread whitech

thank you, I can catch the error now. I've use catch(Exception) not
catch(Error) before so I can't catch it.
There is another problem, can I push the limit of memory higher? It is
a little too small with only 16 MB

On 8月4日, 上午2时14分, fadden  wrote:
> On Aug 2, 8:01 pm,whitech wrote:
>
> > Hi all. I've got this problem:
> > When my program using too much memory, it die. Is there an exception
> > or something else to warn me? How can I catch it?
>
> What exception is appearing in the log file when your application
> dies?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to integrate my application to paypal

2009-08-03 Thread JP


I've seen WebViews with the PayPal payment button snippet pasted in.

On Aug 3, 5:21 am, Venkat  wrote:
> Hi
>
> Could please help me how to integrate my application with paypal, so
> that User can pay money in my application through paypal to the
> merchant?
>
> Thanks & Regards
> Venkat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Clearing the cache of your app on exit

2009-08-03 Thread Dianne Hackborn
On Mon, Aug 3, 2009 at 12:20 AM, for android  wrote:

> i was not talking about the files which my app writes on the local file
> system.
>
> I was talking about the "Clear Cache" button in here "Settings --> Apps -->
> Manage Apps --> "My App" --> Clear Cach"


What that button does is remove all of the files YOUR application has put
into the cache directory.  Your code looks okay, though you should probably
make it recursive to take care of sub-directories.

-- 
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] Re: SQLiteDatabase table

2009-08-03 Thread janardhan

hey Jeff Sharkey,
pls can u send the code for login application using sqlite databse

On Aug 4, 9:55 am, Jeff Sharkey  wrote:
> You should really look at using SQLiteOpenHelper; it automatically
> helps with initial database creation and any upgrade paths.
>
> j
>
>
>
> On Tue, Jul 28, 2009 at 7:35 PM, jayaram wrote:
>
> > Hi,
> >     I've an SQLiteDatabase mydb.db.   I want to check whether a
> > particular table named 'table1' exists or not at the beginning of my
> > pgm.
>
> >    Do i have any methods for checking that without the "create table
> > if not exists" query?
>
> > Any suggestions
>
> > Regards..
> > Jayaram
>
> --
> Jeff Sharkey
> jshar...@android.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SQLiteDatabase table

2009-08-03 Thread janardhan

hey boomerbubba,
pls can u send the code for login application using sqlite databse

On Aug 3, 9:03 pm, boomerbubba  wrote:
> SELECT EXISTS(SELECT * FROM sqlite_master WHERE type = 'table' AND
> Name = 'MyTableName');
>
> returns 1 or 0 for True or False
>
> Substute your own table name for MyTableName.
>
> On Jul 29, 7:07 am, jay ram  wrote:
>
> >     I'm working with SQLiteDatabase. I need to find out whether a table
> > named 'table1' exists in my database or not, programmatically.
> > Is there any method to find that?
>
> > Thanks in advance.
> > --
>
> > Regards,
>
> > T.JAYARAM
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] prevent native application

2009-08-03 Thread Honest

Hello,

I want to prevent native application to receive message.I want that my
application only receive message. Is it possible ? if yes then how ?
can i access the received message and delete it ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Signal re-sampling in android

2009-08-03 Thread Tez

Hi,

Is there any library already available for speech signal re-sampling?
I have sample speech input with the following config.

8Khz, 16bit PCM.

I wish to resample to rates like 11.25, 22.5, 44.1khz, 16khz etc.

Is there any open source project doing this?

Cheers,
Earlence
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: ListActivity selected Item

2009-08-03 Thread bpellow

Hey Mike,

Did you ever get this working?? I need to do something similar in an
app I'm trying to put together.  I need the highlight from a touch on
a ListActivity row to remain highlighted after the touch.

Thanks so much,
Ben

On Jul 8, 8:14 am, mike  wrote:
> I'm having trouble with a list Activity, and selected items.
> Basically, when I move the wheel ball (i select an item without
> touch), then the background of the list item will highlight an orange,
> then I click my corresponding button below and it acts upon the
> selected item. I also want the user to be able to press with their
> finger once, and highlight the item, however, when I touch, it just
> highlights it orange and then back to normal. I know it's calling the
> onListItemClicked. I tried to set the position from that as
> this.setSelected(position), but that doesn't make the background stay
> a constant orange.
>
> Here's my xml that the ListActivity uses
>
> 
> http://schemas.android.com/apk/res/
> android"
>                           android:orientation="vertical"
>                           android:layout_width="fill_parent"
>                           android:layout_height="fill_parent">
>                  android:id="@+id/android:list"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:layout_weight="1" />
>                          android:id="@+id/android:empty"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:text="No Items." />
>              android:id="@+id/buttons"
>         android:orientation="horizontal"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content">
>                          android:id="@+id/editButton"
>                         android:layout_width="fill_parent"
>                         android:layout_height="46dip"
>                         android:layout_weight="1"
>                         android:src="@android:drawable/ic_menu_edit" />
>                                  android:id="@+id/deleteButton"
>                         android:layout_width="fill_parent"
>                         android:layout_height="46dip"
>                         android:layout_weight="1"
>                         android:src="@android:drawable/ic_menu_delete" />
>     
> 
>
> I've been googling, and reading about people who have similar (but not
> exactly the same problem) as me, and none of their solutions worked.
> If its important, I'm populating this listview with a custom extension
> of ArrayAdapter
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Rectangle vs Parallelogram..Plz Help!!!!

2009-08-03 Thread Sagar

Hi all,

I check rectangle intersection when an object intersects with that
rectangle. Now I create a parellelogram using Path class. How can I
check intersection now?? The problem right now is:

--
|  _|
|_  |
|  _|
|_  |
||
--

Here parellogram shows my image that will block object. While
rectangle works like container. But it should shrink itself to
accomodate image only, not the other area. I m not getting this..plz
help..

For vertical and horizontal blockers i have something like this

-
| _ |
| _ |
| _ |
-

So for those blockers, there is no problem.plz suggest a
solution..thanks a lot!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: some basic question.

2009-08-03 Thread Honest


I am so thankful to your reply. Can some one tell me how can i get the
SDKS to change framework of o/s ?

On Aug 3, 8:42 pm, Roman  wrote:
> Signal Strength
>
> For being able to get the signal strength of your current GSM
> connection, implement a   onSignalStrengthChanged callback method.
> This method is called when the Signal strength changes. You have to
> extend the PhoneStateListener class for doing this.
>
> Application in the back ground
>
> I assume that your application offers a kind of a service (similar to
> a daemon process), correct? For being able to run an application in
> the background as kind of a service you have to implement an Android
> service. You should get familiar with how services are implemented in
> Android (http://developer.android.com/reference/android/app/
> Service.html). Find some ideas how to write a service on the following
> pagehttp://developerlife.com/tutorials/?p=356
>
> Display of symbols
>
> I am assuming that this symbols are controled by the framework itself.
> If you want them to disappear you might have to change the framework
> code. I am not aware of that the are APIs on the SDK level with which
> you can disable this symbols.
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Aug 3, 4:10 am, Honest  wrote:
>
>
>
> > Can some one tell me how can i get signal strenght of my GSM network ?
>
> > How to start application in back ground ?
>
> > I want to receive sms and i do not want that new sms symbol display on
> > homes screen at top. Is it possible ?
>
> > and in the same way i do not want that gprs symbol should display.
>
> > So can some one tell me how can i do 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] 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: Images not loading on the phone

2009-08-03 Thread Jeff Sharkey

>                        if(photoUrl.contains(" ")) {
>                                photoUrl = photoUrl.replaceAll(" ", "%20");
>                        }

Just a random side note, but you probably want to use Uri.encode() to
properly escape all characters, not just spaces.


-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: appwidget onReceive() appwidgetIds null

2009-08-03 Thread Jeff Sharkey

There's a known bug where the DELETED broadcast sends
EXTRA_APPWIDGET_ID (instead of IDS):

http://groups.google.com/group/android-developers/msg/e405ca19df2170e2

j

On Mon, Aug 3, 2009 at 8:21 AM, ChangliWang wrote:
>
>        public void onReceive(Context context, Intent intent) {
>                // TODO Auto-generated method stub
>                super.onReceive(context, intent);
>                String action = intent.getAction();
>            if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
>                        Log.i(TAG, "onReceive1");
>                Bundle extras = intent.getExtras();
>                if (extras != null) {
>                Log.i(TAG, "onReceive2");
>                    int[] appWidgetIds = extras.getIntArray
> (AppWidgetManager.EXTRA_APPWIDGET_IDS);
>                    if (appWidgetIds != null && appWidgetIds.length > 0) {
>                        Log.i(TAG, "onReceive3");
>                        this.onDeleted(context, appWidgetIds);
>                    }
>                }
>            }
>
>        }
> I found that appWidgetIds is null. Who can tell me why?
>
> >
>



-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: SQLiteDatabase table

2009-08-03 Thread Jeff Sharkey

You should really look at using SQLiteOpenHelper; it automatically
helps with initial database creation and any upgrade paths.

j


On Tue, Jul 28, 2009 at 7:35 PM, jayaram wrote:
>
> Hi,
>     I've an SQLiteDatabase mydb.db.   I want to check whether a
> particular table named 'table1' exists or not at the beginning of my
> pgm.
>
>    Do i have any methods for checking that without the "create table
> if not exists" query?
>
>
> Any suggestions
>
>
>
> Regards..
> Jayaram
>
> >
>



-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: ImageButton press feedback

2009-08-03 Thread Jeff Sharkey

The framework offers "stateful" drawables that automatically change
based on user interaction, such as focus or touch.  Here's an example
of the default Button background is defined:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/drawable/btn_default.xml;hb=cupcake

When a drawable like this is set as a android:background or
android:src, the framework will handle swapping out the icon based on
state for you.  (You don't need to write onKeyDown, etc.)

j

On Sun, Aug 2, 2009 at 11:07 PM, Venkatesh D wrote:
>
> Hi all,
>
> I am developing an application which has many cool image buttons. On
> press or click of any image button there is no feed back to the user
> either color change or any kind of contrast change in the button.
>
> I don't prefer to have multiple images for a single image button
> loaded onKeyDown and onKeyUp callbacks, simply to avoid the size of
> the APK.
>
> Is there any default property provided by the framework which just
> takes care of Image Button press and release events with some kind of
> feedback to the user on both the events?
>
> >
>



-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: Clearing the cache of your app on exit

2009-08-03 Thread Jeff Sharkey

Another thing worth mentioning when you're managing your own cache is
to listen for the ACTION_DEVICE_STORAGE_LOW broadcast through a
.

This way, if the device runs low on space, you can help by
automatically purging your cache.

j


On Fri, Jul 24, 2009 at 5:27 PM, Mark Murphy wrote:
>
> niko001 wrote:
>> is it possible to force the cache of your app to clear when the user
>> exits the app?
>>
>> My app piles up cache data (rightfully so) on each start, which is no
>> longer needed once the user quits the app, so I am trying to find a
>> way to forcibly clear it.
>
> You could try deleting the files from getCacheDir(), available on
> Activity, Service, and other flavors of Context.
>
> On the other hand, you did not specify which cache you were concerned
> about...
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 1.0 Available!
>
> >
>



-- 
Jeff Sharkey
jshar...@android.com

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



[android-developers] Re: HTTP and some extra

2009-08-03 Thread Kausik Das

While you are using HTTP Get, you have nothing to do with the HTTP
packet that is sent to the server. But while you are doing POST, then
the body part in the request is very important. If you've seen the
code, the problem is, say, I want to ready a file - do base64 encode -
send the packet to the server. Assume the file size is >= 5 MB. You'll
see the HTTP classes are not adequete to match this requirement or
even if it is I do not know.
But the problem is, like Windows Mobile/Blackberry - How can we know
the network services (DATA/VOICE/ DATA+VOICE/Emergency etc.) available
at the time of connection - I do not want to add a listner for that!
Is there any concept of Access Point in Android? What other network
parameters are very much Android specific those one should take care
of?

On Aug 3, 4:22 am, Michael Leung  wrote:
> there is already a http API in the SDK.
> I am using HTTP_GET there seems to be for me
>
>
>
>
>
> On Sun, Aug 2, 2009 at 12:47 AM, Kausik Das  wrote:
>
> > Hi all,
> >      I am just a beginner in the Android and was experimenting with
> > HTTP. I have published the result of my experimentation through the
> > followinf link
> >http://kausikdas.webs.com/apps/blog/show/1489440-http-in-android.
> > I am yet to get a device but working with the Simulator. I need
> > feedbacks on the possible network problems I should handle. e.g.:
> > 1. Do I need to discover the access points and dial one before
> > connecting?
> > 2. How can I know which services (Data/Data & Voice/Voice/No/Emergency
> > etc.) current network is supporting?
> > 3. Anything more to take care of?
>
> --
> Regards,
> Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info- 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: Add menu item to Gallery's share BY CODE

2009-08-03 Thread Dianne Hackborn
Sorry, this can only be done by a manifest declaration.  You can, however,
enable or disable the component declared in your manifest at runtime using
the PackageManager class.

On Mon, Aug 3, 2009 at 8:40 PM, Anthony Xu  wrote:

>
> Cannot implement it?
>
>
> On Aug 1, 12:18 pm, Anthony Xu  wrote:
> > Hi All,
> >
> > I must to new a thread.
> >
> > I know how to implement this issue by Menuifest.xml, see also:
> http://groups.google.com/group/android-developers/browse_thread/threa...
> >
> > But my question is how to add share menu ofGalleryby java code not
> > Menuifest.xml.
> > My code is as below:
> >
> > public class MyActivity extends Activity {
> >
> > private static final String TAG = "MyActivity";
> >
> > @Override
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> >
> > IntentFilter intentFilter = new IntentFilter();
> > intentFilter.addAction(Intent.ACTION_SEND);
> > intentFilter.addCategory(Intent.CATEGORY_DEFAULT);
> > try {
> > intentFilter.addDataType("image/*");
> > } catch (MalformedMimeTypeException e) {
> > Log.e(TAG, e.toString());
> > }
> >
> > Intent x = registerReceiver(new BroadcastReceiver() {
> > public void onReceive(Context context, Intent intent) {
> > Log.d(TAG, "Received intent "+intent);
> > intent.setComponent(new ComponentName(context,
> > Uploader.class));
> > startActivity(intent);
> > }
> > }, intentFilter);
> >
> > if (x==null)
> > Log.i(TAG, "failed to regist a receiver");
> > else
> > Log.i(TAG, "registed a receiver successfully");
> > // ...
> >
> > But registerReceiver always return null, and there is no menu added
> toGallery'sShare.
> >
> > Thank you.
> > Anthony
> >
>


-- 
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] Re: Catching memory exception

2009-08-03 Thread whitech

Uncaught handler: thread main exiting due to uncaught exception
java.lang.OutOfMemoryError
 at xx

On 8月4日, 上午2时14分, fadden  wrote:
> On Aug 2, 8:01 pm,whitech wrote:
>
> > Hi all. I've got this problem:
> > When my program using too much memory, it die. Is there an exception
> > or something else to warn me? How can I catch it?
>
> What exception is appearing in the log file when your application
> dies?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Add menu item to Gallery's share BY CODE

2009-08-03 Thread Anthony Xu

Cannot implement it?


On Aug 1, 12:18 pm, Anthony Xu  wrote:
> Hi All,
>
> I must to new a thread.
>
> I know how to implement this issue by Menuifest.xml, see 
> also:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> But my question is how to add share menu ofGalleryby java code not
> Menuifest.xml.
> My code is as below:
>
> public class MyActivity extends Activity {
>
> private static final String TAG = "MyActivity";
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
>     super.onCreate(savedInstanceState);
>
>     IntentFilter intentFilter = new IntentFilter();
>     intentFilter.addAction(Intent.ACTION_SEND);
>     intentFilter.addCategory(Intent.CATEGORY_DEFAULT);
>     try {
>                 intentFilter.addDataType("image/*");
>         } catch (MalformedMimeTypeException e) {
>                 Log.e(TAG, e.toString());
>         }
>
>     Intent x = registerReceiver(new BroadcastReceiver() {
>         public void onReceive(Context context, Intent intent) {
>                 Log.d(TAG, "Received intent "+intent);
>                 intent.setComponent(new ComponentName(context,
> Uploader.class));
>                 startActivity(intent);
>         }
>         }, intentFilter);
>
>     if (x==null)
>         Log.i(TAG, "failed to regist a receiver");
>     else
>         Log.i(TAG, "registed a receiver successfully");
>     // ...
>
> But registerReceiver always return null, and there is no menu added 
> toGallery'sShare.
>
> Thank you.
> Anthony
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] adc2: can use third party lib from the market?

2009-08-03 Thread blues

My app uses the text-to-speech lib from the market, which is
developed
by Google Charles Chan. User needs to install the lib from the market
first time use my app (using market intent).

So is it eligible to have the app download the lib from the market?

And any technique difficulty here? for example, will the app be able
to download and use the lib from the market? any security limitation
here?

Blues



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: 1.5_r3 backward compatibility

2009-08-03 Thread Peter Jeffe

Xavier and Diane, thanks for the confirmation on the SDK level, I was
hoping that was the case!

On Aug 3, 3:35 pm, Dianne Hackborn  wrote:
> Actually, Market should have been supporting android:minSdkVersion for a
> while, since that was done way back for 1.5.  Is it not working?

Yes, that works just fine, but it limits us to only being able to
publish an apk for that specific level and above--unless we want to
create an entirely different app for each supported OS level, which is
unreasonable for most apps.  Normally (say for PC or Unix software)
you would make different install packages available for different
combinations of OS and version, or perhaps have a single install
package that can handle a set of different OS versions.  But at the
moment we can't do that on Android, we can only specify a minimum
supported SDK level.

So what we really need to be able to do is publish, for the same
application, one or more apks, each with a minimum and maximum SDK
level.  If this was available today then I could still support users
still on 1.0 and 1.1, but I was forced to abandon them because I
wanted to have 1.5-specific features in my app.  That's not good user
support, and it's going to get much worse very soon as the Android
versions proliferate and we have quite a few different levels of OS
out there at any given time.  We developers need to be able to choose
which versions we support and we need to have the tools available to
do that.

Hope that makes sense.

-- Peter

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Using Intent on default Google Map

2009-08-03 Thread guna

I launch the default google map apk from my application, by starting
the intent
new Intent(Intent.ACTION_VIEW, Uri.parse("geo:"+lon+","+lat)), 3);

What I want is to start the map with menu option "my location" clicked
and the current address displayed on the sign (user normally can bring
up the sign with its address with a long click on the map.)

There is a Google application called "places directory" which can
trigger a similar function on Google map, i.e. start the google map
with "my location" with a sign that says "You are here"
The source code for this application is not available, so I can't
check what intent it uses to trigger this action.

Any suggestions are welcome.
If possible tell me where i can get the source code for default google
maps... because i cant find out from git repository


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



[android-developers] how to load a .so library in a apk?

2009-08-03 Thread xuxiake2...@gmail.com

I have a .so library ,which I had  put  in directory  "assets" .   But
how can i load it ?

I can't use System.loadLibrary or System.load  because i can't get the
path.  thanks

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



[android-developers] How can I specify a border color for an ImageView when it has focus

2009-08-03 Thread n179911

Hi,

In android, how can I specify a border color for an Image View when it
has focus?
e.g. how to put an orange border around an Image View when it has focus?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: View Android Marketplace

2009-08-03 Thread steiljes

hey thanks

On Aug 3, 3:02 pm, Mattwho  wrote:
> There are a few websites that supply this informationhttp://www.cyrket.com/is 
> one of them.
>
> On Aug 3, 10:48 am, steiljes  wrote:
>
>
>
> > How to view the comprehensive list of apps in the marketplace? Do I
> > need to buy a handset AND the service with it to see the marketplace?
> > I don't want to start developing before I know what the market really
> > looks like.
>
> > The android.com website offers only a few apps.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Serious dx error. Desperately need expert advice.

2009-08-03 Thread Keith Wiley

Thanks for your continued efforts.

On Aug 3, 11:40 am, Dan Bornstein  wrote:
> First of all, thanks for taking the time to investigate, and I'm glad
> you've found a workaround for this.
>
> As a bit of background, the original version of the code that collects
> local variable debugging info was written to target an inefficient
> output representation. The output format was fixed before 1.0 shipped,
> but the "middle end" of the local variable code wasn't fully updated.
> As a result, we found (later) that there were many cases where
> redundant local variable info was emitted. That problem was addressed
> in Cupcake, but it turns out that the fix wasn't without bugs of its
> own.
>
> I just tried reproducing the issue with the version of dx in Donut and
> the one in Eclair. The Donut version still has the bug, but it has in
> fact already been fixed in Eclair. I suspect it is the same as issue
> #2868, .
> Unfortunately the master (aka Eclair) branch hasn't been pushed to the
> open since the fix was made, but I believe doing so is currently on
> the short list of things to do for the folks who do that sort of
> thing.
>
> BTW, you can blame me directly, for the most part, for bugs in dx.
>
> -dan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Soft keyboard - full alpha-numeric, but defaulting to numbers

2009-08-03 Thread Jason

For cases where you know a user is likely to enter a number before
characters, is it possible to set an EditText View's soft keyboard/IME
default to the "numbers input" yet still retain all it's alpha-numeric
capabilities?

I can get the keyboard to automatically shift to the numbers input by
setting the
android:inputType="number", but then it prohibits characters.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Eclipse 3.3, Android SDK 1.5, adb 1.0.18 running, 1.0.20 needed

2009-08-03 Thread misbell

FYI, Just looked at my Windows install, no "platforms" dir there
either.

Wow, I installed it in Nov 2008, SDK 1.0 R1! That was when I built my
last Android app. Heh. No wonder I'm a little rusty.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Eclipse 3.3, Android SDK 1.5, adb 1.0.18 running, 1.0.20 needed

2009-08-03 Thread misbell

>>  /Users/Dev/android-sdk_m5-rc15_mac-x86/platforms is missing

By the way, that is absolutely correct. That directory does not exist
in my version of the SDK.

misbell
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Eclipse 3.3, Android SDK 1.5, adb 1.0.18 running, 1.0.20 needed

2009-08-03 Thread misbell

Yes, I am. I only have one SDK downloaded onto OSX. As I said, I went
right into the directory (android-sdk_m5-rc15_mac-x86/tools) and
stopped and restarted adb. The SDK definitely comes with 1.0.18.

Let me check again visually right now...

Ok so I

a) downloaded the folder android-sdk_m5-rc15_mac-x86 from here:

http://developer.android.com/sdk/1.5_r3/index.html

b) here is my bash profile
echo $PATH
export PATH=${PATH}:/Users/Dev/android-sdk_m5-rc15_mac-x86/tools

c) installed ADT from here
https://dl-ssl.google.com/android/eclipse/

d) then went to Eclipse | Preferences and chose Android, pointed it at
SDK folder and instantly got two dialog boxes

1.  (!) Required minimum version of adb: 1.0.20 Current version is
1.0.18
2  (!) Error loading the SDK
   /Users/Dev/android-sdk_m5-rc15_mac-x86/platforms is missing







On Aug 3, 8:35 pm, Xavier Ducrohet  wrote:
> Are you sure that you are pointing ADT to the latest SDK?
>
> Xav
>
>
>
>
>
> On Mon, Aug 3, 2009 at 5:31 PM, misbell wrote:
>
> > When you try to point Eclipse 3.3 to Android SDK 1.5 (latest build as
> > of today Aug 3 2009) I get an error saying that I have the wrong adb.
>
> > so I went to /tools and checked it out, running adb version.
> > Sure enough, 1.0.18. including after a restart.
>
> > Could I have vry specific directions for how to get this
> > to work (running on OSX). If I have to go get SDK source code, can I
> > know specifically where I have to go?
>
> > Thank you,
> > misbell
>
> --
> Xavier Ducrohet
> Android Developer Tools Engineer
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Images not loading on the phone

2009-08-03 Thread Jason


Pulkit,

I had a similar problem. It seems that BitmapFactory silently fails
(returning null) when BufferedInputStream blocks while fetching from
the connection (I think). If the BufferedInputStream is coming from an
SD source, it works because it doesn't block (I think). The solution
for me was to download the entire stream as a byte array first, and
then call BitmapFactory.decodeByteArray(...)

To do that efficiently, I got the advice to read bytes from a
DataInputStream, filling up fixed sized chunks at a time until the
input stream is finished, and then copying the data from those chunks
into a final byte array (now that we know the full size of the
download). Here's some example code for this:

///
// example of using Bitmapfactory.decodeByteArray instead of
Bitmapfactory.decodeStream

public static Bitmap fetchImage(URL url, String userAgent) throws
IOException {
byte[] bitmapByteArray = JsonUtils.fetchUrlBytes(url,
userAgent );
Bitmap bm = BitmapFactory.decodeByteArray(bitmapByteArray, 0,
bitmapByteArray.length);
return bm;
}

///
// example of downloading a byte array in chunks

private static final int CHUNKSIZE = 8192;//size of fixed
chunks
private static final int BUFFERSIZE = 1024;   //size of
reading buffer

public static byte[] fetchUrlBytes(URL url, String userAgent )
throws IOException {

HttpURLConnection connection = null;

connection = ( HttpURLConnection ) url.openConnection();
if(userAgent != null) {
connection.setRequestProperty("User-Agent", userAgent);
}
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);

int bytesRead = 0;
byte[] buffer = new byte[BUFFERSIZE];   //initialize buffer
byte[] fixedChunk = new byte[CHUNKSIZE]; //initialize 1st
chunk
ArrayList BufferChunkList = new ArrayList(); //
List of chunk data
int spaceLeft = CHUNKSIZE;
int chunkIndex = 0;

DataInputStream in = new DataInputStream
( connection.getInputStream() );

while( ( bytesRead = in.read( buffer ) ) != -1 ) { //loop
until the DataInputStream is completed
if(bytesRead > spaceLeft) {
//copy to end of current chunk
System.arraycopy(buffer, 0, fixedChunk, chunkIndex,
spaceLeft);
BufferChunkList.add(fixedChunk);

//create a new chunk, and fill in the leftover
fixedChunk = new byte[CHUNKSIZE];
chunkIndex = bytesRead - spaceLeft;
System.arraycopy(buffer, spaceLeft, fixedChunk, 0,
chunkIndex);
} else {
//plenty of space, just copy it in
System.arraycopy(buffer, 0, fixedChunk, chunkIndex,
bytesRead);
chunkIndex = chunkIndex + bytesRead;
}
spaceLeft = CHUNKSIZE - chunkIndex;
}

if (in != null) {
in.close();
}

// copy it all into one big array
int responseSize = (BufferChunkList.size() * CHUNKSIZE) +
chunkIndex;

byte[] responseBody = new byte[responseSize];
int index = 0;
for(byte[] b : BufferChunkList) {
System.arraycopy(b, 0, responseBody, index, CHUNKSIZE);
index = index + CHUNKSIZE;
}

System.arraycopy(fixedChunk, 0, responseBody, index,
chunkIndex);

return responseBody;
}





On Jul 28, 10:55 pm, Pulkit  wrote:
> Hi All,
>
> In my app I am downloading images from a remote server and putting it
> into a gallery and displaying it. The problem is that when i do it on
> the emulator it works absolutely fine but when i do it on the phone
> few of the images come and a few arenull. I tried many ways but I am
> not able to find the perfect way. The images on my server are of 50 kb
> max. But still some are downloaded and rest are not. it would be
> really great if someone could help me asap coz i need to make this app
> live by this weekend.
>
> Here is the code snippet to download the images from the server.
>
> public Bitmap getImage(String photoUrl) {
>                 Bitmap image =null;
>                 if (!photoUrl.equals("")) {
>                         if(photoUrl.contains(" ")) {
>                                 photoUrl = photoUrl.replaceAll(" ", "%20");
>                         }
>                                 try {
>                                         URLConnection conn = new 
> URL(photoUrl).openConnection();
>                                         conn.connect();
>                                         InputStream inStream = 
> conn.getInputStream();
>                                         BufferedInputStream bis = new 
> BufferedInputStream(inStream);
>
>                                         image 
> =BitmapFactory.decodeStream(bis);
>
>   

[android-developers] Re: listactivity problems

2009-08-03 Thread Mark Murphy

Carl wrote:
> I am trying to build a listactivity with listitems that consist of two
> textviews. Unfortunately I don't see anything but lines in my list.
> Can anyone tell me whats wrong with this code?
> 
> 
> in list_item.xml
> 
> 
>   xmlns:android="http://schemas.android.com/apk/res/android";
>  android:layout_width="fill_parent"
>  android:layout_height="wrap_content"
>  android:orientation="vertical">
> 
>android:textSize="16px"
>  android:textStyle="bold"
>  android:layout_width="fill_parent"
>  android:layout_height="wrap_content"/>
> 
>android:textSize="12px"
>  android:textStyle="italic"
>  android:layout_width="fill_parent"
>  android:layout_height="wrap_content"/>
> 
> 
> in my class:
> 
> public class mylv extends ListActivity
> {
>   ArrayList> list = new
> ArrayList>();
> 
>   /** Called when the activity is first created. */
>   @Override
>   public void onCreate(Bundle savedInstanceState)
>   {
>   super.onCreate(savedInstanceState);
> 
>   // add items to the list
> HashMap item1 = new
> HashMap();
>   item1.put("line1", "one");
>   item1.put("line2", "two");
>   list.add(item1);
>   HashMap item2 = new HashMap();
>   item2.put("line3", "three");
>   item2.put("line4", "four");
>   list.add(item2);
>   HashMap item3 = new HashMap();
>   item3.put("line5", "five");
>   item3.put("line6", "six");
>   list.add(item3);
> 
>   // build the list adapter
>   ListAdapter adapter = new SimpleAdapter(
>   this,
>   list,
>   R.layout.list_item,
>   new String[] { "label", "description" },
>   new int[] { R.id.text1, R.id.text2 }
>   );
> 
>   // show the items
>   setListAdapter(adapter);
>   }
> }

Your HashMaps do not have anything named "label" or "description".
Change your HashMap keys to "label" and "description".

-- 
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: Eclipse 3.3, Android SDK 1.5, adb 1.0.18 running, 1.0.20 needed

2009-08-03 Thread Xavier Ducrohet

Are you sure that you are pointing ADT to the latest SDK?

Xav

On Mon, Aug 3, 2009 at 5:31 PM, misbell wrote:
>
>
> When you try to point Eclipse 3.3 to Android SDK 1.5 (latest build as
> of today Aug 3 2009) I get an error saying that I have the wrong adb.
>
> so I went to /tools and checked it out, running adb version.
> Sure enough, 1.0.18. including after a restart.
>
> Could I have vry specific directions for how to get this
> to work (running on OSX). If I have to go get SDK source code, can I
> know specifically where I have to go?
>
> Thank you,
> misbell
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Eclipse 3.3, Android SDK 1.5, adb 1.0.18 running, 1.0.20 needed

2009-08-03 Thread misbell


When you try to point Eclipse 3.3 to Android SDK 1.5 (latest build as
of today Aug 3 2009) I get an error saying that I have the wrong adb.

so I went to /tools and checked it out, running adb version.
Sure enough, 1.0.18. including after a restart.

Could I have vry specific directions for how to get this
to work (running on OSX). If I have to go get SDK source code, can I
know specifically where I have to go?

Thank you,
misbell
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] listactivity problems

2009-08-03 Thread Carl

I am trying to build a listactivity with listitems that consist of two
textviews. Unfortunately I don't see anything but lines in my list.
Can anyone tell me whats wrong with this code?


in list_item.xml


http://schemas.android.com/apk/res/android";
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:orientation="vertical">

 

 


in my class:

public class mylv extends ListActivity
{
ArrayList> list = new
ArrayList>();

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

// add items to the list
HashMap item1 = new
HashMap();
item1.put("line1", "one");
item1.put("line2", "two");
list.add(item1);
HashMap item2 = new HashMap();
item2.put("line3", "three");
item2.put("line4", "four");
list.add(item2);
HashMap item3 = new HashMap();
item3.put("line5", "five");
item3.put("line6", "six");
list.add(item3);

// build the list adapter
ListAdapter adapter = new SimpleAdapter(
this,
list,
R.layout.list_item,
new String[] { "label", "description" },
new int[] { R.id.text1, R.id.text2 }
);

// show the items
setListAdapter(adapter);
}
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Canvas + Bitmap + ColorMatrixFilter is great. How to SAVE the bitmap?

2009-08-03 Thread Shane M. (Pop Crowd)

Off screen bitmap might be a possibility - let me look into that.
Thanks Jason.

Shane


On Aug 3, 5:06 pm, Jason Proctor 
wrote:
> the problem i think is that the filters and transforms and all that
> are done in native code, then that code writes to the frame buffer.
> getting that stuff back and turning it into a java Bitmap would be
> expensive.
>
> can you draw into an offscreen bitmap somehow? ISTR something being
> possible along those lines.
>
>
>
>
>
> >I guess from the lack of responses this isn't possible?
>
> >Too bad.
>
> >Shane
>
> >On Aug 2, 2:14 pm, Shane  wrote:
> >>  So I have a Canvas which uses a bitmap to store the draw calls on.  I
> >>  have applied a ColorMatrixFilter to the underlying bitmap of the
> >>  canvas.  It looks awesome when on the phone and during the OnDraw
> >>  calls.  The ColorMatrixFilter is making the bitmap look exactly like I
> >>  want it when the Canvas is drawn.
>
> >>  Now how do I SAVE the Colormatrix effect?  I normally take the
> >>  underlying bitmap that is attached to the Canvas and Bitmap.Compress
> >>  save it.  But this method doesn't save the ColorMatrixFilter effect.
> >>  How can I get the ColorMatrixFilter to actually alter the Bitmap
> >>  itself so I can Bitmap.compress save the damn thing!!
>
> >>  Thanks Everyone,
> >>  Shane
>
> --
> jason.software.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] Canvas + Bitmap + ColorMatrixFilter is great. How to SAVE the bitmap?

2009-08-03 Thread Jason Proctor

the problem i think is that the filters and transforms and all that 
are done in native code, then that code writes to the frame buffer. 
getting that stuff back and turning it into a java Bitmap would be 
expensive.

can you draw into an offscreen bitmap somehow? ISTR something being 
possible along those lines.



>I guess from the lack of responses this isn't possible?
>
>Too bad.
>
>Shane
>
>
>On Aug 2, 2:14 pm, Shane  wrote:
>>  So I have a Canvas which uses a bitmap to store the draw calls on.  I
>>  have applied a ColorMatrixFilter to the underlying bitmap of the
>>  canvas.  It looks awesome when on the phone and during the OnDraw
>>  calls.  The ColorMatrixFilter is making the bitmap look exactly like I
>>  want it when the Canvas is drawn.
>>
>>  Now how do I SAVE the Colormatrix effect?  I normally take the
>>  underlying bitmap that is attached to the Canvas and Bitmap.Compress
>>  save it.  But this method doesn't save the ColorMatrixFilter effect.
>>  How can I get the ColorMatrixFilter to actually alter the Bitmap
>>  itself so I can Bitmap.compress save the damn thing!!
>>
>>  Thanks Everyone,
>>  Shane
>

-- 
jason.software.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: Canvas + Bitmap + ColorMatrixFilter is great. How to SAVE the bitmap?

2009-08-03 Thread Shane M. (Pop Crowd)

I guess from the lack of responses this isn't possible?

Too bad.

Shane


On Aug 2, 2:14 pm, Shane  wrote:
> So I have a Canvas which uses a bitmap to store the draw calls on.  I
> have applied a ColorMatrixFilter to the underlying bitmap of the
> canvas.  It looks awesome when on the phone and during the OnDraw
> calls.  The ColorMatrixFilter is making the bitmap look exactly like I
> want it when the Canvas is drawn.
>
> Now how do I SAVE the Colormatrix effect?  I normally take the
> underlying bitmap that is attached to the Canvas and Bitmap.Compress
> save it.  But this method doesn't save the ColorMatrixFilter effect.
> How can I get the ColorMatrixFilter to actually alter the Bitmap
> itself so I can Bitmap.compress save the damn thing!!
>
> Thanks Everyone,
> Shane
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: LocationManager and PendingIntent problem

2009-08-03 Thread Lutz Schönemann

Okay, I managed to get it to work on a real phone (Google Dev Phone  
1). But why doesn't it work on an emulator? Is there more to do than  
just use the geo command?


Am 03.08.2009 um 19:02 schrieb Dianne Hackborn:

> Please look at the examples in ApiDemos.
>
> 2009/8/3 Lutz Schönemann 
>
> I have created a new project focusing on that problem.
> Now the PendingIntent.getBroadcast() method doesn't try to start an
> activity any longer.
>
> But the problem that the LocationManager doesn't fire the intent still
> consists. I have a Activity that creates a PendingIntent and calls the
> addProximityAlert() method. The BroadcastReceiver should only log the
> incomming events. The only event that appears is the broadcast I send
> by my self (sendBroadcast(intent);)
>
> public class MyActivity extends Activity {
>
>private static final String PROXIMITY_ALERT =
> "de.pengingintent.Activity.PROXIMITY_ALERT";
>private static final String TAG = "MyActivity";
>
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> Intent intent = new Intent(PROXIMITY_ALERT);
> PendingIntent pintent =
> PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 0);
>
>// just to test if the broadcast receiver exists
> Log.d(TAG, "testing broadcast receiver");
> sendBroadcast(intent);
>
> LocationManager lm =
> (LocationManager)getSystemService(Context.LOCATION_SERVICE);
> lm.addProximityAlert(1, 1, 200, 2, pintent);
> }
>
> }
>
> public class MyReceiver extends BroadcastReceiver {
>
>private static final String TAG = "MyReceiver";
>@Override
>public void onReceive(Context context, Intent intent) {
>// TODO Auto-generated method stub
>Log.d(TAG, "received new intent");
>if(intent.getAction() != null)
>Log.d(TAG, intent.getAction());
>
>Bundle extras = intent.getExtras();
>if(extras != null) {
> 
> if(extras.containsKey(LocationManager.KEY_PROXIMITY_ENTERING)) {
>Log.d(TAG,  
> LocationManager.KEY_PROXIMITY_ENTERING + " is: " +
> Boolean
> .toString(extras.getBoolean(LocationManager.KEY_PROXIMITY_ENTERING)));
>}
>}
>}
>
> }
>
>
> The latitude and longitute I registerd for is 1, 1 and on the terminal
> I run the "geo" command multiple times:
>
> geo fix 3 3
> geo fix 1 1
> ...
>
> What am I doing wrong?
>
>
>
>
> Am 03.08.2009 um 15:12 schrieb Lutz Schönemann:
>
> >
> > Hi,
> >
> > I have more than one problem to use the addProximityAlert() method
> > from the LocationManager class.
> >
> > The first thing is that I want to create a PendingIntent for a
> > broadcast receiver. Therefor I use this code:
> >
> >   Intent intent = new Intent("app1.PROXIMITY_ALERT");
> >   PendingIntent pintent =  
> PendingIntent.getBroadcast(Activity1.this, 1,
> > intent, 0);
> >
> > The problem is, that I get this error message:
> >
> > "No activity found to handle intent { action=app1.PROXIMITY_ALERT }"
> >
> > I'm confused because this should not call an Activity but a
> > BroadcastReceiver.
> > If I send this intent as a broadcast my self, the BroadcastReceiver
> > receives this intent...
> >
> > What is wrong with my code?
> >
> >
> > I tried to create an intent to call an Activity instead and  
> registered
> > it to be send when reaching a location:
> >
> >   Intent intent = new Intent(Intent.ACTION_DEFAULT)
> >   intent.setType("vnd.app1/activity1");
> >
> >   PendingIntent pintent =  
> PendingIntent.getBroadcast(Activity1.this, 1,
> > intent, 0);
> >
> >   LocationManager lm =
> > (LocationManager)getSystemService(Context.LOCATION_SERVICE);
> >   lm.addProximityAlert(latitude, longitude, radius, -1,  
> pintent);
> >
> > The problem is that the Activity is called immediately but NEVER if
> > the registered location is reached.
> >
> >
> > I'm working on a emulator and setting the gps coordinates using the
> > geo fix
> > command.
> >
> >
> > Can anyone help me with this problems
> > thanks
> >
> > >
> >
>
>
>
>
>
>
> -- 
> 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...@go

[android-developers] Re: Launching a Service at the startup

2009-08-03 Thread Mark Murphy

R Ravichandran wrote:
> Thanks Mark. Actually the code I posted missed out the 'onStart' method
> details that I actually tried. Here is the actual 'onStart' method of
> the MyService class I used where I create the thread and starting it.
> 
> 
> @Override
> public void onStart(Intent intent, int startId) {
> System.out.println ("MyService  ))");
> super.onStart(intent, startId);
> Thread t = new Thread(this);
> t.start();
> }
> 
> I modified the run method I put some System.out. statement inside a
> while(true) loop. The idea was to keep this service running as long as
> the device is on. But it looks like the system is sending a SIG 9 to
> kill the process (process id 697) for the 'service'. Here is the logcat
> lines that I see.
> 
> D/installd(  557): DexInv: --- BEGIN '/data/app/vmdl51510.tmp' ---
> I/System.out(  697): =>: inside the run methodCount = 49
> I/System.out(  697): =>: inside the run methodCount = 50
> D/dalvikvm(  722): DexOpt: load 41ms, verify 52ms, opt 1ms
> D/installd(  557): DexInv: --- END '/data/app/vmdl51510.tmp' (success) ---
> D/PackageManager(  583):   Services: com.bn.InStoreWifiConnectivityManager
> D/PackageManager(  583):   Receivers: com.bn.InStoreWiFiServiceInitiator
> I/System.out(  697): =>: inside the run methodCount = 51
> I/installd(  557): move
> /data/dalvik-cache/d...@app@vmdl51510@classes.dex ->
> /data/dalvik-cache/d...@app@com.bn@classes.dex
> D/PackageManager(  583): New package installed in /data/app/com.bn.apk
> I/System.out(  697): =>: inside the run methodCount = 52
> D/AndroidRuntime(  708): Shutting down VM
> D/dalvikvm(  708): DestroyJavaVM waiting for non-daemon threads to exit
> D/dalvikvm(  708): DestroyJavaVM shutting VM down
> D/dalvikvm(  708): HeapWorker thread shutting down
> D/dalvikvm(  708): HeapWorker thread has shut down
> D/jdwp(  708): JDWP shutting down net...
> D/dalvikvm(  708): VM cleaning up
> D/dalvikvm(  708): LinearAlloc 0x0 used 627404 of 4194304 (14%)
> D/ActivityManager(  583): Uninstalling process com.bn 
> I/System.out(  697): =>: inside the run methodCount = 53
> D/ActivityManager(  583): Force removing process ProcessRecord{436ea918
> 697:com.bn/10020 } (com.bn/10020 )
> W/ActivityManager(  583): Scheduling restart of crashed service
> com.mypackage/.MyService in 5000ms
> I/Process (  583): Sending signal. PID: 697 SIG: 9
> D/ActivityManager(  583): Received spurious death notification for
> thread android.os.binderpr...@436c0898
> E/ActivityThread(  583): Failed to find provider info for
> android.server.checkin
> W/Checkin (  583): Can't log event SYSTEM_SERVICE_LOOPING:
> java.lang.IllegalArgumentException: Unknown URL
> content://android.server.checkin/events
> 
> Looks the process Id 583 is the one that sends SIG 9. Any idea why this
> is happening?

Possibly, it's because your service crashed:

> W/ActivityManager(  583): Scheduling restart of crashed service
> com.mypackage/.MyService in 5000ms

Usually, logcat will show a stack trace associated with service crashes.

Bear in mind, though, that your process will be shut down for other
reasons as well, such as memory reclamation. Keeping a service running
all the time is an Android "code smell" -- while it is possible, and
there are occasions when it is the right design, it feels like the vast
majority of people try it when they don't need it.

Consider using an AlarmManager to start your service on a periodic
basis, and have the service stopSelf() when the background thread is
done performing that cycle's worth of work. This will be more reliable
and, for reasonably long alarm periods, more efficient.

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

_Beginning Android_ from Apress Now Available!

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



[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] GsmCellLocaion.getCid frequently returns -1

2009-08-03 Thread Richard Schilling

I know that a -1 value from a call to GsmCellLocaion.getCid means that
the network is unknown.  But, I'm frequently getting that as a result
even though the phone is connected to the network and able to send/
receive calls.

Can anyone shed some light on why this happens and how to get around
it?  From what I can tell, GsmCellLocation.getCid() is the only API
call to get the tower id that the phone is connected to.

Thanks in advance.

Richard Schilling
Root Wireless

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: 1.5_r3 backward compatibility

2009-08-03 Thread Dianne Hackborn
On Mon, Aug 3, 2009 at 1:32 PM, Dianne Hackborn  wrote:

>
>>
>> So that's why I'm really hoping that Google will allow developers to
>> publish multiple builds for different OS versions in the future.  It
>> was very tough to have to hold off releasing 1.5-specific features
>> until a critical mass of users were upgraded to 1.5.  At this point
>> there's no turning back on increasing platform divergence, and the
>> Market has to allow for us to publish builds for each release we
>> choose to support.  Romain, do you know if this is in the plans?
>
>
> At some point it will, though I don't know when that will be.  This is what
> android:minSdkVersion was introduced in Cupcake for.
>

Actually, Market should have been supporting android:minSdkVersion for a
while, since that was done way back for 1.5.  Is it not working?

-- 
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] Re: Launching a Service at the startup

2009-08-03 Thread R Ravichandran
Thanks Mark. Actually the code I posted missed out the 'onStart' method
details that I actually tried. Here is the actual 'onStart' method of the
MyService class I used where I create the thread and starting it.


@Override
public void onStart(Intent intent, int startId) {
System.out.println ("MyService  ))");
super.onStart(intent, startId);
Thread t = new Thread(this);
t.start();
}

I modified the run method I put some System.out. statement inside a
while(true) loop. The idea was to keep this service running as long as the
device is on. But it looks like the system is sending a SIG 9 to kill the
process (process id 697) for the 'service'. Here is the logcat lines that I
see.

D/installd(  557): DexInv: --- BEGIN '/data/app/vmdl51510.tmp' ---
I/System.out(  697): =>: inside the run methodCount = 49
I/System.out(  697): =>: inside the run methodCount = 50
D/dalvikvm(  722): DexOpt: load 41ms, verify 52ms, opt 1ms
D/installd(  557): DexInv: --- END '/data/app/vmdl51510.tmp' (success) ---
D/PackageManager(  583):   Services: com.bn.InStoreWifiConnectivityManager
D/PackageManager(  583):   Receivers: com.bn.InStoreWiFiServiceInitiator
I/System.out(  697): =>: inside the run methodCount = 51
I/installd(  557): move /data/dalvik-cache/d...@app
@vmdl51510@classes.dex -> /data/dalvik-cache/d...@app
@com.bn@classes.dex
D/PackageManager(  583): New package installed in /data/app/com.bn.apk
I/System.out(  697): =>: inside the run methodCount = 52
D/AndroidRuntime(  708): Shutting down VM
D/dalvikvm(  708): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm(  708): DestroyJavaVM shutting VM down
D/dalvikvm(  708): HeapWorker thread shutting down
D/dalvikvm(  708): HeapWorker thread has shut down
D/jdwp(  708): JDWP shutting down net...
D/dalvikvm(  708): VM cleaning up
D/dalvikvm(  708): LinearAlloc 0x0 used 627404 of 4194304 (14%)
D/ActivityManager(  583): Uninstalling process com.bn
I/System.out(  697): =>: inside the run methodCount = 53
D/ActivityManager(  583): Force removing process ProcessRecord{436ea918 697:
com.bn/10020} (com.bn/10020)
W/ActivityManager(  583): Scheduling restart of crashed service
com.mypackage/.MyService in 5000ms
I/Process (  583): Sending signal. PID: 697 SIG: 9
D/ActivityManager(  583): Received spurious death notification for thread
android.os.binderpr...@436c0898
E/ActivityThread(  583): Failed to find provider info for
android.server.checkin
W/Checkin (  583): Can't log event SYSTEM_SERVICE_LOOPING:
java.lang.IllegalArgumentException: Unknown URL
content://android.server.checkin/events

Looks the process Id 583 is the one that sends SIG 9. Any idea why this is
happening?

Thanks

Ravi

On Mon, Aug 3, 2009 at 4:58 AM, Mark Murphy  wrote:

>
> R Ravichandran wrote:
> > This is  definitely a viable approach for my application architecture,
> > but still strugglng to make this work. Here are some details, and I am
> > hoping that someone will point out what is going wrong here.
> >
> > 1. I have a class "MyServiceInitiator" that is hooked up to the
> > BOOT_COMPLETED action.
> >
> >
> > public class MyServiceInitiator extends BroadcastReceiver {
> >
> > private ServiceConnection mConnection = new ServiceConnection() {
> > public void onServiceConnected(ComponentName className, IBinder
> > service) {
> > }
> >
> > public void onServiceDisconnected(ComponentName className) {
> >  }
> > };
>
> You cannot call bindService() from a BroadcastReceiver. You can call
> startService() from a BroadcastReceiver, as you doing below. Hence you
> do not need a ServiceConnection object, since that is only used with
> bindService().
>
> > public class MyService extends Service implements Runnable {
> >
> >
> > @Override
> > public void onCreate() {
> > System.out.println ("MyService:
> > onCreate()");
> > }
>
> You need to chain to super.onCreate(). Also, please consider using
> android.util.Log instead of System.out.
>
> >
> > @Override
> > public IBinder onBind(Intent arg0) {
> > // TODO Auto-generated method stub
> > System.out.println ("MyService:
> > onBind()");
> > doScan();
> > return null;
> > }
>
> This will never be called, since you are not using bindService().
>
> > @Override
> > public boolean onUnbind(Intent intent) {
> > System.out.println
> > ("onUnbind()");
> > return super.onUnbind(intent);
> > }
> >
> > public class LocalBinder extends Binder {
> > MyService getService() {
> > return MyService.this;
> > }
> > }
> >
> >
> > @Override
> > public void onRebind(Intent intent) {
> > super.onRebind(intent);
> > }
>
> Those will never be

[android-developers] Re: Rotate TextView to an angle... What's wrong with this code?

2009-08-03 Thread Moto

Thanks Jeff! It worked but by overriding the onDraw call not the
dispatchDraw.

@Override
onDraw(Canvas canvas) {
canvas.save();
canvas.rotate(45);
super.onDraw(canvas);
canvas.restore();
}

I tried the same method on an ImageView extended class but I didn't
get the same rotation, nothing happend than... any ideas?
canvas contains all that the user can see right?  So if it was a
LinearLayout the canvas will be what ever is contained inside it?
Sorry I 'm very new to graphics :P

Thanks!
-Moto
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Supporting RTL language

2009-08-03 Thread Milad

Hi every body
As you known android does not support RTL languages like
farsi,arabic,... and
it is time to comminuty do something !
If  android dev team give us  clue to  workon that, I believe we can
solve this problem


i do some work on fonts but it's SUCKS and need some change on core (I
think !)
http://anddev.ir/uploads/persian_keyboard_android0.png


Thanks and we are waiting for your clue
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Accessing logs on Android

2009-08-03 Thread Mattwho

Google led me to http://code.google.com/p/android-log-collector/

On Aug 3, 10:59 am, Jay-andro  wrote:
> Is there a way to access the default logs on the phone for purposes of
> uploading for debugging purposes?
>
> I'd like to be able to provide an "Upload Logs" button that allows the
> users of my app to upload their logs if they are encountering issues
> with the app. I know I can write my logs to my own file and provide an
> upload for that, but I like the context provided by the system logs
> interspersed with my log entries to understand what else is going on
> on the device when my app has issues.
>
> Is app access to the system logs considered a security issue and hence
> not exposed or is there a way to get at the system logs
> programmatically? By system logs, I'm referring to what one can see
> using DDMS.
>
> thanks
> Jay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Pls give me a hand.....

2009-08-03 Thread Balwinder Kaur (T-Mobile)

Delete R.java from your src/ and let Eclipse pick up the one from
gen/.

That should resolve your problem.


Balwinder Kaur
Open Source Development Center
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 3, 12:52 am, Samuel Terre  wrote:
> 我不知道为啥老是会出现一个gen [generated java files]的包 里头的r.java和我src文件夹里头的r.java同名
> 于是老是一把红叉  错误名曰:   the type r is already defined 可是我要是删掉gen  马上它又自动生成
>
> Hello everyone im a newbie in Android field recently I download an
> example named "get Splashy",I don't know why there always create a
> folder named gen[generated java files]  .There is a java file share
> the same name with the one in src package and noticed there was an
> error:"the type is already defined".If i delete the folder the Eclipse
> would recreate this folder with the r.java file again.   I don't know
> how to handle this nor I will unable to run/debug the program..
> pls help me
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: This bug is costing us money every month

2009-08-03 Thread Disconnect
The G2 JUST came out - it may cost you money next month, but it hasn't cost
you anything yet...

On Mon, Aug 3, 2009 at 3:50 AM, Mister Helmut wrote:

>
> Hello,
>
> I'd like to refer to the issue 2379 :
> http://code.google.com/p/android/issues/detail?id=2379
>
> I know that I may be in infringement of the discussion group guideline
> but this is a kind of "SOS" message.
> This bug is actually costing money every month to all of us going
> aboard very often (or just occasionnaly).
> As of me, in my company, we have G2's as professional phones, and we
> ALL get that charges every month (most of us don't live in the country
> we are working in).
>
> This bug has a "new" status since april, and we can't imagine it not
> being fixed for the next 6 month as our phone provider wont refund us
> anymore.
>
> We may try to correct it ourself, but we are very confident with the
> lower level stack of android source code and we just don't really have
> the time to do it.
>
> Thanks for reading, and I feel sorry about this message, as I know
> that this kind of message isn't percived very well but please
> understand our situation.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] installing gphone drivers automatically

2009-08-03 Thread jonathan

I wish to create an installer that unpack the driver files so windows
new hardware wizard will automatically find it instead of have to let
user select where the files are.  I unpacked the driver files into
windows\system32, windows\ and windows\inf and windows
\system32\drivers,  then the wizard found the inf file, recognized it
as HTC Dream Composite ADB Interface, then it said "Please insert the
compact disc labeled 'ADB Interface Installation Disk' to your CD ROM
drive.
am I doing something wrong?
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: android developer cup Season2

2009-08-03 Thread Luciano Broussal
Hi,
Thanks for the advice.

Croco

On Mon, Aug 3, 2009 at 8:24 PM, Yusuf T. Mobile wrote:

>
> Hi Croco, you can read about ADC here:
>
> http://code.google.com/android/adc/
>
> App submission should start sometime this month.
>
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
>
>
> On Aug 3, 2:23 am, Croco  wrote:
> > Hi all,
> >
> > I'm wondering what is the procedure to submit an application entry for
> > the competition.
> >
> > I can't find into the related docs the procedure to submit  a
> > candidate application.
> >
> > Do we need to submit on the Android Market but any android application
> > can't participate according the terms and agreements of the cup.
> >
> > Thanks for your lights  ;)
> >
> > Croco
> >
>


.com

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



[android-developers] Re: 1.5_r3 backward compatibility

2009-08-03 Thread Xavier Ducrohet

On Mon, Aug 3, 2009 at 12:18 PM, Peter Jeffe wrote:
>
> On Aug 3, 2:04 am, Romain Guy  wrote:
>> 1.5r3 is compatible with 1.5r2, 1.5r1 and even 1.1 and 1.0 if you are
>> careful about which APIs you use.
>
> Thanks Romain, can you confirm that there were no API changes between
> 1.5r1 and 1.5r3?

If there were API changes then the API level would have changed. All
"Android 1.5" platforms in the 1.5 r1 to r3 SDKs show as API 3.

The update of the SDK to r2 and r3 are only for security fixes in the
emulator system image. See the original post on these mailing list for
details.

Xav
-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Rotate TextView to an angle... What's wrong with this code?

2009-08-03 Thread Moto

Thanks Jeff! It worked but by overriding the onDraw call not the
dispatchDraw.

@Override
onDraw(Canvas canvas) {
canvas.save();
canvas.rotate(45);
super.onDraw(canvas);
canvas.restore();
}

I tried the same method on an ImageView extended class but I didn't
get the same rotation, nothing happend than... any ideas?
canvas contains all that the user can see right?  So if it was a
LinearLayout the canvas will be what ever is contained inside it?
Sorry I 'm very new to graphics :P

Thanks!
-Jona

On Aug 2, 5:35 pm, Jeff Sharkey  wrote:
> Don't restore the Canvas until /after/ you super.dispatchDraw().
>
> j
>
>
>
> On Sun, Aug 2, 2009 at 10:32 AM, Moto wrote:
>
> > Hello,
> > I got this code from another post and modified it to work for me as a
> >TextView.  I tried using the code below but no transformation is
> > happening?  Can someone help me out see what's wrong?  I trying to
> > draw the canvas of theTextViewwith the given Matrix transformation.
>
> > Thanks!
> > Moto!
>
> > import android.content.Context;
> > import android.graphics.Canvas;
> > import android.graphics.Matrix;
> > import android.util.AttributeSet;
> > import android.view.MotionEvent;
> > import android.widget.TextView;
>
> > public class CTextView extendsTextView
> > {
> >        private Matrix mForward = new Matrix();
> >    private Matrix mReverse = new Matrix();
> >    private float[] mTemp = new float[2];
>
> >        public CTextView(Context context) {
> >                super(context);
>
> >                mForward.postRotate(90);
> >        mForward.invert(mReverse);
> >        }
> >        public CTextView(Context context, AttributeSet attrs) {
> >                super(context, attrs);
>
> >                mForward.postRotate(90);
> >        mForward.invert(mReverse);
> >        }
> >        public CTextView(Context context, AttributeSet attrs, int defStyle) {
> >                super(context, attrs, defStyle);
>
> >                mForward.postRotate(90);
> >        mForward.invert(mReverse);
> >        }
>
> >       �...@override
> >        protected void dispatchDraw(Canvas canvas) {
> >                canvas.save();
> >                canvas.concat(mForward);
> >                canvas.restore();
>
> >                super.dispatchDraw(canvas);
> >        }
>
> >       �...@override
> >        public boolean dispatchTouchEvent(MotionEvent event) {
> >                final float[] temp = mTemp;
> >        temp[0] = event.getX();
> >        temp[1] = event.getY();
>
> >        mReverse.mapPoints(temp);
>
> >        event.setLocation(temp[0], temp[1]);
> >        return super.dispatchTouchEvent(event);
> >        }
> > }
>
> --
> Jeff Sharkey
> jshar...@android.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: View Android Marketplace

2009-08-03 Thread Mattwho

There are a few websites that supply this information
http://www.cyrket.com/ is one of them.


On Aug 3, 10:48 am, steiljes  wrote:
> How to view the comprehensive list of apps in the marketplace? Do I
> need to buy a handset AND the service with it to see the marketplace?
> I don't want to start developing before I know what the market really
> looks like.
>
> The android.com website offers only a few apps.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Bug report: widget does not load if the orientation changes during the configuration

2009-08-03 Thread Derek

Are you sure forcing portrait mode for configuration activity could
solve the problem ?
I've tried to add: android:screenOrientation="portrait" to my activity
and the problem is still here.
The activity is displayed in portrait whatever the orientation but the
phantom widget bug is still here.

On Jul 13, 9:15 pm, Jeff Sharkey  wrote:
> Thanks for catching this--it's a known issue and an engineer has been
> assigned to it.  :)  There really isn't a good workaround in 1.5,
> other than forcing the configuration activity into portrait mode or
> asking users to rotate before returning.
>
> j
>
>
>
> On Sun, Jul 12, 2009 at 3:19 PM, Pablo Pera wrote:
>
> > Hi,
>
> > I'd like to report a bug we just found while writing a widget.
>
> > Summary: There is a widget installed, that defines a configuration
> > activity. If the user changes the orientation while they are in the
> > configuration activity, and they finish that activity in a different
> > orientation that they started, the widget does NOT appear in the home
> > screen after the configuration is done.
>
> > How to reproduce: have a minimal widget, with a configuration activity
> > that contains a button, which correctly updates the App Widget when it
> > is clicked (as explained 
> > inhttp://developer.android.com/guide/topics/appwidgets/index.html#Confi...).
> > Add a new instance of the widget, so the config screen shows up.
> > Change the orientation once. Click on the button. Your widget does not
> > appear in the home screen. (Ouch.)
>
> > If this has already been reported, or if there's a better way to
> > submit a bug report, please let me know!
>
> > Thanks,
>
> > Pablo
>
> --
> Jeff Sharkey
> jshar...@android.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: 1.5_r3 backward compatibility

2009-08-03 Thread Dianne Hackborn
On Mon, Aug 3, 2009 at 12:18 PM, Peter Jeffe  wrote:

> Thanks Romain, can you confirm that there were no API changes between
> 1.5r1 and 1.5r3?


There aren't any -- you can tell because the SDK version in android.os.Build
has not changed.


> So that's why I'm really hoping that Google will allow developers to
> publish multiple builds for different OS versions in the future.  It
> was very tough to have to hold off releasing 1.5-specific features
> until a critical mass of users were upgraded to 1.5.  At this point
> there's no turning back on increasing platform divergence, and the
> Market has to allow for us to publish builds for each release we
> choose to support.  Romain, do you know if this is in the plans?


At some point it will, though I don't know when that will be.  This is what
android:minSdkVersion was introduced in Cupcake for.

-- 
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] Re: how to use adb tool on SAMSUNG GALAXY?

2009-08-03 Thread arnouf

It's a real headache this samsung on Linux!

I tried a lot of stuff too, but Galaxy is never found by adb...:(

On Jul 31, 11:00 pm, "mobidroid.com"  wrote:
> Hi there,
>
> Not much success with the galaxy and adb :(
>
> I'm under ubuntu 8.10 here are my question:
>
> The step in :http://developer.android.com/intl/de/guide/developing/device.html
>
> Talk about creating the file 51: /etc/udev/rules.d/51-android.rules
> and chmod file 50: chmod a+rx /etc/udev/rules.d/50-android.rules
>
> Which is not the same file is that a typo or it's ok?! And why the
> file 50 need the x status and every other file have only r?
>
> I tried about anything without success the stock r3 adb file and the
> modified one.
>
> Any lights on this will be greatly appreciated (if possible soon
> because I think I can't refund that damn phone in two days!)
>
> Cheers,
>
> Francois
>
> On 23 juil, 16:17, Xionbox  wrote:
>
> > Hi,
>
> > I'm trying to use the Samsung Galaxy on OpenSuSE 11.1 (Linux). I add
> > the following line to /lib/udev/rules.d/50-udev-default.rules
> > SUBSYSTEM=="usb" SYSFS{idVendor}=="04e8", MODE="0666"
> > I also created /etc/udev/rules.d/51-android.rules which has the exact
> > same line.
> > I also updated adb via "android update adb" and then I restarted the
> > adb server. Even after upluging and repluging several times adb still
> > doesn't list the device.
>
> > Any idea on how the rule should be?
> > Thanks in advance.
>
> > On Jul 21, 1:21 am, Olaf Geibig  wrote:
>
> > > Quick Howto for ubuntu:
>
> > > - download SDK 1.5 r3
> > > - enable debug mode on the device: Settings -> Applications ->
> > > Development -> USB debugging
> > > - add udev rule:http://developer.android.com/intl/de/guide/developing/
> > > device.html but use Samsung's vendor id instead: SYSFS{idVendor}
> > > =="04e8"
> > > - replace the adb binary by this 
> > > one:http://floe.butterbrot.org/external/adb.gz
> > > - to use ddms on a 64 bit 
> > > system:http://coffeecokeandcode.blogspot.com/2009/07/ddms-on-ubuntu-64bit.html
>
> > > Patched adb thanks to Flori7500 as mentioned in my previous post.
>
> > > Cheers, Olaf
>
> > > On 18 Jul., 21:13, fexpop  wrote:
>
> > > > Hi,
>
> > > > on my device the build number is 76XXCSDCBALUM6375. It won't be found
> > > > by adb, neither on Windows nor on Linux.
>
> > > > Regards,
>
> > > > Felix
>
> > > > On Jul 18, 8:50 pm, dan raaka  wrote:
>
> > > > > can you post what you see in the settings->about .. about the build 
> > > > > info you
> > > > > have ..
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: 1.5_r3 backward compatibility

2009-08-03 Thread Mark Murphy

Peter Jeffe wrote:
> So that's why I'm really hoping that Google will allow developers to
> publish multiple builds for different OS versions in the future.  It
> was very tough to have to hold off releasing 1.5-specific features
> until a critical mass of users were upgraded to 1.5.  At this point
> there's no turning back on increasing platform divergence, and the
> Market has to allow for us to publish builds for each release we
> choose to support.

I suspect the answer, at least in the short term, looks like this:

http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

That being said, this is also another fine area for competing markets to
out-do the Android Market: offer N app flavors for different
firmware/hardware, yet roll them all up for the purposes of popularity,
ratings, etc.

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

Android App Developer Training: http://commonsware.com/training.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] arcade style virtual joystick

2009-08-03 Thread Croco

Hi All,

I'm wondering if someone know a snippet of code that would implement a
joystick behavior.

I did a 4 orientation button widget but it's really not user friendly
for my game :(

Thanks by advance.

Croco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: 1.5_r3 backward compatibility

2009-08-03 Thread Peter Jeffe

On Aug 3, 2:04 am, Romain Guy  wrote:
> 1.5r3 is compatible with 1.5r2, 1.5r1 and even 1.1 and 1.0 if you are
> careful about which APIs you use.

Thanks Romain, can you confirm that there were no API changes between
1.5r1 and 1.5r3?

And Fred, there is definitely no way you can expect a given level of
firmware to be universally used.  We're still getting users on 1.1
(well, not since we recently required 1.5 :-), and then you've got
custom builds, dev builds...

So that's why I'm really hoping that Google will allow developers to
publish multiple builds for different OS versions in the future.  It
was very tough to have to hold off releasing 1.5-specific features
until a critical mass of users were upgraded to 1.5.  At this point
there's no turning back on increasing platform divergence, and the
Market has to allow for us to publish builds for each release we
choose to support.  Romain, do you know if this is in the plans?

-- Peter

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: ADC2

2009-08-03 Thread Luciano Broussal
Thank you Mark for the confirmation.
Croco

On Mon, Aug 3, 2009 at 7:39 PM, Mark Murphy  wrote:

>
> Croco wrote:
> > I'm wondering what is the procedure to submit an application entry for
> > the competition.
>
> Wait for instructions to appear on http://code.google.com/android/adc/.
>
> --
> 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] Re: Serious dx error. Desperately need expert advice.

2009-08-03 Thread Dan Bornstein

First of all, thanks for taking the time to investigate, and I'm glad
you've found a workaround for this.

As a bit of background, the original version of the code that collects
local variable debugging info was written to target an inefficient
output representation. The output format was fixed before 1.0 shipped,
but the "middle end" of the local variable code wasn't fully updated.
As a result, we found (later) that there were many cases where
redundant local variable info was emitted. That problem was addressed
in Cupcake, but it turns out that the fix wasn't without bugs of its
own.

I just tried reproducing the issue with the version of dx in Donut and
the one in Eclair. The Donut version still has the bug, but it has in
fact already been fixed in Eclair. I suspect it is the same as issue
#2868, .
Unfortunately the master (aka Eclair) branch hasn't been pushed to the
open since the fix was made, but I believe doing so is currently on
the short list of things to do for the folks who do that sort of
thing.

BTW, you can blame me directly, for the most part, for bugs in dx.

-dan

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



[android-developers] Re: Keeping graphics running through orientation change

2009-08-03 Thread Mark Murphy

SChaser wrote:
> How does one create a graphics canvas that is visible by the user
> through orientation (port->land->port) changes? If one defines layout
> land and port, there is a noticeable pause during the switch. Yet, I
> downloaded a bubble level application that never pauses as orientation
> changes - even when it switches from a circular level (gravity vector
> through back of device) to a flat level (gravity vector through side
> or bottom edge). How is this done?

Most likely, they arrange to handle the rotation themselves.

http://wiki.andmob.org/samplecode

Look in there for the links to the Rotational Forces series of blog
posts. This one covers what you need:

http://androidguys.com/?p=2723

In your case, you would detect the rotation and change how you draw on
your canvas to match.

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

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



[android-developers] Re: Can We make canvas trancluent ?

2009-08-03 Thread Yusuf T. Mobile

Hi AV, I'm not sure what you are trying to do, but I recommend
searching the Canvas javadoc for the word "alpha". That's another way
to say "translucent", and Canvas supports it.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Aug 2, 10:45 pm, "android.vinny"  wrote:
> HI
> How can we make canvas translucent background to play images in the
> activity...
>
> plz give me some suggestions regarding this thanks a lot ina
> dvance...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Keeping graphics running through orientation change

2009-08-03 Thread SChaser

How does one create a graphics canvas that is visible by the user
through orientation (port->land->port) changes? If one defines layout
land and port, there is a noticeable pause during the switch. Yet, I
downloaded a bubble level application that never pauses as orientation
changes - even when it switches from a circular level (gravity vector
through back of device) to a flat level (gravity vector through side
or bottom edge). How is this done?

Tks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 developer cup Season2

2009-08-03 Thread Yusuf T. Mobile

Hi Croco, you can read about ADC here:

http://code.google.com/android/adc/

App submission should start sometime this month.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Aug 3, 2:23 am, Croco  wrote:
> Hi all,
>
> I'm wondering what is the procedure to submit an application entry for
> the competition.
>
> I can't find into the related docs the procedure to submit  a
> candidate application.
>
> Do we need to submit on the Android Market but any android application
> can't participate according the terms and agreements of the cup.
>
> Thanks for your lights  ;)
>
> Croco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Catching memory exception

2009-08-03 Thread fadden

On Aug 2, 8:01 pm, whitech  wrote:
> Hi all. I've got this problem:
> When my program using too much memory, it die. Is there an exception
> or something else to warn me? How can I catch it?

What exception is appearing in the log file when your application
dies?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 objects in memory after onDestroy.

2009-08-03 Thread fadden

On Aug 3, 7:18 am, Felipe Silveira  wrote:
> Does anyone know when the Activity object is supposed to be garbage-
> collected, and what can be done to avoid the issue I mentioned?

Start with this article:

  http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html

If that doesn't help spot it, you can use the hprof tools to figure
out what's holding on to it:

  
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/heap-profiling.html;hb=HEAD

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Sending an email

2009-08-03 Thread Mark Wyszomierski

Hi,

I'm looking to send an email, I see we have a few options:

1) Start an intent to send the message, this will popup an activity
the user has to interact with to fire the message off.

2) Include the javamail jar in my project, ask the user for their smtp
info one-time, after that I can automatically send messages.

I need to be able to automatically send messages, so #1 is out. I
could go with #2, but it requires usage of an external jar. Is there
not some method in the android library which can already do this? I'd
like to avoid additional jars if possible,

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



[android-developers] View Android Marketplace

2009-08-03 Thread steiljes

How to view the comprehensive list of apps in the marketplace? Do I
need to buy a handset AND the service with it to see the marketplace?
I don't want to start developing before I know what the market really
looks like.

The android.com website offers only a few apps.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Accessing logs on Android

2009-08-03 Thread Jay-andro

Is there a way to access the default logs on the phone for purposes of
uploading for debugging purposes?

I'd like to be able to provide an "Upload Logs" button that allows the
users of my app to upload their logs if they are encountering issues
with the app. I know I can write my logs to my own file and provide an
upload for that, but I like the context provided by the system logs
interspersed with my log entries to understand what else is going on
on the device when my app has issues.

Is app access to the system logs considered a security issue and hence
not exposed or is there a way to get at the system logs
programmatically? By system logs, I'm referring to what one can see
using DDMS.

thanks
Jay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Publishing to Android market - question

2009-08-03 Thread Mark Murphy

steiljes wrote:
> Do I need to download each carrier's emulator to see what the app
> looks like? 

Carriers don't have emulators.

> Or is there a generic one that comes with Android SDK?

Yes.

> How to view the comprehensive list of apps in the marketplace? Do I
> need to buy a handset AND the service with it to see the marketplace?
> I don't want to start developing before I know what the market really
> looks like.

There is no official solution. There are a few unofficial ones, such as
http://www.cyrket.com/.

-- 
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] Launch an app from within the native Contacts app

2009-08-03 Thread Jay-andro

I would like to be able to launch my app using a URI scheme rather
than an StartIntent. The idea is to be able to embed this "link" in
other apps for example inside a Contact as a URL. clicking on the URL
from within the contact should open my app. Is this possible?

On iPhone, an app can declare a "scheme" for itself in a plist file,
and when any link that starts with "scheme://" is clicked anywhere on
the phone, this will be translated by the OS as a launch request for
this app. Anything similar on Android?

Thanks
Jay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: submit html form

2009-08-03 Thread Yusuf T. Mobile

If I understand your question, you want to render HTML in your
application. If so, then I recommend the WebView class:
http://developer.android.com/reference/android/webkit/WebView.html


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Aug 1, 8:17 am, chl  wrote:
> I am writing an application where i want to show data which i gather
> from normal web requests. Normally i use htmlunit for that. But that
> does not work on android. Is there an other way for android to do 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: Publishing to Android market - question

2009-08-03 Thread steiljes

thank you all for responding.

Do I need to download each carrier's emulator to see what the app
looks like? Or is there a generic one that comes with Android SDK?

On Jul 31, 3:05 pm, happydroid  wrote:
> No, you need to publish just once for Android Market. You can choose
> to not publish to some countries, but that's all you can choose.
> Some carriers may have their own stores, but I used none.
>
> As for portability, if you develop with the SDK and without making any
> assumptions regarding the hardware (screen size for example), your app
> should run on any device.
> You can use the emulators to test your app with various screen sizes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: ADC2

2009-08-03 Thread Mark Murphy

Croco wrote:
> I'm wondering what is the procedure to submit an application entry for
> the competition.

Wait for instructions to appear on http://code.google.com/android/adc/.

-- 
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] Re: enable StreetView

2009-08-03 Thread Juan Pablo Hoyos Sanchez
thank you

2009/8/3 iñaki 

> Take it easy Juan Pablo!!!
>
>
>
> 2009/8/3 Juan Pablo Hoyos Sanchez 
>
>>
>> I have enabled StreetView with .setStreetView(true) but it don´t load, so
>> I don´t know if I have enable other things.
>>
>> thank you.
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] appwidget onReceive() appwidgetIds null

2009-08-03 Thread ChangliWang

public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
super.onReceive(context, intent);
String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
Log.i(TAG, "onReceive1");
Bundle extras = intent.getExtras();
if (extras != null) {
Log.i(TAG, "onReceive2");
int[] appWidgetIds = extras.getIntArray
(AppWidgetManager.EXTRA_APPWIDGET_IDS);
if (appWidgetIds != null && appWidgetIds.length > 0) {
Log.i(TAG, "onReceive3");
this.onDeleted(context, appWidgetIds);
}
}
}

}
I found that appWidgetIds is null. Who can tell me why?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 StreetView

2009-08-03 Thread iñaki
Take it easy Juan Pablo!!!



2009/8/3 Juan Pablo Hoyos Sanchez 

>
> I have enabled StreetView with .setStreetView(true) but it don´t load, so I
> don´t know if I have enable other things.
>
> thank you.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Programmatically refresh email account

2009-08-03 Thread Yves Glodt
Hi,

is is possible to programmatically trigger a refresh for one or all Email
accounts?

Best regards,
Yves

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: SQLiteDatabase table

2009-08-03 Thread boomerbubba

SELECT EXISTS(SELECT * FROM sqlite_master WHERE type = 'table' AND
Name = 'MyTableName');

returns 1 or 0 for True or False

Substute your own table name for MyTableName.


On Jul 29, 7:07 am, jay ram  wrote:
>     I'm working with SQLiteDatabase. I need to find out whether a table
> named 'table1' exists in my database or not, programmatically.
> Is there any method to find that?
>
> Thanks in advance.
> --
>
> Regards,
>
> T.JAYARAM

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] Adding a hand-crafted WAV to the ContentResolver database

2009-08-03 Thread Rhodri

Hello there,

I've got some code that generates 16-bit PCM audio, and have written a
method to encase it in a valid WAV header - but when I try to add such
a file to the ContentResolver's database (with getContentResolver
().insert()) I get a rather unhelpful CONSTRAINT FAILED error. Is
there a specific MIME type I should be using, since audio/x-wav
doesn't work. I've tried just saving the file to the root of the SD
card, but to get it to show up in the system's audio picker I have to
restart the device.

Any advice?
Thanks,
Rhodri

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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 objects in memory after onDestroy.

2009-08-03 Thread Felipe Silveira

Hi everyone,

I have a activity MyActivity, which "kills" yourself using the finish
() method.

The problem is: after the kill operation, method onDestroy is called,
but the object of type MyActivity is never garbage-collected (I forced
the GC run). It is causing a memory leak, because MyActivity is
launched many times, by other activities.

Does anyone know when the Activity object is supposed to be garbage-
collected, and what can be done to avoid the issue I mentioned?

Thanks in advance.


Felipe Silveira
http://www.felipesilveira.com.br

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



[android-developers] How to integrate my application to paypal

2009-08-03 Thread Venkat

Hi

Could please help me how to integrate my application with paypal, so
that User can pay money in my application through paypal to the
merchant?

Thanks & Regards
Venkat

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



[android-developers] How to add favorite button in my application

2009-08-03 Thread Venkat

Hi

Could you please tell me or if possible please give me the source code
for how to add favorite button in my application?

Thanks & Regards
Venkat

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



[android-developers] How to hide dialer application after establishing call?

2009-08-03 Thread mmj

Hi all,

I am with an application that will establish a call from it and do
something else after that.Establishing call from my application is
working fine using Intent.Action_Call.But after that the control is
going to the native dialer application.I want to bring the control
back to my application after few seconds.Even though i start a new
activity depending on the call states obtained by the
PhoneStatelistener, it is launching the new activity in that
application.But it is all happening at the background because as soon
as dialer comes into picture,my application is minimized.

I need the control to be back to my application from the dialer after
some time and call established should be there until the user is
disconnecting it.

Can anyone help me in implementing the same?

Thanks in advance

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



[android-developers] Re: filenotfound ... but creating with recorder !!!

2009-08-03 Thread Umair Akbar
On 8/3/09, Umair Akbar  wrote:
>
> *Hey, acquaintances h r u *
>
> *Break these bogs @ very fascinating*
>
> *I hope u enjoy this bogs*
>
> * *
>
> *www.safteytips007.blogspot.com*
>
> *www.wonderfulbwp.blogspot.com *
>
> *   www.technicaleducationbwp.blogspot.com*
>
>
> On 8/3/09, pierre  wrote:
>>
>>
>> Hi,
>>
>> I don't understand how this can happen (it has just happened once,
>> works properly other times) :
>> - /sdcard/mydir/ is an existing directory
>> - myRecord.3gp doesn't exist, of course.
>>
>>
>> ERROR :
>> java.io.FileNotFoundException: /sdcard/mydir/myRecord.3gp
>> at org.apache.harmony.luni.platform.OSFileSystem.open
>> (OSFileSystem.java:231)
>> at java.io.FileOutputStream.(FileOutputStream.java:96)
>> at java.io.FileOutputStream.(FileOutputStream.java:169)
>> at java.io.FileOutputStream.(FileOutputStream.java:147)
>> at android.media.MediaRecorder.prepare(MediaRecorder.java:364)
>>
>> CODE :
>> recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
>> recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
>> recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
>> recorder.setOutputFile(pathToMyRecord);
>> try {
>>recorder.prepare();
>>recorder.start();
>>  }
>> ...
>>
>>
>> I did notice some other errors when using sdcard files, is this a know
>> sdcard problem ?
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: usb cable + failed to start monitoring

2009-08-03 Thread Samuel Terre

Try to plug into another USB interface and see how it going

On 8月3日, 下午5时19分, gunar  wrote:
> Hi!
>
> I don't know if this is the proper forum to put my question, but here
> is goes:
> I have a G1 Dev Phone and I damaged the usb cable that I received with
> the package. I plugged another USB cable that fits in and it charges
> the device, but from eclipse I am getting "failed to start monitoring"
> messages as adb logcat is useless.  Also, my Windows machine reports
> from system manager that the USB cable is working fine. So, it seems
> as it is only an Eclipse issue.
>
> What are my options?
>
> Regards,
> gunar

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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] plan about video on download(VOD) framework

2009-08-03 Thread ZhangJieJing
Hello  Everyone,

I'm a developer of android product, I'm working for the online play without
broswer, like some P2P stream player on our device, I heard someone said
that Google's Android Team have some play on that, I want to know is this
true?  or I must make a framework to P2P stream video play.


BTW,
Can anyone give some suggestion about how to share memory with the player
application.
The Normal P2P interface is like p2p_read_request(int fd, char *buf, size_t
request_size, time_t block_time);
fd: this is just the id of cache, maybe some is the file descriptor.
buf: is requesting bufer pointer. the download lib will full fill this
memory.
request_size: is the size of request. the player can get this memory and
play, in some all-in-one player.
block_time, this is the longest time will waiting.

since we have multi p2p download lib from different vendor, so I start a
server to handle all of this.
But I can't find a good way to share memory to the player (they are in
different process).
the cache is controled by download lib.


Thanks.
---
Best regards,
Zhang Jiejing

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



[android-developers] Re: How to use CheckBox as children in ExpandableList?

2009-08-03 Thread powerbyte

Hello Kostmo
use the following code to toggle check box

 @Override
 public boolean onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id)
 {
CheckedTextView tempView = (CheckedTextView)v.findViewById
(android.R.id.text1);
tempView.setChecked(!tempView.isChecked());
return super.onChildClick(parent, v, groupPosition,
childPosition, id);
 }


On Jul 21, 11:16 am, "anki_dai...@yahoo.com" 
wrote:
> You are using
>
> final ListView listView = getExpandableListView();
>         listView.setItemsCanFocus(false);
>         listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
>
> but you are extending ExpandableListActivity, not ListActivity. To use
> chekboxes properly you have to use mAdapter variable..
>
> On Jul 14, 5:35 am, kostmo  wrote:
>
>
>
> > I would like to haveexpandabletext categories which reveal children
> > that are checkable entries.
> > I've used the "simple_list_item_multiple_choice" layout for the
> > childLayout argument ofSimpleExpandableListAdapter.
>
> > The activity shows up correctly, but when a child item is clicked, the
> > check box will not toggle.
>
> > I haven taken code from List11.java and ExpandableList3.java from the
> > ApiDemos project.
>
> > 
> > package com.kostmo.android.test;
>
> > import java.util.ArrayList;
> > import java.util.HashMap;
> > import java.util.List;
> > import java.util.Map;
>
> > import android.app.ExpandableListActivity;
> > import android.os.Bundle;
> > import android.widget.ExpandableListAdapter;
> > import android.widget.ListView;
> > import android.widget.SimpleExpandableListAdapter;
>
> > public class ExpandableFeatureSelector extends ExpandableListActivity
> > {
> >     private static final String NAME = "NAME";
>
> >     private ExpandableListAdapter mAdapter;
>
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
>
> >        List> groupData = new
> > ArrayList>();
> >        List>> childData = new
> > ArrayList>>();
>
> >         for (String database_name : AvailableCategories) {
> >             Map curGroupMap = new HashMap > String>();
> >             groupData.add(curGroupMap);
> >             curGroupMap.put(NAME, database_name);
>
> >            List> children = new
> > ArrayList>();
> >             for (String download_option : AvailableFeatures) {
> >                 Map curChildMap = new HashMap > String>();
> >                 children.add(curChildMap);
> >                 curChildMap.put(NAME, download_option);
> >             }
> >             childData.add(children);
> >         }
>
> >         mAdapter = newSimpleExpandableListAdapter(
> >                 this,
> >                 groupData,
> >                 android.R.layout.simple_expandable_list_item_1,
> >                 new String[] { NAME },
> >                 new int[] { android.R.id.text1 },
> >                 childData,
> >                 android.R.layout.simple_list_item_multiple_choice,
> >                 new String[] { NAME },
> >                 new int[] { android.R.id.text1 }
> >                 );
> >         setListAdapter(mAdapter);
>
> >         final ListView listView = getExpandableListView();
> >         listView.setItemsCanFocus(false);
> >         listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
> >     }
>
> >     private static final String[] AvailableCategories = new String[] {
> >         "Books", "Clothes", "Cars"
> >     };
>
> >     private static final String[] AvailableFeatures = new String[] {
> >         "Damaged", "Used"
> >     };
>
> > }
>
> > - 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] Catching memory exception

2009-08-03 Thread whitech

Hi all. I've got this problem:
When my program using too much memory, it die. Is there an exception
or something else to warn me? How can I catch it?

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



[android-developers] Recording/Playback volume control

2009-08-03 Thread Venkatesh D

Hi all,

I am developing an application which involves recording and playback
of audio. Am using MediaPlayer to record the audio from Mic in amr
format, save it to a file and playback the same file. I wish to have
the best audio record/playback performance with maximum recording
volume and same while playback.

Is there any API through which I can increase the recording or
playback volume?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
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: Help Activity History Stack...

2009-08-03 Thread Umair Akbar
*Hey, acquaintances h r u *

*Break these bogs @ very fascinating*

*I hope u enjoy this bogs*

* *

*www.safteytips007.blogspot.com*

*www.wonderfulbwp.blogspot.com *

*   www.technicaleducationbwp.blogspot.com*


On 8/3/09, Dianne Hackborn  wrote:
>
> There isn't a direct way to do this.  You could either handle onNewIntent()
> in the activity to have it clear itself, or finish() itself and start a new
> fresh instance.
>
> On Fri, Jul 31, 2009 at 11:43 PM, Moto  wrote:
>
>>
>> Hello could someone help me out choosing the right flags?
>>
>> I have 3 activities, I want to allow only one of each of the
>> activities to be on the history stack at one time.
>>
>> A>B>C>[GO TO B]
>> gives me A>C>B  using FLAG_ACTIVITY_REORDER_TO_FRONT flag.
>>
>> Now the problem is that when I call B from C I want B to be restarted
>> not just brought to the front...  how can I do that?
>>
>> Thanks!
>> Moto!
>>
>>
>
>
> --
> 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] Re: How to use CheckBox as children in ExpandableList?

2009-08-03 Thread powerbyte

Hello kostmo,

use the following code to toggle checkbox
@Override
public boolean onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id)
{
CheckedTextView tempView = (CheckedTextView)v.findViewById
(android.R.id.text1);
tempView.setChecked(!tempView.isChecked());
return super.onChildClick(parent, v, groupPosition,
childPosition, id);
 }

On Jul 21, 11:16 am, "anki_dai...@yahoo.com" 
wrote:
> You are using
>
> final ListView listView = getExpandableListView();
>         listView.setItemsCanFocus(false);
>         listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
>
> but you are extending ExpandableListActivity, not ListActivity. To use
> chekboxes properly you have to use mAdapter variable..
>
> On Jul 14, 5:35 am, kostmo  wrote:
>
>
>
> > I would like to haveexpandabletext categories which reveal children
> > that are checkable entries.
> > I've used the "simple_list_item_multiple_choice" layout for the
> > childLayout argument of SimpleExpandableListAdapter.
>
> > The activity shows up correctly, but when a child item is clicked, the
> > check box will not toggle.
>
> > I haven taken code from List11.java and ExpandableList3.java from the
> > ApiDemos project.
>
> > 
> > package com.kostmo.android.test;
>
> > import java.util.ArrayList;
> > import java.util.HashMap;
> > import java.util.List;
> > import java.util.Map;
>
> > import android.app.ExpandableListActivity;
> > import android.os.Bundle;
> > import android.widget.ExpandableListAdapter;
> > import android.widget.ListView;
> > import android.widget.SimpleExpandableListAdapter;
>
> > public class ExpandableFeatureSelector extends ExpandableListActivity
> > {
> >     private static final String NAME = "NAME";
>
> >     private ExpandableListAdapter mAdapter;
>
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
>
> >        List> groupData = new
> > ArrayList>();
> >        List>> childData = new
> > ArrayList>>();
>
> >         for (String database_name : AvailableCategories) {
> >             Map curGroupMap = new HashMap > String>();
> >             groupData.add(curGroupMap);
> >             curGroupMap.put(NAME, database_name);
>
> >            List> children = new
> > ArrayList>();
> >             for (String download_option : AvailableFeatures) {
> >                 Map curChildMap = new HashMap > String>();
> >                 children.add(curChildMap);
> >                 curChildMap.put(NAME, download_option);
> >             }
> >             childData.add(children);
> >         }
>
> >         mAdapter = new SimpleExpandableListAdapter(
> >                 this,
> >                 groupData,
> >                 android.R.layout.simple_expandable_list_item_1,
> >                 new String[] { NAME },
> >                 new int[] { android.R.id.text1 },
> >                 childData,
> >                 android.R.layout.simple_list_item_multiple_choice,
> >                 new String[] { NAME },
> >                 new int[] { android.R.id.text1 }
> >                 );
> >         setListAdapter(mAdapter);
>
> >         final ListView listView = getExpandableListView();
> >         listView.setItemsCanFocus(false);
> >         listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
> >     }
>
> >     private static final String[] AvailableCategories = new String[] {
> >         "Books", "Clothes", "Cars"
> >     };
>
> >     private static final String[] AvailableFeatures = new String[] {
> >         "Damaged", "Used"
> >     };
>
> > }
>
> > - 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
-~--~~~~--~~--~--~---



  1   2   >