[android-developers] How to call web service with different methods?

2009-02-03 Thread dilu

I am having a webservice at particularURL:-
http://192.168.1.10/abcd/Service_MobClients.asmx;.
Under that webservice we are having different methods like
1.authenticate client

2.contacts to sync
3.inbox to sync
etc.
now I want to call these methods with parameters.
So,please tell me how to call these methods .
Thanks
dileep
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is it possible to have 2 launcher Activity in a single apk?

2009-02-03 Thread Romain Guy

Yes :) Just put two activities in your manifest, both with the
LAUNCHER category.

On Mon, Feb 2, 2009 at 10:45 PM, j jac...@gmail.com wrote:

 I need to have 2 launcher activities (i.e. 2 icons on the home
 screen). Each launch icon would launch a separate activity.
 Essentially, I need a single apk which contains a suite of 2 apps
 which I don't want to distribute separately.  Is this possible?
 




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

Note: please don't send private questions to me, as I don't have time
to provide private support.  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: About media player

2009-02-03 Thread Jerry Yang

I wanna to add a plug-in with certain de-crypto. That means I receive
encrypted meida, and de-encrypt it on run time with certain key. My
propose is to setup a demo system for research and study.
With best wishes
Jerry

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Dave Sparks
Sent: Tuesday, February 03, 2009 6:43 AM
To: Android Developers
Subject: [android-developers] Re: About media player


What kind of plug-in do you want to write?

media player is kind of a vague term. There is the Music player
application, the MusicPlaybackService, the MovieView activity, the
VideoView activity, and the MediaPlayer object. Source for all of
those is available at source.android.com.

On Feb 1, 12:36 am, Jerry Yang jer...@intertrust.com wrote:
 Hi, all

 I have a simple question, except the default player, is there any open
 source media player we can modify or is there anyway we can add some
 feature to the media player in android platform? Like we add a plug-in
 into the MS media player?

 Thanks

 With best wishes

 Jerry Yang

 Client System Engineer Intertrust.



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

2009-02-03 Thread shweta kumari
Hi All,

When i run the browser StartActivityLocked() is called which runs the
activity with some pid. If i open 4 browser windows on UI  for each instance
the same process is called (as noted from pid).Does the memory get allocated
for each window? If this process goes
into background state and the foreground process needs memory how the memory
handler works?

Thanks,
Shweta

On Mon, Feb 2, 2009 at 11:21 AM, shweta kumari shweta.n...@gmail.comwrote:

 Hi,

 I am running a script that runs randomly the browser and music.After 7-8
 instances of browser getting opened I see the following error :-

 D/AndroidRuntime(  992): Shutting down VM
 W/dalvikvm(  992): threadid=3: thread exiting with uncaught exception
 (group=0x4000fe68)
 E/AndroidRuntime(  992): Uncaught handler: thread main exiting due to
 uncaught exception
 E/AndroidRuntime(  992): java.lang.NullPointerException
 E/AndroidRuntime(  992):   at
 android.app.SearchDialog.jamSuggestionQuery(SearchDialog.java:921)
 E/AndroidRuntime(  992):   at
 android.app.SearchDialog.onItemSelected(SearchDialog.java:1451)
 E/AndroidRuntime(  992):   at
 android.widget.AdapterView.fireOnSelected(AdapterView.java:856)
 E/AndroidRuntime(  992):   at
 android.widget.AdapterView.access$200(AdapterView.java:41)
 E/AndroidRuntime(  992):   at
 android.widget.AdapterView$SelectionNotifier.run(AdapterView.java:827)
 E/AndroidRuntime(  992):   at
 android.os.Handler.handleCallback(Handler.java:587)
 E/AndroidRuntime(  992):   at
 android.os.Handler.dispatchMessage(Handler.java:92)
 E/AndroidRuntime(  992):   at android.os.Looper.loop(Looper.java:123)
 E/AndroidRuntime(  992):   at
 android.app.ActivityThread.main(ActivityThread.java:3790)
 E/AndroidRuntime(  992):   at java.lang.reflect.Method.invokeNative(Native
 Method)
 E/AndroidRuntime(  992):   at
 java.lang.reflect.Method.invoke(Method.java:521)
 E/AndroidRuntime(  992):   at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
 E/AndroidRuntime(  992):   at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:503)
 E/AndroidRuntime(  992):   at dalvik.system.NativeStart.main(Native Method)
 I/Process (  824): Sending signal. PID: 992 SIG: 3
 I/dalvikvm(  992): threadid=7: reacting to signal 3
 W/ActivityManager(  824): Force-killing crashed app com.android.browser at
 watcher's request
 I/Process (  824): Sending signal. PID: 992 SIG: 9
 I/ActivityManager(  824): Process com.android.browser (pid 992) has died
 I/WindowManager(  824): WIN DEATH: Window{43841140
 com.android.browser/com.android.browser.BrowserActivity}
 I/WindowManager(  824): WIN DEATH: Window{438589b0
 Panel:com.android.browser/com.android.browser.BrowserActivity}
 W/WindowManager(  824): No focus window, dropping: KeyEvent{action=1
 code=21 repeat=0 meta=0 scancode=0 mFlags=0}
 V/ActivityThread(  869): Resuming ActivityRecord{436cfbd0
 token=android.os.binderpr...@436cf660{com.android.launcher/com.android.launcher.Launcher}}
  with isForward=false
 I/ActivityManager(  824): Low Memory: No more background processes.
 D/dalvikvm(  891): GC freed 6207 objects / 226360 bytes in 267ms
 D/dalvikvm(  824): GC freed 7734 objects / 346640 bytes in 354ms
 I/AndroidRuntime(  983): AndroidRuntime onExit calling exit(4973)

 Is it possible to open the browser windows consecutively for 10
 mins.Secondly why does the background process get killed?

 Thanks,
 Shweta



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

2009-02-03 Thread blindfold

My app generates and plays sound samples in one second bursts, and
this context sensitive volume adjustment keeps flipping between
ringtone volume and media volume depending on split second timing
(apparently depending on whether a burst is playing or a next burst is
in preparation when the volume buttons are pressed). How can I pin
down (lock?) the audio context to prevent this? Right now volume
adjustment via the volume buttons is unworkable.

Thanks.

On Feb 2, 11:35 pm, Dave Sparks davidspa...@android.com wrote:
 The volume adjustment is context sensitive. You can tell which volume
 is being adjusted by the volume display.

 If YouTube or the music player, adjusting the volume will affect only
 the music/video playback volume. The volume display will read Media
 Volume. If you're in the home screen, or most other apps that don't
 use audio, adjusting the volume will affect the ringtone/notification
 volume. The volume display will read Ringtone Volume.

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



[android-developers] Re: Memory leak in BitmapFactory/Gallery?

2009-02-03 Thread blindfold

Thank you for the additional information. I will look into it later.
One thing that kept me from further working with this a few days ago
is that I ran the monkey tool with the --hprof option, which according
to http://code.google.com/intl/zh-TW/android/reference/monkey.html
puts results in the data/misc folder. However, it seems impossible
(prohibited) to access that folder on the phone to retrieve the
generated profiling results? So can this only be used by people who
flash their own phones with a development build, or did I overlook
something (I did not dig for long)?

Thanks

On Feb 3, 1:24 am, fadden fad...@android.com wrote:

 Unfortunately I don't have a lot of different compilers to test with.
 stdint.h is only needed for a couple of types (uint8_t and
 uint32_t); not sure if there's a better way to deal with those.  I
 figured variadic macros could be a problem, but since it's a debug
 macro that is compiled out by default I figured at worst people could
 just strip it out entirely.

 One user reported some problems running it under Cygwin that sounded
 like stdin/stdout were undergoing text conversion, so I posted a new
 version that takes the input and output files as arguments, and will
 fopen them with rb/wb.  Per UNIX convention, you can specify -
 to use stdin/stdout for the original behavior.  (I probably should've
 done it this way in the first place.)

 New version is up onhttp://bigflake.com/HprofConv.c.txt.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Fwd: GMAPS is not being displayed in the emulator

2009-02-03 Thread Alistair.

This really looks to me like your debug map key is incorrect.

Refer to

http://code.google.com/android/toolbox/apis/mapkey.html

There are a couple of batch files, definition.bat and getDebugKey.bat
which might help here:

http://code.google.com/p/netthreads-for-android/source/browse/#svn/trunk/place-finder/build

The keytool.exe is found in your jdk bin directory.

Failing that. Have you tried explicitly uninstalling your app and then
running it again (which will install it once more). I noticed that any
change I made to the key didn't seem to get picked up until I had
wiped it from the emulator first.

Al.

On Feb 3, 3:58 am, swapna annamaneni swapna.annaman...@gmail.com
wrote:
 hi,
 i am also facing sme problem ,if get it plz let me know
 @      swapna.annaman...@gmail.com

 On Fri, Jan 16, 2009 at 12:19 PM, sheik sheik...@gmail.com wrote:

  Kindly look at this queryand help me regarding the issue..

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



[android-developers] Re: How to hang up outgoing call?

2009-02-03 Thread Kamal Hasan

You can abort a call using BroadcastReceiver in your application.

Kamal

On Feb 3, 1:31 am, Tilekus tile...@gmail.com wrote:
 Hi everyone,

 We are new to Android and creating an application where one of the
 things we need is to control the outgoing call,
 at least to be able to stop it from our application.

 For now we tried using Intent.ACTION_CALL to use existing activity:

         Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse
 (tel: + phoneNumber));
         startActivity(callIntent);

 But we can't figure out whether it's possible to stop launched by this
 default Call activity. Is it possible? If yes, how?

 If not, what should we use to write our own Call activity to make a
 very simple call?
 We would want this activity only to be used by our application, not
 for all outgoing calls.

 Million thanks in advance,

 Tilek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: DEVICE_POWER permission denied for using goToSleep

2009-02-03 Thread shahzad ahmad
Did u find a way to lock the phone ?

On Fri, Jan 30, 2009 at 3:31 PM, mnj manojgopa...@gmail.com wrote:


 Yes this permission is set in androidmanifest

 On Jan 29, 5:10 pm, Phill Midwinter ph...@grantmidwinter.com wrote:
  Is it set in the androidmanifest?
 
  2009/1/29 mnj manojgopa...@gmail.com
 
 
 
 
 
 
 
   Hi,
 
   I wanted to use the funcion goToSleep() in PowerManager Class to force
   the device to sleep. But I'm getting an exception and the application
   crashes when I call this function. I already have added the
   DEVICE_POWER permission in Androidmanifest.xml. When I checked the
   logs I could see below error
 
   E/AndroidRuntime( 2158): Caused by: java.lang.SecurityException:
   Neither user 10
   020 nor current process has android.permission.DEVICE_POWER.
 
   Has anyone faced this issue before. Does application have
   DEVICE_POWER permission. or is it disabled.
 
   Regards,
   Manoj
 
  --
  Phill Midwinter
  Director
  Grant Midwinter Limited
  d: 0844 736 5234 x: 0
  m: 07538 082156
  e: ph...@grantmidwinter.com- Hide quoted text -
 
  - Show quoted text -
 


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



[android-developers] Serialization problem with objects, when using ksoap

2009-02-03 Thread sooraj.rit

Hi i want to implement a webmethod to search some data and I have done
it well in C#.net . Now i want to access that method from android .
The real problem I am facing is that, I have to use a complex data
type. ( a class containing two strings ). when I call the webmethod,
an exception is thrown (Runtime exception saying - cannot serialize
my class ). I have attached the code.pls help me.


I am using a class to hold my data as

class PAT_DETAILS
{
String PatName;
String PatID;
}

and in my java code

public class SearchData extends Activity
{
private static final String SOAP_ACTION = http://MobWebService.org/
GetPatDetails;
private static final String METHOD_NAME = GetPatDetails;
private static final String NAMESPACE = http://MobWebService.org/;;
private static final String URL = http://10.1.26.21/Webservice/
SearchService.asmx;
PAT_DETAILS m_PatDetails;

@Override
public void onCreate( Bundle savedInstanceState )
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
m_PatDetails.PatName = John;
m_PatDetails.PatID =123;

SoapObject request = new SoapObject( NAMESPACE, METHOD_NAME );
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope
( SoapEnvelope.VER11 );
envelope.dotNet = true;
// request.addProperty( PatientName, patname );
// request.addProperty( PatID, patientId );

request.addProperty( patientDetails, m_PatDetails );
envelope.setOutputSoapObject( request );
HttpTransportSE htransport = new HttpTransportSE( URL );
try
{

try
{
htransport.call( SOAP_ACTION, envelope ); // throws exception
}
catch( IOException exp )
{
exp.printStackTrace();
}
SoapObject ResultRequestSOAP = (SoapObject)envelope.bodyIn;

// Remaining codesnippet here..
}
catch ( Exception aE )
{
aE.printStackTrace (); //Runtime exception here - cannot serialize my
class 
}
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there a simple way to do Key/Value with Spinners?

2009-02-03 Thread muckwarrior

If you want to stick with using array resources, just make two
arrays, one
 with the things to display to the user, the other with the keys.

That's what I was hoping to be able to do alright. But how do I get
both arrays into the spinner. Can I do it without creating a custom
adapter? Also, I assume I'll need to create my own spinner layouts?



On Feb 2, 5:46 pm, Dianne Hackborn hack...@android.com wrote:
 If you want to stick with using array resources, just make two arrays, one
 with the things to display to the user, the other with the keys.

 Otherwise, you can always make your own adapter, and load that from an XML
 resource or anything else of whatever format you want.

 On Sun, Jan 11, 2009 at 4:21 PM, Robert Green rbgrn@gmail.com wrote:

  I'm familiar with arrays.xml to define static data sets for spinners
  and this works fine except that so far I am only able to define lists
  of values for the spinner.  What I need now is to have keys associated
  with those values so that in the future when I add new elements in
  arbitrary positions, it won't matter and the code won't have to be
  updated to handle it.  I'd like it if it worked like the select/option
  in html.

  The idea is to have a data set like this:

  Key / Value
  -
  flwr1 / Rose
  flwr2 / Daffodil

  and the spinner would show
  Rose
  Daffodil

  but the code can get to
  flwr1
  flwr2

  Sounds easy enough, right?   Can anyone give me a quick code snippet
  to get me there?

  Thanks!

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  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: android.app.Application global application variable store

2009-02-03 Thread MB

How would you use global variables?  That is what I would like to do.
I have different files for each Activity so I was not sure how to have
globals across them.
I need the LinkedList to be shared over various Activities so I can
use data from it without replication.

On Feb 2, 6:02 pm, Dianne Hackborn hack...@android.com wrote:
 Just make a subclass, put its name in the application tag in your
 manifest, and retrieve it from the activity and cast it to your class.

 Though personally I would just use global variables for this kind of stuff.



 On Sun, Feb 1, 2009 at 5:29 AM, MB marcus.mm.bur...@googlemail.com wrote:

  I want to create a global variable store for a list of user defined
  objects.

  I have a LinkedList of Feed (a user defined object) that I need to be
  made available to a new Activity that is created.
  This list is displayed using a ListView and so when an item of the
  ListView is clicked, I need the correct Feed index to be 'passed' to
  the new Activity.  I have no problem doing this as I create an Intent
  and then pass the id of the selected row.
  I need the new Activity to have access to the LinkedList of Feed
  objects.

  There are different ways to do this (explained here -
 http://code.google.com/android/kb/framework.html).
  I want to use the option (quoted from link above):
  The android.app.Application class
  The android.app.Application is a base class for those who need to
  maintain global application state. It can be accessed via
  getApplication() from any Activity or Service. It has a couple of life-
  cycle methods and will be instantiated by Android automatically if
  your register it in AndroidManifest.xml.

  I want to use the above method as I could then fill the LinkedList at
  application start and then use it throughout without any duplicates
  etc.

  Does anyone know how the android.app.Application class can be used as
  a global variable store that can be accessed from other classes?
  I cannot find any more information on this method of passing
  information between Activities within a single application.  Any
  information regarding passing user defined objects would be useful and
  specifically how to get the above idea to work.

  Cheers,
  MB.

 --
 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.  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] How get text from EditText filed which is showing in alert Dialog

2009-02-03 Thread Gulfam


Hi all,
I m facing a problem for getting text from EditText field which is on
alert dialog  same like ApiDemo text entry Dialog

public void enterNumberView(Activity activity){


LayoutInflater factory = LayoutInflater.from(_activity);
final View textEntryView = factory.inflate
(R.layout.invite_friend_enternumber, null);
new AlertDialog.Builder(_activity)
.setIcon(R.drawable.invite_friends_icon)
.setTitle(Enter Numbers)
.setView(textEntryView)
.setPositiveButton(Invite, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {

EditText enterNumberField = (EditText)
findViewById(R.id.username_edit);

String numbers = enterNumberField.getText
().toString();

Log.i(Enter Number Field Text, +numbers);

}
})
.setNegativeButton(Cancel, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {

/* User clicked cancel so do some stuff */
}
})
.show();
   }

*xml is
under*
EditText
android:id=@+id/username_edit
android:layout_height=wrap_content
android:layout_width=fill_parent
android:layout_marginLeft=20dip
android:layout_marginRight=20dip
android:scrollHorizontally=true
android:numeric=integer
android:digits=0123456789,
android:autoText=false
android:capitalize=none
android:gravity=fill_horizontal
android:textAppearance=?android:attr/textAppearanceMedium /


i have also found the an answer of this post as under

You are doing the findViewById() on the *activity*, not the dialog.
Call findViewById() on the dialog's content instead. BY (Romain Guy)

any one can help How Call findViewById() on the dialog's content
please modify in my code where i am wrong
i dont know the exact syntex to Call findViewById() on the dialog's
content.

Thanks and Regards,
Gulfam



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 good to use intents with an application to communcate and modularise it

2009-02-03 Thread Raja Nagendra Kumar

Hi Diannel

Thank you for the reply, I know How painful is it to impl. generic
back.. in j2me.  I am glad that Intents could help here.
However, Intents way does open up certain other issues of code clarity
as said in my message.. Specially the compile check and passing
different parameters to create view etc..Any case every desing may
excel in some place and may expose different other issues.

Just one question though..

Is there a way to use concept of intent, with out descripting all the
activities in AndroidManfest file.. I don't want to expose the sub
views activites etc..with in AndroidManfiest.xml as it could could
give a different impression that all of different functional units
usable by other applications..

Regards,
Raja Nagendra Kumar
www.tejasoft.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] Support for USIM messages in android

2009-02-03 Thread srinivas

hi,
At present android supports GSM sim messages decoding only.
Is there any plan for supporting USIM message decoding?
Can you please give form pointers for implementing this in android?


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



[android-developers] sharing resources across projects (apk's )

2009-02-03 Thread achhabra1...@gmail.com

Hi All,

I am trying to share my resources from apk named A in apk name B. Has
someone tried this?

I have tried sharing resources by adding the project in eclipse's
project properties required build path
but it seems I can just share source files not the resources.

Please share if any one has done it. or if some one can throw some
idea 

Thanks
Droid …


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

2009-02-03 Thread joebowbeer

On Feb 2, 7:42 am, Moto medicalsou...@gmail.com wrote:
 But single tap doesn't give my the onUp event I need.  Essentially if
 you hold down a while or scroll the onSingleTapUp is never called...

 What I did was overwrite the dispatchTouchEvent(MotionEvent ev) and
 using
 ev.getAction() looked for ACTION_UP. This did the trick...

 Thanks for your helpp Phill,

 Moto!

I've observed this also in emu 1.0 r2 and on the dev. G1.

If you press down and release without moving in X or Y, you will
receive onSingleTapUp.  But you won't if you press long enough to
receive onLongPress.  At this point, I presume, it's no longer a tap,
and you won't receive onSingleTapUp.

You also won't receive onSingleTapUp if you slide you finger before
releasing: if you press, slide, hold, and then release, you also won't
see the up event via the onGestureListener.

Sometimes the missing UP needs to be discarded.  The following code
works for me:

@Override
public boolean onTouchEvent(MotionEvent event) {
boolean handled = false;
if (isEnabled()) {
handled = gestureDetector.onTouchEvent(event) ||
event.getAction() == MotionEvent.ACTION_UP;
}
return handled || super.onTouchEvent(event);
}

--
Joe Bowbeer
myspace.com/irishexperience

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



[android-developers] Re: How to handle ini file in android?

2009-02-03 Thread Paranoia

no, they are 2 different issues.

one is how to use ini file as the config file. another is that there
is the file size limit in assets dir.

On Feb 3, 8:57 am, Emmanuel emmanuel.ast...@gmail.com wrote:
 Do you mean you want to use a .ini file that is more than 1 mo ?
 1mo is a lot of memory for a mobile phone !

 Though if you really need to, you can always concatenate several 1 Mo
 asset files to fit your needs.

 Emmanuelhttp://androidblogger.blogspot.com/

 On Feb 2, 8:18 am, Paranoia zheny...@gmail.com wrote:

  and seems there is a limit on the file size in assets. the file can
  not be larger than 1MB!

  On Feb 2, 2:39 pm, Paranoia zheny...@gmail.com wrote:

   how to use assets directory? i have rebuild the apk by apkbuilder
   manually?

   On Jan 30, 9:56 pm, Tote tot...@gmail.com wrote:

Or alternatively you can put your asset files under 'assets' directory
in your package. AssetManager helps you opening those files, however,
parsing is really up to you.

Anyway, I let the users of my application edit preferences and for
that I use PreferenceActivity along with PreferenceManager. Might be
useful for you, too.

On Jan 30, 8:59 am, hmmm akul...@mail.ru wrote:

 You can place your ini file (or any file), say config,ini, in the 
 'raw'
 subdir of the 'res' dir and then use
 InputStream is = Context.getResources().openRawResource(R.raw.config)
 But then, I guess, there's no API in android dealing with ini files
 specifically so you then might want to create your own class to 
 represent an
 ini file

 - Original Message -
 From: Paranoia zheny...@gmail.com
 To: Android Developers android-developers@googlegroups.com
 Sent: Friday, January 30, 2009 10:32 AM
 Subject: [android-developers] Re: How to handle ini file in android?

 i want to use ini file as my config files. how to use ini file in
 android instead of xml file. i mean replace xml with ini in android

 On Jan 30, 11:48 am, Dianne Hackborn hack...@android.com wrote:
  Android doesn't do ini files; we generally use XML for these kinds 
  of
  things. You will probably need to find a parser elsewhere, or write 
  your
  own, and compile it into your app.

  On Thu, Jan 29, 2009 at 6:59 PM, Paranoia zheny...@gmail.com 
  wrote:

   Thanks
   but it seems that this method can not handle the ini file with
   multiple sections.
   e.g.

   [Section1]
   X=a
   Y=b

   [Section2]
   U=c
   V=d
   ...

   On Jan 22, 2:37 pm, Freepine freep...@gmail.com wrote:
Hi, maybe you can try
java.util.Properties.load(InputStream
  http://code.google.com/android/reference/java/io/InputStream.html
in)
  http://code.google.com/intl/zh-CN/android/reference/java/util/Propert...)

On Thu, Jan 22, 2009 at 2:14 PM, Paranoia zheny...@gmail.com 
wrote:

 i can not find any utility to parse the ini file in android. 
 any one
 can help me?

  --
  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. 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: Caching a content provider

2009-02-03 Thread Charles Harley

I have submitted a RFE to cache the content provider. If you are keen
to see this implemented add your vote.

http://code.google.com/p/android/issues/detail?id=1907

Charles

On Feb 2, 5:07 pm, Charles Harley charles.har...@googlemail.com
wrote:
 Unfortunately I have to use thecontentprovider, I have already
 optimized it a little using bulkInsert but I hadn't thought of
 deleting several entries at once.

 If there definitely isn't a way tocachethecontentprovider then
 I'll submit it as a feature request.

 Charles

 On Feb 2, 4:58 pm, Peli peli0...@googlemail.com wrote:

  Good question. Indeed the URI has to be resolved with each query,
  update, delete.

  If the ContentProvider supports it, you may try whether you are not
  faster
  1) by deleting several entries at once: using delete on the whole
  table, with appropriate selection clause
  2) by inserting several entries at once using bulkInsert (if the
 contentprovider supports 
 this):http://code.google.com/android/reference/android/content/ContentProvi...[]%29

  Finally, if you have so many changes to do, do they really have to go
  into a ContentProvider? Maybe you are better off with a private
  database:

  If you don't need to share data amongst multiple applications you can
  use a database directly via SQLiteDatabase. 
  http://code.google.com/android/reference/android/content/ContentProvi...

  Peli

  On Feb 2, 5:42 pm, Charles Harley charles.har...@googlemail.com
  wrote:

   I am performing hundreds of calls to a singlecontentprovider to
   perform various insertions, updates and deletions. After profiling my
   application, I have noticed that the ContentResolver class takes
   approx. 30ms to retrieve the correspondingcontentprovider object for
   each call. Is there anyway to retrieve a reference to thecontent
   provider rather then going through the ContentResolver every time?

   Many thanks,

   Charles


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

2009-02-03 Thread Sagar Parmar
Hello,
I m using webview to display my text. I want to give font change option to
user. I read that, We can use CSS2 spec fonts in webview. I have used the
following code. Still I dont get any difference except courier new..

wv.loadDataWithBaseURL(some fake url, htmlbody
background=\file:///android_asset/bg.jpg\font face=\+fontName+\
size=\3\ color=\#4F0F1A\+data, text/html, utf-8,null);

here fontName is accessed programatically...
Plz 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] Creating a service using eclipse

2009-02-03 Thread info.sktechnol...@gmail.com

Can someone point me to info on how to create an Android service (that
uses IPC) using eclipse?

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] Event to get that phone is in potrait/landscape mode

2009-02-03 Thread sagar.indianic

Hello,
I want to get notification when user changes its phone mode (landscape/
potrait)..
How to get this event notification??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Signing the application

2009-02-03 Thread Alowishus

I got it all worked out thanks for your help. My app is in the
marketplace, let the negative reviews begin. :)

On Feb 2, 6:57 pm, srajpal sraj...@gmail.com wrote:
 here is a great tutorial that worked perfectly for me

 http://www.anddev.org/signing_your_apk-application_for_release_keytoo...

 On Feb 2, 8:35 pm, Alowishus alowis...@gmail.com wrote:

  Update: I think this may be a vista problem, theappis built and runs
  perfectly in the emulator, I try and use the instructions for the
  keytool and the jarsigner and i was getting IO errors because of
  Vista's file security, I ended up copying the tools and files into my
  workspace to rectify the problem and the keytool created the
  android.keystore.  However the jarsigner refuses to work and tells me
  the .keystore does not exist. Any ideas?

  On Feb 2, 4:51 pm, Alowishus alowis...@gmail.com wrote:

   So, I got the screens and code all worked out, I want to export and
   sign the application for public distribution but the documentation on
   this is overwhelming. Any hints onsigningtheappand all that jazz?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Are you localizing an app? Do you want to be?

2009-02-03 Thread Peli

I have the same question.

Dan, in the document you provided, in the section Publishing
Localized Applications, the possibility is mentioned to break
their .apk files apart into different builds for different groups of
languages.

The following suggestion is given:
The easiest way to do this is to create a temporary folder in
Eclipse, move out the resource directories which you do not wish to
appear, rebuild the project, and then export an unsigned build as you
normally would.  Then move the resource directories back in.

Unfortunately, it seems Market does not accept multiple apks uploaded
in this way, because package names have to be unique (and applications
of different language share the same package name!).

So for now, we can only include all language versions in a single apk
and upload this. What would be the long-term solution here? Construct
different package names based on the localization? (may lead to
problems if the same content provider is used but several language
versions are installed on the same device).

I hope that the Market will allow to upload the same package for
different localizations, as well as allow for adding different,
localized titles and descriptions to applications.

Peli
www.openintents.org

On Jan 27, 10:59 am, alex alexp...@gmail.com wrote:
 When we upload our localized apps to the Market, will we be able to
 provide our application descriptions in different languages?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to send xml file to server?

2009-02-03 Thread Mark Murphy

manoj wrote:
 Hi friends,
 I want to send the some xml data to server. Here I am showing you the
 example I tried:
 try
 {
 String s = ?xml version=\1.0\ encoding=\UTF-8\?\n
+nameManoj/name\n
+number123/number\n
+schooldmh/school\n;
 String url = http://localhost:9090/loggerapi.php?data=+s;
 HttpClient httpclient = new DefaultHttpClient();
  HttpPost httpPost = new HttpPost(URI.create(url));
  httpPost.setHeader(Content-type,text/xml; charset=ISO-8859-1);
 ResponseHandlerString responseHandler = new BasicResponseHandler();
 String responseBody = httpclient.execute(httpPost, responseHandler);
 }
 
 catch(Exception e)
 {
 e.printstackTrace();
 }
 
 I am getting the exception as
 java.lang.IllegalArgumentException: Illegal character in query at
 index 41:
 nameManoj/name
 number123/number
 schooldmh/school
 can any one please help me how to solve this problem (sending the xml
 file to server)?

http://hc.apache.org/httpcomponents-client/examples.html

Notably:

-- You don't normally construct POST requests with parameters in the URL

-- If you do, you have to URL-encode the URL parameters

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

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



[android-developers] Re: LocationManager causes application to crash

2009-02-03 Thread Mark Murphy

pulkit wrote:
 Pratap
 
 here is the logcat trace. What we understand from this is that it
 requires ACCESS_FINE_LOCATION permission
 which you suggested in first place. Now that we have specified it in
 our manifest.xml, what might be the issue?
 
 We define permissions as:-
 
   uses-permission android:name=android.permission.ACCESS_GPS/
   uses-permission
 android:name=android.permission.ACCESS_LOCATION/
   uses-permission
 android:name=android.permission.ACCESS_FINE_LOCATION/
   uses-permission android:name=android.permission.INTERNET/

The error is:

 E/AndroidRuntime(  173): Caused by: java.lang.SecurityException:
 Requires ACCESS
 _FINE_LOCATION permission

This suggests your uses-permission elements are in the wrong spot or
something.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

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



[android-developers] No window to dispatch pointer action 1 onTouchEvent problem

2009-02-03 Thread ad

Does anybody have any idea why I get often(but not always) error
during the on touch event?
Handling touch events is freezed for few seconds(this appears only
immediately after application start).
Then Error screen appears (choose wait of close). When I choose wait
after few seconds screen is starting to process events. I'm using
surfaceView with thread for painting.
In logcat I get something like :
No window to dispatch pointer action 1

 Key dispatching timed out sending to com.myApp
 ANR (application not responding) in process: com.myApp
 Annotation: keyDispatchingTimedOut
 CPU usage:
 Load: 4.21 / 4.46 / 4.63
 CPU usage from 8200ms to 24ms ago:
   com.myApp: 92% = 91% user + 0% kernel
   system_server: 5% = 3% user + 2% kernel
   android.process.acore: 1% = 1% user + 0% kernel
   synaptics_wq: 0% = 0% user + 0% kernel
   akmd: 0% = 0% user + 0% kernel
   events/0: 0% = 0% user + 0% kernel
   mediaserver: 0% = 0% user + 0% kernel
   tiwlan_wifi_wq: 0% = 0% user + 0% kernel
   logcat: 0% = 0% user + 0% kernel
 TOTAL: 100% = 96% user + 3% kernel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Cant go back to previous page from webview page.

2009-02-03 Thread Fred Grott(shareme)

In  your webview settings code what do you have?..ie post it so we can
take a look

On Feb 2, 5:24 pm, Komal komal...@gmail.com wrote:
 Hi,
 I am developing simple RSS Reader kind of application.In my applicaion
 i cant go back from Webview page to  previous page.i can go back from
 all pages except the page where i have used Webview.What could be the
 reason?why i cant go back?
 Thanx.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Creating a service using eclipse

2009-02-03 Thread Charlie Collins

The documentation is pretty good in that regard and samples that come
with Android cover that ground, for starters:

http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/
(go down to the Service area there)

http://code.google.com/android/reference/android/app/Service.html.

Also, here is an example of a simple service with IPC:
http://unlocking-android.googlecode.com/svn/chapter4/trunk/ServiceBinderExample/.



On Feb 3, 8:32 am, info.sktechnol...@gmail.com
info.sktechnol...@gmail.com wrote:
 Can someone point me to info on how to create an Android service (that
 uses IPC) using eclipse?

 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: LocationManager causes application to crash

2009-02-03 Thread JS

The permissions xml tags are wierd.

Try going to do Permissions tab in the Eclipse's AndroidManifest.xml
view.  Now see if all the permissions are shown in the List.  Making
sure they all show there usually solves my permission problems.

Anyone what changes?


On Feb 3, 6:12 am, Mark Murphy mmur...@commonsware.com wrote:
 pulkit wrote:
  Pratap

  here is the logcat trace. What we understand from this is that it
  requires ACCESS_FINE_LOCATION permission
  which you suggested in first place. Now that we have specified it in
  our manifest.xml, what might be the issue?

  We define permissions as:-

     uses-permission android:name=android.permission.ACCESS_GPS/
             uses-permission
  android:name=android.permission.ACCESS_LOCATION/
             uses-permission
  android:name=android.permission.ACCESS_FINE_LOCATION/
             uses-permission android:name=android.permission.INTERNET/

 The error is:

  E/AndroidRuntime(  173): Caused by: java.lang.SecurityException:
  Requires ACCESS
  _FINE_LOCATION permission

 This suggests your uses-permission elements are in the wrong spot or
 something.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Share text options ACTION_SEND

2009-02-03 Thread Alexey

This is from manifest of mms applicaton
 intent-filter
   action android:name=android.intent.action.SEND /
   category
android:name=android.intent.category.DEFAULT /
   data android:mimeType=text/plain /
So this should work and yet i have only gmail and K9 app respond to
that .
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, Body);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, Header);

sendIntent.putExtra(sms_body, The SMS text);

sendIntent.setType(text/plain);

ListResolveInfo activitiesList =  
getContext().getPackageManager
().queryIntentActivities(sendIntent, 0) ;
try {

getContext().startActivity(Intent.createChooser(sendIntent,
getContext().getText(R.string.share_this_story)));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getContext(), Can't share, 
Toast.LENGTH_SHORT).show
();
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Share text options ACTION_SEND

2009-02-03 Thread Alexey

And here is the init block from the ComposeMessage

   if (savedInstanceState != null) {
mThreadId = savedInstanceState.getLong(thread_id, 0);
mMessageUri = (Uri) savedInstanceState.getParcelable
(msg_uri);
mExternalAddress = savedInstanceState.getString
(address);
mComposeMode = savedInstanceState.getBoolean
(compose_mode, false);
mExitOnSent = savedInstanceState.getBoolean
(exit_on_sent, false);
mSubject = savedInstanceState.getString(subject);
mMsgText = savedInstanceState.getString(sms_body);
} else {
mThreadId = intent.getLongExtra(thread_id, 0);
mMessageUri = (Uri) intent.getParcelableExtra(msg_uri);
if ((mMessageUri == null)  (mThreadId == 0)) {
// If we haven't been given a thread id or a URI in
the extras,
// get it out of the intent.
Uri uri = intent.getData();
if ((uri != null)  (uri.getPathSegments().size() =
2)) {
try {
mThreadId = Long.parseLong(uri.getPathSegments
().get(1));
} catch (NumberFormatException exception) {
Log.e(TAG, Thread ID must be a Long.);
}
}
}
mExternalAddress = intent.getStringExtra(address);
mComposeMode = intent.getBooleanExtra(compose_mode,
false);
mExitOnSent = intent.getBooleanExtra(exit_on_sent,
false);
mMsgText = intent.getStringExtra(sms_body);

setSubjectFromIntent(intent);
}

On Feb 3, 9:33 am, Alexey avolo...@gmail.com wrote:
 This is from manifest of mms applicaton
  intent-filter
                action android:name=android.intent.action.SEND /
                category
 android:name=android.intent.category.DEFAULT /
                data android:mimeType=text/plain /
 So this should work and yet i have only gmail and K9 app respond to
 that .
                 Intent sendIntent = new Intent(Intent.ACTION_SEND);
                 sendIntent.putExtra(Intent.EXTRA_TEXT, Body);
                 sendIntent.putExtra(Intent.EXTRA_SUBJECT, Header);

                 sendIntent.putExtra(sms_body, The SMS text);

                 sendIntent.setType(text/plain);

                 ListResolveInfo activitiesList =  
 getContext().getPackageManager
 ().queryIntentActivities(sendIntent, 0) ;
                 try {
                         
 getContext().startActivity(Intent.createChooser(sendIntent,
 getContext().getText(R.string.share_this_story)));
                 } catch (android.content.ActivityNotFoundException ex) {
                         Toast.makeText(getContext(), Can't share, 
 Toast.LENGTH_SHORT).show
 ();
                 }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Selected state of WebView in a ListView does not show selection

2009-02-03 Thread Mark Nuetzmann

Question, is there a way to show that a WebView item contained as a
item in a ListView is selected?  Right now the WebView does not seem
to display its contents transparently like every other control so it
takes up the entire view and does not show its state as selected.

Also, when the content of the WebView is selected, scrolling down with
the track back does not seem to cause the WebView to loose focus.  If
I continue to scroll down with the track ball, all of a sudden an item
in the middle of the ListView gets selected.  This seems kind of odd
to me...


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

2009-02-03 Thread bejay.bam...@googlemail.com

This is a problem with DNS resolution on the Android SDK/emulator. Use
the ip-adress instead of the hostname.

bj

On Jan 27, 6:17 pm, Mathias mmennin...@googlemail.com wrote:
 Hi,

 I'm trying to read a file via http. (http://www-lehre.inf.uos.de/
 ~mmenning/balingen.ts). I wrote a Connector Class:

 package gip.android.ogl;

 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;

 import android.util.Log;

 public class DataConnectorTS {

         private final String DEBUG_TAG = DataConnectorTS;

         public DataConnectorTS() {}

         public void requestTS(String address) {
                 try {

                         URL url = new URL(address);
                         Log.d(DEBUG_TAG, url:  + url);
                         Log.d(DEBUG_TAG,host: +url.getHost());
                         readData(url.openStream());

                 } catch (IOException e) {
                         Log.e(DEBUG_TAG, JML request IOError, e);
                 }
         }

         private void readData(InputStream in){

         }

 }

 But by trying to connect in the ActivityClass
   DataConnectorTS dcts= new DataConnectorTS();
   dcts.requestTS(http://www-lehre.inf.uos.de/~mmenning/
 balingen.jml);

 I will only get the following ExceptionTrace:

 01-27 17:00:18.605: ERROR/DataConnectorTS(182): JML request IOError
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):
 java.net.UnknownHostException: Host is unresolved: www-
 lehre.inf.uos.de:80
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 java.net.Socket.connect(Socket.java:928)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.init
 (HttpConnection.java:61)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager
 $ConnectionPool.getHttpConnection(HttpConnectionManager.java:145)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager.getConnection
 (HttpConnectionManager.java:67)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getHTTPConnection
 (HttpURLConnection.java:800)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.connect
 (HttpURLConnection.java:786)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream
 (HttpURLConnection.java:1030)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 java.net.URL.openStream(URL.java:664)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 gip.android.ogl.DataConnectorTS.requestTS(DataConnectorTS.java:35)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 gip.android.ogl.FirstOGLApp.onCreate(FirstOGLApp.java:14)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1122)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 2103)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 2156)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.app.ActivityThread.access$1800(ActivityThread.java:112)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.os.Handler.dispatchMessage(Handler.java:88)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.os.Looper.loop(Looper.java:123)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 android.app.ActivityThread.main(ActivityThread.java:3742)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 java.lang.reflect.Method.invokeNative(Native Method)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 java.lang.reflect.Method.invoke(Method.java:515)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
 (ZygoteInit.java:739)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
 01-27 17:00:18.605: ERROR/DataConnectorTS(182):     at
 dalvik.system.NativeStart.main(Native Method)

 I already added the uses-permission Internet Tag to the manifest.xml
 (above the application tag).

 I can create the URL Instance but not call openStream().
 Any Idea what the problem could be?

 Thanks for any help

 Mathias

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To 

[android-developers] Ability to utilize ad-hoc networking with android?

2009-02-03 Thread Altehed

Hi all,

We are a group of students at Chalmers University of Technology
currently planning to develop a mobile application that heavy utilizes
ad-hoc networking. We want to use Android as a platform for this
application.

During our research of Android we stumbled upon some posts claiming
that android has no support for ad-hoc networking. (see:
http://groups.google.com/group/android-platform/browse_thread/thread/b4b2eca664b249b6
and http://code.google.com/p/android/issues/detail?id=82 ).

Can anyone confirm that the fix posted by HetaIDP in the second link
above works?

Do anyone have a status at the fix from the developers?

Is there any application available that utilizes ad-hoc networking?

Regards,
T. Altehed

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do you find/pick only contacts that have phone number(s)?

2009-02-03 Thread Parakoos

Hello!

I am working on an application and have run into my first problem I
can't find any solution for on my own. I've searched the web and this
forum, but can't find the questioned asked before.

How do I either create an ACTION_PICK Intent or create a Cursor for
all contacts in the phone that have one or more phone numbers?

Specifically, I am not looking to pick a phone number, I want to
select the Contact itself. Also, if a specific contact has two phone
numbers I don't want them to appear two times in the select list.

Thank you for any help in this.

Gustav

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



[android-developers] Host is unresolved error

2009-02-03 Thread newuser

Hi,

I am trying to run the GetDataFromTheWeb app from one of the Android
tutorial. As I am behind a proxy, I did the proxy settings for
emulator in Eclipse's Run dialog by specifying -http-proxy
http://username:password@proxy ip:port

After doing this setting, I am able to use the browser of the emulator
but when i try to run the above mentioned app, I get Host is
unresolved error. I am getting this for any URL i specify in the code
( www.anddev.org, www.google.com, etc).

I did read on this forum that a couple of developers encountered this
problem but there was no solution mentioned.
If some one knows how to resolve this problem, kindly help.

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] contact listener

2009-02-03 Thread gour

How to listen if any contact is added or deleted or updated in the
address book. How do i implement that listener in my 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] eclipse in ubantu

2009-02-03 Thread vidya

unable run or installing a eclipse on ubantu.
Thanks
vidya

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



[android-developers] Questions about using Android native apps on commercial products

2009-02-03 Thread bercago

Hi,
Not sure if my previous post success or not, so I post it again.

Can we use the applications that released with Android Open Source
Project in our commercial products?

For example, the Browser and the Contacts.

And I also found some demo applications in SDK\Samples, like Home and
NotePad, can them be used for commercial products? Do we need to pay
extra license fee for using these open source applications?

Thanks
bercago

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



[android-developers] RTSP Streaming on g1 phone

2009-02-03 Thread Jeff Oh


 Hi, I'm trying to receive RTSP streaming video with g1. The video
file I made was encoded using QuickTime pro, and they are progressive
streamable with a hint track. Video is encoded in H.264, and audio is
encoded in AAC LC. File container is MP4. (They can be played via
sdcard)

 I used Darwin Streaming Server to stream this file.

 With sample media player given from android, I changed 'path' to the
address like rtsp://172.29.10.109/test.mp4

 The results are really odd. It sometimes (like once per 20~30 times)
runs well, but in other times, only audio is played and video freezes
after first 1~3 frames.

 Is there anyone having same problem or any idea? Any comments will be
very appreciated.
 Thanks in forward.

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

2009-02-03 Thread philipp

Hi

A customer asked me to create an android application for their
internal use. Essentially it would some sort of mobile terminal for a
special chemistry database.

It doesn't make any sense, to distribute this application via Android
Market since it is only useful for special users and payment wont be
done per installation but for the whole contract.

Is there any other way to distribute android apps besides the market?
Maybe by putting them on a web page? Any hints appreciated since i
couldn't find anything on the web  ;-)

Thanks for your help,
Philipp

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



[android-developers] Adding to market to an installation of android

2009-02-03 Thread mkelly

Is it possible to download the android market application and install
it on a G1 which does not have it?

Michael.

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

2009-02-03 Thread Al Sutton

You can make apps available via a webserver. More info is available from;

http://andappstore.com/AndroidPhoneApplications/publishing.jsp

Regards,

Al.

philipp wrote:
 Hi

 A customer asked me to create an android application for their
 internal use. Essentially it would some sort of mobile terminal for a
 special chemistry database.

 It doesn't make any sense, to distribute this application via Android
 Market since it is only useful for special users and payment wont be
 done per installation but for the whole contract.

 Is there any other way to distribute android apps besides the market?
 Maybe by putting them on a web page? Any hints appreciated since i
 couldn't find anything on the web  ;-)

 Thanks for your help,
 Philipp

 
   


-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

2009-02-03 Thread Al Sutton

No, but you can use one of the clients from an alternative app directory 
(such as AndAppStore - 
http://andappstore.com/AndroidPhoneApplications/apps/7661).

Regards,

Al.

mkelly wrote:
 Is it possible to download the android market application and install
 it on a G1 which does not have it?

 Michael.

 
   


-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-03 Thread Justin (Google Employee)

What is the name of your application? If you're not comfortable
sharing this publicly, please message me privately.

Cheers,
Justin
Android Team @ Google

On Feb 3, 1:58 am, Ronald van der Lingen lin...@jsource.nl wrote:
 Last week I published our first app to the Market, which is a game
 targeted to users in The Netherlands. Now that the G1 has been
 available over here for a couple of days, we have received feedback
 from several of our users.

 When I look at the developers console in the market however, the
 download count still shows 0. Also on the device it is listed as 50.
 When looking around in the Market, I see that all applications
 targeted to The Netherlands are listed as having 50 downloads, even
 an application that received a lot of publicity.

 Have other developers noticed the same?

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



[android-developers] Market statistics for apps targeting The Netherlands are not correct

2009-02-03 Thread Ronald van der Lingen

Last week I published our first app to the Market, which is a game
targeted to users in The Netherlands. Now that the G1 has been
available over here for a couple of days, we have received feedback
from several of our users.

When I look at the developers console in the market however, the
download count still shows 0. Also on the device it is listed as 50.
When looking around in the Market, I see that all applications
targeted to The Netherlands are listed as having 50 downloads, even
an application that received a lot of publicity.

Have other developers noticed the same?

Kind regards,
Ronald

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



[android-developers] Template for Activity

2009-02-03 Thread mat

Hi All,
Is it possible to add the same element e.g ImageView, TextView to all
activity layouts ? Can I do it by specifying some kind of template,
theme maybe in order to omit adding the same component to every
layout.

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: Cannot View Images from SD Card Image on Emulator

2009-02-03 Thread SBK

Thnks.. That worked..


On Feb 3, 1:18 am, myIP marckas...@gmail.com wrote:
 Read my last post.

 I simply reverted the SDK to 'release 1'.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 pass object as a parameter when starting a service

2009-02-03 Thread CJ

Here I have a broadcastreceiver where i need to start a service. but,
the service need an object from this broadcastreceiver in order to
function. so, far, i have not found a solution.
Can anybody help me out?
thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Automatic upgrade

2009-02-03 Thread mat

Anybody knows how to resolve this issue ??


 Hi All,
 Can you provide some example code forautomaticupgradeof
 application? I have URL where the new version is hosted, so after the
 user start the application I'd like to download new version from given
 URL, reinstall and run the new version.

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



[android-developers] Listening to changes in address book

2009-02-03 Thread Shrikant Agrawal

Hi

Is there any way to know the changes made in the address book.
What I want to know is that whenever an contact is added ,modified or
deleted  my app should receive the notification as well as the ID of
the contact changed.

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



[android-developers] Re: eclipse in ubantu

2009-02-03 Thread MMF
Try this:
http://www.howtoforge.com/installing-google-android-sdk1.0-on-ubuntu8.04-desktop


On Tue, Feb 3, 2009 at 7:54 PM, vidya vidyav.pesh...@gmail.com wrote:


 unable run or installing a eclipse on ubantu.
 Thanks
 vidya

 


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



[android-developers] set max zoom level in map

2009-02-03 Thread jsm

For privacy reasons, is it possible to set the maximum zoom in level
to some fixed level? I am using map view and getting the zoom view to
display the zoom controls but i would like to control the zoom in
level. Is this possible?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 get lists of email from contact application?

2009-02-03 Thread dilu

Hi,
Please tell me how to get lists of email from contact application in
android?If possible then please provide me some sample code or
tutorial on this.
please help me.
Thanks
dileep
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Help needed with animation... (startAnimation functions or ViewFlippers etc)

2009-02-03 Thread Zi Yong Chua

Hi folks,

Really thank you to those who have helped me so far.. I have tried
working with animating text in my application for the whole day but
just cant got it to work. I have created a directory of anim in .Res
with the animation xml and imported viewflippers, animation packages,
but some how the text are not animating still (sometimes even
clashing)... so i am wondering if anyone can help answer me how to use
the startAnimation and ViewFlipper?

The code I have is below  but the both level_message and
level_timer is not fading in and out..

level_message = ((ViewFlipper) this.findViewById(R.id.flipper));
level_timer = ((ViewFlipper) this.findViewById(R.id.timer));

level_timer.setInAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_in));
level_message.setInAnimation(AnimationUtils.loadAnimation(this,
android.R.anim.fade_in));


level_message.setOutAnimation(AnimationUtils.loadAnimation
(this, android.R.anim.fade_out));
level_timer.setOutAnimation(AnimationUtils.loadAnimation
(this, android.R.anim.fade_out));

Sorry if this is a bit brief.. My code is really in a mess now so will
reorganize it at the same time.. Any help help is greatly appreciated.
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] How to Lock the phone by application

2009-02-03 Thread shahzad ahmad
Hi,

I'm trying to lock the phone through my application .I'm using following
code

PowerManager pm =
(PowerManager)context.getSystemService(Context.POWER_SERVICE);
pm.goToSleep(16);

I've added following permission to AndroiManifest.xml file

uses-permission android:name=android.permission.DEVICE_POWER/

But the application crashes by throwing following exception

*E/AndroidRuntime(  436): Caused by: java.lang.SecurityException: Neither
user 10032 nor current process has android.permission.DEVICE_POWER.*

Please help me to avoid the above mentioned exception or tell me some other
way to lock the screen

thanks,
shahzad

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

2009-02-03 Thread manoj

Hi friends,

I want to send the some xml data to server. Here I am showing you the
example I tried:
try
{
String s = ?xml version=\1.0\ encoding=\UTF-8\?\n
   +nameManoj/name\n
   +number123/number\n
   +schooldmh/school\n;
String url = http://localhost:9090/loggerapi.php?data=+s;
HttpClient httpclient = new DefaultHttpClient();
 HttpPost httpPost = new HttpPost(URI.create(url));
 httpPost.setHeader(Content-type,text/xml; charset=ISO-8859-1);

ResponseHandlerString responseHandler = new BasicResponseHandler();
String responseBody = httpclient.execute(httpPost, responseHandler);
}
catch(Exception e)
{
e.printstackTrace();
}

I am getting the exception as

java.lang.IllegalArgumentException: Illegal character in query at
index 41:
http://localhost:9090/loggerapi.php?data=?xml version=1.0
encoding=UTF-8?
 request type=moreinfoobject_id432591/object_id
urlhttp://www.huizenzoeker.nl/koop/flevoland/almere/venkelstraat-10/
details.html/url
nameManoj/name
number123/number
schooldmh/school


can any one please help me how to solve this problem (sending the xml
file to server)?

Thanks,
Manoj.


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



[android-developers] Starting multiple services sequentially

2009-02-03 Thread Al Sutton

I have an app which will start multiple separate services which perform 
an action and then exit. I don't want them all to run at the same time 
(because this may bog down the OS).

I have the code for finding the services and starting the services, but 
does anyone know how I can make sure one service has completed before 
the next starts.

Due to what the app does it will have to start multiple services and the 
actions the services perform have no GUI and may take tens of seconds or 
minutes (hence why I'm using a service so the user isn't just shown a 
blank screen every time the next service starts).

Anyone have any ideas?

Al.

-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



[android-developers] Create an XML file

2009-02-03 Thread elo

Hi!
I need to create my own XML file to save a screen configuration
this new file use to be in /data/data/org.remotecontrol/files/
interface/newfile.xml

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



[android-developers] Re: Automatic upgrade

2009-02-03 Thread Al Sutton

http://www.tomgibara.com/android/veecheck/

Al.

mat wrote:
 Anybody knows how to resolve this issue ??


   
 Hi All,
 Can you provide some example code forautomaticupgradeof
 application? I have URL where the new version is hosted, so after the
 user start the application I'd like to download new version from given
 URL, reinstall and run the new version.

 Regards
 
 
   


-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



[android-developers] Re: How to get lists of email from contact application?

2009-02-03 Thread Mark Roberts

If you are looking for the emails for  a specific contact then you
could do it like this where id is the id of the contact for which you
are trying to get the data:

public static final String[] METHODS_PROJECTION = new String[] {
People.ContactMethods._ID,
People.ContactMethods.KIND,
People.ContactMethods.DATA,
People.ContactMethods.TYPE,
People.ContactMethods.LABEL,
People.ContactMethods.ISPRIMARY,
};
mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/
people), id)
Uri methodsUri = Uri.withAppendedPath(mUri,
People.ContactMethods.CONTENT_DIRECTORY);
Cursor methodsCursor = getContentResolver().query(methodsUri,
METHODS_PROJECTION, kind=1, null, null);

On Feb 3, 12:05 pm, dilu discover.dile...@gmail.com wrote:
 Hi,
 Please tell me how to get lists of email from contact application in
 android?If possible then please provide me some sample code or
 tutorial on this.
 please help me.
 Thanks
 dileep
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] plugin link broken

2009-02-03 Thread Rajesh S

On the page
http://code.google.com/android/intro/installing.html#installingplugin

Please update

https://dl-ssl.google.com/android/eclipse/

to

https://dl-ssl.google.com/

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



[android-developers] Re: I am getting SICK of 1 star ratings for charging!

2009-02-03 Thread Bobby Kolev

I fully agree!

Don't know what Google were thinking, but the current download and
review model pushed me away from Android and back to BlackBerry and
iPhone, where we have better control over quality and - at the very
least - a chance to defend against both stupidity and purposeful
attacks against our brand and products.

In the curent Android Marketplace you're not just on your own, you're
without any control whatsoever.

The ability to charge for applications will be one small way to change
that, but it's not going to be a big thing by itself.

I hope someone from the Android team reads that and doesn't ignore it
on the basis of it being non-technical. They'd just repeat the mistake
they did back at Palm.

We *are* technical. You're just preventing us from showing it on your
platform.

- bobby

On Feb 3, 8:51 am, gsmd gsm...@gmail.com wrote:
 The whole non-moderated comment system is broken from the start.  I
 don't want spam on MY app's page! Wish they added an option to disable
 comments alltogether.
 Besides that, not being able to charge for app through Android Market
 makes it just a free (ugly!) showroom for demo versions.


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



[android-developers] second call to WebView.loadUrl() no longer calls WebViewClient.shouldOverrideUrlLoading

2009-02-03 Thread Mark Nuetzmann

When I make a call to WebView.setWebViewClient and then call
WebView.loadUrl I am able to get a callback into the
shouldOverrideUrlLoading method of the WebViewClient.  However, if I
make an additional call to WebView.loadUrl, I never again get a
callback into shouldOverrideUrlLoading.  The WebView is showing visual
confirmation that I am clicking a link on the page that was loaded,
but that is as far as it gets...  I can restart the activity and have
the first call to WebView.loadUrl call a different page and it is just
fine, but if I call loadUrl again in the same activity, it no longer
calls into the WebViewClient.

I am really scratching my head as to why this is happening...  Am I
supposed to somehow reinitialize the WebView each time I call
loadUrl?  I tried calling clearView and several of the other clear
methods but that made no difference.

any ideas would be greatly appreciated.

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



[android-developers] Default sounds - URI?

2009-02-03 Thread code_android_festival_way

Could someone tell me what URI I have to use in order to get access to
the default sounds which you can choose for example in the messaging
notifications.

Thank you very much.

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



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-03 Thread Ronald van der Lingen

The name of my application is PimPam.

Thank you,
Ronald


On Feb 3, 5:07 pm, Justin (Google Employee) j...@google.com wrote:
 What is the name of your application? If you're not comfortable
 sharing this publicly, please message me privately.

 Cheers,
 Justin
 Android Team @ Google

 On Feb 3, 1:58 am, Ronald van der Lingen lin...@jsource.nl wrote:

  Last week I published our first app to the Market, which is a game
  targeted to users in The Netherlands. Now that the G1 has been
  available over here for a couple of days, we have received feedback
  from several of our users.

  When I look at the developers console in the market however, the
  download count still shows 0. Also on the device it is listed as 50.
  When looking around in the Market, I see that all applications
  targeted to The Netherlands are listed as having 50 downloads, even
  an application that received a lot of publicity.

  Have other developers noticed the same?

  Kind regards,
  Ronald


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

2009-02-03 Thread Dianne Hackborn
Nearly all of the code in Android is licensed under Apache 2.0, which lets
you do pretty much whatever you want with it.  You should look at the exact
license associated with the specific code to make sure it is okay.

As far as sample code...  well those are there to show you how to write
apps, so it would be pretty silly to not allow you to copy the code to write
your app. :}

On Tue, Feb 3, 2009 at 12:01 AM, bercago tzu.hsuan...@gmail.com wrote:


 Hi,
 Not sure if my previous post success or not, so I post it again.

 Can we use the applications that released with Android Open Source
 Project in our commercial products?

 For example, the Browser and the Contacts.

 And I also found some demo applications in SDK\Samples, like Home and
 NotePad, can them be used for commercial products? Do we need to pay
 extra license fee for using these open source applications?

 Thanks
 bercago

 



-- 
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.  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: I am getting SICK of 1 star ratings for charging!

2009-02-03 Thread gsmd

The whole non-moderated comment system is broken from the start.  I
don't want spam on MY app's page! Wish they added an option to disable
comments alltogether.
Besides that, not being able to charge for app through Android Market
makes it just a free (ugly!) showroom for demo versions.

On Feb 2, 11:48 pm, Beshoy odsl...@gmail.com wrote:
 Come on.  All these people giving 1 star JUST BECAUSE someone wants to
 make some money?! WHAT THE HECK!  I'm making two versions: ONE FREE
 and one for a buck.  The free one will have ads... and I've got tons
 of people giving one star saying won't pay... seriously.. this
 rating system is flawed for that reason and the whole first thing
 going around. :-/  sorry... just needed to vent about this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Listening to changes in address book

2009-02-03 Thread Shrikant Agrawal

Thanks Mark

But is there any way to know what fields are changed.


On Feb 3, 10:08 pm, Mark Roberts snappe...@gmail.com wrote:
 You can register an observer to monitor a specific uri.  For example:

 Define the observer
 private ContentObserver yourObserver = new ContentObserver(new Handler
 ()) {
         @Override
         public boolean deliverSelfNotifications() {
             return true;
         }

         @Override
         public void onChange(boolean selfChange) {
             Cursor cursor = getCursor();
             if (cursor != null  !cursor.isClosed()) {
                 cursor.requery();
             }
         }
     };

 Now add the code to register it.
 getContentResolver().registerContentObserver(Uri.parse(content://
 contacts/people),
                     true, yourObserver);

 This will notify you whenever a change is made to the people table.
 It will not however tell you what was changed.

 On Feb 3, 11:40 am, Shrikant Agrawal shrikant...@gmail.com wrote:

  Hi

  Is there any way to know the changes made in the address book.
  What I want to know is that whenever an contact is added ,modified or
  deleted  my app should receive the notification as well as the ID of
  the contact changed.

  Thanks in advance
  Shrikant
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Listening to changes in address book

2009-02-03 Thread Mark Roberts

I do not believe so.

The above code just redraws the screen anytime there is a change to
the people table.

On Feb 3, 1:07 pm, Shrikant Agrawal shrikant...@gmail.com wrote:
 Thanks Mark

 But is there any way to know what fields are changed.

 On Feb 3, 10:08 pm, Mark Roberts snappe...@gmail.com wrote:

  You can register an observer to monitor a specific uri.  For example:

  Define the observer
  private ContentObserver yourObserver = new ContentObserver(new Handler
  ()) {
          @Override
          public boolean deliverSelfNotifications() {
              return true;
          }

          @Override
          public void onChange(boolean selfChange) {
              Cursor cursor = getCursor();
              if (cursor != null  !cursor.isClosed()) {
                  cursor.requery();
              }
          }
      };

  Now add the code to register it.
  getContentResolver().registerContentObserver(Uri.parse(content://
  contacts/people),
                      true, yourObserver);

  This will notify you whenever a change is made to the people table.
  It will not however tell you what was changed.

  On Feb 3, 11:40 am, Shrikant Agrawal shrikant...@gmail.com wrote:

   Hi

   Is there any way to know the changes made in the address book.
   What I want to know is that whenever an contact is added ,modified or
   deleted  my app should receive the notification as well as the ID of
   the contact changed.

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



[android-developers] Abort Http URL

2009-02-03 Thread Kamal Hasan

Hi

Anyone knows how to block or abort a http url request in android ?

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



[android-developers] .apk file resource optimisation

2009-02-03 Thread Raja Nagendra Kumar

When we open up the .apk file in winzip (as it is a jar file), we see
the classes are compressed and stored as one file. However the
resources are taken as is. Would it not be a nice approach to compress
all the resources (specially if all the application has many images)
and store it as one file, as this could further bring down the .apk
size. I understand it needs more runtime memory though.. Are there any
options to pack the resources this way already..

As Android seems to run j2se.. I am assuming that such kind of runtime
memory is not an issue.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.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: I am getting SICK of 1 star ratings for charging!

2009-02-03 Thread Beshoy Girgis
I think some cool additions to the market would be to be able to rate a
comment with a thumbs up or down... then from there, show the top ten rated
comments or what not.. no need to show all 1000 of them.

Sincerely,

Beshoy Girgis
Owner
One Design Studios, LLC
http://www.ODSLabs.com
816.347.8637


On Tue, Feb 3, 2009 at 11:33 AM, Bobby Kolev ko...@beiks.com wrote:


 I fully agree!

 Don't know what Google were thinking, but the current download and
 review model pushed me away from Android and back to BlackBerry and
 iPhone, where we have better control over quality and - at the very
 least - a chance to defend against both stupidity and purposeful
 attacks against our brand and products.

 In the curent Android Marketplace you're not just on your own, you're
 without any control whatsoever.

 The ability to charge for applications will be one small way to change
 that, but it's not going to be a big thing by itself.

 I hope someone from the Android team reads that and doesn't ignore it
 on the basis of it being non-technical. They'd just repeat the mistake
 they did back at Palm.

 We *are* technical. You're just preventing us from showing it on your
 platform.

 - bobby

 On Feb 3, 8:51 am, gsmd gsm...@gmail.com wrote:
  The whole non-moderated comment system is broken from the start.  I
  don't want spam on MY app's page! Wish they added an option to disable
  comments alltogether.
  Besides that, not being able to charge for app through Android Market
  makes it just a free (ugly!) showroom for demo versions.
 

 


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



[android-developers] Listview layout and other widgets

2009-02-03 Thread Al

In my listview, I'm trying to make the list row show 2 imageviews as
well as the textview which holds the data. The layout of a single row
is like this: [textview | img1| img2]. The problem is the text inside
the textview overlaps the imageviews. I've tried various layout
options but can't seem to get it right. This is my layout file:

?xml version=1.0 encoding=utf-8?
RelativeLayout
android:layout_width=fill_parent
android:layout_height=wrap_content
android:padding=5px
xmlns:android=http://schemas.android.com/apk/res/android;

TextView
android:id=@+id/label
android:layout_width=wrap_content
android:layout_height=wrap_content
android:paddingLeft=2dip
android:textColor=#eee

/

LinearLayout
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignParentRight=true


ImageView
android:id=@+id/alert
android:layout_width=wrap_content
android:layout_height=wrap_content
android:src=@drawable/stat_notify_alarm
android:tag=alarm
/

ImageView
android:id=@+id/delete
android:layout_width=wrap_content
android:layout_height=wrap_content
android:src=@android:drawable/ic_delete
android:layout_toRightOf=@id/alert
android:paddingLeft=10px
android:tag=del
/

/LinearLayout

/RelativeLayout

and this is the code I'm using for generating the list:

setListAdapter(new ArrayAdapterString(this, R.layout.favs,
R.id.label, shows);

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: How to get lists of email from contact application?

2009-02-03 Thread dileep singh
Thanks a lot mark.I will try the above code.

On Tue, Feb 3, 2009 at 10:46 PM, Mark Roberts snappe...@gmail.com wrote:


 If you are looking for the emails for  a specific contact then you
 could do it like this where id is the id of the contact for which you
 are trying to get the data:

 public static final String[] METHODS_PROJECTION = new String[] {
People.ContactMethods._ID,
People.ContactMethods.KIND,
People.ContactMethods.DATA,
People.ContactMethods.TYPE,
People.ContactMethods.LABEL,
People.ContactMethods.ISPRIMARY,
};
 mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/
 people), id)
 Uri methodsUri = Uri.withAppendedPath(mUri,
 People.ContactMethods.CONTENT_DIRECTORY);
 Cursor methodsCursor = getContentResolver().query(methodsUri,
 METHODS_PROJECTION, kind=1, null, null);

 On Feb 3, 12:05 pm, dilu discover.dile...@gmail.com wrote:
  Hi,
  Please tell me how to get lists of email from contact application in
  android?If possible then please provide me some sample code or
  tutorial on this.
  please help me.
  Thanks
  dileep
 


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



[android-developers] Re: Listview layout and other widgets

2009-02-03 Thread Mark Roberts

Have you tried changing the RelativeLayout to a LinearLayout?

On Feb 3, 2:07 pm, Al alcapw...@googlemail.com wrote:
 In my listview, I'm trying to make the list row show 2 imageviews as
 well as the textview which holds the data. The layout of a single row
 is like this: [textview | img1| img2]. The problem is the text inside
 the textview overlaps the imageviews. I've tried various layout
 options but can't seem to get it right. This is my layout file:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:padding=5px
         xmlns:android=http://schemas.android.com/apk/res/android;

         TextView
                 android:id=@+id/label
                 android:layout_width=wrap_content
                 android:layout_height=wrap_content
             android:paddingLeft=2dip
             android:textColor=#eee

         /

         LinearLayout
                         android:layout_width=wrap_content
                         android:layout_height=wrap_content
                         android:layout_alignParentRight=true

                 
                 ImageView
                                 android:id=@+id/alert
                                 android:layout_width=wrap_content
                                 android:layout_height=wrap_content
                                 android:src=@drawable/stat_notify_alarm
                                 android:tag=alarm
                         /

                         ImageView
                                 android:id=@+id/delete
                                 android:layout_width=wrap_content
                                 android:layout_height=wrap_content
                                 android:src=@android:drawable/ic_delete
                                 android:layout_toRightOf=@id/alert
                                 android:paddingLeft=10px
                                 android:tag=del
                         /

         /LinearLayout

 /RelativeLayout

 and this is the code I'm using for generating the list:

 setListAdapter(new ArrayAdapterString(this, R.layout.favs,
 R.id.label, shows);

 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] MMS ( Messaging App ) ACTION_SEND text/plain

2009-02-03 Thread Alexey

Hi All i'm looking for answer why Messaging is not showing up in the
activity chooser dialog.
Looking at the manifest it should do exactly that

activity android:name=.ui.ComposeMessageActivity
  android:configChanges=orientation|keyboardHidden
intent-filter
action android:name=android.intent.action.VIEW /
category
android:name=android.intent.category.DEFAULT /
data android:mimeType=vnd.android-dir/mms-sms /
/intent-filter
intent-filter
action android:name=android.intent.action.VIEW /
action android:name=android.intent.action.SENDTO /
category
android:name=android.intent.category.DEFAULT /
category
android:name=android.intent.category.BROWSABLE /
data android:scheme=sms /
data android:scheme=smsto /
/intent-filter
intent-filter
action android:name=android.intent.action.VIEW /
action android:name=android.intent.action.SENDTO /
category
android:name=android.intent.category.DEFAULT /
category
android:name=android.intent.category.BROWSABLE /
data android:scheme=mms /
data android:scheme=mmsto /
/intent-filter
   intent-filter
   action android:name=android.intent.action.SEND /
   category
android:name=android.intent.category.DEFAULT /
   data android:mimeType=image/* /
   /intent-filter
   intent-filter
   action android:name=android.intent.action.SEND /
   category
android:name=android.intent.category.DEFAULT /
   data android:mimeType=video/* /
   /intent-filter
   intent-filter
   action android:name=android.intent.action.SEND /
   category
android:name=android.intent.category.DEFAULT /
   data android:mimeType=text/plain /
   /intent-filter
/activity

But if i create my intent like that :

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, Body);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, Header);
sendIntent.putExtra(sms_body, The SMS text);
sendIntent.setType(text/plain);
try {

getContext().startActivity(Intent.createChooser(sendIntent,
getContext().getText(R.string.share_this_story)));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getContext(), Can't share the Story,
Toast.LENGTH_SHORT).show();
}

Only gmail is an option or gmail +k9 if k9 installed.
Changing intent type to */* works but it's not really a good options
since i have a plain text.

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



[android-developers] Re: How to use proxy server on the g1?

2009-02-03 Thread friedger

I am interested as well.
Friedger

On Jan 30, 3:18 pm, joff m...@j0ff.com wrote:
 Anyone figured this one out yet?

 On Jan 24, 9:38 pm, DJMoran danmo...@blueyonder.co.uk wrote:

  I also need the exact same help, my school uses a proxy server to
  access the web.

  Also my home wireless doesn't need a proxy to access the web.

  I know the iPhone and iPod touch can use multiple proxy settings
  depending on the network it is connected to but what about the G1

  On Jan 10, 1:52 pm, kevkev...@googlemail.com

  kevkev...@googlemail.com wrote:
   Does anyone know how to connect to the internet via a proxy server on
   a g1 handset? I need to use a proxy server at school to get on the
   internet on wifi.

   Cheers


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Serialization problem with objects, when using ksoap

2009-02-03 Thread Michael MacDonald

Maybe it's as simple as PAT_DETAILS is not implementing
java.io.Serializable?

sooraj.rit wrote:
 Hi i want to implement a webmethod to search some data and I have done
 it well in C#.net . Now i want to access that method from android .
 The real problem I am facing is that, I have to use a complex data
 type. ( a class containing two strings ). when I call the webmethod,
 an exception is thrown (Runtime exception saying - cannot serialize
 my class ). I have attached the code.pls help me.


 I am using a class to hold my data as

 class PAT_DETAILS
 {
 String PatName;
 String PatID;
 }

 and in my java code

 public class SearchData extends Activity
 {
 private static final String SOAP_ACTION = http://MobWebService.org/
 GetPatDetails;
 private static final String METHOD_NAME = GetPatDetails;
 private static final String NAMESPACE = http://MobWebService.org/;;
 private static final String URL = http://10.1.26.21/Webservice/
 SearchService.asmx;
 PAT_DETAILS m_PatDetails;

 @Override
 public void onCreate( Bundle savedInstanceState )
 {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 m_PatDetails.PatName = John;
 m_PatDetails.PatID =123;

 SoapObject request = new SoapObject( NAMESPACE, METHOD_NAME );
 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope
 ( SoapEnvelope.VER11 );
 envelope.dotNet = true;
 // request.addProperty( PatientName, patname );
 // request.addProperty( PatID, patientId );

 request.addProperty( patientDetails, m_PatDetails );
 envelope.setOutputSoapObject( request );
 HttpTransportSE htransport = new HttpTransportSE( URL );
 try
 {

 try
 {
 htransport.call( SOAP_ACTION, envelope ); // throws exception
 }
 catch( IOException exp )
 {
 exp.printStackTrace();
 }
 SoapObject ResultRequestSOAP = (SoapObject)envelope.bodyIn;

 // Remaining codesnippet here..
 }
 catch ( Exception aE )
 {
 aE.printStackTrace (); //Runtime exception here - cannot serialize my
 class 
 }
 }



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



[android-developers] Re: how to pass object as a parameter when starting a service

2009-02-03 Thread CJ

any hints?

On Feb 3, 10:53 am, CJ chunyu.ji...@gmail.com wrote:
 Here I have a broadcastreceiver where i need to start a service. but,
 the service need an object from this broadcastreceiver in order to
 function. so, far, i have not found a solution.
 Can anybody help me out?
 thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to pass object as a parameter when starting a service

2009-02-03 Thread zero

You can pass a Bundle into the Intent that starts the service,
so as long as your object fits into a Bundle, no problem.

On Feb 3, 10:30 pm, CJ chunyu.ji...@gmail.com wrote:
 any hints?

 On Feb 3, 10:53 am, CJ chunyu.ji...@gmail.com wrote:

  Here I have a broadcastreceiver where i need to start a service. but,
  the service need an object from this broadcastreceiver in order to
  function. so, far, i have not found a solution.
  Can anybody help me out?
  thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Question about android instrumentation

2009-02-03 Thread silverburgh.me...@gmail.com

Hi,

Can you please tell me if you know how to get the Andorid unit test
instrementation to call my activity’s onActivityResult()?

I can’t find anything here:
http://code.google.com/android/reference/android/app/Instrumentation.html

Thanks in advance.



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



[android-developers] Re: Selected state of WebView in a ListView does not show selection

2009-02-03 Thread Mark Murphy

Mark Nuetzmann wrote:
 Question, is there a way to show that a WebView item contained as a
 item in a ListView is selected?  Right now the WebView does not seem
 to display its contents transparently like every other control so it
 takes up the entire view and does not show its state as selected.

I'd be fairly stunned if WebView worked well in a ListView or other
selection widget.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Selected state of WebView in a ListView does not show selection

2009-02-03 Thread Romain Guy

We built an app at some point that was made of a ListView of WebViews.
I haven't tried this in a while though.

On Tue, Feb 3, 2009 at 3:00 PM, Mark Murphy mmur...@commonsware.com wrote:

 Mark Nuetzmann wrote:
 Question, is there a way to show that a WebView item contained as a
 item in a ListView is selected?  Right now the WebView does not seem
 to display its contents transparently like every other control so it
 takes up the entire view and does not show its state as selected.

 I'd be fairly stunned if WebView worked well in a ListView or other
 selection widget.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 2.0 Published!

 




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

Note: please don't send private questions to me, as I don't have time
to provide private support.  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: Recognising when an app is closed

2009-02-03 Thread Mark Nuetzmann

mcswd01,

You also might take a look at using the onDestroy() event of the first/
main Activity.  onDestroy for the main activity will only get called
if you hit back from that activity of call finish() for that
activity.  I think this is what you are looking for.

On Jan 17, 10:13 am, mscwd01 mscw...@gmail.com wrote:
 Okay, I'll have to opt for the stop/start approach each time you
 switch from Activity to Activity - its not a very elegant solution
 though.

 Im suprised theres not a whole application has lost focus.onPause().

 On Jan 17, 3:27 pm, Mark Murphy mmur...@commonsware.com wrote:

  mscwd01 wrote:
   Isn't onPause() called when one Activity calls another too?

  Sure.

   I want to know when an entire Activity has lost focus,

  What is an entire Activity?

   if I use onPause
   () in an Activity which calls another, when the other Activity has
   started the initiating Activity's onPause() method is called.

  Correct. Suspend network activity on every onPause(); re-enable network
  processing on every onResume(). Then, if any activity is active, network
  processing is in operation; if all are paused, network processing is
  stopped.

  If by an entire Activity you really mean an entire application, so
  long as all the components are in the same process, and so long as you
  use loose coupling so garbage collection isn't impeded, you can
  communicate among collaborating activities however you wish.

  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Get your own affiliatesite today and start earning real money

2009-02-03 Thread brilliant.danielw...@gmail.com

Are you tired of promoting others people products without seeing any
result?

If yes, then you don't have to worry any more,
because with your own affiliatesite, you will start
promoting your own products. Which means you get more money
than you used to do when you were promoting others people products.
So what are you waiting for? Click here today to get your own
affiliatesite and start promoting your own products.

http://www.dollarmonitor.com/affsites/afx/143306.html

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



[android-developers] Re: Market statistics for apps targeting The Netherlands are not correct

2009-02-03 Thread Justin (Google Employee)

Ronald,

I've talked with the Market team and there may be a delay in
statistics gathering. My recommendation is to wait a day or two and
see what your results are then. Either way, please post back with your
results in a day or two.

Cheers,
Justin
Android Team @ Google

On Feb 3, 9:51 am, Ronald van der Lingen lin...@jsource.nl wrote:
 The name of my application is PimPam.

 Thank you,
 Ronald

 On Feb 3, 5:07 pm, Justin (Google Employee) j...@google.com wrote:

  What is the name of your application? If you're not comfortable
  sharing this publicly, please message me privately.

  Cheers,
  Justin
  Android Team @ Google

  On Feb 3, 1:58 am, Ronald van der Lingen lin...@jsource.nl wrote:

   Last week I published our first app to the Market, which is a game
   targeted to users in The Netherlands. Now that the G1 has been
   available over here for a couple of days, we have received feedback
   from several of our users.

   When I look at the developers console in the market however, the
   download count still shows 0. Also on the device it is listed as 50.
   When looking around in the Market, I see that all applications
   targeted to The Netherlands are listed as having 50 downloads, even
   an application that received a lot of publicity.

   Have other developers noticed the same?

   Kind regards,
   Ronald


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Memory leak in BitmapFactory/Gallery?

2009-02-03 Thread fadden

On Feb 3, 1:42 am, blindfold seeingwithso...@gmail.com wrote:
 One thing that kept me from further working with this a few days ago
 is that I ran the monkey tool with the --hprof option, which according
 tohttp://code.google.com/intl/zh-TW/android/reference/monkey.html
 puts results in the data/misc folder. However, it seems impossible
 (prohibited) to access that folder on the phone to retrieve the
 generated profiling results? So can this only be used by people who
 flash their own phones with a development build, or did I overlook
 something (I did not dig for long)?

The VM is listening for two signals, SIGQUIT and SIGUSR1.  If you send
it a SIGQUIT it will dump the stacks from all running threads; if you
send it a SIGUSR1 it will dump the heap profiling data.

On a production device, you can't send signals to arbitrary processes,
so adb shell kill -10 pid isn't going to work.  You can, however,
send the process a signal from itself, using
android.os.Process.sendSignal(myPid(), SIGNAL_USR1).  Unfortunately
(as you've noted) this isn't useful unless (a) the process can write
to /data/misc, and (b) you can adb pull the files out once they have
been written.

In not-yet-public Cupcake there's a new call in android.os.Debug that
will dump the heap profiling data to a file you specify.  In the
future we hope to be able to control this through DDMS.

In the mean time, you need to use a development device or the
emulator, either of which will allow you to chmod 777 /data/misc.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Generate .apk without debug info in .class

2009-02-03 Thread Dianne Hackborn
The .apk generated by ADT in Eclipse does not have any extraneous debug
information.

On Tue, Feb 3, 2009 at 2:50 PM, Nanard bsegon...@free.fr wrote:


 Hi,

 If I test my application and generate a .apk, or if I use the 'Export
 unsigned' menu, I get the
 same application size.

 How can I remove debug information for my final releases ?

 I use Eclipse.

 Thanks.
 



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

Note: please don't send private questions to me, as I don't have time to
provide private support.  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: Starting multiple services sequentially

2009-02-03 Thread Al Sutton

I'm not limited to services, so if there is a way to do this with an 
activity I'd be happy to do that.

The problem with timeouts is that it's possible for the app to still be 
alive and the timeout to kick in, which is not what I want.

I hope there is a way to do this :).

Al.

Peli wrote:
 I think it is impossible to know whether a service has finished or not
 unless the service itself lets you know that.

 If you just check whether the service is still alive - it may be
 waiting for a server response - or it may have finished and processing
 some other application's requests.

 So, I guess you have to request that all services let you know by a
 callback when they are done, so that you can continue with the next
 service. Probably you also need a timeout, in case a service never
 finishes.

 Peli

 On Feb 3, 8:37 pm, Al Sutton a...@funkyandroid.com wrote:
   
 The services come from different APKs.

 Best way to think about it is the main application does some processing
 and an additional number of APKs can contain perform contributions to
 that processing. For example, there may be many APKs each of which has a
 particular stock trading prediction forumla, and a main APK has stock
 price data, the main APK calls each of the strategy APKs with the stock
 history content provider URI and each strategy APK can process the
 history and do what it wants.

 The strategy APKs may not come from one place and may be written by many
 different companies (hence why they are seperate APKs)

 Hope that clarifies things a bit.

 Al.



 Dianne Hackborn wrote:
 
 If they are running in the same process, you could just use globals to
 keep track of who is running and decide what next to do.
   
 If you really just want one thing to run at a time, though, why not
 just put it all in one service?  A common pattern is to have a service
 that you submit work to with startService(), which does each thing
 given to it in order and stops itself when done.  There is an ApiDemo
 showing how to structure such a service (the one with three buttons to
 submit work to it, I can't remember the exact name off-hand).
   
 On Tue, Feb 3, 2009 at 9:12 AM, Al Sutton a...@funkyandroid.com
 mailto:a...@funkyandroid.com wrote:
   
 I have an app which will start multiple separate services which
 perform
 an action and then exit. I don't want them all to run at the same time
 (because this may bog down the OS).
   
 I have the code for finding the services and starting the
 services, but
 does anyone know how I can make sure one service has completed before
 the next starts.
   
 Due to what the app does it will have to start multiple services
 and the
 actions the services perform have no GUI and may take tens of
 seconds or
 minutes (hence why I'm using a service so the user isn't just shown a
 blank screen every time the next service starts).
   
 Anyone have any ideas?
   
 Al.
   
 --
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.
   
 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.
   
 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com mailto:hack...@android.com
   
 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them.
   
 --
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.
 
 
   


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

2009-02-03 Thread AusR

Anyone?

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: Starting multiple services sequentially

2009-02-03 Thread Peli

I think it is impossible to know whether a service has finished or not
unless the service itself lets you know that.

If you just check whether the service is still alive - it may be
waiting for a server response - or it may have finished and processing
some other application's requests.

So, I guess you have to request that all services let you know by a
callback when they are done, so that you can continue with the next
service. Probably you also need a timeout, in case a service never
finishes.

Peli

On Feb 3, 8:37 pm, Al Sutton a...@funkyandroid.com wrote:
 The services come from different APKs.

 Best way to think about it is the main application does some processing
 and an additional number of APKs can contain perform contributions to
 that processing. For example, there may be many APKs each of which has a
 particular stock trading prediction forumla, and a main APK has stock
 price data, the main APK calls each of the strategy APKs with the stock
 history content provider URI and each strategy APK can process the
 history and do what it wants.

 The strategy APKs may not come from one place and may be written by many
 different companies (hence why they are seperate APKs)

 Hope that clarifies things a bit.

 Al.



 Dianne Hackborn wrote:
  If they are running in the same process, you could just use globals to
  keep track of who is running and decide what next to do.

  If you really just want one thing to run at a time, though, why not
  just put it all in one service?  A common pattern is to have a service
  that you submit work to with startService(), which does each thing
  given to it in order and stops itself when done.  There is an ApiDemo
  showing how to structure such a service (the one with three buttons to
  submit work to it, I can't remember the exact name off-hand).

  On Tue, Feb 3, 2009 at 9:12 AM, Al Sutton a...@funkyandroid.com
  mailto:a...@funkyandroid.com wrote:

      I have an app which will start multiple separate services which
      perform
      an action and then exit. I don't want them all to run at the same time
      (because this may bog down the OS).

      I have the code for finding the services and starting the
      services, but
      does anyone know how I can make sure one service has completed before
      the next starts.

      Due to what the app does it will have to start multiple services
      and the
      actions the services perform have no GUI and may take tens of
      seconds or
      minutes (hence why I'm using a service so the user isn't just shown a
      blank screen every time the next service starts).

      Anyone have any ideas?

      Al.

      --
      ==
      Funky Android Limited is registered in England  Wales with the
      company number  6741909. The registered head office is Kemp House,
      152-160 City Road, London,  EC1V 2NX, UK.

      The views expressed in this email are those of the author and not
      necessarily those of Funky Android Limited, it's associates, or it's
      subsidiaries.

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

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

 --
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 update list

2009-02-03 Thread cindy

I have a list. Which will first show 10 items, user would be able to
do pagination with click pagination button.

The list is extended from listActivity, and the list adapter is
extends from BaseAdapter .

But how to update UI when I get next 10 items back?

Thanks!

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



[android-developers] Re: Some Activities never display UIs?

2009-02-03 Thread Andrew Stadler

Ron-

This is not comprehensive, but here is one example:

You can create an Activity that serves to accept Intents, process or
react to them in a non-UI way, and then either send a new Intent or a
response.

Here's how:  Do all of the work in onCreate(), never call
setContentView(), and on the way out of onCreate, be sure to call
finish().

--Andy


On Mon, Feb 2, 2009 at 8:03 PM, Ron DuPlain ron.dupl...@gmail.com wrote:

 I hear that some Activities never display UIs according to
 http://code.google.com/android/devel/building-blocks.html.  My
 question: is this true?

 I have yet to find a way to make an Activity without a UI.
 Documentation suggests an Activity can be non-visual.  For example,
 Activity.getWindow() returns the current window, or null if the
 activity is not visual.  When would an Activity have a null Window?
 The docs say the Activity class takes care of creating a window for
 you... at http://code.google.com/android/reference/android/app/Activity.html.

 Any idea?

 Ron


 PS - Yes, I know a Service does not have a UI.  My question is about
 the Activity class.

 


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



[android-developers] Re: I am getting SICK of 1 star ratings for charging!

2009-02-03 Thread Beshoy Girgis
nice!  at least they're doing something about it
and yay, finally! an update! lol

Sincerely,

Beshoy Girgis
Owner
One Design Studios, LLC
http://www.ODSLabs.com
816.347.8637


On Tue, Feb 3, 2009 at 1:57 PM, blindfold seeingwithso...@gmail.com wrote:


 Somewhat in this direction goes the new RC33 G1 firmware,

 http://forums.t-mobile.com/tmbl/board/message?board.id=87thread.id=30897

 allowing visitors to

  Tap Mark this as SPAM.

 in the application's comments.

 Regards


 On Feb 3, 7:59 pm, Beshoy Girgis odsl...@gmail.com wrote:
  I think some cool additions to the market would be to be able to rate a
  comment with a thumbs up or down... then from there, show the top ten
 rated
  comments or what not.. no need to show all 1000 of them.
 
  Sincerely,
 
  Beshoy Girgis
  Owner
  One Design Studios, LLChttp://www.ODSLabs.com
  816.347.8637

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: MMS ( Messaging App ) ACTION_SEND text/plain

2009-02-03 Thread Peli

The answer is simple:
http://android.git.kernel.org/?p=platform/packages/apps/Mms.git;a=blobdiff;f=AndroidManifest.xml;h=bdb822cd1b5014bf0814160138e8ac0c3cce29c7;hp=772fc2270e138a1f3d2bf077a17908fb7ca8a122;hb=HEAD;hpb=8eed706474910ccb978acda03e85d3261037da6e

The original version of MMS only had the intent filter for image/*
MIME type. As you can see in the diff, video/* and text/plain MIME
types have been added later (in cupcake), but are not available on the
device yet.

Peli
www.openintents.org

On Feb 3, 8:20 pm, Alexey avolo...@gmail.com wrote:
 Hi All i'm looking for answer why Messaging is not showing up in the
 activity chooser dialog.
 Looking at the manifest it should do exactly that

         activity android:name=.ui.ComposeMessageActivity
                   android:configChanges=orientation|keyboardHidden
             intent-filter
                 action android:name=android.intent.action.VIEW /
                 category
 android:name=android.intent.category.DEFAULT /
                 data android:mimeType=vnd.android-dir/mms-sms /
             /intent-filter
             intent-filter
                 action android:name=android.intent.action.VIEW /
                 action android:name=android.intent.action.SENDTO /
                 category
 android:name=android.intent.category.DEFAULT /
                 category
 android:name=android.intent.category.BROWSABLE /
                 data android:scheme=sms /
                 data android:scheme=smsto /
             /intent-filter
             intent-filter
                 action android:name=android.intent.action.VIEW /
                 action android:name=android.intent.action.SENDTO /
                 category
 android:name=android.intent.category.DEFAULT /
                 category
 android:name=android.intent.category.BROWSABLE /
                 data android:scheme=mms /
                 data android:scheme=mmsto /
             /intent-filter
            intent-filter
                action android:name=android.intent.action.SEND /
                category
 android:name=android.intent.category.DEFAULT /
                data android:mimeType=image/* /
            /intent-filter
            intent-filter
                action android:name=android.intent.action.SEND /
                category
 android:name=android.intent.category.DEFAULT /
                data android:mimeType=video/* /
            /intent-filter
            intent-filter
                action android:name=android.intent.action.SEND /
                category
 android:name=android.intent.category.DEFAULT /
                data android:mimeType=text/plain /
            /intent-filter
         /activity

 But if i create my intent like that :

 Intent sendIntent = new Intent(Intent.ACTION_SEND);
                 sendIntent.putExtra(Intent.EXTRA_TEXT, Body);
                 sendIntent.putExtra(Intent.EXTRA_SUBJECT, Header);
                 sendIntent.putExtra(sms_body, The SMS text);
                 sendIntent.setType(text/plain);
                 try {
                         
 getContext().startActivity(Intent.createChooser(sendIntent,
 getContext().getText(R.string.share_this_story)));
                 } catch (android.content.ActivityNotFoundException ex) {
                         Toast.makeText(getContext(), Can't share the Story,
 Toast.LENGTH_SHORT).show();
                 }

 Only gmail is an option or gmail +k9 if k9 installed.
 Changing intent type to */* works but it's not really a good options
 since i have a plain text.

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



[android-developers] Re: I am getting SICK of 1 star ratings for charging!

2009-02-03 Thread blindfold

Somewhat in this direction goes the new RC33 G1 firmware,

http://forums.t-mobile.com/tmbl/board/message?board.id=87thread.id=30897

allowing visitors to

 Tap Mark this as SPAM.

in the application's comments.

Regards


On Feb 3, 7:59 pm, Beshoy Girgis odsl...@gmail.com wrote:
 I think some cool additions to the market would be to be able to rate a
 comment with a thumbs up or down... then from there, show the top ten rated
 comments or what not.. no need to show all 1000 of them.

 Sincerely,

 Beshoy Girgis
 Owner
 One Design Studios, LLChttp://www.ODSLabs.com
 816.347.8637

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



[android-developers] Re: Question about android instrumentation

2009-02-03 Thread Dianne Hackborn
If you just want to have the method called, you can post work to the main
thread and directly call the method on the activity.

If you want to mock out some other activity it is launching to return your
own result, you can add an activity watcher to look for the launch, cancel
it, and return the desired result.

On Tue, Feb 3, 2009 at 2:46 PM, silverburgh.me...@gmail.com 
silverburgh.me...@gmail.com wrote:


 Hi,

 Can you please tell me if you know how to get the Andorid unit test
 instrementation to call my activity's onActivityResult()?

 I can't find anything here:
 http://code.google.com/android/reference/android/app/Instrumentation.html

 Thanks in advance.



 



-- 
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.  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: Starting multiple services sequentially

2009-02-03 Thread Al Sutton

The services come from different APKs.

Best way to think about it is the main application does some processing 
and an additional number of APKs can contain perform contributions to 
that processing. For example, there may be many APKs each of which has a 
particular stock trading prediction forumla, and a main APK has stock 
price data, the main APK calls each of the strategy APKs with the stock 
history content provider URI and each strategy APK can process the 
history and do what it wants.

The strategy APKs may not come from one place and may be written by many 
different companies (hence why they are seperate APKs)

Hope that clarifies things a bit.

Al.

Dianne Hackborn wrote:
 If they are running in the same process, you could just use globals to 
 keep track of who is running and decide what next to do.

 If you really just want one thing to run at a time, though, why not 
 just put it all in one service?  A common pattern is to have a service 
 that you submit work to with startService(), which does each thing 
 given to it in order and stops itself when done.  There is an ApiDemo 
 showing how to structure such a service (the one with three buttons to 
 submit work to it, I can't remember the exact name off-hand).

 On Tue, Feb 3, 2009 at 9:12 AM, Al Sutton a...@funkyandroid.com 
 mailto:a...@funkyandroid.com wrote:


 I have an app which will start multiple separate services which
 perform
 an action and then exit. I don't want them all to run at the same time
 (because this may bog down the OS).

 I have the code for finding the services and starting the
 services, but
 does anyone know how I can make sure one service has completed before
 the next starts.

 Due to what the app does it will have to start multiple services
 and the
 actions the services perform have no GUI and may take tens of
 seconds or
 minutes (hence why I'm using a service so the user isn't just shown a
 blank screen every time the next service starts).

 Anyone have any ideas?

 Al.

 --
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909. The registered head office is Kemp House,
 152-160 City Road, London,  EC1V 2NX, UK.

 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.






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

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


 


-- 
==
Funky Android Limited is registered in England  Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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