[android-developers] Re: Problems streaming videos in Android 2.2

2012-05-12 Thread Giuseppe
Hi Kiview,
I have your same problem, did you solved it?

Giuseppe

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

[android-developers] need help fro Android SSO in flash using flex library and creation of ane

2012-05-12 Thread ANKUR GOEL
Hi all ,

need help fro Android SSO in flash using flex library and creation of ane

I have make the simple notification program but its giving error 1009
cannot access method of null refrences .

Please 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] Get SubView Location in MapView

2012-05-12 Thread Matt Clark
In my app I am using a mapView with ImageViews within. When I click on one 
of the contained imageviews, how would I get its location withing the 
mapView so that I can center the mapview on the clicked ImageView.

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

Re: [android-developers] ImageView.getWidth() at the start of my App

2012-05-12 Thread satya attili
hi...

how to implement payment gate way in android 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] Re: Confirmation with pressing back button

2012-05-12 Thread Matt Clark


 Probably not the most efficient way to do things... but it works on all 
 devices that I have used... Not neat.. but hey, it works. xD


boolean quitOnBack = false;

public void onBackPressed() {
if (menuLayout.getVisibility() == View.VISIBLE) {
menuLayout.startAnimation(Anim_SlideOut_Bottom);
menuLayout.setVisibility(View.GONE);
} else {
if (quitOnBack) {
finish();
} else {
quitOnBack = true;
Toast.makeText(this, Press {Back} again to quit., 
Toast.LENGTH_SHORT).show();
new Thread() {
@Override
public void run() {
try {
Thread.sleep(2500);
} catch (Exception e) {
}
quitOnBack = false;
}
}.start();
}
}
} 

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

2012-05-12 Thread Matt Clark


 Probably not the most efficient way to do things... but it works on all 
 devices that I have used... Not neat.. but hey, it works. xD


 boolean quitOnBack = false; public void onBackPressed() { if (quitOnBack) 
 { finish(); } else { quitOnBack = true; Toast.makeText(this, Press {Back} 
 again to quit., Toast.LENGTH_SHORT).show(); new Thread() { @Override 
 public void run() { try { Thread.sleep(2500); } catch (Exception e) { } 
 quitOnBack = false; } }.start(); } }


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

2012-05-12 Thread al
The error message seems to say there's a problem in an XML file, right? I 
would look at line 2 in new_profile.xml.

Am Donnerstag, 10. Mai 2012 13:35:07 UTC+2 schrieb Mentos:

 In my release apk I have very strange problem. In debug all works 
 fine. 
 proguard.cfg is normal from examples. 

 Any sugestion ? 

 Unable to start activity ComponentInfo{myclass}: 
 android.view.InflateException: Binary XML file line #2: Error 
 inflating class PreferenceScreen 



 public class MyClas extends PreferenceActivity implements 
 SharedPreferences.OnSharedPreferenceChangeListener { 

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

 addPreferencesFromResource(R.xml.new_profile); 

 setContentView(R.layout.new_profile); //HERE IS PROBLEM 

 } 
 

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

Re: [android-developers] Equally verticaly spaced button

2012-05-12 Thread Kostya Vasilyev
Ah, ok, I'll bite.

View is exactly the android.widget.View that you mentioned above.

You can use it just like any other View subclass in a layout XML.

Ordinarily, it's useless, because a View doesn't draw anything. But here we
can use it to provide spacing between the other views / widgets / buttons.

The code I wrote in my email was not syntactially complete, I omitted the
usual implied things like android: namespace prefix, layout_ attribute
prefixes.

With this boilerplate stuff in place, it might look like this:

?xml version=1.0 encoding=utf-8?
LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical
 Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 1/
 View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 2/
 View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 3/
/LinearLayout

-- K

2012/5/12 huberte svend.wal...@gmail.com

 Le vendredi 11 mai 2012 19:03:39 UTC-4, Kostya Vasilyev a écrit :

 View? No, View is definitely not documented. It might not even exist.

 /LameJoke


 :)

 Of course it's documented, but not the way your wrote it.

 Because your code as you wrote is:

 - not referenced in
 http://developer.android.com/reference/android/view/View.html
 - returns error

 would you be so kind and give me some explanation ?


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


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

[android-developers] Re: Equally verticaly spaced button

2012-05-12 Thread huberte
OUhh, that is clever ! Works ! (I did try to add the android: befor 
your code, I'm not so good)

Really a nice issue for this problem, why is it not so much spread ?

Here the view block what I add to your code

?xml version=1.0 encoding=utf-8?
LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical
View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/
Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 1/
 View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 2/
 View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/

Button
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=button 3/
View
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1/ 
/LinearLayout

Le jeudi 10 mai 2012 23:04:34 UTC-4, huberte a écrit :

 I tried this with no luck :

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:layout_width=wrap_content
 android:layout_height=fill_parent
 android:orientation=vertical
 android:visibility=visible android:weightSum=3

 Button
 android:id=@+id/button1
 android:layout_width=fill_parent
 android:layout_height=0dp
 android:gravity=center_vertical|center_horizontal
 android:text=Button android:layout_weight=1/

 Button
 android:id=@+id/button2
 android:layout_width=fill_parent
 android:layout_height=0dp
 android:gravity=center_vertical|center_horizontal
 android:text=Button android:layout_weight=1/

 Button
 android:id=@+id/button3
 android:layout_width=fill_parent
 android:layout_height=0dp
 android:gravity=center_vertical|center_horizontal
 android:text=Button android:layout_weight=1/

 /LinearLayout

 thks for your 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] Menu : Handling click events : DialogBox

2012-05-12 Thread huberte


I did red

http://developer.android.com/guide/topics/ui/menus.html

http://developer.android.com/guide/topics/resources/menu-resource.html

I wrote this in main activity

@Override   
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.mainmenu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.infos:
infos();
return true;
case R.id.waring:
waring();
return true;
case R.id.credits:
credits();
return true;
case R.id.about:
about();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void about() {
//  // TODO Auto-generated method stub
//  // custom dialog

}

Where shoudd I put my alertbox (is this correct for a simple text box with 
no button ?) :

new AlertDialog.Builder(this).setTitle(About).setMessage(el viva Android  
!).create();

in private void about(), which never works

or directly in case R.id.about: about();

Quit lost here.


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

2012-05-12 Thread huberte
Oh and thanks Kostya, just one thing, why does Eclipse telling me a warning 
?
nested weights is bad for performance ?

thks

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

[android-developers] Menu : Handling click events : DialogBox

2012-05-12 Thread huberte


Hi, I did red

http://developer.android.com/guide/topics/ui/menus.html

http://developer.android.com/guide/topics/resources/menu-resource.html

I wrote this in main activity

@Override   
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.mainmenu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.infos:
infos();
return true;
case R.id.waring:
waring();
return true;
case R.id.credits:
credits();
return true;
case R.id.about:
about();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private void about() {
//  // TODO Auto-generated method stub
//  // custom dialog

}

Where shoudd I put my alertbox (is this correct for a simple text box with 
no button ?) :

new AlertDialog.Builder(this).setTitle(About).setMessage(el viva Android  
!).create();

in private void about(), which never works

or directly in case R.id.about: about();

Quit lost here.

thks


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

2012-05-12 Thread Tolriq
You can put it in both it's the same.

You just forgot to show the created dialog :)

Dialog dialog = new AlertDialog.Builder(this).setTitle(About).setMessage(el 
viva Android  !).create();
dialog.show();




Le samedi 12 mai 2012 12:10:20 UTC+2, huberte a écrit :

 I did red

 http://developer.android.com/guide/topics/ui/menus.html

 http://developer.android.com/guide/topics/resources/menu-resource.html

 I wrote this in main activity

 @Override   
 public boolean onCreateOptionsMenu(Menu menu) {
 MenuInflater inflater = getMenuInflater();
 inflater.inflate(R.menu.mainmenu, menu);
 return true;
 }
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
 // Handle item selection
 switch (item.getItemId()) {
 case R.id.infos:
 infos();
 return true;
 case R.id.waring:
 waring();
 return true;
 case R.id.credits:
 credits();
 return true;
 case R.id.about:
 about();
 return true;
 default:
 return super.onOptionsItemSelected(item);
 }
 }
 private void about() {
 //  // TODO Auto-generated method stub
 //  // custom dialog

 }

 Where shoudd I put my alertbox (is this correct for a simple text box with 
 no button ?) :

 new AlertDialog.Builder(this).setTitle(About).setMessage(el viva Android  
 !).create();

 in private void about(), which never works

 or directly in case R.id.about: about();

 Quit lost here.




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

[android-developers] Exception e is a null string in HttpTransportSE.call method using KSOAP to consume a WSDL Service

2012-05-12 Thread ingaponteca
I am trying to consume a web service from android and I got that the
application send the  XML right format needed for my WebService. I
checked with a sniffer and test it in SOAPUI client.

I can see that requestDump and respondDump are filled with the in and
out information but the application failed in the line:

aht.call(SOAP_ACTION_1, soapEnvelop);

It goes to the catch:
catch (Exception e)

but e.toString() is equals to null.

I cannot see any exception that give me a clue of the problem. I am
just blind.

Any suggestion or possible errors.

I appreciate your help.

Below the Main Code:

where
   InClass and OutClass implements KvmSerializable.
   In InClass = Contains 3 Strings objects
   Out OutClass = Contains 6 Strings 1 Integer and 2 User defined
classes that also implements KvmSerializable and inside them there are
Strings and Integer variables.

Code:
===
String NAME_SPACE_1 = http://name_space;;
String  URL_1 = http://server:port/XXX//Service?wsdl;
String METHOD_NAME_1 = searchMethod;
String SOAP_ACTION_1 = ;

SoapObject request = new SoapObject(NAME_SPACE_1, METHOD_NAME_1);

In InClass = new In();
In.mS = 1234;
PropertyInfo PI_In = new PropertyInfo();
PI_In.setName(In);
PI_In.setValue(InClass);
PI_In.setType(InClass.getClass());
request.addProperty(PI_In);

//Set the web service envelope
SoapSerializationEnvelope soapEnvelop = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
//envelope.dotNet = false;
soapEnvelop.setOutputSoapObject(request);
//Remove extra entries in XML to format needed input XML
soapEnvelop.implicitTypes = true;
soapEnvelop.setAddAdornments(false);

//Setting output parameters
Out OutClass = new  Out();
soapEnvelop.addMapping(NAME_SPACE_1, Out,new Out().getClass());

HttpTransportSE aht = new HttpTransportSE(URL_1);
aht.debug=true;

//Call the web service and retrieve result
try{
aht.call(SOAP_ACTION_1, soapEnvelop);
}
catch (IOException e) {
outputTextKSoap.setText(GetVersion  +
IOException:   + e);
} catch (XmlPullParserException e) {
outputTextKSoap.setText(GetVersion  +
XmlPullParserException:  + e);
}
catch (Exception e) {
if(e != null  e.toString().equals(null))
outputTextKSoap.setText(StackTrace:  +
e.getStackTrace().toString());
else
outputTextKSoap.setText(Exception is NULL);
}
}

requestDump
==
v:Envelope
xmlns:i=http://www.w3.org/2001/XMLSchema-instance;
xmlns:d=http://www.w3.org/2001/XMLSchema;
xmlns:c=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:v=http://schemas.xmlsoap.org/soap/envelope/;
v:Header /
v:Body
n0:searchMethod xmlns:n0=http://name_space;
In
mS1234/mS
/In
/n0:searchMethod
/v:Body
/v:Envelope

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

2012-05-12 Thread lbendlin
The error may be caused by something else entirely.
 
The other day I learned that lint in it over-eagerness gave me bad advice. 
It told me to put drawables into resolution folders like drawable-mdpi but 
it neglected to mention that this breaks the app on 1.5 devices. I had to 
move the drawables back to the default folder.
 

On Thursday, May 10, 2012 7:35:07 AM UTC-4, Mentos wrote:

 In my release apk I have very strange problem. In debug all works 
 fine. 
 proguard.cfg is normal from examples. 

 Any sugestion ? 

 Unable to start activity ComponentInfo{myclass}: 
 android.view.InflateException: Binary XML file line #2: Error 
 inflating class PreferenceScreen 



 public class MyClas extends PreferenceActivity implements 
 SharedPreferences.OnSharedPreferenceChangeListener { 

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

 addPreferencesFromResource(R.xml.new_profile); 

 setContentView(R.layout.new_profile); //HERE IS PROBLEM 

 } 
 

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

[android-developers] Re: Menu : Handling click events : DialogBox

2012-05-12 Thread huberte
Le samedi 12 mai 2012 07:20:46 UTC-4, Tolriq a écrit :

 You just forgot to show the created dialog :)


o| Sorry

Thanks Tolric :) 

Just 3 other questions if I may.

The text in question could be very long,

1. Would the scrollbar auto appears ?
2. Should I use the sample code from API ReadAsses.java (
https://groups.google.com/forum/?fromgroups#!topic/android-developers/sJBm7LywxDQ
)
3. Should I put my text file in res/ or res/common or res/raw ?

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

Re:: [android-developers] Re: Proguard and PreferenceActivity

2012-05-12 Thread Kostya Vasilyev
Right, like setContentView being pretty much meaningless for a
PreferenceActivity

Unless I'm missing something really subtle and clever.
12.05.2012 16:42 пользователь lbendlin l...@bendlin.us написал:

 The error may be caused by something else entirely.

 The other day I learned that lint in it over-eagerness gave me bad advice.
 It told me to put drawables into resolution folders like drawable-mdpi but
 it neglected to mention that this breaks the app on 1.5 devices. I had to
 move the drawables back to the default folder.


 On Thursday, May 10, 2012 7:35:07 AM UTC-4, Mentos wrote:

 In my release apk I have very strange problem. In debug all works
 fine.
 proguard.cfg is normal from examples.

 Any sugestion ?

 Unable to start activity ComponentInfo{myclass}:
 android.view.InflateException: Binary XML file line #2: Error
 inflating class PreferenceScreen



 public class MyClas extends PreferenceActivity implements
 SharedPreferences.**OnSharedPreferenceChangeListen**er {

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

 addPreferencesFromResource(R.**xml.new_profile);

 setContentView(R.layout.new_**profile); //HERE IS PROBLEM

 }
 

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

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

2012-05-12 Thread Tolriq
If simple TextView there's no scrollbar by default, you need a scrollview 
or things like : 
http://stackoverflow.com/questions/1748977/making-textview-scrollable-in-android

For 2 and 3, it depends on your needs :) If you want your text in multiple 
language then res would be the way to go, if it's simple text you can use 
raw and assets just a personal choice.

Le samedi 12 mai 2012 14:49:44 UTC+2, huberte a écrit :

 Le samedi 12 mai 2012 07:20:46 UTC-4, Tolriq a écrit :

 You just forgot to show the created dialog :)


 o| Sorry

 Thanks Tolric :) 

 Just 3 other questions if I may.

 The text in question could be very long,

 1. Would the scrollbar auto appears ?
 2. Should I use the sample code from API ReadAsses.java (
 https://groups.google.com/forum/?fromgroups#!topic/android-developers/sJBm7LywxDQ
 )
 3. Should I put my text file in res/ or res/common or res/raw ?


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

[android-developers] Maps API - internal persistence of data

2012-05-12 Thread Simon Giddings
I am building a maps api application and have noticed that the map position 
and zoom levels are restored upon subsequent application launches.

Is it possible to access this persistence store so as to be able to control 
and detect what data is going to be restored.
This would be notably useful to not have to reinvent the same process.

In addition, it would appear that it will restore the last position using a 
default marker - which in my case is not necessarily what is needed.

I would prefer being able to do this through correct api calls as opposed 
to hacking it.

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

Re: [android-developers] Maps API - internal persistence of data

2012-05-12 Thread Mark Murphy
On Sat, May 12, 2012 at 11:53 AM, Simon Giddings
mr.s.giddi...@gmail.com wrote:
 I am building a maps api application and have noticed that the map position
 and zoom levels are restored upon subsequent application launches.

 Is it possible to access this persistence store so as to be able to control
 and detect what data is going to be restored.

Not that I am aware of.

 In addition, it would appear that it will restore the last position using a
 default marker - which in my case is not necessarily what is needed.

I cannot reproduce that behavior. I see no markers if I have not added
them myself via an overlay.

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

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

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


Re: [android-developers] Maps API - internal persistence of data

2012-05-12 Thread Simon Giddings
Hi Mark,

Thank you for your rapid reply (notably for a Saturday).

You are right - I spoke too soon.  I was creating the marker myself (*now 
that's embarrassing*).
It would appear that the last location, zoom level and map type is 
preserved.

It would still be good to be able to grab this, I feel.

On Saturday, 12 May 2012 18:18:12 UTC+2, Mark Murphy (a Commons Guy) wrote:

 On Sat, May 12, 2012 at 11:53 AM, Simon Giddings 
 mr.s.giddi...@gmail.com wrote: 
  I am building a maps api application and have noticed that the map 
 position 
  and zoom levels are restored upon subsequent application launches. 
  
  Is it possible to access this persistence store so as to be able to 
 control 
  and detect what data is going to be restored. 

 Not that I am aware of. 

  In addition, it would appear that it will restore the last position 
 using a 
  default marker - which in my case is not necessarily what is needed. 

 I cannot reproduce that behavior. I see no markers if I have not added 
 them myself via an overlay. 

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

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


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

Re: [android-developers] Maps API - internal persistence of data

2012-05-12 Thread Mark Murphy
On Sat, May 12, 2012 at 12:27 PM, Simon Giddings
mr.s.giddi...@gmail.com wrote:
 Thank you for your rapid reply (notably for a Saturday).

Just sitting here, trying to figure out why AlarmManager alarm isn't working...

 It would still be good to be able to grab this, I feel.

There are lots and lots of things that would be good if the Google
Maps add-on offered. Holding your breath waiting for them is not
recommended. :-(

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

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

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


Re: [android-developers] Re: Equally verticaly spaced button

2012-05-12 Thread Kostya Vasilyev
That warning comes from the Android LINT.

As you can see, there are no nested weights in that layout.

I've already reported this:

http://code.google.com/p/android/issues/detail?id=22889#c8

-- K

2012/5/12 huberte svend.wal...@gmail.com

 Oh and thanks Kostya, just one thing, why does Eclipse telling me a
 warning ?
 nested weights is bad for performance ?

 thks

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


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

Re: [android-developers] Re: Proguard and PreferenceActivity

2012-05-12 Thread Kostya Vasilyev
Not sure about the crash, but calling setContentView yourself on a
PreferenceActivity is quite meaningless.

-- K

2012/5/12 lbendlin l...@bendlin.us

 The error may be caused by something else entirely.

 The other day I learned that lint in it over-eagerness gave me bad advice.
 It told me to put drawables into resolution folders like drawable-mdpi but
 it neglected to mention that this breaks the app on 1.5 devices. I had to
 move the drawables back to the default folder.


 On Thursday, May 10, 2012 7:35:07 AM UTC-4, Mentos wrote:

 In my release apk I have very strange problem. In debug all works
 fine.
 proguard.cfg is normal from examples.

 Any sugestion ?

 Unable to start activity ComponentInfo{myclass}:
 android.view.InflateException: Binary XML file line #2: Error
 inflating class PreferenceScreen



 public class MyClas extends PreferenceActivity implements
 SharedPreferences.**OnSharedPreferenceChangeListen**er {

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

 addPreferencesFromResource(R.**xml.new_profile);

 setContentView(R.layout.new_**profile); //HERE IS PROBLEM

 }
 

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


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

Re: [android-developers] Get SubView Location in MapView

2012-05-12 Thread TreKing
On Sat, May 12, 2012 at 2:31 AM, Matt Clark mrclark32...@gmail.com wrote:

 In my app I am using a mapView with ImageViews within. When I click on one
 of the contained imageviews, how would I get its location withing the
 mapView so that I can center the mapview on the clicked ImageView.


Use Overlays instead of ImageViews.

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

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

[android-developers] How to find device dropping installs

2012-05-12 Thread Droid
I have an App that is dropping installs like a stone but I do not see
which device is doing it in my Play beautiful stats. Why? Because all
the devices in the graphic are OK so it must be one below the main
list (in 'others') that my app is crashing.  Any ideas how I can find
out which device is losing installs?

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

2012-05-12 Thread huberte
Thanks. But I'm to noob to check how to have this menu item clicked and 
then display a basic textbox from a txt file... I try to find something 
easy, but I didn't succeed :(

Le samedi 12 mai 2012 09:38:29 UTC-4, Tolriq a écrit :

 If simple TextView there's no scrollbar by default, you need a scrollview 
 or things like : 
 http://stackoverflow.com/questions/1748977/making-textview-scrollable-in-android

 For 2 and 3, it depends on your needs :) If you want your text in multiple 
 language then res would be the way to go, if it's simple text you can use 
 raw and assets just a personal choice.

 Le samedi 12 mai 2012 14:49:44 UTC+2, huberte a écrit :

 Le samedi 12 mai 2012 07:20:46 UTC-4, Tolriq a écrit :

 You just forgot to show the created dialog :)


 o| Sorry

 Thanks Tolric :) 

 Just 3 other questions if I may.

 The text in question could be very long,

 1. Would the scrollbar auto appears ?
 2. Should I use the sample code from API ReadAsses.java (
 https://groups.google.com/forum/?fromgroups#!topic/android-developers/sJBm7LywxDQ
 )
 3. Should I put my text file in res/ or res/common or res/raw ?



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

Re: [android-developers] Re: Proguard and PreferenceActivity

2012-05-12 Thread JBirdVegas
I think what you want is not to call setContentView and instead make a custom 
preference for the 2nd part of your content you need to load.

In the custom preference you can use whatever layout you want but while within 
a PreferenceActivity your options of system provided layouts is limited.

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

2012-05-12 Thread huberte
Tolriq, I have this main.xml :

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical 

ScrollView
android:id=@+id/scrollView1
android:layout_width=fill_parent
android:layout_height=wrap_content 

LinearLayout
android:layout_width=fill_parent
android:layout_height=fill_parent 

TextView
android:id=@+id/TextView1
android:layout_width=wrap_content
android:layout_height=wrap_content
/

/LinearLayout
/ScrollView

/LinearLayout

Then I call my textview in java :

package com.android.boite;

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

import java.io.IOException; 
import java.io.InputStream;

public class BoiteActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

 // Programmatically load text from an asset and place it into the 
// text view.  Note that the text we are loading is ASCII, so we 
// need to convert it to UTF-16. 
try { 
InputStream is = getAssets().open(text.txt); // 

// We guarantee that the available method returns the 
   //total 
// size of the asset...  of course, this does mean that a 
   //single 
// asset can't be more than 2 gigs. 
int size = is.available(); 

// Read the entire asset into a local byte buffer. 
byte[] buffer = new byte[size]; 
is.read(buffer); 
is.close(); 

// Convert the buffer into a string. 
String text = new String(buffer); 

// Finally stick the string into the text view. 
TextView tv = (TextView)findViewById(R.id.TextView1); 
tv.setText(text); 
} catch (IOException e) { 
// Should never happen! 
throw new RuntimeException(e); 
} 
}
}

Almost all bymyself (and this group). The text is showing (but not like in 
a box, I think I have to use margin in my second linearlayout ?) but é à é 
caracters are faulty (?)

Is my way good ? Thks

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

Re: [android-developers] Re: Menu : Handling click events : DialogBox

2012-05-12 Thread Kostya Vasilyev
Regarding the umlauts:

1) Replace this:

// Convert the buffer into a string.
String text = new String(buffer);

with this:

// Convert the buffer into a string.
String text = new String(buffer, UTF-8);

... you will now need to catch UnsupportedEncodingException, as a formality.

2) Check the encoding of your asset text file in Eclipse: right click,
properties, see bottom of the right pane.

-- K

2012/5/13 huberte svend.wal...@gmail.com


 but é à é caracters are faulty (?)




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 make simultaneous connections to a Wi-Fi Direct and AP in ICS

2012-05-12 Thread fan zhang
Hi:

Do you know how to make simultaneous connections to a Wi-Fi Direct and AP
in ICS.

Current Samsung Nexus with ICS 4.0.2 does not support simultaneous
connections to Wi-Fi direct device and a AP.

Thanks

Fan

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

2012-05-12 Thread Shawn
I am using a surfaceview and have drawn multiple bitmaps to the view.
My question is how can I use the touch listener to target each bitmaps
move action independently?

Basically I want the user to be able to arrange the bitmaps in any
order they like. I came up with a method of determining the space
utilized on the surfaceview for each bitmap and then checking the x
and y values of the touch listener to determine if the user was
selecting the known location of the bitmap. The problem I am having is
that if the bitmaps end up crossing each other then they stick
together as they share the same space.

I am thinking there is a simpler way to handle the events of multiple
bitmaps, any suggestions?

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


[android-developers] Android to PHP error- Unidentified Index

2012-05-12 Thread Jeresam515


when sending data to a php server through android I cam across this error: 
Notice: Undefined index: IT in C:\xampp\htdocs\hello.php on line 4. After 
a few hours of messing around with it I can't solve my issue.

hello.php :

?php
mysql_connect(localhost,user,pass);
mysql_select_db(mmo);
$r=mysql_query(update players set X = '.$_REQUEST['IT'].' where 22=22);
if(!$r)
echo Error in query: .mysql_error();
mysql_close();
header('Refresh: 0.01; URL=http://localhost/hello.php');
?

update method in android:

public void UpdateSeverWithPlayer()
{ListNameValuePair nameValuePairs = new ArrayListNameValuePair();  
nameValuePairs.add(new BasicNameValuePair(IT,3));
try{
 HttpClient httpclient = new DefaultHttpClient();
 HttpPost httppost = new HttpPost(http://10.0.2.2/hello.php;);
 httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

 HttpResponse response = httpclient.execute(httppost);
 HttpEntity entity = response.getEntity();
 is = entity.getContent();
 }catch(Exception e){
 Log.e(log_tag, Error in http connection+e.toString());
}}

I am working on the android emulator and do have the internet permission. 
As always help is greatly appreciated. EDIT 1: It appears the issue is in 
the android and not the php code.

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

2012-05-12 Thread lbendlin
You have full control over when and how to show the map. You should not 
assume that your users open your app in the same geo location as when they 
last closed it.

On Saturday, May 12, 2012 11:53:28 AM UTC-4, Simon Giddings wrote:

 I am building a maps api application and have noticed that the map 
 position and zoom levels are restored upon subsequent application launches.

 Is it possible to access this persistence store so as to be able to 
 control and detect what data is going to be restored.
 This would be notably useful to not have to reinvent the same process.

 In addition, it would appear that it will restore the last position using 
 a default marker - which in my case is not necessarily what is needed.

 I would prefer being able to do this through correct api calls as opposed 
 to hacking it.


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

Re: [android-developers] Re: Menu : Handling click events : DialogBox

2012-05-12 Thread huberte
Le samedi 12 mai 2012 18:17:55 UTC-4, Kostya Vasilyev a écrit :


 ... you will now need to catch UnsupportedEncodingException, as a 
 formality.


Didn't understood...
 


 2) Check the encoding of your asset text file in Eclipse: right click, 
 properties, see bottom of the right pane.


Done, thks it works

Don'y know how to have a textbox with a little margin over the text.

 This odes not work :

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:orientation=vertical 

ScrollView
android:id=@+id/scrollView1
android:layout_width=wrap_content
android:layout_height=wrap_content android:layout_margin=10dp

LinearLayout
android:layout_width=fill_parent
android:layout_height=fill_parent 

TextView
android:id=@+id/TextView1
android:layout_width=wrap_content
android:layout_height=wrap_content
/

/LinearLayout
/ScrollView

/LinearLayout

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

Re: [android-developers] ImageView.getWidth() at the start of my App

2012-05-12 Thread Justin Anderson
Satya,

1) Don't hijack someone's post to ask your own question

2) When you do ask the question in your own thread, ask a question that
makes sense.
On May 12, 2012 1:53 AM, satya attili satyandr...@gmail.com wrote:


 hi...

 how to implement payment gate way in android 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

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

2012-05-12 Thread Jonathan S


$_REQUEST is $_GET http://www.php.net/manual/en/reserved.variables.get.php, 
$_POST http://www.php.net/manual/en/reserved.variables.post.php and $_COOKIE 
http://www.php.net/manual/en/reserved.variables.cookies.php.

since you are not doing query string, it be null.


On Saturday, May 12, 2012 10:22:34 PM UTC-4, Jeresam515 wrote:

 when sending data to a php server through android I cam across this error: 
 Notice: Undefined index: IT in C:\xampp\htdocs\hello.php on line 4. After 
 a few hours of messing around with it I can't solve my issue.

 hello.php :

 ?php
 mysql_connect(localhost,user,pass);
 mysql_select_db(mmo);
 $r=mysql_query(update players set X = '.$_REQUEST['IT'].' where 22=22);
 if(!$r)
 echo Error in query: .mysql_error();
 mysql_close();
 header('Refresh: 0.01; URL=http://localhost/hello.php');
 ?

 update method in android:

 public void UpdateSeverWithPlayer()
 {ListNameValuePair nameValuePairs = new ArrayListNameValuePair();  
 nameValuePairs.add(new BasicNameValuePair(IT,3));
 try{
  HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(http://10.0.2.2/hello.php;);
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

  HttpResponse response = httpclient.execute(httppost);
  HttpEntity entity = response.getEntity();
  is = entity.getContent();
  }catch(Exception e){
  Log.e(log_tag, Error in http connection+e.toString());
 }}

 I am working on the android emulator and do have the internet permission. 
 As always help is greatly appreciated. EDIT 1: It appears the issue is in 
 the android and not the php code.



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

2012-05-12 Thread Jonathan S
I think you should use $_POST instead $_REQUEST because $_REQUEST is 
$_POST, $_GET and $_COOKIE. 

look into this sample 
http://www.androidsnippets.com/executing-a-http-post-request-with-httpclient

On Saturday, May 12, 2012 10:22:34 PM UTC-4, Jeresam515 wrote:

 when sending data to a php server through android I cam across this error: 
 Notice: Undefined index: IT in C:\xampp\htdocs\hello.php on line 4. After 
 a few hours of messing around with it I can't solve my issue.

 hello.php :

 ?php
 mysql_connect(localhost,user,pass);
 mysql_select_db(mmo);
 $r=mysql_query(update players set X = '.$_REQUEST['IT'].' where 22=22);
 if(!$r)
 echo Error in query: .mysql_error();
 mysql_close();
 header('Refresh: 0.01; URL=http://localhost/hello.php');
 ?

 update method in android:

 public void UpdateSeverWithPlayer()
 {ListNameValuePair nameValuePairs = new ArrayListNameValuePair();  
 nameValuePairs.add(new BasicNameValuePair(IT,3));
 try{
  HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(http://10.0.2.2/hello.php;);
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

  HttpResponse response = httpclient.execute(httppost);
  HttpEntity entity = response.getEntity();
  is = entity.getContent();
  }catch(Exception e){
  Log.e(log_tag, Error in http connection+e.toString());
 }}

 I am working on the android emulator and do have the internet permission. 
 As always help is greatly appreciated. EDIT 1: It appears the issue is in 
 the android and not the php code.



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

2012-05-12 Thread Jeresam515
POST does not seem to be making a difference, thanks though.

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