[android-developers] Re: ADT 9.0.0 preview

2010-12-16 Thread Zarah
Zsolt, by formatting do you by any chance include the indentations?
FWIW, The CTRL+I auto-format shortcut in Eclipse works for Android
XMLs also.



- Zarah.



On Dec 16, 3:20 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 Xavier, I just saw that a bunch of improvements for made for XML
 formatting.  I welcome this, since I am a strickler for tidy
 formatting, I've been hand editing my XMLs so that the formatting
 wouldn't get messed up.

 One request, if it's not already there regarding the formatting:  I
 would really like to be able to specify thatt the android:layout_*
 attributes should come first, followed by the android:* non-layout
 attributes then finally any custom (app:*) attributes. Ideally, I
 would also like to be able to specify that the layout_* attributes
 should be inserted in the id, width. height, weight order.

 Thanks.

 On Dec 16, 8:37 am, Xavier Ducrohet x...@android.com wrote:







  hey all,

  we're released a preview of the next ADT 
  athttp://tools.android.com/download.

  This is not a final release, not ready for general public consumption
  but we wanted to start publishing regular builds out of the dev tree.

  See the above link for more information about the changes.

  Xav
  --
  Xavier Ducrohet
  Android SDK Tech Lead
  Google Inc.

  Please do not send me questions directly. 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: Help in ExpandableList

2010-12-16 Thread pramod.deore

Hi Kostya, Thanks
I have change code like this:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME,
MODE_PRIVATE, null);

Cursor groupCursor = sampleDB.rawQuery (SELECT _id,
RoomName ,SwitchFullName FROM SwitchTable GROUP BY RoomName,null);
System.out.println (###+groupCursor.getCount());
System.out.println (_+groupCursor.getPosition());
System.out.println (groupCursor.getColumnIndex(RoomName));
// Cache the ID column index
mGroupIdColumnIndex =
groupCursor.getColumnIndexOrThrow(_id);
//groupCursor.moveToFirst();

// Set up our adapter
mAdapter = new MyExpandableListAdapter(groupCursor,
this,
android.R.layout.simple_expandable_list_item_1,
android.R.layout.simple_expandable_list_item_2,
new String[] {RoomName}, // Name for group layouts
new int[] {android.R.id.text1},
new String[] {SwitchFullName}, // Number for child
layouts
new int[] {android.R.id.text1});

setListAdapter(mAdapter);

System.out.println (
%+getExpandableListAdapter().getGroupCount());
System.out.println (::+this.getSelectedId());

}

Now I want name of parent (here name of room) on  which user clicked.
Because if I get name of room then I can use that in getChildrenCursor
() as
 protected Cursor getChildrenCursor(Cursor groupCursor)
{

Cursor groupCursor1 = sampleDB.rawQuery (SELECT
_id,SwitchFullName FROM SwitchTable where RoomName = 'HERE GOES ROOM
NAME',null);
//System.out.println (###+groupCursor1.getCount());
return groupCursor1;
}

So how to get room name.Thanks

On Dec 15, 4:55 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 15.12.2010 14:05, pramod.deore пишет:

  Hi every time I get  _ID value as 1. I used following line to get
  value
    mGroupIdColumnIndex = groupCursor.getColumnIndexOrThrow(_id);

 That's the index of column _ID within your query, not the value stored
 in the database.

 http://developer.android.com/reference/android/database/Cursor.html#g...)

  And you told me that usethis is in where condition into following
  query.

  Cursor groupCursor1 = sampleDB.rawQuery (SELECT DISTINCT
  RoomName AS RoomName1 ,_id , SwitchFullName FROM SwitchTable ORDER BY
  RoomName,null);

 See last parameter:

 http://developer.android.com/reference/android/database/sqlite/SQLite...,
 java.lang.String[])

 Also:

 http://www.sqlite.org/lang_select.html#whereclause

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: How can I manually set the screen rotation?

2010-12-16 Thread SW
Marcin Orlowski webnet.android at gmail.com writes:

 
  So I am trying to write an app that will allow me to set the screen
  rotation. Is this possible? I can't find anything in the SDK
  documentation that does what I want.
 

http://developer.android.com/reference/android/app/Activity.html#setRequestedOrientation%28int%29
 http://developer.android.com/guide/topics/manifest/activity-element.html#screen

That's no good, it only sets the rotation for my activity and it then reverts
back once my activity exits.

I want to manually set the rotation for the android device, not just my 
activity.



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


Re: [android-developers] Re: Project on Android

2010-12-16 Thread Chirayu Dalwadi
I need to find a definition and then to work on it. Since I am new in field
of android I wanted help of community. Moreover, this is not a part of
homework.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Binder IPC ( native process - to - android service )

2010-12-16 Thread FrankG
IMHO the platform is the best example ( and android platform
is better group for this kind of questiions, as this is out of scope
of the sdk )

The android-platfrom uses AIDL or sockets to communicate between
native processes and i.e. java services.

Good luck ! Frank


On 15 Dez., 16:39, a11xc07bc a11xc0...@gmail.com wrote:
 Hi,

 Does anyone know if there are any good information/examples on how to
 bind to an Android service written in Java from a native process
 written in C/C++? and use that binding for further IPC.

 And, what steps needs to be done in the service? in order to be
 listable/bindable from the native process:

 i.e. something like:

 spIServiceManager servman = defaultServiceManager();
 servman-listServices();

 and

 spIBinder binder = servman-

 getService(String16(com.path.to.service));

 Please reassign this question to the right forum, if this forum is
 wrong.

 Regards,
 a11xc07bc

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


[android-developers] Re: Why need CleanSpec.mk for each module from Android2.1?

2010-12-16 Thread Hylon
Hi Gurus,

Anyone can help me on this?
thanks.

On Dec 16, 11:25 am, Hylon hlliu2...@hotmail.com wrote:
 Anyone can help answer this, thanks a lot in advance.

 On Dec 14, 2:18 pm, Hylon hlliu2...@hotmail.com wrote:



  Hi Everyone,

   

  Can anyone help explain why need CleanSpec.mk for each module from
  Android2.1  how to use it? is it possible to disable this feature?

   

  I encounter a problem that it will take 1+mins to search all
  CleanSpec.mk from Android root each time when i use mm to build a
  module, especially for applications with short build time, it seems
  this impact their build time seriously. (ex. building Mms ONLY takes
  30s in Android2.1 but 100+s from Android2.2, with ~230% build time
  increased)- 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


Re: [android-developers] Re: Help in ExpandableList

2010-12-16 Thread Kostya Vasilyev

Pramod,

getChildrenCursor is given a cursor.

You get the value of room name (or any other column) the same way, by 
calling methods of Cursor.


http://developer.android.com/reference/android/database/Cursor.html

-- Kostya

16.12.2010 11:08, pramod.deore пишет:

Hi Kostya, Thanks
I have change code like this:
public void onCreate(Bundle savedInstanceState)
 {
 super.onCreate(savedInstanceState);
 sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME,
MODE_PRIVATE, null);

 Cursor groupCursor = sampleDB.rawQuery (SELECT _id,
RoomName ,SwitchFullName FROM SwitchTable GROUP BY RoomName,null);
 System.out.println (###+groupCursor.getCount());
 System.out.println (_+groupCursor.getPosition());
 System.out.println (groupCursor.getColumnIndex(RoomName));
 // Cache the ID column index
 mGroupIdColumnIndex =
groupCursor.getColumnIndexOrThrow(_id);
 //groupCursor.moveToFirst();

 // Set up our adapter
 mAdapter = new MyExpandableListAdapter(groupCursor,
 this,
 android.R.layout.simple_expandable_list_item_1,
 android.R.layout.simple_expandable_list_item_2,
 new String[] {RoomName}, // Name for group layouts
 new int[] {android.R.id.text1},
 new String[] {SwitchFullName}, // Number for child
layouts
 new int[] {android.R.id.text1});

 setListAdapter(mAdapter);

 System.out.println (
%+getExpandableListAdapter().getGroupCount());
 System.out.println (::+this.getSelectedId());

 }

Now I want name of parent (here name of room) on  which user clicked.
Because if I get name of room then I can use that in getChildrenCursor
() as
  protected Cursor getChildrenCursor(Cursor groupCursor)
 {

 Cursor groupCursor1 = sampleDB.rawQuery (SELECT
_id,SwitchFullName FROM SwitchTable where RoomName = 'HERE GOES ROOM
NAME',null);
//System.out.println (###+groupCursor1.getCount());
return groupCursor1;
 }

So how to get room name.Thanks

On Dec 15, 4:55 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

15.12.2010 14:05, pramod.deore пишет:


Hi every time I get  _ID value as 1. I used following line to get
value
   mGroupIdColumnIndex = groupCursor.getColumnIndexOrThrow(_id);

That's the index of column _ID within your query, not the value stored
in the database.

http://developer.android.com/reference/android/database/Cursor.html#g...)


And you told me that usethis is in where condition into following
query.
Cursor groupCursor1 = sampleDB.rawQuery (SELECT DISTINCT
RoomName AS RoomName1 ,_id , SwitchFullName FROM SwitchTable ORDER BY
RoomName,null);

See last parameter:

http://developer.android.com/reference/android/database/sqlite/SQLite...,
java.lang.String[])

Also:

http://www.sqlite.org/lang_select.html#whereclause

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Enabling bluetooth to a System Service

2010-12-16 Thread FrankG
- android-platform

On 15 Dez., 13:15, Narseo Vallina nar...@gmail.com wrote:
 Hi all

 I'm working on a research project and I need to have a system service
 running as an android component and one of it's features is performing
 bluetooth scans in the environment.

 I have the following code to discover bluetooth devices (taken from
 BluetoothChat example). I tried it as an application and it worked but
 once I'm adding it as a feature of my system service it does not work.
 I'm not sure if I'm declaring the intents properly or if I need to set
 up the permissions for my system service somewhere. Does any of you
 tried to do something similar?

 The erros I get are:

 E/ErdMngr(   88): Error starting enable BT intent: No Activity found
 to handle Intent { act=android.bluetooth.adapter.action.REQUEST_ENABLE
 flg=0x1000 }

 E/ErdMngr(   88): Error starting enable BT intent: No Activity found
 to handle Intent { act=android.bluetooth.adapter.action.REQUEST_ENABLE
 flg=0x1000 }

 E/ErdMngr ( 88) Error ensuring BT device is discoverable: No Activity
 found to handle Intent
 { act=android.bluetooth.adapter.action.REQUEST_DISCOVERABLE
 flg=0x1000 (has extras) }

 D/ErdMngr(   88): Bluetooth discovering
 I/ActivityManager(   88): Starting activity: Intent
 { act=android.bluetooth.adapter.action.REQUEST_DISCOVERABLE
 flg=0x1000 (has extras) }

 And the code:

 //In run (for the thread), I define the intents:
         IntentFilter intentFilter = new IntentFilter();
         intentFilter.addAction(ALARM_WAKEUP);
         intentFilter.addAction(ALARM_TIMEOUT);
         intentFilter.addAction(BluetoothDevice.ACTION_FOUND);

 intentFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
         mContext.registerReceiver(mBroadcastReciever, intentFilter);

 //And then it calls a method to start bluetooth
         private void loadInterfaces(){

                 Log.d(TAG, Loading interfaces);
                 //At this point, interfaces must be ready

                 mBtAdapter = BluetoothAdapter.getDefaultAdapter();
                 try{
                         //Enable interface
                         enableBluetooth();
                 }
                 catch(Exception e){
                         Log.e(TAG, Failed to enable interface);
                 }
                 try{
                         //Ensure interface is discoverable
                         ensureBluetoothDiscoverability();
                 }
                 catch(Exception e){
                         Log.e(TAG, Failed to set BT interface discoverable);
                 }

         }

         private void enableBluetooth(){
                 Log.d(TAG, enableBluetooth());
                 if(!mBtAdapter.isEnabled()){
                         Intent enableBtIntent = new Intent
 (BluetoothAdapter.ACTION_REQUEST_ENABLE);
                         
 enableBtIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                 try{
                         mContext.startActivity(enableBtIntent);
                 }
                 catch(Exception e){
                         Log.e(TAG, Error starting enable BT intent: 
 +e.getMessage());
                 }

                 }
                 else{
                         Log.e(TAG, BT Interface already enabled);
                 }
         }

         private void ensureBluetoothDiscoverability(){
                 Log.d(TAG, Ensuring bluetoot is discoverable);
                 if(mBtAdapter.getScanMode()!=
 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE){
                         Log.e(TAG, Device was not in discoverable mode);
                         Intent discoverableIntent = new
 Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);

 discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION,
 300);

                         //Without specifying the flags, it returns the 
 exception: Calling
 startActivity() from outside of an Activity  context requires the
 FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
                         
 discoverableIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                         try{
                                 mContext.startActivity(discoverableIntent);
                                 Log.d(TAG, Device set up as discoverable);
                         }
                         catch(Exception e){
                                 Log.e(TAG, Error ensuring BT device is 
 discoverable:
 +e.getMessage());
                         }
                 }
                 else{
                         Log.e(TAG, Device already discoverable);
                 }
         }

         //TODO: It should specify which interface to use (argument)
         private void startDiscovery(){

                 if (mBtAdapter.isDiscovering()){
                         Log.e(TAG, BT Interface already discovering. 
 Cancelling);
                         mBtAdapter.cancelDiscovery();
                 }
                 

[android-developers] AppWidget Problem

2010-12-16 Thread Vivek
Hi All,

I have been working on creating AppWidget for my application.
I contains 4 images and I need to change them at an interval of 30
sec.
I was able to achieve it using service and it is changing at an
interval of 30 sec.
The problem is that it does hang for the period where the images of
the widget change.
The home screen of android hangs for the period when updating the
widget.
Any gesture appears to hang for that period.

The other implementation that involves AlarmManager does not work.
I took an example from the link
http://android-er.blogspot.com/2010/10/app-widget-using-alarm-manager.html
but it does not update the TextView after it is placed on the android
home screen (launcher).
I am not able to figure out anything related to AlarmManager.

What should I do?
Please help

Thanks
Vivek

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 image to server...?

2010-12-16 Thread Abhilash baddam
Hi friends,

  I am new to android. Actually I have to send an image which is in
SDCard to server.
   For that I have displayed all images which are in SDcard in grid
view. When i click on image that image is sent to server. Please any help
regarding this problem.






Regards,
Abhay_401

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Fm Radio

2010-12-16 Thread wolf
thanks mr brill, you are closer than the other answer, i want to know
how the FM Radio app is work, the code, not how to use it in my
programs.

On Dec 15, 3:07 pm, Bob Kerns r...@acm.org wrote:
 I'm reasonably sure he means FM radio. Like the FM Radio app that
 showed up on my Google Nexus One after updating with a MoDoCo build,
 which uses the headset as an antenna, and the phone really does
 operate as an FM radio receiver. Like I'm listening to right now.

 Apparently the radio chip supports low-power FM transmit, too. I would
 be curious if that has been through the FCC certification process, but
 I bet it gets enabled in the non-stock builds soon anyway. Presumably
 this will enable you to play your tunes on an

 I have no idea of the API involved in turning it on. But once on, it
 is fed through the Media audio stream.

 The package name is 'com.htc.fm', so draw your own conclusions.

 On Dec 13, 7:18 pm, Brill Pappin br...@pappin.ca wrote: I don't remember 
 seeing any API for FM Radio... do you mean steaming radio?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ImageView not refreshing/reflecting changes

2010-12-16 Thread Daniel Quach
I'm using a photo picker intent to choose an image and write it to an
application-private file created via:

FileOutputStream fos = openFileOutput(temp.jpg,
Context.MODE_WORLD_WRITEABLE);
fos.close();
return getFileStreamPath(temp.jpg);
upon activity result, I set the ImageView's image URI to this file.

When it first completes, the ImageView changes to reflect this.
However, if I attempt to choose the image again (same activity), the
ImageView will not update until I exit and re-enter the activity. I'm
not sure why this happens, is it because I'm trying to write to the
temp.jpg everytime? Or do I need to refresh my layout somehow to
reflect changes in the ImageView?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 bluetooth

2010-12-16 Thread Jags
is this message a spam ? Nobody is able to see my message or what ?
dont get answers, only get spams posted in the forum !

On Dec 16, 11:03 am, hanika han...@securitywall.in wrote:
 hi

 Thanks  Regards,
 cid:image002@01CA2AEF.10F60770
 Vijay Patel
 Test Engineer
 Elitecore Technologies Ltd.
 904, Silicon tower, off C.G Road, Ahmedabad-380 006 Gujarat (INDIA),
 Tel: +91-79-66065606 | HYPERLINK
 mailto:vijay.pa...@elitecore.comvijay.pa...@elitecore.com
 HYPERLINK http://www.cyberoam.comwww.cyberoam.com
 P    Please do not print this email unless it is absolutely necessary.
 Spread environmental awareness.

  image001.jpg
 2KViewDownload

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


Re: [android-developers] Re: Why need CleanSpec.mk for each module from Android2.1?

2010-12-16 Thread Dianne Hackborn
This question is not appropriate for android-developers; look on
android-building.

On Thu, Dec 16, 2010 at 12:10 AM, Hylon hlliu2...@hotmail.com wrote:

 Hi Gurus,

 Anyone can help me on this?
 thanks.

 On Dec 16, 11:25 am, Hylon hlliu2...@hotmail.com wrote:
  Anyone can help answer this, thanks a lot in advance.
 
  On Dec 14, 2:18 pm, Hylon hlliu2...@hotmail.com wrote:
 
 
 
   Hi Everyone,
 
  
 
   Can anyone help explain why need CleanSpec.mk for each module from
   Android2.1  how to use it? is it possible to disable this feature?
 
  
 
   I encounter a problem that it will take 1+mins to search all
   CleanSpec.mk from Android root each time when i use mm to build a
   module, especially for applications with short build time, it seems
   this impact their build time seriously. (ex. building Mms ONLY takes
   30s in Android2.1 but 100+s from Android2.2, with ~230% build time
   increased)- Hide quoted text -
 
  - Show quoted text -

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




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

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

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

Re: [android-developers] Re: How can I manually set the screen rotation?

2010-12-16 Thread Dianne Hackborn
On Thu, Dec 16, 2010 at 12:08 AM, SW simon.wind...@gmail.com wrote:

 That's no good, it only sets the rotation for my activity and it then
 reverts
 back once my activity exits.
 I want to manually set the rotation for the android device, not just my
 activity.


Sorry, you can't.

-- 
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] Problem with Publishing app in android Market

2010-12-16 Thread Lamia Hannoun
Hello!

I want to publish my first android app in Android market, I payed the 25 USD
to get liscence to get an account to add my app and still I didn't hear from
them and I didn't get any response from android market it's been 14days !!!
What should I do?

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

Re: [android-developers] Re: display brightness

2010-12-16 Thread Dianne Hackborn
On Wed, Dec 15, 2010 at 11:08 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 If it's doable with the Settings app, it should be doable from your
 app.  You may have to use reflection or whatever to get to the APIs
 and no gurantee of future compatibility, but that's the trade-off.


That's not true.  The settings application runs with special privileges to
allow it to interact with core parts of the system.  (Actually it runs with
the same uid as the system itself.)  More, parts of it run in different
processes, or are even implemented in different .apks, to be able to touch
the things it needs to.

-- 
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] Customizing a RelativeLayout

2010-12-16 Thread Paolo
Hi!
I'm trying to customize a RelativeLayout on order to show a nice
trasparent black content box. So my class has extended RelativeLayout
and has overridden the onDraw() method, but nothing appears in the
Eclipse layout editor; the same happens if I try to run my app on the
device.

I read I have to override dispatchDraw() and this works. I can see my
custom layout in the editor, but I'm not able to add child view to the
layout. Or better... I add a child in my layout from XML, but I can't
see it on the Eclipse layout editor. In this case if I run the app on
the device I see my layout drawn not correctly.. only a part of it is
drawn or it appears cut.

Why? What am I wrong?

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


Re: [android-developers] How to identify which client called into a Remote/AIDL service?

2010-12-16 Thread 苗忠良
hi:

how to get the Context of  Binder.getCallingUid() ?

2010/7/31 Dianne Hackborn hack...@android.com

 Oh yeah and actually this is the one most people use:
 http://developer.android.com/reference/android/content/Context.html#enforceCallingPermission(java.lang.Stringhttp://developer.android.com/reference/android/content/Context.html#enforceCallingPermission%28java.lang.String,
 java.lang.String)


 On Fri, Jul 30, 2010 at 7:07 PM, Dianne Hackborn hack...@android.comwrote:

 Binder.getCallingUid() returns the uid of the calling who initiated the
 current incoming call.

 However more typically you'll use one of the flavors of these to just do a
 permission check on the incoming call:
 http://developer.android.com/reference/android/content/Context.html#checkCallingPermission(java.lang.String)http://developer.android.com/reference/android/content/Context.html#checkCallingPermission%28java.lang.String%29

 That function calls Binder.getCallingUid() for you and then does the
 permission check with the system.

 On Mon, Jul 26, 2010 at 11:13 AM, Jin Chiu live2drea...@gmail.comwrote:

 In the implementation of my remote service's published API, is there a
 way to identify which client called a given method? For example, is
 there a way to obtain a unique ID or address of the caller? I already
 cache an AIDL callback reference to the client, but not sure how I can
 use this for identification.

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




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

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




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




-- 
/***/
苗忠良(Miao Zhong-liang)
MSN:mzl...@163.com msn%3amzl...@163.com
BLOG:http://miaozl.spaces.live.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: Customizing a RelativeLayout

2010-12-16 Thread Zsolt Vasvari
Why would you need to extend RelativeLayout just to change the
background?

On Dec 16, 5:36 pm, Paolo brand...@gmail.com wrote:
 Hi!
 I'm trying to customize a RelativeLayout on order to show a nice
 trasparent black content box. So my class has extended RelativeLayout
 and has overridden the onDraw() method, but nothing appears in the
 Eclipse layout editor; the same happens if I try to run my app on the
 device.

 I read I have to override dispatchDraw() and this works. I can see my
 custom layout in the editor, but I'm not able to add child view to the
 layout. Or better... I add a child in my layout from XML, but I can't
 see it on the Eclipse layout editor. In this case if I run the app on
 the device I see my layout drawn not correctly.. only a part of it is
 drawn or it appears cut.

 Why? What am I wrong?

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


Re: [android-developers] Re: android bluetooth

2010-12-16 Thread Abhilash baddam
Hi every one..
 I am new to Android. I want to send an image from
sdcard to server. For that already  I have displayed all the images from
sdcard in Grid View. Now I want , when we click on a particular image that
image have to sent to server.  For that plz send any code snippets regarding
this issue.


Regards,
Abhay_401

On Thu, Dec 16, 2010 at 2:51 PM, Jags jag...@gmail.com wrote:

 is this message a spam ? Nobody is able to see my message or what ?
 dont get answers, only get spams posted in the forum !

 On Dec 16, 11:03 am, hanika han...@securitywall.in wrote:
  hi
 
  Thanks  Regards,
  cid:image002@01CA2AEF.10F60770
  Vijay Patel
  Test Engineer
  Elitecore Technologies Ltd.
  904, Silicon tower, off C.G Road, Ahmedabad-380 006 Gujarat (INDIA),
  Tel: +91-79-66065606 | HYPERLINK
  mailto:vijay.pa...@elitecore.comvijay.pa...@elitecore.com
  HYPERLINK http://www.cyberoam.comwww.cyberoam.com
  PPlease do not print this email unless it is absolutely necessary.
  Spread environmental awareness.
 
   image001.jpg
  2KViewDownload

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


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

[android-developers] Re: Galaxy Tab + external screen : how to detect events from the right screen ?

2010-12-16 Thread Hakim Aammar
Hello Mark,

Thanks for your feedback, I'll have to find something else then...

On 15 déc, 17:27, Hakim Aammar hakim.aam...@gmail.com wrote:
 My first idea was to look at ACTION_SCREEN_ON and ACTION_SCREEN_OFF
 intents (thanks to a custom BroadcastReceiver), since these intents
 are correctly delivered when the external screen is plugged/unplugged.

Update : this actually seems to be wrong, further tests showed that
these intents concerned only the embedded screen, and weren't
delivered when plugging or unplugging an external screen. Sorry about
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: Help in ExpandableList

2010-12-16 Thread pramod.deore
Hi, After chaining getChildrenCursor(Cursor groupCursor)as
protected Cursor getChildrenCursor(Cursor groupCursor)
{
System.out.println (Inside getChildrenCursor);
String roomname =
groupCursor.getString(groupCursor.getColumnIndex(RoomName));
System.out.println (@@#...@#@#...@#+idVal);
Cursor groupCursor1 = sampleDB.rawQuery (SELECT
_id,SwitchFullName FROM SwitchTable where RoomName='+roomname
+',null);

return groupCursor1;
}

it works well. THANK YOU Kostya.

On Dec 16, 1:34 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Pramod,

 getChildrenCursor is given a cursor.

 You get the value of room name (or any other column) the same way, by
 calling methods of Cursor.

 http://developer.android.com/reference/android/database/Cursor.html

 -- Kostya

 16.12.2010 11:08, pramod.deore пишет:



  Hi Kostya, Thanks
  I have change code like this:
  public void onCreate(Bundle savedInstanceState)
       {
           super.onCreate(savedInstanceState);
           sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME,
  MODE_PRIVATE, null);

           Cursor groupCursor = sampleDB.rawQuery (SELECT _id,
  RoomName ,SwitchFullName FROM SwitchTable GROUP BY RoomName,null);
           System.out.println (###+groupCursor.getCount());
           System.out.println (_+groupCursor.getPosition());
           System.out.println (groupCursor.getColumnIndex(RoomName));
           // Cache the ID column index
           mGroupIdColumnIndex =
  groupCursor.getColumnIndexOrThrow(_id);
           //groupCursor.moveToFirst();

           // Set up our adapter
           mAdapter = new MyExpandableListAdapter(groupCursor,
                   this,
                   android.R.layout.simple_expandable_list_item_1,
                   android.R.layout.simple_expandable_list_item_2,
                   new String[] {RoomName}, // Name for group layouts
                   new int[] {android.R.id.text1},
                   new String[] {SwitchFullName}, // Number for child
  layouts
                   new int[] {android.R.id.text1});

           setListAdapter(mAdapter);

           System.out.println (
  %+getExpandableListAdapter().getGroupCount());
           System.out.println (::+this.getSelectedId());

       }

  Now I want name of parent (here name of room) on  which user clicked.
  Because if I get name of room then I can use that in getChildrenCursor
  () as
    protected Cursor getChildrenCursor(Cursor groupCursor)
           {

               Cursor groupCursor1 = sampleDB.rawQuery (SELECT
  _id,SwitchFullName FROM SwitchTable where RoomName = 'HERE GOES ROOM
  NAME',null);
             //System.out.println (###+groupCursor1.getCount());
             return groupCursor1;
           }

  So how to get room name.Thanks

  On Dec 15, 4:55 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
  15.12.2010 14:05, pramod.deore пишет:

  Hi every time I get  _ID value as 1. I used following line to get
  value
     mGroupIdColumnIndex = groupCursor.getColumnIndexOrThrow(_id);
  That's the index of column _ID within your query, not the value stored
  in the database.

 http://developer.android.com/reference/android/database/Cursor.html#g...)

  And you told me that usethis is in where condition into following
  query.
  Cursor groupCursor1 = sampleDB.rawQuery (SELECT DISTINCT
  RoomName AS RoomName1 ,_id , SwitchFullName FROM SwitchTable ORDER BY
  RoomName,null);
  See last parameter:

 http://developer.android.com/reference/android/database/sqlite/SQLite...,
  java.lang.String[])

  Also:

 http://www.sqlite.org/lang_select.html#whereclause

  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: display brightness

2010-12-16 Thread Zsolt Vasvari
Stand corrected, thanks.

On Dec 16, 5:33 pm, Dianne Hackborn hack...@android.com wrote:
 On Wed, Dec 15, 2010 at 11:08 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
  If it's doable with the Settings app, it should be doable from your
  app.  You may have to use reflection or whatever to get to the APIs
  and no gurantee of future compatibility, but that's the trade-off.

 That's not true.  The settings application runs with special privileges to
 allow it to interact with core parts of the system.  (Actually it runs with
 the same uid as the system itself.)  More, parts of it run in different
 processes, or are even implemented in different .apks, to be able to touch
 the things it needs to.

 --
 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: Customizing a RelativeLayout

2010-12-16 Thread Paolo
Because I'd like to draw something similar to this.
http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500

On 16 Dic, 10:53, Zsolt Vasvari zvasv...@gmail.com wrote:
 Why would you need to extend RelativeLayout just to change the
 background?

 On Dec 16, 5:36 pm, Paolo brand...@gmail.com wrote:



  Hi!
  I'm trying to customize a RelativeLayout on order to show a nice
  trasparent black content box. So my class has extended RelativeLayout
  and has overridden the onDraw() method, but nothing appears in the
  Eclipse layout editor; the same happens if I try to run my app on the
  device.

  I read I have to override dispatchDraw() and this works. I can see my
  custom layout in the editor, but I'm not able to add child view to the
  layout. Or better... I add a child in my layout from XML, but I can't
  see it on the Eclipse layout editor. In this case if I run the app on
  the device I see my layout drawn not correctly.. only a part of it is
  drawn or it appears cut.

  Why? What am I wrong?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ADT 9.0.0 preview

2010-12-16 Thread Zsolt Vasvari
Well, if I start from (all the attributes niclely aligned):

ScrollView android:layout_width=match_parent
  android:layout_height=0px
  android:layout_weight=1
  android:fillViewport=true

Hand edit it to something like what the layout editor does:

ScrollView android:layout_width=match_parent
android:layout_height=0px
  android:layout_weight=1
  android:fillViewport=true

Then hit CTRL-I, it becomes

ScrollView android:layout_width=match_parent
 android:layout_height=0px android:layout_weight=1
 android:fillViewport=true

Instead of the original format, which is what I want to see.  This is
with 8.0.0



On Dec 16, 4:04 pm, Zarah zarahj...@gmail.com wrote:
 Zsolt, by formatting do you by any chance include the indentations?
 FWIW, The CTRL+I auto-format shortcut in Eclipse works for Android
 XMLs also.

 - Zarah.

 On Dec 16, 3:20 pm, Zsolt Vasvari zvasv...@gmail.com wrote:



  Xavier, I just saw that a bunch of improvements for made for XML
  formatting.  I welcome this, since I am a strickler for tidy
  formatting, I've been hand editing my XMLs so that the formatting
  wouldn't get messed up.

  One request, if it's not already there regarding the formatting:  I
  would really like to be able to specify thatt the android:layout_*
  attributes should come first, followed by the android:* non-layout
  attributes then finally any custom (app:*) attributes. Ideally, I
  would also like to be able to specify that the layout_* attributes
  should be inserted in the id, width. height, weight order.

  Thanks.

  On Dec 16, 8:37 am, Xavier Ducrohet x...@android.com wrote:

   hey all,

   we're released a preview of the next ADT 
   athttp://tools.android.com/download.

   This is not a final release, not ready for general public consumption
   but we wanted to start publishing regular builds out of the dev tree.

   See the above link for more information about the changes.

   Xav
   --
   Xavier Ducrohet
   Android SDK Tech Lead
   Google Inc.

   Please do not send me questions directly. Thanks!- 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


Re: [android-developers] AppWidget Problem

2010-12-16 Thread Kostya Vasilyev

Vivek,

It should not matter what mechanism you use to trigger updates. I would 
actually taking a second look at AlarmManager, as its much more reliable 
than a background service, and uses less memory. You can use a non-wake 
up alarm, to save battery.


Which method of RemoteViews do you use to update the images?

How large are they?

What is your phone / firmware - Samsung Galaxy S family by any chance?

-- Kostya

16.12.2010 11:38, Vivek пишет:

Hi All,

I have been working on creating AppWidget for my application.
I contains 4 images and I need to change them at an interval of 30
sec.
I was able to achieve it using service and it is changing at an
interval of 30 sec.
The problem is that it does hang for the period where the images of
the widget change.
The home screen of android hangs for the period when updating the
widget.
Any gesture appears to hang for that period.

The other implementation that involves AlarmManager does not work.
I took an example from the link
http://android-er.blogspot.com/2010/10/app-widget-using-alarm-manager.html
but it does not update the TextView after it is placed on the android
home screen (launcher).
I am not able to figure out anything related to AlarmManager.

What should I do?
Please help

Thanks
Vivek




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Kostya Vasilyev

Just use android:background with a nine-patch drawable. No need to subclass.

You can even copy one of Android's nine-patch backgrounds into your project.

Take a look inside the Android SDK directory, then 
platforms\android-X\data\res\drawable-mdpi (-hdpi).


There are some very nice one in there, in particular toast_frame.9.png, 
zoom_plate, panel_background, etc.


-- Kostya

16.12.2010 13:03, Paolo пишет:

Because I'd like to draw something similar to this.
http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500

On 16 Dic, 10:53, Zsolt Vasvarizvasv...@gmail.com  wrote:

Why would you need to extend RelativeLayout just to change the
background?

On Dec 16, 5:36 pm, Paolobrand...@gmail.com  wrote:




Hi!
I'm trying to customize a RelativeLayout on order to show a nice
trasparent black content box. So my class has extended RelativeLayout
and has overridden the onDraw() method, but nothing appears in the
Eclipse layout editor; the same happens if I try to run my app on the
device.
I read I have to override dispatchDraw() and this works. I can see my
custom layout in the editor, but I'm not able to add child view to the
layout. Or better... I add a child in my layout from XML, but I can't
see it on the Eclipse layout editor. In this case if I run the app on
the device I see my layout drawn not correctly.. only a part of it is
drawn or it appears cut.
Why? What am I wrong?



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Brightness through seekbar.pls help

2010-12-16 Thread Atik
HI,
 i have gone through the settings app of android application on git.
major java files to implement the brightness functionality through
seek bar  are
BrightnessPreference.java
DisplaySettings.java
Display.java

can i use this .. i m trying very diff approaches to get the desired
effect..pls suggest.
i just want to implement for the image view to +/- the brightness.

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


Re: [android-developers] Re: ADT 9.0.0 preview

2010-12-16 Thread Kostya Vasilyev
I'd like to put in a vote for one attribute per line, and options for 
line breaks immediately after the view tag, and after the last attribute 
value, as well as how far attributes are indented (relative to view tag 
vs. below the first attribute tag).


This is my personal preference (I edit my layouts in XML):

TextView
android:id=...
android:layout_width=...
android:layout_height=...
/

These options would also allow for Zsolt's preferred way.

And, Xavier, thank you for doing this.

-- Kostya

16.12.2010 12:59, Zsolt Vasvari пишет:

Well, if I start from (all the attributes niclely aligned):

ScrollView android:layout_width=match_parent
   android:layout_height=0px
  android:layout_weight=1
  android:fillViewport=true

Hand edit it to something like what the layout editor does:

ScrollView android:layout_width=match_parent
android:layout_height=0px
   android:layout_weight=1
   android:fillViewport=true

Then hit CTRL-I, it becomes

ScrollView android:layout_width=match_parent
  android:layout_height=0px android:layout_weight=1
  android:fillViewport=true

Instead of the original format, which is what I want to see.  This is
with 8.0.0



On Dec 16, 4:04 pm, Zarahzarahj...@gmail.com  wrote:

Zsolt, by formatting do you by any chance include the indentations?
FWIW, The CTRL+I auto-format shortcut in Eclipse works for Android
XMLs also.

- Zarah.

On Dec 16, 3:20 pm, Zsolt Vasvarizvasv...@gmail.com  wrote:




Xavier, I just saw that a bunch of improvements for made for XML
formatting.  I welcome this, since I am a strickler for tidy
formatting, I've been hand editing my XMLs so that the formatting
wouldn't get messed up.
One request, if it's not already there regarding the formatting:  I
would really like to be able to specify thatt the android:layout_*
attributes should come first, followed by the android:* non-layout
attributes then finally any custom (app:*) attributes. Ideally, I
would also like to be able to specify that the layout_* attributes
should be inserted in the id, width. height, weight order.
Thanks.
On Dec 16, 8:37 am, Xavier Ducrohetx...@android.com  wrote:

hey all,
we're released a preview of the next ADT athttp://tools.android.com/download.
This is not a final release, not ready for general public consumption
but we wanted to start publishing regular builds out of the dev tree.
See the above link for more information about the changes.
Xav
--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
Please do not send me questions directly. Thanks!- Hide quoted text -

- Show quoted text -



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Customizing a RelativeLayout

2010-12-16 Thread Paolo
ah... and using nine-patch drawable is better than the way I'm
following? Why should I prefer this way? I'm asking just to
understand :)

On 16 Dic, 11:16, Kostya Vasilyev kmans...@gmail.com wrote:
 Just use android:background with a nine-patch drawable. No need to subclass.

 You can even copy one of Android's nine-patch backgrounds into your project.

 Take a look inside the Android SDK directory, then
 platforms\android-X\data\res\drawable-mdpi (-hdpi).

 There are some very nice one in there, in particular toast_frame.9.png,
 zoom_plate, panel_background, etc.

 -- Kostya

 16.12.2010 13:03, Paolo пишет:





  Because I'd like to draw something similar to this.
 http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500

  On 16 Dic, 10:53, Zsolt Vasvarizvasv...@gmail.com  wrote:
  Why would you need to extend RelativeLayout just to change the
  background?

  On Dec 16, 5:36 pm, Paolobrand...@gmail.com  wrote:

  Hi!
  I'm trying to customize a RelativeLayout on order to show a nice
  trasparent black content box. So my class has extended RelativeLayout
  and has overridden the onDraw() method, but nothing appears in the
  Eclipse layout editor; the same happens if I try to run my app on the
  device.
  I read I have to override dispatchDraw() and this works. I can see my
  custom layout in the editor, but I'm not able to add child view to the
  layout. Or better... I add a child in my layout from XML, but I can't
  see it on the Eclipse layout editor. In this case if I run the app on
  the device I see my layout drawn not correctly.. only a part of it is
  drawn or it appears cut.
  Why? What am I wrong?

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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


Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Kostya Vasilyev

Paolo,

Yes, using a nine-patch drawable background is easy, efficient, and 
produces great results.


Try this: open a layout in XML mode and add this attribute:

android:background=@android:drawable/toast_frame

Think you'll like it :)

-- Kostya

16.12.2010 13:24, Paolo пишет:

ah... and using nine-patch drawable is better than the way I'm
following? Why should I prefer this way? I'm asking just to
understand :)

On 16 Dic, 11:16, Kostya Vasilyevkmans...@gmail.com  wrote:

Just use android:background with a nine-patch drawable. No need to subclass.

You can even copy one of Android's nine-patch backgrounds into your project.

Take a look inside the Android SDK directory, then
platforms\android-X\data\res\drawable-mdpi (-hdpi).

There are some very nice one in there, in particular toast_frame.9.png,
zoom_plate, panel_background, etc.

-- Kostya

16.12.2010 13:03, Paolo пишет:






Because I'd like to draw something similar to this.
http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500
On 16 Dic, 10:53, Zsolt Vasvarizvasv...@gmail.comwrote:

Why would you need to extend RelativeLayout just to change the
background?
On Dec 16, 5:36 pm, Paolobrand...@gmail.comwrote:

Hi!
I'm trying to customize a RelativeLayout on order to show a nice
trasparent black content box. So my class has extended RelativeLayout
and has overridden the onDraw() method, but nothing appears in the
Eclipse layout editor; the same happens if I try to run my app on the
device.
I read I have to override dispatchDraw() and this works. I can see my
custom layout in the editor, but I'm not able to add child view to the
layout. Or better... I add a child in my layout from XML, but I can't
see it on the Eclipse layout editor. In this case if I run the app on
the device I see my layout drawn not correctly.. only a part of it is
drawn or it appears cut.
Why? What am I wrong?

--
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Newbie having trouble detecting when VideoView video playing completes

2010-12-16 Thread vtb
Hi Zarah
Thank you for your input and suggested code. I discovered a missing )
in it
the one that matches the the opening (. Unfortunately it would still
not
compile due to the video.setOnCompletion() not being recognised.
However what you provided certainly pushed me in the right direction
I added an implements OnCompletionListener to the method
and then added my interpretation of the listsener and then it started
to work.
Here is the resulting code.

package org.example.video_4;


import android.app.Activity;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.os.Bundle;
import android.widget.VideoView;

public class Videos extends Activity implements OnCompletionListener{

@Override
protected void onCreate( Bundle savedInstanceState ){
// recover the name of the video to play
Bundle bundle = getIntent().getExtras();
String video_to_play = bundle.getString(Value);
// set the screen up
super.onCreate(savedInstanceState);
setContentView( R.layout.videos );
// set up to play the video
VideoView video = (VideoView) findViewById( R.id.vidview);
video.setVideoPath( video_to_play );
// action at the end of the video, finish activity and go back 
to
selection screen
video.setOnCompletionListener( this );
// Now play the video to completion
video.start();
}
public void onCompletion(MediaPlayer arg0) {
   finish();
}
}

Thank you very much for your help, i hope someday to be able to be
able to
support new coders with valuable help as you do yourself.

Best regards

Viv


On Dec 16, 5:04 am, Zarah zarahj...@gmail.com wrote:
 No, you don't need to change to a MediaPlayer for it to work.  I think
 your code doesn't hang, you just haven't told it what to do after
 playing the video and that is why it is stuck there.

 Setting up the onCompletionListener() is the same as setting up
 listeners for button clicks.  I added some lines to your code:

 public class Videos extends Activity {
         @Override
         protected void onCreate( Bundle savedInstanceState ){
                 // recover the name of the video to play
                 Bundle bundle = getIntent().getExtras();
                 String video_to_play = bundle.getString(Value);

                 // set the screen up
                 super.onCreate(savedInstanceState);
                 setContentView( R.layout.videos );
                 // set up to play the video
                 VideoView video = (VideoView)
 findViewById( R.id.vidview);
                 video.setVideoPath( video_to_play );
                 video.setOnCompletionListener(setOnCompletionListener(new
 OnCompletionListener() { // --- What to do when playback finishes

                         public void onCompletion(MediaPlayer mp) {
                                 finish();
                         }
                 });
                 video.setMediaController(new MediaController(this)); // 
 ---
 If you want to show the controller
                 video.start();
         }

 }

 Also, I think it would be better if you can show a progress bar or
 something while the video loads. Just so the user won't think that
 nothing is happening.

 Best of luck!

 - Zarah.

 On Dec 16, 1:18 am, vtb v...@lineone.net wrote:

  Hi Zarah
  I really appreciate you getting back to me. I did put a finsh(); in
  the code but the
  code  is in error and won't compile

  Here is the code before adding, this works but obviously hangs at the
  end of the video

  import android.app.Activity;
  import android.os.Bundle;
  import android.widget.VideoView;

  public class Videos extends Activity {

          @Override
          protected void onCreate( Bundle savedInstanceState ){
                  // recover the name of the video to play
                  Bundle bundle = getIntent().getExtras();
                  String video_to_play = bundle.getString(Value);
                  // set the screen up
                  super.onCreate(savedInstanceState);
                  setContentView( R.layout.videos );
                  // set up to play the video
                  VideoView video = (VideoView) findViewById( R.id.vidview);
                  video.setVideoPath( video_to_play );
                  video.start();
          }

  }

  When I try an add a video setonComplettionListener( video ) I get
  The method set or onCompletionListener() is undefined for the type
  VideoView

  Any further advice would be very much appreciated

  Perhaps the couple of luines from your code showing how to set the
  listener up and the listener.

  One thought is do i have to change to a MediaPlayer reather than
  VideoView to get this to work?

  Thank you and best regards

  Viv

  On Dec 14, 8:09 am, 

[android-developers] Alert Dialog problem in Froyo

2010-12-16 Thread Rahul Garg
Hi Guys,

In Gallery,if you view any image and in that if you select Menu- Details. 

At the time of display image it shows annunciator bar for a moment and just 
disappear. I dont want this. After analyzing this I found that this is not 
visible when the items in the dialog is limited to 2-3 items. So suggest me 
the solution. It is in the Google Froyo code.


Thanks
Rahul

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

Re: [android-developers] Capturing Intent.ACTION_MEDIA_SCANNER_FINISHED

2010-12-16 Thread Mark Murphy
On Wed, Dec 15, 2010 at 7:47 PM, Julius Spencer jul...@msa.co.nz wrote:
 That was it; thank you again Mark.

 Do you know why it might not work in the manifest in this case (ie. for this 
 Intent)?

If you have not tried the corresponding data element, try that.

Otherwise, it is possible that this, like ACTION_BATTERY_CHANGED, is
one that only works for registerReceiver(). I never tracked down where
the Intent is being broadcast, but you might poke at Google Code
Search to try to find that, which may give you more clues.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] Re: Customizing a RelativeLayout

2010-12-16 Thread Paolo
Ok I'm going to try it ;)

On 16 Dic, 11:31, Kostya Vasilyev kmans...@gmail.com wrote:
 Paolo,

 Yes, using a nine-patch drawable background is easy, efficient, and
 produces great results.

 Try this: open a layout in XML mode and add this attribute:

 android:background=@android:drawable/toast_frame

 Think you'll like it :)

 -- Kostya

 16.12.2010 13:24, Paolo пишет:





  ah... and using nine-patch drawable is better than the way I'm
  following? Why should I prefer this way? I'm asking just to
  understand :)

  On 16 Dic, 11:16, Kostya Vasilyevkmans...@gmail.com  wrote:
  Just use android:background with a nine-patch drawable. No need to 
  subclass.

  You can even copy one of Android's nine-patch backgrounds into your 
  project.

  Take a look inside the Android SDK directory, then
  platforms\android-X\data\res\drawable-mdpi (-hdpi).

  There are some very nice one in there, in particular toast_frame.9.png,
  zoom_plate, panel_background, etc.

  -- Kostya

  16.12.2010 13:03, Paolo пишет:

  Because I'd like to draw something similar to this.
 http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500
  On 16 Dic, 10:53, Zsolt Vasvarizvasv...@gmail.com    wrote:
  Why would you need to extend RelativeLayout just to change the
  background?
  On Dec 16, 5:36 pm, Paolobrand...@gmail.com    wrote:
  Hi!
  I'm trying to customize a RelativeLayout on order to show a nice
  trasparent black content box. So my class has extended RelativeLayout
  and has overridden the onDraw() method, but nothing appears in the
  Eclipse layout editor; the same happens if I try to run my app on the
  device.
  I read I have to override dispatchDraw() and this works. I can see my
  custom layout in the editor, but I'm not able to add child view to the
  layout. Or better... I add a child in my layout from XML, but I can't
  see it on the Eclipse layout editor. In this case if I run the app on
  the device I see my layout drawn not correctly.. only a part of it is
  drawn or it appears cut.
  Why? What am I wrong?
  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.com

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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: Using AndroidHTTPClient

2010-12-16 Thread flipside
Hi Bob, thanks for the reply. What happens on the server is completely out 
of my hands. It is not part of my app, and it's not under my control. That 
said, the use of get to update the database is something that the server 
offers as a convenience. It's not the case the a user could inadvertently 
update data by retreiving a web page, for example. And as far as my app is 
concerned, the get is issued completely within my code; the user never 
visits the url within a browser. The user indicates within the app that data 
needs to be stored on the database, and the get is issued behind the scenes 
to store it.

I largely agree with your method for dealing with the destruction of the app 
after the issuing the update and before receiving the response. I think what 
I'm going to do is track the updates within a local database. When an update 
is issued, I'll create a record in the local database and set the status to 
pending. As each response is returned, I'll update the corresponding row in 
the database, setting the status to indicate success or failure. When the 
app returns after being destroyed, I'll access the local database and for 
each record which has a status of pending, I'll query the server to check 
whether the update succeeded.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Problem with Publishing app in android Market

2010-12-16 Thread bagelboy
What are you expecting to hear? Once you pay you should be able to log
into the market as a developer using your gmail account.

On Dec 16, 9:29 am, Lamia Hannoun lamia.hann...@gmail.com wrote:
 Hello!

 I want to publish my first android app in Android market, I payed the 25 USD
 to get liscence to get an account to add my app and still I didn't hear from
 them and I didn't get any response from android market it's been 14days !!!
 What should I do?

 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] how to change child list color in ExpandableList

2010-12-16 Thread pramod.deore
This code is from  \samples\android-8\ApiDemos\. This is example of
ExpandableList. But here when the list item is expanded it's hard to
visually distinguish where the child item ends and next group item
begins. So what I want is give different color to child and icon in
front of both child and group.



public class ExpandableList1 extends ExpandableListActivity {
private int mGroupIdColumnIndex;

private String mPhoneNumberProjection[] = new String[] {
People.Phones._ID, People.Phones.NUMBER
};


private ExpandableListAdapter mAdapter;


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Query for people
Cursor groupCursor = managedQuery(People.CONTENT_URI,
new String[] {People._ID, People.NAME}, null, null,
null);

// Cache the ID column index
mGroupIdColumnIndex =
groupCursor.getColumnIndexOrThrow(People._ID);

// Set up our adapter
mAdapter = new MyExpandableListAdapter(groupCursor,
this,
android.R.layout.simple_expandable_list_item_1,
android.R.layout.simple_expandable_list_item_1,
new String[] {People.NAME}, // Name for group layouts
new int[] {android.R.id.text1},
new String[] {People.NUMBER}, // Number for child
layouts
new int[] {android.R.id.text1});
setListAdapter(mAdapter);
}

public class MyExpandableListAdapter extends
SimpleCursorTreeAdapter {

public MyExpandableListAdapter(Cursor cursor, Context context,
int groupLayout,
int childLayout, String[] groupFrom, int[] groupTo,
String[] childrenFrom,
int[] childrenTo) {
super(context, cursor, groupLayout, groupFrom, groupTo,
childLayout, childrenFrom,
childrenTo);
}

@Override
protected Cursor getChildrenCursor(Cursor groupCursor) {
// Given the group, we return a cursor for all the
children within that group

// Return a cursor that points to this contact's phone
numbers
Uri.Builder builder = People.CONTENT_URI.buildUpon();
ContentUris.appendId(builder,
groupCursor.getLong(mGroupIdColumnIndex));
 
builder.appendEncodedPath(People.Phones.CONTENT_DIRECTORY);
Uri phoneNumbersUri = builder.build();

// The returned Cursor MUST be managed by us, so we use
Activity's helper
// functionality to manage it for us.
return managedQuery(phoneNumbersUri,
mPhoneNumberProjection, null, null, null);
}

}
}

How to do this? 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: Customizing a RelativeLayout

2010-12-16 Thread Paolo
I've tried, but I don't like that nine-patch. Maybe I should draw end
substitute my own nine patch. Anyway in this way I can simply manage
it in the Eclipse Layout editor, and that's is good!
The only thing I don't like of the nine-patch way is that I have to
draw one nine-patch for all the time I want to change, for example the
color of the background or the alpha value, while extending
RelativeLayout I can to that by code programmatically. Is it right?

On 16 Dic, 12:18, Paolo brand...@gmail.com wrote:
 Ok I'm going to try it ;)

 On 16 Dic, 11:31, Kostya Vasilyev kmans...@gmail.com wrote:



  Paolo,

  Yes, using a nine-patch drawable background is easy, efficient, and
  produces great results.

  Try this: open a layout in XML mode and add this attribute:

  android:background=@android:drawable/toast_frame

  Think you'll like it :)

  -- Kostya

  16.12.2010 13:24, Paolo пишет:

   ah... and using nine-patch drawable is better than the way I'm
   following? Why should I prefer this way? I'm asking just to
   understand :)

   On 16 Dic, 11:16, Kostya Vasilyevkmans...@gmail.com  wrote:
   Just use android:background with a nine-patch drawable. No need to 
   subclass.

   You can even copy one of Android's nine-patch backgrounds into your 
   project.

   Take a look inside the Android SDK directory, then
   platforms\android-X\data\res\drawable-mdpi (-hdpi).

   There are some very nice one in there, in particular toast_frame.9.png,
   zoom_plate, panel_background, etc.

   -- Kostya

   16.12.2010 13:03, Paolo пишет:

   Because I'd like to draw something similar to this.
  http://pocketjourney.files.wordpress.com/2008/03/goal.gif?w=500
   On 16 Dic, 10:53, Zsolt Vasvarizvasv...@gmail.com    wrote:
   Why would you need to extend RelativeLayout just to change the
   background?
   On Dec 16, 5:36 pm, Paolobrand...@gmail.com    wrote:
   Hi!
   I'm trying to customize a RelativeLayout on order to show a nice
   trasparent black content box. So my class has extended RelativeLayout
   and has overridden the onDraw() method, but nothing appears in the
   Eclipse layout editor; the same happens if I try to run my app on the
   device.
   I read I have to override dispatchDraw() and this works. I can see my
   custom layout in the editor, but I'm not able to add child view to the
   layout. Or better... I add a child in my layout from XML, but I can't
   see it on the Eclipse layout editor. In this case if I run the app on
   the device I see my layout drawn not correctly.. only a part of it is
   drawn or it appears cut.
   Why? What am I wrong?
   --
   Kostya Vasilyev -- WiFi Manager + pretty widget 
   --http://kmansoft.wordpress.com

  --
  Kostya Vasilyev -- WiFi Manager + pretty widget 
  --http://kmansoft.wordpress.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: Sending image to server...?

2010-12-16 Thread RamaMohan
HI Abhilash,

please follow the steps as follows:

1)on cliking Grid item get the path of the image (you can get source
code for this APIdemoS application)
2)after that upload the file to server using the following code.
Please visit the link
 
http://androidsnips.blogspot.com/2010/08/upload-file-to-remote-server-in-android.html

It may helpful for your task.




On Dec 16, 1:59 pm, Abhilash baddam
abhilash.androiddevelo...@gmail.com wrote:
 Hi friends,

       I am new to android. Actually I have to send an image which is in
 SDCard to server.
        For that I have displayed all images which are in SDcard in grid
 view. When i click on image that image is sent to server. Please any help
 regarding this problem.

 Regards,
 Abhay_401

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Project on Android

2010-12-16 Thread Eric Wong (hdmp4.com)
Before you start going after ideas, have you learn how to use the
Android SDK yet?

If not, I suggest you can start your project with App Inventor for
Android
http://appinventor.googlelabs.com/about/

If yes, you should define your scope and capabilities first.
E.g. how much time you can put into it, whether you are working on it
alone or in a team, etc

Otherwise, you will simply end up doing something which is beyond your
capacity or available time.
Idea is easy to come but realizing it is the hard part.

If you are short on idea, just go into Android market or Apple app
store and see what others have made, and see how u can make it
better ;)

If you willing to build a commerical apk for someone for free as well
as for your own college schoolwork, I am sure there are plenty of
people who be happy to give u something to build.
(Like I could easily come up with something for you to build if you
are willing to build it for me ;)

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


Re: [android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Kostya Vasilyev

16.12.2010 14:34, Paolo пишет:

I've tried, but I don't like that nine-patch. Maybe I should draw end
substitute my own nine patch. Anyway in this way I can simply manage
it in the Eclipse Layout editor, and that's is good!


Yes, you can certainly use other nine-patches from Android (see my 
previous message on where to find them), or draw your own:


http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch


The only thing I don't like of the nine-patch way is that I have to
draw one nine-patch for all the time I want to change, for example the
color of the background or the alpha value, while extending
RelativeLayout I can to that by code programmatically. Is it right?


You can change the background from code:

http://developer.android.com/reference/android/view/View.html#setBackgroundDrawable(android.graphics.drawable.Drawable)

http://developer.android.com/reference/android/view/View.html#setBackgroundResource(int)

On the other hand, overriding onDraw does give you complete control, so 
it's a judgment call on flexibility vs. effort (isn't everything?)


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Input Currency with Fixed decimal Values

2010-12-16 Thread RamaMohan
HI,
I have an edittext which is for reading currency value.

How do you create an edittext entry that formats input in money
format only? When the user enters 5, I want the input to look like
$0.05 and when they then enter 3, the input should now look like
$0.53 and finally they enter 6 and the input should look like
$5.36.

I did as follows:

mUserText.addTextChangedListener(new MyTextWatcher());

and

public class MyTextWatcher implements TextWatcher {

public void afterTextChanged(Editable arg0) {

}

public void beforeTextChanged(CharSequence s, int start, int
count, int after) {

}

public void onTextChanged(CharSequence s, int start, int before,
int count) {
 // here i converted to string
  String userInput= +s.toString();
 Float in=Float.parseFloat(userInput);
 float percen = in/100;
 Log.i(user input Text final,+percen+ --+percen);
 mUserText.setText(+percen);

}


Everything is working but the problem here is ,will report
StackOverflow exception due to the following reason

1) It will come to OnTextChanged method whenever text changed.But
after that when we try to set the formatted value in edittext ,in the
last line of the code.it will get recursive ...

 mUserText.setText(+percen);

2)It is becoming as infinate.

I hope you understood the problem.

Please help me if anybody knows the solution or any idea related to
the solution.

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] Facing securtiy exception while binding to MediaPlaybackService in gingerBread code

2010-12-16 Thread sourabh.j...@gmail.com
Hi All,

I am trying to make an application which can access the
MediaPlaybackService , so I have copied the IMediaPlaybackService.aidl
in my app's com.android.music path and tried to bind with the
MediaPlaybackService as below .


public class TestMusicPlaybackAppService extends Service {

/* Description for playback service interface */
IMediaPlaybackService mPlaybackService = null;

public TestMusicPlaybackAppService() {
System.out.println(TestMusicPlaybackAppService() constructor
call);
}
  @Override
public void onCreate() {
super.onCreate();
System.out.println(Service onCreate() call!);

if (mPlaybackService == null) {
Intent i = new Intent();

i.setClassName(com.android.music,com.android.music.MediaPlaybackService);
System.out.println(Binding to MediaPlaybackService.);
bindService(i, connection, Context.BIND_AUTO_CREATE);
}

}


@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}

 // Create ServiceConnection to existing MediaPlaybackService
ServiceConnection connection = new ServiceConnection() {

@Override
public void onServiceConnected(ComponentName name, IBinder
service) {
mPlaybackService =
IMediaPlaybackService.Stub.asInterface(service);
   System.out.println(MediaPlaybackService is connected!);

   try {
System.out.println(Album Id: 
+mPlaybackService.getAlbumId());
System.out.println(Album 
Name:+mPlaybackService.getAlbumName());
System.out.println(Artist
Name:+mPlaybackService.getArtistName());

System.out.println(IsPlaying:+mPlaybackService.isPlaying());
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

@Override
public void onServiceDisconnected(ComponentName name) {
mPlaybackService = null;
System.out.println(MediaPlaybackService is
disconnected!);

}
};


}

But this code is generating securtiy exception Not allowed to bind to
service Intent { cmp=com.android.music/.MediaPlaybackService }


12-16 19:51:58.018: ERROR/AndroidRuntime(1846): FATAL EXCEPTION: main
12-16 19:51:58.018: ERROR/AndroidRuntime(1846):
java.lang.RuntimeException: Unable to create service
com.android.samsung.TestMusicPlaybackApp.TestMusicPlaybackAppService:
java.lang.SecurityException: Not allowed to bind to service Intent
{ cmp=com.android.music/.MediaPlaybackService }
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.app.ActivityThread.handleCreateService(ActivityThread.java:
1930)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.app.ActivityThread.access$2500(ActivityThread.java:117)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:982)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.os.Handler.dispatchMessage(Handler.java:99)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.os.Looper.loop(Looper.java:123)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.app.ActivityThread.main(ActivityThread.java:3644)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
java.lang.reflect.Method.invokeNative(Native Method)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
java.lang.reflect.Method.invoke(Method.java:507)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:849)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
dalvik.system.NativeStart.main(Native Method)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): Caused by:
java.lang.SecurityException: Not allowed to bind to service Intent
{ cmp=com.android.music/.MediaPlaybackService }
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.app.ContextImpl.bindService(ContextImpl.java:875)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.content.ContextWrapper.bindService(ContextWrapper.java:347)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
com.android.samsung.TestMusicPlaybackApp.TestMusicPlaybackAppService.onCreate(TestMusicPlaybackAppService.java:
31)
12-16 19:51:58.018: ERROR/AndroidRuntime(1846): at
android.app.ActivityThread.handleCreateService(ActivityThread.java:
1920)

Could some one tell me what is missing in my code ? Should I need to
add any permission tag in the manifest file ?

Thanks.

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

[android-developers] how to download app from git.

2010-12-16 Thread Atik
hi need to check the source code execution from the git and repo but
unable to find the correct way for the same.

the sample code contains ample layout files. so pls tell me the how to
use the same... i have allready installed the  GIT BASH ..and
through certain commands i have tried to access but it was giving some
error..

thx 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: Fm Radio

2010-12-16 Thread Bob Kerns
Well, I doubt HTC is going to tell you, so your best approach, I
think, would either to see what the people who integrated it on to
Nexus One did, or to reverse engineer the com.htc.fm app yourself.

I suspect that's more trouble than it's worth, as the result won't be
something that's supported, and will only work on a limited number of
devices.

On Dec 16, 12:59 am, wolf wolfy1...@gmail.com wrote:
 thanks mr brill, you are closer than the other answer, i want to know
 how the FM Radio app is work, the code, not how to use it in my
 programs.

 On Dec 15, 3:07 pm, Bob Kerns r...@acm.org wrote:

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] galaxy sd card

2010-12-16 Thread Jags
hi all, i have a samsung galaxy gt-15700. i lost my micro sd card that
came with d phone and when i try another pre existing card with my
phone, it does not recognise. what could be the problem ? how to know
if a micro sd card will work in my phone or not ?

jags

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


Re: [android-developers] Hello World and Google Maps API for Android!

2010-12-16 Thread Caio Serra
Thanks a lot!

This website will help me so much.

Caio Vinícius Serra
(11)7313-4038


2010/12/15 TreKing treking...@gmail.com

 On Wed, Dec 15, 2010 at 7:26 AM, Caio Serra cvse...@gmail.com wrote:

 Is only Java that is avaible? Or other language can be used too?
 Somebody has any materials to help me to finish this aplication?


 http://code.google.com/android/add-ons/google-apis/index.html


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

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

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

[android-developers] Re: Customizing a RelativeLayout

2010-12-16 Thread Paolo
Thanks a lot for your answer ;)

Before to use my own nine-patch, I'd like to understand what I'm wrong
extending the RelativeLayout.
So, in other topics I found that Roman Guy suggested to use
setWillNotDraw(false).  Using this flag I can show my Custom Layout
correctly running on a device (why?), but I continue to not see its
own child in the Eclipse editor. It isn't a big problem, because I
know what I'm doing, but I'd like that all the things work fine also
with the editor. About this Eclipse shows me a warining that says:

AndroidManifest: Ignoring unknown 'TextView' XML element -
com.android.ide.eclipse.adt

where TextView is RelativeLayout's chid.

Maybe I'm forgetting something... :(


On 16 Dic, 12:42, Kostya Vasilyev kmans...@gmail.com wrote:
 16.12.2010 14:34, Paolo пишет:

  I've tried, but I don't like that nine-patch. Maybe I should draw end
  substitute my own nine patch. Anyway in this way I can simply manage
  it in the Eclipse Layout editor, and that's is good!

 Yes, you can certainly use other nine-patches from Android (see my
 previous message on where to find them), or draw your own:

 http://developer.android.com/guide/topics/graphics/2d-graphics.html#n...

  The only thing I don't like of the nine-patch way is that I have to
  draw one nine-patch for all the time I want to change, for example the
  color of the background or the alpha value, while extending
  RelativeLayout I can to that by code programmatically. Is it right?

 You can change the background from code:

 http://developer.android.com/reference/android/view/View.html#setBack...)

 http://developer.android.com/reference/android/view/View.html#setBack...)

 On the other hand, overriding onDraw does give you complete control, so
 it's a judgment call on flexibility vs. effort (isn't everything?)

 --
 Kostya Vasilyev -- WiFi Manager + pretty widget 
 --http://kmansoft.wordpress.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] Global Plugin.

2010-12-16 Thread Ken Perry
 

 

I am trying to find out if there is a way to add a global WebKit plugin so
that any programming using the WebView will have my plugin in attached.  The
plugin will need access to the NP Navigation and dom.

 

I looked at the example under development Samples for browser plugin but
that only works in the browser and only if you include the code in the web
page.  I need it to work on any  web page.If you have any ideas I can
take you off list and give you a more clear idea of what I am wanting to
accomplish.

 

Ken

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Scrollview

2010-12-16 Thread André
Hi,

I am trying to make an edittext with line numbers. For this I have one
edittext and to the left of it is a textview with the line numbering.
I have tried to put both of these in a scrollview so that both of them
can be scrolled simultaneously. But when the edittext is focused it
can still scroll by it self so that the line numbers doesn't match.
Is there a way to disable scrolling in a edittext? Or does anyone have
any other suggestions how to solve this?

André

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Application visibility on Galaxy S

2010-12-16 Thread Laurent Lugon
Hi all,

I have published an application on the market and I find it with different
android 2.x phone. The problem is when I make the same key-word search
(secu4) with my Galaxy S, I don't see anithing, however there is 2
application (for android 1.x and android2.x) on the market which should be
found.

Here is my manifest :

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.secu4.bluewatchdog2
  android:versionCode=5
  android:versionName=2.2
application android:icon=@drawable/card
android:label=@string/app_name
 android:screenOrientation=sensor android:debuggable=false
activity android:name=.Welcome
  android:configChanges=orientation|keyboardHidden
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

activity android:name=.Connected
android:configChanges=orientation|keyboardHidden/
 activity android:name=.Alarm android:launchMode=singleTask
android:configChanges=orientation|keyboardHidden
android:theme=@android:style/Theme.Dialog/
 activity android:name=.Protecting
android:configChanges=orientation|keyboardHidden/
activity android:name=.Settings
android:configChanges=orientation|keyboardHidden/
 service android:name=.provider.ArmService android:enabled=true/
service android:name=.provider.ProtectionService android:enabled=true/
/application

uses-permission android:name=android.permission.BLUETOOTH/
uses-permission android:name=android.permission.BLUETOOTH_ADMIN/
 uses-permission android:name=android.permission.VIBRATE /
uses-sdk android:minSdkVersion=3/
/manifest

I also try to add this in the manifest :

supports-screens android:smallScreens=true
  android:normalScreens=true
android:anyDensity=true
  android:largeScreens=true
  android:resizeable=true /

But the application still hidden for the Galaxy S... Why ?

Thank you !

*Best regards*


SECU4 SA
Laurent Lugon Moulin

Technical  Development Assistant
 Technopôle 5
3960 Sierre – Switzerland

Office  :   +4127 4567 931
Fax  :   +4127 4567
935
Mobile :   +4179 4509 566

Skype :   laurent.lugon.moulin

www.secu4.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] Edittext singleline in landscape

2010-12-16 Thread André
Hi,

How can I disable the singleline thing in Edittext when editing in
landscape mode?
I have tried android:singleLine=false in the xml file and it doesn't
work.
Any suggestions?

André

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


[android-developers] SQLite Implementation

2010-12-16 Thread cuil yahoo
Hello,

I am trying to use a database to store a huge text in it serially(using a
primary key, for easy searching).

I have already done the following things,

1. Created a SQLite database(named database) using the SQLite Database
Browser, and have imported that to my assets folder in Eclipse. The database
has two fields one _id(primarykey) and saveme(the text field).

2. Now, i want to write stuff in this database, however when i try to open
the database using the code below, i get a SQLite Code 14 type of an error(
which on a google result showed up error on opening of database).

SQLiteDatabase writedatabase = null;
writedatabase.openDatabase(file:///android_asset/database,null,0);
writedatabase.execSQL(INSERT INTO  + database +  Values ('1',
'first'));


It would be really very helpful, if someone could please point the error in
the steps.

Thanks.

Cuil

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

Re: [android-developers] Re: ADT 9.0.0 preview

2010-12-16 Thread Jake Basile
This is an option in the Eclipse XML formatter. Open your 
preferencesXMLXML FilesEditor and turn on split multiple attributes each 
on one line.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: SQLite Implementation

2010-12-16 Thread Alexei 'keyhell' Zhurba
/data/data/you.package.here/databases/you_db.name

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

Re: [android-developers] Re: ADT 9.0.0 preview

2010-12-16 Thread Kostya Vasilyev

Thank you, this worked great!

16.12.2010 16:02, Jake Basile пишет:
This is an option in the Eclipse XML formatter. Open your 
preferencesXMLXML FilesEditor and turn on split multiple 
attributes each on one line. --

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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


Re: [android-developers] Global Plugin.

2010-12-16 Thread Mark Murphy
On Thu, Dec 16, 2010 at 7:46 AM, Ken Perry kpe...@blinksoft.com wrote:
 I am trying to find out if there is a way to add a global WebKit plugin so
 that any programming using the WebView will have my plugin in attached.  The
 plugin will need access to the NP Navigation and dom.

If by any programming using the WebView refers to the device as a
whole, you can only do this by modifying the firmware, AFAIK.

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

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

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


Re: [android-developers] SQLite Implementation

2010-12-16 Thread Mark Murphy
You cannot modify application assets at runtime, as they are part of
the digitally signed APK. You would need to copy that file out
somewhere else and modify it there.

On Thu, Dec 16, 2010 at 7:53 AM, cuil yahoo cuilya...@gmail.com wrote:
 Hello,

 I am trying to use a database to store a huge text in it serially(using a
 primary key, for easy searching).

 I have already done the following things,

 1. Created a SQLite database(named database) using the SQLite Database
 Browser, and have imported that to my assets folder in Eclipse. The database
 has two fields one _id(primarykey) and saveme(the text field).

 2. Now, i want to write stuff in this database, however when i try to open
 the database using the code below, i get a SQLite Code 14 type of an error(
 which on a google result showed up error on opening of database).

 SQLiteDatabase writedatabase = null;
 writedatabase.openDatabase(file:///android_asset/database,null,0);
 writedatabase.execSQL(INSERT INTO  + database +  Values ('1',
 'first'));


 It would be really very helpful, if someone could please point the error in
 the steps.

 Thanks.

 Cuil



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



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

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

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


Re: [android-developers] SQLite Implementation

2010-12-16 Thread Mark Murphy
Also, I doubt that you can use a file:/// URL to open a database.

On Thu, Dec 16, 2010 at 8:19 AM, Mark Murphy mmur...@commonsware.com wrote:
 You cannot modify application assets at runtime, as they are part of
 the digitally signed APK. You would need to copy that file out
 somewhere else and modify it there.

 On Thu, Dec 16, 2010 at 7:53 AM, cuil yahoo cuilya...@gmail.com wrote:
 Hello,

 I am trying to use a database to store a huge text in it serially(using a
 primary key, for easy searching).

 I have already done the following things,

 1. Created a SQLite database(named database) using the SQLite Database
 Browser, and have imported that to my assets folder in Eclipse. The database
 has two fields one _id(primarykey) and saveme(the text field).

 2. Now, i want to write stuff in this database, however when i try to open
 the database using the code below, i get a SQLite Code 14 type of an error(
 which on a google result showed up error on opening of database).

 SQLiteDatabase writedatabase = null;
 writedatabase.openDatabase(file:///android_asset/database,null,0);
 writedatabase.execSQL(INSERT INTO  + database +  Values ('1',
 'first'));


 It would be really very helpful, if someone could please point the error in
 the steps.

 Thanks.

 Cuil



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



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

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




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

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

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


Re: [android-developers] App to place wallpapers on Android

2010-12-16 Thread Marcin Orlowski
  I'm trying to place a number of static wallpapers on Android Marketplace
 No thanks. There's hell lot of such junk there already
 The OP didn't ask your opinion

Did I about your on mine?

 He's got as much right to publish his apps, wallpaper or no, as anyone else.

So do I to classify much (sadly, far too much) of Market content as junk.

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


RE: [android-developers] Global Plugin.

2010-12-16 Thread Ken Perry

Modifying the firmware is not a problem the plugin I am writing is for a
proprietary device.  Can you point me at some information on how to go about
this?

Ken
-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Thursday, December 16, 2010 8:18 AM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Global Plugin.

On Thu, Dec 16, 2010 at 7:46 AM, Ken Perry kpe...@blinksoft.com wrote:
 I am trying to find out if there is a way to add a global WebKit plugin so
 that any programming using the WebView will have my plugin in attached. 
The
 plugin will need access to the NP Navigation and dom.

If by any programming using the WebView refers to the device as a
whole, you can only do this by modifying the firmware, AFAIK.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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

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


Re: [android-developers] SQLite Implementation

2010-12-16 Thread cuil yahoo
I appreciate your replying back so soon.

Since, i am new to programming for android and haven't worked with databases
before, it would be great if someone could correct the code for me.

On Thu, Dec 16, 2010 at 6:49 PM, Mark Murphy mmur...@commonsware.comwrote:

 Also, I doubt that you can use a file:/// URL to open a database.

 Could you help me out with the statement ? I am searching for the same.



  On Thu, Dec 16, 2010 at 8:19 AM, Mark Murphy mmur...@commonsware.com
 wrote:
  You cannot modify application assets at runtime, as they are part of
  the digitally signed APK. You would need to copy that file out
  somewhere else and modify it there.
 

 Where else should i copy the database?

   On Thu, Dec 16, 2010 at 7:53 AM, cuil yahoo cuilya...@gmail.com
 wrote:
  Hello,
 
  I am trying to use a database to store a huge text in it serially(using
 a
  primary key, for easy searching).
 
  I have already done the following things,
 
  1. Created a SQLite database(named database) using the SQLite Database
  Browser, and have imported that to my assets folder in Eclipse. The
 database
  has two fields one _id(primarykey) and saveme(the text field).
 
  2. Now, i want to write stuff in this database, however when i try to
 open
  the database using the code below, i get a SQLite Code 14 type of an
 error(
  which on a google result showed up error on opening of database).
 
  SQLiteDatabase writedatabase = null;
  writedatabase.openDatabase(file:///android_asset/database,null,0);
  writedatabase.execSQL(INSERT INTO  + database +  Values ('1',
  'first'));
 
 
  It would be really very helpful, if someone could please point the error
 in
  the steps.
 
  Thanks.
 
  Cuil
 
 
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
 
  --
  Mark Murphy (a Commons Guy)
  http://commonsware.com | http://github.com/commonsguy
  http://commonsware.com/blog | http://twitter.com/commonsguy
 
  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
  Available!
 



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

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

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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] tutorial for dev android application using sqlite

2010-12-16 Thread zenous
ive been searching for a good kick start/example on how to intergrate
sqlite with android application
but so far i found a few simple but not up to my expectation
do u guys know any tutorial for android application that use sqlite
database?

my application currently running with a local array to do a simple
comparison

i want to build application that compare string with sqlite
database...

tq 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


Re: [android-developers] tutorial for dev android application using sqlite

2010-12-16 Thread Kostya Vasilyev

This brief into in the SDK documentation:

http://developer.android.com/guide/topics/data/data-storage.html#db

includes links to sample code.

This tutorial:

http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html

also has database access, and is somewhat simpler than the sample code 
in the first link.


-- Kostya

16.12.2010 17:31, zenous пишет:

ive been searching for a good kick start/example on how to intergrate
sqlite with android application
but so far i found a few simple but not up to my expectation
do u guys know any tutorial for android application that use sqlite
database?

my application currently running with a local array to do a simple
comparison

i want to build application that compare string with sqlite
database...

tq in advance




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Sipdroid build problem

2010-12-16 Thread Apache Technologoes
maxsap max.sapranidis at gmail.com writes:

 
 Thank you a lot Kostya, you have to use -t 8 to build it correctly,
 this is a problem posted on a lot of sites but no answer yet, but that
 worked I am going to post it on sipdroids forums to help others as
 well.
 regards maxsap
 

Hi Folks,

Was you able to compile the sipdroid 2.0.1 version. 

What was the size of apk file.

Did you incluced NDK compiled files as well?

Regards
Sandeep



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


Re: [android-developers] Re: Sending image to server...?

2010-12-16 Thread Abhilash baddam
Hi RamaMohan,
*
*
*   I used your code it's working fine.
Thanks allot.*
*
*
*
*
*Regards,*
*Abhay_401
*
On Thu, Dec 16, 2010 at 5:03 PM, RamaMohan rama.mohan...@gmail.com wrote:

 HI Abhilash,

 please follow the steps as follows:

 1)on cliking Grid item get the path of the image (you can get source
 code for this APIdemoS application)
 2)after that upload the file to server using the following code.
 Please visit the link

 http://androidsnips.blogspot.com/2010/08/upload-file-to-remote-server-in-android.html

 It may helpful for your task.




 On Dec 16, 1:59 pm, Abhilash baddam
 abhilash.androiddevelo...@gmail.com wrote:
  Hi friends,
 
I am new to android. Actually I have to send an image which is in
  SDCard to server.
 For that I have displayed all images which are in SDcard in grid
  view. When i click on image that image is sent to server. Please any help
  regarding this problem.
 
  Regards,
  Abhay_401

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

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

Re: [android-developers] App to place wallpapers on Android

2010-12-16 Thread TreKing
On Thu, Dec 16, 2010 at 7:33 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

  The OP didn't ask your opinion

 Did I about your on mine?


Nope! But that's clearly not going to stop us ;-)


  He's got as much right to publish his apps, wallpaper or no, as anyone
 else.

 So do I to classify much (sadly, far too much) of Market content as junk.


You didn't classify much of Market content as junk - that I would
wholeheartedly agree with.

You dismissed this developer's efforts as junk based on your own notion of
the worth of similar apps, with zero knowledge of what he actually has to
offer.

I like to think this group has a good vibe as far as developers helping each
other out and genuinely wanting each other (and the platform as a whole) to
succeed.

So I think that telling a fellow developer who had a simple question, no
thanks, we don't want your crap, we have enough of it, is, frankly, quite
lame.

IMHO, of course.

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

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

Re: [android-developers] Global Plugin.

2010-12-16 Thread Mark Murphy
On Thu, Dec 16, 2010 at 9:18 AM, Ken Perry kpe...@blinksoft.com wrote:
 Modifying the firmware is not a problem the plugin I am writing is for a
 proprietary device.  Can you point me at some information on how to go about
 this?

You would want to ask that question on one of these lists:

http://source.android.com/community/index.html

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

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

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


Re: [android-developers] SQLite Implementation

2010-12-16 Thread Mark Murphy
On Thu, Dec 16, 2010 at 9:20 AM, cuil yahoo cuilya...@gmail.com wrote:
 Also, I doubt that you can use a file:/// URL to open a database.

 Could you help me out with the statement ? I am searching for the same.

Your path has to be on the file system, not a URL.

  Where else should i copy the database?

Use getDatabasePath() to build a good path for the database, then copy
the file to that path.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] getExternalStorageDirectory() on NEXUS S

2010-12-16 Thread Xavier
Hi,

What is the behavior of the Nexus S when calling this function and
others like getExternalStorageState(), etc... ? Is it emulating a SD
Card without any extra code?

Thanks,
Xavier

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] SmsManager.sendDataMessage application port addressing and carrier SMSC support

2010-12-16 Thread tedx
This is slightly off topic but does anyone have experience developing
mms apps for non-standard(not a picture or sound)/custom binary data?
I'm testing an app that uses port 16000 (described as 'Available for
allocation by applications') and watching the logcat of the radio the
messages seem to get sent but are never received. I'm guessing that
the SMSC is dropping then but there is no actual indication that this
is case. I'm using ATT and T-Mobile so I've been trying to track down
information on there SMSC capabilities so any pointer regard this
would be appreciated.

Ted

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: In-App payment options

2010-12-16 Thread Xavier
Thanks JP, never heard of them before, I will take a look. The Android
integrations looks pretty good.

On 13 dic, 02:29, JP joachim.pfeif...@gmail.com wrote:
 There's probably a few options, including these guys:http://www.boku.com/
 I ran into one of their staff a couple of weeks ago and asked what
 their position on distributing in-app payment based apps in Android
 Market was. That that was walking a thin line was acknowledged but
 basically they consider it OK to distribute boku in-app-payment based
 apps in Android Market. I am not so sure if that holds, but OTOH
 Android Market might be losing out in the long run if they don't
 support engagement based monetization models. At least where things
 stand today, not many starting out dare not to have an engagement
 angle to their monetization model. That's my perception anyways, hope
 this helps.

 On Dec 11, 11:14 am, Xavier xpl...@gmail.com wrote:







  Hi,

  Imagine an app distributed outside the Google Market, so no
  restrictions for that. What possibilities do I have to integrate some
  method of payments inside it? (Paypal is not an option) I guess what I
  should be looking for is some kinf of API from a credit card merchant?

  Could someone point me on several directions I could begin look at?

  X.

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


Re: [android-developers] Re: how to print name of parent in ExpandableList

2010-12-16 Thread TreKing
On Thu, Dec 16, 2010 at 12:56 AM, pramod.deore deore.pramo...@gmail.comwrote:

 In this code I am displaying list of room. and after click on any room
 name then switches list is displayed. I want to know on which item
 (1.e on room) user had clicked. How to do this?


http://developer.android.com/reference/android/widget/ExpandableListView.html#setOnGroupClickListener(android.widget.ExpandableListView.OnGroupClickListener)

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

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

[android-developers] Re: Programmatically specifying a particular APN to be used in my application

2010-12-16 Thread Jens
Afaik the answer is a resounding no. It's possible for the MMS
application to use the MMS APN but that's about as far as it goes.


On 14 Dec, 17:38, Accandme a...@accandme.com wrote:
 I am writing a chat application (still demo stage) for an operator,
 and they want to be able to use a specific APN just for chatting (for
 charging purposes) which gives the user access to the chat server but
 no access to the internet.

 Is it possible to do that on android?
 Can I specify in my own application that it should use the CHAT APN
 while
 all the other applications on the phone keep using the regular default
 internet APN at the same time?

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


Re: [android-developers] how to change child list color in ExpandableList

2010-12-16 Thread TreKing
On Thu, Dec 16, 2010 at 5:24 AM, pramod.deore deore.pramo...@gmail.comwrote:

 How to do this? Thanks


Change the properties of the layout you're using for either child or parent,
or both.

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

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

Re: [android-developers] getExternalStorageDirectory() on NEXUS S

2010-12-16 Thread Mark Murphy
On Thu, Dec 16, 2010 at 10:39 AM, Xavier xpl...@gmail.com wrote:
 What is the behavior of the Nexus S when calling this function and
 others like getExternalStorageState(), etc... ? Is it emulating a SD
 Card without any extra code?

It should. There are other devices, like the HTC Droid Incredible,
that use on-board flash for the external storage.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
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] Re: INSTALL_PARSE_FAILED_NO_CERTIFICATES on Android-2.3

2010-12-16 Thread Danny Backx
This might be the problem. No I didn't, and I can't find the tool to
do it for me.
What I do know is I'm not calling apkbuilder any more, it says

 THIS TOOL IS DEPRECATED. See --help for more information.

but there's no other info if you start it with that option. I can't
seem to figure out from the XML files in the distribution how to
trigger signing either.

Can you help me with that ?

Thanks,

  Danny



On Dec 15, 10:42 pm, Jake Basile jakerbas...@gmail.com wrote:
 Just to be sure, did you sign your 
 APKhttp://developer.android.com/guide/publishing/app-signing.htmlafter it 
 is built?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] #androiddev podcast with Motorola, Foursquare, PayPal, and Adobe

2010-12-16 Thread DJ Ksar


http://mdpcyir2010-adev.eventbrite.com

hey all. Just want to invite you all to today's (Dec. 16th) live 
MOTODEVhttp://developer.motorola.comAndroid Podcast with folks from Motorola, 
Adobe, Foursquare, and PayPal. 
Starts at 5pm pacific and will be streamed online for everyone to listen to 
and join in the online chat.  We're going to be talking about 2010 Android 
dev related news and we also wanna hear what you have 
produced/released/launched in terms of applications. You can register for 
the podcast at http://mdpcyir2010-adev.eventbrite.com where you'll get all 
the details on the streaming info, online chat, and ways to call in to the 
show (yep just like a radio show).  Look forward to having a great 
conversation on what the #androiddev community has done in 2010.  Got any 
questions just ping me. 

-Randy from the MOTODEV team
@djksar http://twitter.com/djksar on Twitter

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Illegal continuation byte in NewStringUTF

2010-12-16 Thread Luca Carlon
Hi! I'm trying to create a jstring using NewStringUTF but I
experienced a strange issue when the C string passed to the function
contains characters not ASCII (i.e. accented characters). This is what
I get:

01-01 02:56:41.719: WARN/(1738): Creating the jstring for Dracula Der
Pfähler.mp3.
01-01 02:56:41.719: WARN/dalvikvm(1738): JNI WARNING: illegal
continuation byte 0x68
01-01 02:56:41.719: WARN/dalvikvm(1738):  string: 'Dracula
Der Pfähler.mp3'
01-01 02:56:41.719: WARN/dalvikvm(1738):  in method_name
(NewStringUTF)

where the first line is created using the char* and the android log
functions. This is the piece of code:

jstring pathStr;
LOGW(Creating the jstring for %s., fileName);
if ((pathStr = mEnv-NewStringUTF(fileName)) == NULL) {
   LOGE(Failed NewStringUTF.);
   return false;
}
LOGW(The jstring has been created...);

Any idea why this is happening?
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] Reducing 1 star ratings for IM; strategies

2010-12-16 Thread Brill Pappin
So the biggest complaint I'm getting is doesn't work when it works just 
fine. Usually this is because the user can't be bothered to read the dev 
site which has installation instructions (among other useful info).

Obviously I'm looking for ways to help the low end users understand what 
they need to do to enable it.
Has anyone deployed an IM with an accompanying start menu app that 
gives them the lowdown?
Can the IM settings be adjusted via an app?
Does it work for you in reducing 1 star ratings because someone doesn't 
understand what they need to do?

I haven't tried to do this yet, but I thought I'd ask before reinventing the 
wheel.

- Brill

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Reducing 1 star ratings for IM; strategies

2010-12-16 Thread Maps.Huge.Info (Maps API Guru)
My main app Radar Now! couldn't possibly be simpler. You just start
the app and that's it. Even with its simplicity, I still get one star
ratings that claim doesn't work or my favorite sux. There will
always be the dolt who can't figure out how to screw in a light bulb
and consequently claims it doesn't work. You'll just to accept that
and move on. Just try to make all instructions understandable by the
lowest common denominator and you should have less problems.

One thing that might help is a new rating system for apps where device
owners have to read some simple instructions and answer three
questions. If they can't get at least one right, then they get a
rating of imbecile and are prevented from seeing apps that have
omit imbeciles.

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: A ready for Android development Eclipse

2010-12-16 Thread MrUmunhum


On Dec 15, 11:24 am, Roc Boronat pipo...@gmail.com wrote:
 Yes, but just now I'm talking with Carles Plà, a person who wants to help us
 doing the same but for Linux.

 What OS are you using?

 Bests,
 Roc Boronat
 rocboronat.net

 2010/12/15 MrUmunhum mrumun...@cruzio.com

  On Dec 14, 3:12 am, Roc Boronat pipo...@gmail.com wrote:
   Download Eclipse, download the SDK, install ADT in Eclipse, point Eclipse
  to
   the SDK, download the last APIs from Google… I have no idea how many
  times I
   had to repeat this process on my machines, enough to go crazy!

   So, to improve the trainings we do at Catdroid.org and to not have to
  repeat
   this ever again, I made a .zip where you’ll find an Eclipse 3.5 with ADT,
   the Android SDK version 7, and a workspace with some code examples.
   You can find more information here:http://catdroid.org/?p=210〈=en

   Bests,
   Roc Boronat
   rocboronat.net
  Is this only for Winders??

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

I am currently running Fedora 12. I absolutely hate Winders and will
not use it to develop.
And this from an old OS/2 developer.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 tell if phone is Android configured?

2010-12-16 Thread MrUmunhum
Hi group,

 I just was given a phone that is said to support Android? How can I
tell??
It is a Sony Ericsson Xperia. If it dows support Android, how do I
update it?

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


Re: [android-developers] Re: ADT 9.0.0 preview

2010-12-16 Thread Tor Norbye
If you are using the new 9.0.0 preview bits you can go to the
Options/Preferences dialog, and enable Android  Editors 
Automatically format the XML edited by the visual layout editor. This
will run the Eclipse formatter on your behalf behind the scenes when
you are making graphical edits, so you don't have to switch to the XML
editor and explicitly run the formatter yourself.

If this option is not enabled (as is the default), we will (as of
9.0.0 preview) attempt to modify the formatting as little as possible
and in general preserve the whitespace and indentation that already
exists in the file.

-- Tor

On Thu, Dec 16, 2010 at 5:07 AM, Kostya Vasilyev kmans...@gmail.com wrote:
 Thank you, this worked great!

 16.12.2010 16:02, Jake Basile пишет:

 This is an option in the Eclipse XML formatter. Open your
 preferencesXMLXML FilesEditor and turn on split multiple attributes each
 on one line. --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


 --
 Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.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




-- 
-- Tor

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Google Maps Web service

2010-12-16 Thread Ragavan
Can anyone tell how to connect my web application with android mobile
application through Google Maps web service?
And explain the procedure to connect in details.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Reading assets directory without AssetManager

2010-12-16 Thread btschumy
I am porting some existing code to android.  I have some data files
that I need to put in the assets directory (or some comparable place
in the package).  The code I'm porting wants a path to the directory
containing the data files, in this case assets.  However, it seems
like android won't let you access the assets directory directly
without AssetManager.  I assume this has to do with localization
issues.

So if I know I placed a resource Data.dat in assets, is there any
way to get a path to it so I can open it with something like:

FileInputStream in = new FileInputStream(path);

I really need a path to the resource.  I can't use

AssetManager assetMgr = this.getAssets();
InputStream in = assetMgt.open(filename);

Is this 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] Stuck at Screen Locked View

2010-12-16 Thread psrikant
When I run a basic 'Hello World' Android application in eclipse, the
emulator launches and shows the screen locked view and the application
does not run. The console shows the following...


[2010-12-15 16:28:56 - Droid1] Android Launch!
[2010-12-15 16:28:56 - Droid1] adb is running normally.
[2010-12-15 16:28:56 - Droid1] Performing
com.androidbook.droid1.DroidActivity activity launch
[2010-12-15 16:28:56 - Droid1] Automatic Target Mode: Preferred AVD
'VanillaAVD' is not available. Launching new emulator.
[2010-12-15 16:28:56 - Droid1] Launching a new emulator with Virtual
Device 'VanillaAVD'
[2010-12-15 16:28:57 - Droid1] New emulator found: emulator-5554
[2010-12-15 16:28:57 - Droid1] Waiting for HOME
('android.process.acore') to be launched...
[2010-12-15 16:30:00 - Droid1] HOME is up on device 'emulator-5554'
[2010-12-15 16:30:00 - Droid1] Uploading Droid1.apk onto device
'emulator-5554'
[2010-12-15 16:30:01 - Droid1] Installing Droid1.apk...
[2010-12-15 16:30:51 - Droid1] Success!
[2010-12-15 16:30:51 - Droid1] Starting activity
com.androidbook.droid1.DroidActivity on device emulator-5554
[2010-12-15 16:31:07 - Droid1] ActivityManager: Starting: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER]
cmp=com.androidbook.droid1/.DroidActivity }


It says 'Starting activity and nothing happens after that. Can
somebody please help me resolve this issue.? I am new to Android. I am
running on Android 2.1 API 7.

Thanks
Prashanth

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Null canvas being passed to onDraw(Canvas canvas)

2010-12-16 Thread Henning
I start to see the same issue - never experienced it during testing, now 
seeing bugs in the publisher console.

Is it safe to follows MOxo's suggestion?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Computer Vision / Image Processing

2010-12-16 Thread mhathcock
Android Developers:

I am looking to develop native Android libraries for computer vision
and image processing. I am an experienced C++ developer, and have a
great deal of experience with OpenCV.

What I'm looking for:

Information about how Android handles cameras. I am well aware of the
basics that are available in the android references (getting a camera
object, starting a preview, etc) but I need further information about
the pixel information can be obtained. Results on the internet are
shoddy at best ( most of them are for older versions of Android ) but
I've found so far that the camera uses YUV colorspace, and thats
pretty much it.

Pointing me in the right direction would be awesome, or links/articles/
references/examples are fantastic as well.

If anyone would like to assist in development, I can start a google
code project. (Yes, i've seen that there is at least 1, called
androidcv, already. There is no activity, so we can request owner
change from the owner or start another one).

Regards,

Myles

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Keyguard Issue

2010-12-16 Thread Wik Pun
Hi, I want to start activity when the screen is on so I need to
disable keyguard. I have an main activity which register broadcast
receiver. That broadcast receiver will check for screen_on intent and
it will start a new activity to disable the keyguard. My program works
fine if my main activity is active. If I pressed the home button and
turn the screen on, my program will not work. I am stuck for 2 weeks.
Can someone please help?

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


[android-developers] Wifi connect and no internet error

2010-12-16 Thread Mark
I'm trying to open a webpage in my app using :

try {
URL url = new URL(rl);

// Get the response
BufferedReader rd = new BufferedReader(
new InputStreamReader(url.openStream()));
}
catch (Exception e) {}


It works great, and when there is no internet connection, it  catches
the error fast in one second. However, if the phone is connected to
WiFi, and the WiFi has no internet Access. It takes forever and the
main thread will finally crash. I tried using a new thread other than
the main thread for the app, it worked but still it takes about 30
seconds to catch that there is no internet connection.

I need it to catch the error in 5 seconds or less. So i was told to
Set a timeout on the connection. It worked. But not all the times.
Sometimes it takes forever. 9 out of 10 times it does work. I still
don't understand why its doing that.
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] Re: Android 2.3 SDK Emulator is very slow

2010-12-16 Thread Doug C.
I noticed the same thing.  I'm simply running the Notepad tutorials.
Previously I was running the 2.2 emulator, but after upgrading to 2.3
it seems *considerably* slower.  Unfortunately I don't have an Android
phone, and if this emulator slowdown is any indication of the way the
SDK is going, I doubt I will bother getting one.

And by slow I mean entering a short sentence (20chars) with the
keyboard in an EditText widget in the emulator took about 10-12
seconds longer than it took me to finish typing.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Activity from pause to resume?

2010-12-16 Thread kong
I have two activities A and B,They are transparent. B uses mediaplayer
to play video.

A to B use startActivity(intent);

then B plays the video.Then use startActivity(intent) to A.
I found B's state is pause.

But then I use startActivity(intent) from A to B. B's state is
onCreate, onStart,Then onResume. I think it's unnecessary to use
oncreate to create the UI and initalize the mediaplayer. Because B is
on the background.It's just pause.And from graph of activity's life
cycle, we can see the activity can from pause to resume state.

But how to do it?Can anyone help?

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


[android-developers] Re: Conversion to Dalvik format failed with error 1

2010-12-16 Thread sumanth
Hi Christopher,

I looked up the build path and it contains only the library of android
2.2 (i tried it with other versions, including the new 2.3).

Nothing seems to work, let me know if you/anyone have any ideas.

Thanks
Sumanth

On Dec 7, 8:07 am, Christopher Lester whichsh...@gmail.com wrote:
 Sumanth - I had this error yesterday and found this helpful.

 Go to Project » Properties » Java Build Path » Libraries and remove
 all except the Android X.Y (in my case Android 2.2). click OK. Go to
 Project » Clean » Clean projects selected below » select your project
 and click OK. That should work.

 On Dec 1, 10:59 pm, sumanth ag.suma...@gmail.com wrote:







  Hi all,

  I'm new to android and currently stuck with this error when I try to
  create a simple android project.

  I apologize if this is a repost, but the solutions in other
  discussions in this group and the net was not helping me.

  I get this when i create a new project and try to compile:

  UNEXPECTED TOP-LEVEL EXCEPTION:
  java.util.zip.ZipException: error in opening zip file
          at java.util.zip.ZipFile.open(Native Method)
          at java.util.zip.ZipFile.init(ZipFile.java:115)
          at java.util.zip.ZipFile.init(ZipFile.java:132)
          at
  com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.jav 
  a:
  205)
          at
  com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
  130)
          at
  com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.j 
  ava:
  190)
          at
  com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
  122)
          at
  com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
  108)
          at com.android.dx.command.dexer.Main.processOne(Main.java:247)
          at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
          at com.android.dx.command.dexer.Main.run(Main.java:139)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
  48)
          at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
  l.java:
  25)
          at java.lang.reflect.Method.invoke(Method.java:600)
          at com.android.ide.eclipse.adt.internal.sdk.DexWrapper.run(Unknown
  Source)
          at
  com.android.ide.eclipse.adt.internal.build.PostCompilerHelper.executeDx(Unk 
  nown
  Source)
          at
  com.android.ide.eclipse.adt.internal.build.PostCompilerBuilder.build(Unknow 
  n
  Source)
          at org.eclipse.core.internal.events.BuildManager
  $2.run(BuildManager.java:633)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  170)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  201)
          at org.eclipse.core.internal.events.BuildManager
  $1.run(BuildManager.java:253)
          at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
  256)
          at
  org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j 
  ava:
  309)
          at
  org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
  341)
          at
  org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
  140)
          at
  org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
  238)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  [2010-12-02 11:55:24 - helloandroid] 1 error; aborting
  [2010-12-02 11:55:24 - helloandroid] Conversion to Dalvik format
  failed with error 1

  I'm not sure which zip file android is having trouble opening.

  Thanks!
  Sumanth

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Camera Preview problems

2010-12-16 Thread sivaramkrishna neeruganti
hi all,

i am running a camera preview application on froyo file system.i have
got problems with the preview.

the preview has got two preview surfaces side by side.i am able to see
the preview on two surfaces at the same time.one surface showing
slightly blurred preview compared with the preview on other.

i am posting my application here.

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.out.println(hoera);
// Hide the window title.
requestWindowFeature(Window.FEATURE_NO_TITLE);

// Create our Preview view and set it as the content of our
activity.
try{
mPreview = new Preview(this);
setContentView(mPreview);
System.out.println(hoera);
}
catch(RuntimeException e){
System.out.println(e.getMessage());
}
}

}

//
--

class Preview extends SurfaceView implements SurfaceHolder.Callback {
SurfaceHolder mHolder;
Camera mCamera;

Preview(Context context) {
super(context);

// Install a SurfaceHolder.Callback so we get notified when
the
// underlying surface is created and destroyed.
mHolder = getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}

public void surfaceCreated(SurfaceHolder holder) {
// The Surface has been created, acquire the camera and tell
it where
// to draw.
mCamera = Camera.open();
try {
   mCamera.setPreviewDisplay(holder);
} catch (IOException exception) {
mCamera.release();
mCamera = null;
// TODO: add more exception handling logic here
}
}

public void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return, so stop the
preview.
// Because the CameraDevice object is not a shared resource,
it's very
// important to release it when the activity is paused.
mCamera.stopPreview();
mCamera.release();
mCamera = null;
}

public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h) {
// Now that the size is known, set up the camera parameters
and begin
// the preview.
Camera.Parameters parameters = mCamera.getParameters();
parameters.setPreviewSize(w, h);
mCamera.setParameters(parameters);
mCamera.startPreview();
}

}


can u please help me whats going wrong in the above application?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] The button Uninstall is gray

2010-12-16 Thread kong
settings-Applications-Manage applications

But the button uninstall is gray.How can I uninstall the app?

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


[android-developers] unable to connect to the repository

2010-12-16 Thread rajiv
hi i have downloaded eclipse from eclipse if i tried to install adt
pluggin it is saying unable to connect to repository please 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] Videos

2010-12-16 Thread nish
HI i am new to android and i am looking for some video tutorials , so
if any of you'll know where i can find please let me know.
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


  1   2   >