[android-developers] ScrollView draw error on 3D flip animation

2011-07-21 Thread mongd
Hello, I'm facing a draw error with ScrollView.
I created a ScrollView which includes a long long LinearLayout in it.
By long long, I mean the height of LinearLayout is far longer than
that of ScrollView.

This ScrollView fills the whole screen.

Flip animation that I used was something like following:
http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html

I want to rotate this ScrollView around X-axis, so I added an option
menu which does something like the following:
ScrollView.startAnimation(FlipAnimation);

When I ran the above line, ScrollView rotates, but at certain point
part of it just disappears and part of it is painted with solid white
color.
This happens on GingerBread.

I even tried this with HoneyComb and it seems that with
hardwareAccelerated ON, ScrollView just disappears,
I guess there's some kind of issue with Canvas while drawing, but I
don't know how to resolve this.
If you have any workaround or suggestion to overcome this, please let
me know.

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:CameraButtonIntentReceiver.java

2011-07-21 Thread Durgadoss Ramanathan
Hi,

In My GingerBread source, under packages/apps/Camera,
I find a CameraButtonIntentReceiver.java.

Seems like it is supposed to capture the Intent for Camera Button and start
the Camera Activity..

I added some Log.i/v messages inside the onReceive method and tested.
When I touch the Camera App or touch the Camera Image Capture button, none
of these messages are coming on Logcat..

So, Wonder this file is used ? If so, in what way ?

-- 
Regards
Durgadoss

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

2011-07-21 Thread arun kumar
am having a textview when i click on it a popup window(containing list has
to display.). i read the documents but not understanding how to code

plz guide me
Thankyou arun

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

[android-developers] Spinner value on button click

2011-07-21 Thread Igor Barros
Dear all,

Is it possible to return a spinner selected value only when I click in a
button in the same activity, instead of using the OnItemSelected() method?
Could you tell me how to proceed with it?


Best Regards,
-- 

Igor Smagasz Barros
igorsmag...@gmail.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] How to convert the raw data from Camera.takepicture(shutter, raw,jpeg) to Bitmap?

2011-07-21 Thread musfiq
Hi:
I want to find the faces in an image after taking picture. I want to
use the Facedetetor.findfaces(...,); But for that I need Bitmap
file. How to convert byte [] to bitmap?
/Musfiq

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

2011-07-21 Thread TDaniel
All

I am beginner using Android Tools and I am familiar with the Monkey
tool that does Usability Stress testing for mobile devices.

Can you please point me to the website where I can do the following:
(i) The Test cases it is executed while running it. I know it randomly
creates these test cases but which database does it use?
(ii) write use cases using Monkey Tool

Appreciate your help and if you could provide examples would be great.

Thanks
Tom

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


[android-developers] Parameters passed to a .NET webservice are always null when using ksoap2 jar

2011-07-21 Thread Shabu Thomas
Hi, I tried to call a .NET web service from a sample application using
KSOAP2. I could successfully call a web service method without any
parameter. But, even if I set a valid value to a string
parameter, .NET service takes it as null. Let me give the code sample.

private static final String SOAP_ACTION = http://www.webservicex.net/
GetGeoIP;
private static final String METHOD_NAME = GetGeoIPResult;
private static final String NAMESPACE = http://www.webserviceX.NET/;;
private static final String URL = http://www.webservicex.net/
geoipservice.asmx;
private Object resultRequestSOAP = null;

.



SoapObject request = new SoapObject(NAMESPACE,
METHOD_NAME);


String ipVal = 10.0.0.15;

PropertyInfo p = new PropertyInfo();
p.name = IPAddress;
//p.setType(PropertyInfo.STRING_CLASS);
p.setValue(ipVal);


   request.addProperty(p);

   SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
   envelope.encodingStyle = SoapEnvelope.ENC;
   envelope.dotNet = true;
   envelope.setOutputSoapObject(request);


   //envelope.implicitTypes = true;
  // envelope.setAddAdornments(false);



   HttpTransportSE androidHttpTransport = new
HttpTransportSE(URL);
   androidHttpTransport.setXmlVersionTag(?xml version=
\1.0\ encoding=\UTF-8\?);
   try
   {

androidHttpTransport.call(SOAP_ACTION, envelope);
//tv.setText(The Start);
   resultRequestSOAP =
(Object)envelope.getResponse();
   result = resultRequestSOAP.toString();


   }
   catch (Exception aE)
   {
   //tv.setText(aE.toString());
   aE.printStackTrace ();;
   result = aE.toString();
  }

I have searched a lot of blogs and none of them have give a proper
solution better than what I have done. Would you please give me a
better solution for this?


Thanks  Regards
Shabu Thomas

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


[android-developers] Determine missing Chinese font characters

2011-07-21 Thread Jimen Ching
Hi,

I'm developing an application that displays Chinese characters.  I am seeing 
some characters being displayed as square boxes.  Instead of displaying lots 
of square boxes, I would like to just filter out these characters and not 
display them at all.  Anyone know how to do this programmatically?

Thanks in advance.

--jc

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

2011-07-21 Thread Kris Ar
Yesterday I registered with the Android Market to make my app available.
The credit card was processed and I got the receipt for that.

But when I login to my account it says Your Registration to the Android
Market is still being processed.  It's been almost a day.  Is this
typical?  Is there an actual support email I can contact to learn more about
my status?  Most of the chatter I see online says that accounts typically
are activated very quickly.

Any help is appreciated.

Kris

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

2011-07-21 Thread musfiq
I get the similar kind of error in 2.3.4 but don't know how to fix
it.

On Jun 30, 10:01 am, dingding dangdang ustcchenj...@gmail.com wrote:
 I have some codes of takeing picture working at Android 2.1 and 2.2.
 But these codes broke at Android 2.3.
 After spending a time to fix this issue in vain, I would like to ask for
 help here.

 My code flow to take picture is like this:

 1. create a class Camlayer extends SurfaceView

         public class CamLayer extends SurfaceView implements
 SurfaceHolder.Callback {

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

                 mCamera = Camera.open();
             }

             public CamLayer(Context context) {
                 super(context);
                 init(context);
             }

             public CamLayer(Context context, AttributeSet attrs) {
                 super(context, attrs);
                 init(context);
             }

             public void surfaceChanged(SurfaceHolder holder, int format, int
 w, int h) {
                 Log.i(TAG+.surfaceChanged, being called!);
                 Log.i(TAG+.surfaceChanged, w=+w);
                 Log.i(TAG+.surfaceChanged, h=+h);

                 if (isPreviewRunning) {
                     mCamera.stopPreview();
                 }

                    try {
                     mCamera.setPreviewDisplay(holder);
                     mCamera.setPreviewCallback(mPreviewCallback);
                 } catch (IOException e) {
                     Log.e(TAG+.surfaceCreated,
 mCamera.setPreviewDisplay(holder););
                 }

                 Camera.Parameters p = mCamera.getParameters();
                 setOptimalSize(p, w, h, SIZEOFPREVIEW);
                 setOptimalSize(p, w, h, SIZEOFPICTURE);
                 mCamera.setParameters(p);

                 mCamera.startPreview();
                 isPreviewRunning = true;
             }

             public void takePicture(){
                 Log.i(TAG+.takePicture, being called!);
                 mCamera.takePicture(null, null, mPictureCallback);
                 Log.i(TAG+.takePicture, call ended!);
             }

 2. CamLayer.takePicture() will be called by external classes to start

 3. The problem is that at Android 2.3.3, the takePicture will hang, so an
 ANR problem is found. In /data/anr/traces.txt, below are found. As u can
 see, the native_takePicture never returns.

 DALVIK THREADS:

 (mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)

 main prio=5 tid=1 NATIVE

   | group=main sCount=1 dsCount=0 obj=0x40022170 self=0xce68

   | sysTid=2411 nice=0 sched=0/0 cgrp=default handle=-1345006464

   at android.hardware.Camera.native_takePicture(Native Method)

   at android.hardware.Camera.takePicture(Camera.java:746)

   at android.hardware.Camera.takePicture(Camera.java:710)

   at oms.cj.tube.camera.CamLayer.takePicture(CamLayer.java:256)

   at oms.cj.tube.camera.DefineColor.takePicture(DefineColor.java:61)

   at oms.cj.tube.camera.DefineColor.onKeyUp(DefineColor.java:71)

   at android.view.KeyEvent.dispatch(KeyEvent.java:1280)

   at android.app.Activity.dispatchKeyEvent(Activity.java:2078)

   at
 com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:16
 66)
   at
 android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2571)

   at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2546)

   at android.view.ViewRoot.handleMessage(ViewRoot.java:1878)

   at android.os.Handler.dispatchMessage(Handler.java:99)

   at android.os.Looper.loop(Looper.java:123)

   at android.app.ActivityThread.main(ActivityThread.java:3691)

   at java.lang.reflect.Method.invokeNative(Native Method)

   at java.lang.reflect.Method.invoke(Method.java:507)

   at
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)

   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)

   at dalvik.system.NativeStart.main(Native Method)

 Is there anybody having the same problem? And know how to fix 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] Android Web view with you tube videos

2011-07-21 Thread saman norallahy
ok

On Wed, Jul 20, 2011 at 2:05 PM, H@ri harish.gran...@gmail.com wrote:

 In my app i am using web view. In that i am loading the page
 http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html.
 This page contain youtube videos. These are not displaying untill i
 click on them. If we open the same from the browser then these are
 showing properly. My code is :

 wv = (WebView)findViewById(R.id.
 wv.getSettings().setJavaScriptEnabled(true);
 wv.loadUrl(http://apiblog.youtube.com/2010/07/new-way-to-embed-
 youtube-videos.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

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

2011-07-21 Thread gjs
http://androidforums.com/motorola-droid/27217-bluetooth-printing-your-android-droid-device.html

On Jul 20, 9:34 pm, Zero qkhhdn...@yahoo.cn wrote:
 I am about to develop a program that can use the shared printer on
 android.But when I looking the APIs that android has,I am shocked as
 it hasn't javax.print.
 Thus I want to know that where can I start.
 Can anyone help me?
 Thanks in advance.

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


Re: [android-developers] Determine missing Chinese font characters

2011-07-21 Thread Nikolay Elenkov
On Thu, Jul 21, 2011 at 8:21 AM, Jimen Ching jimen.ch...@gmail.com wrote:
 Hi,
 I'm developing an application that displays Chinese characters.  I am seeing
 some characters being displayed as square boxes.  Instead of displaying lots
 of square boxes, I would like to just filter out these characters and not
 display them at all.  Anyone know how to do this programmatically?

Probably not possible. Your best bet is to bundle a font that support Chinese
characters properly and use it for displaying your data/UI.

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


[android-developers] Re: can Wi-Fi and 3G establish network connections individually and simutaneously on a single android?

2011-07-21 Thread Jens
Yes.

Using

http://developer.android.com/reference/android/net/ConnectivityManager.html#TYPE_MOBILE_HIPRI

you should be able to do short, explicitly routed transmissions on the
mobile network while maintaining a WiFi connection. There's a timeout
on the TYPE_MOBILE_HIPRI request and you may need to refresh it every
minute or so to maintain the connection.


On 14 Juli, 06:33, Ryan ryanhsu1...@gmail.com wrote:
 Hi ,
 can Wi-Fi and 3G establish network connections individually and
 simutaneously on a single android?
 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] Getting EULA dialog to show on first run and subsequent upgrade first runs.

2011-07-21 Thread Raghav Sood
Hi all,

I know that this thread is similar to a few previous ones but I need help.

I am currently using the following code to display an EULA dialog on first
run.

SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

boolean dialogShown = settings.getBoolean(dialogShown, false);


if (!dialogShown) {

AlertDialog.Builder builder = new AlertDialog.Builder(this);

builder.setMessage(EULA Text.)

   .setCancelable(false)

   .setPositiveButton(Ok, newDialogInterface.OnClickListener() {

   public void onClick(DialogInterface dialog, int id) {

Vortex.this.finish();

   }

   });

AlertDialog alert = builder.create();


  SharedPreferences.Editor editor = settings.edit();

  editor.putBoolean(dialogShown, true);

  editor.commit();

}


It works perfectly on the first run but when an upgrade is done the code
fails to display the dialog. Is there any way to display the dialog on
upgrades as well?


As it is using SharedPreferences I thought I could set the boolean to false
in a way that it only happens on upgrades and only once per upgrade. The
problem is that I don't know how.


Any ideas/suggestions/links?


Thanks

-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Getting EULA dialog to show on first run and subsequent upgrade first runs.

2011-07-21 Thread Nikolay Elenkov
On Thu, Jul 21, 2011 at 5:43 PM, Raghav Sood raghavs...@gmail.com wrote:


 It works perfectly on the first run but when an upgrade is done the code
 fails to display the dialog. Is there any way to display the dialog on
 upgrades as well?


Append the version name/number to the preference key.

Why do you need to show the EULA on every update? Do you
really change it every time you upgrade the app? BTW, that's
a sure way to get a lot of hate mail/1 star reviews. Everybody
hates EULAs :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Getting EULA dialog to show on first run and subsequent upgrade first runs.

2011-07-21 Thread Kostya Vasilyev
Yes, you just need to keep track of version code for which the EULA was 
already shown vs. the current one.


Something like this:

PackageManager packageManager = getPackageManager();
String packageName = getPackageName();
PackageInfo packageInfo;

try {
packageInfo = packageManager.getPackageInfo(packageName, 
PackageManager.GET_META_DATA);

int versionCode = packageInfo.versionCode;
if (versionCode != mSettings.mOldVersionCode) {
// First run after an upgrade
// Display the changelog and update SharedPrefs with 
new versionCode

}
}

-- Kostya

21.07.2011 12:43, Raghav Sood ?:

Hi all,

I know that this thread is similar to a few previous ones but I need help.

I am currently using the following code to display an EULA dialog on 
first run.


SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

booleandialogShown = settings.getBoolean(dialogShown, false);


if(!dialogShown) {

AlertDialog.Builder builder = newAlertDialog.Builder(this);

builder.setMessage(EULA Text.)

  .setCancelable(false)

  .setPositiveButton(Ok, newDialogInterface.OnClickListener() {

publicvoidonClick(DialogInterface dialog, intid) {

Vortex.this.finish();

  }

  });

AlertDialog alert = builder.create();


  SharedPreferences.Editor editor = settings.edit();

  editor.putBoolean(dialogShown, true);

  editor.commit();

}


It works perfectly on the first run but when an upgrade is done the 
code fails to display the dialog. Is there any way to display the 
dialog on upgrades as well?



As it is using SharedPreferences I thought I could set the boolean to 
false in a way that it only happens on upgrades and only once per 
upgrade. The problem is that I don't know how.



Any ideas/suggestions/links?


Thanks


--
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

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


--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Getting EULA dialog to show on first run and subsequent upgrade first runs.

2011-07-21 Thread Raghav Sood
Okay. I got it working with your help, but think on Nikolay's answer. In the
end I have decided to show the EULA in  the help activity.

Thanks

On Thu, Jul 21, 2011 at 2:21 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  Yes, you just need to keep track of version code for which the EULA was
 already shown vs. the current one.

 Something like this:

 PackageManager packageManager = getPackageManager();
 String packageName = getPackageName();
 PackageInfo packageInfo;

 try {
 packageInfo = packageManager.getPackageInfo(packageName,
 PackageManager.GET_META_DATA);
 int versionCode = packageInfo.versionCode;
 if (versionCode != mSettings.mOldVersionCode) {
 // First run after an upgrade
 // Display the changelog and update SharedPrefs with new
 versionCode
 }
 }

 -- Kostya

 21.07.2011 12:43, Raghav Sood пишет:

 Hi all,

  I know that this thread is similar to a few previous ones but I need
 help.

  I am currently using the following code to display an EULA dialog on
 first run.

  SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

 boolean dialogShown = settings.getBoolean(dialogShown, false);


  if (!dialogShown) {

 AlertDialog.Builder builder = new AlertDialog.Builder(this);

 builder.setMessage(EULA Text.)

.setCancelable(false)

.setPositiveButton(Ok, newDialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int id) {

 Vortex.this.finish();

}

});

 AlertDialog alert = builder.create();


SharedPreferences.Editor editor = settings.edit();

   editor.putBoolean(dialogShown, true);

   editor.commit();

 }


  It works perfectly on the first run but when an upgrade is done the code
 fails to display the dialog. Is there any way to display the dialog on
 upgrades as well?


  As it is using SharedPreferences I thought I could set the boolean to
 false in a way that it only happens on upgrades and only once per upgrade.
 The problem is that I don't know how.


  Any ideas/suggestions/links?


  Thanks

 --
 Raghav Sood
 http://www.raghavsood.com/
 http://wiki.androidappcheck.com/
 http://www.telstop.tel/
 https://market.android.com/developer?pub=Raghav+Sood

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


 --
 Kostya Vasilyev

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




-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

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

Re: [android-developers] Re: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 1:26 AM, animeshsi animeshs...@gmail.com wrote:
 The issue is that I need to call the service methods as soon as it is
 connected.
 So, Is there any way by which I can execute the functions of service
 JUST AFTER binding is complete ?

Execute those functions in onServiceConnected().

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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

2011-07-21 Thread Fernando Miguélez Palomo
Hi Michael,

As far as I understand sending APDUs to the SmartMX SE element is possible 
because the NFC Controller (PN544) is told to enable the NFC-WI interface 
with SE. This is carried out by calling *phHal4Nfc_Switch_SMX_Mode()*, with 
parameter *eSmartMx_Wired *(function *phLibNfc_SE_SetMode()).*
*
*
Wouldn't it be possible to use the SWP channel to send APDUs to UICC SE 
through NFC Controller in an wired mode from an application the same way 
it is performed when sending APDUs to the SmartMX element? Or is SWP only 
supposed for raw RF Communication and has no such equivalent capabilities 
used by NFC-WI?

Taking a look at the libnfc-nxp library theare are some SWP related 
functions that are not being used.Maybe *phHal4Nfc_Switch_Swp_Mode() *could 
be used in a similar fashion to *phHal4Nfc_Switch_SMX_Mode()*?
*
*
*
*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unable to add/see custom menu item to contacts in device

2011-07-21 Thread Mark Murphy
CATEGORY_ALTERNATIVE is no longer being used AFAIK.

On Thu, Jul 21, 2011 at 12:41 AM, Mamz joinmama...@gmail.com wrote:
 Hi Mark,

 I used android.intent.action.SEND  action for the approp MIME type to
 have the activity chooser for gallery and browser. So I could see my
 activity under Share for gallery and Browser.
 But for contacts below is the intent filter used:
   activity android:name=ContactTestActivity
            intent-filter android:label=Contact Test
                action android:name=android.intent.action.VIEW /
                category
 android:name=android.intent.category.DEFAULT /
                category
 android:name=android.intent.category.ALTERNATIVE /
                data android:mimeType=vnd.android.cursor.item/
 contact /
            /intent-filter
     /activity

 The above code snippet worked in emulator.When I select a contact and
 say View Contact, I can see my activity i.e Contact Test and View
 Contact options.But the same is not happening in device.

 On Jul 20, 6:27 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jul 20, 2011 at 2:46 AM,Mamzjoinmama...@gmail.com wrote:
  I did add custom menu item to Gallery and Browser (menu item will be
  displayed under Share option).

 That is not a custom menu item. That is an activity chooser.

  I checked in device as well.
  I could add menu item to contacts and worked in emulator but not
  working in device.

 Then whatever MIME type(s) you are supporting with your
 android.intent.action.SEND intent-filter do not match what your
 contacts application is trying to share.

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

 Android Training...At Your Office:http://commonsware.com/training

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




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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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

2011-07-21 Thread Boozel
Hi

I'm trying to connect to SQL Server 2008 using JDBC. I downloaded the JDBC 
from microsoft and there were two java files sqljdbc.jar and sqljdbc4.jar. I 
imported sqljdbc4.jar into my application but when i get to conn = 
DriverManager.getConnection(connString); i get the error below: the 
connection string is 
jdbc:sqlserver://xxx.xxx.xxx.xxx:1433;encrypt=fasle;user=username;password=password;
 
Can any one tell me what is going wrong? my code is below the error below. I 
know that there are other ways to connect to a db and using JDBC isnt the 
best but it the only suitable method for my application.

any help would be great and Thanks in advance.

I/MobileTrend(13984): ERROR 1: 
com.microsoft.sqlserver.jdbc.SQLServerException:The driver could not 
establish a secure connection to SQL Server by using Secure Sockets Layer 
(SSL) encryption. Error: Socket closed.
W/System.err(13984): com.microsoft.sqlserver.jdbc.SQLServerException: The 
driver could not establish a secure connection to SQL Server by using Secure 
Sockets Layer (SSL) encryption. Error: Socket closed.
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1352)
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1533)
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1042)
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
W/System.err(13984):at 
java.sql.DriverManager.getConnection(DriverManager.java:180)
W/System.err(13984):at 
java.sql.DriverManager.getConnection(DriverManager.java:145)
W/System.err(13984):at 
com.boozel.mobiletrend.MobileTrendActivity.query(MobileTrendActivity.java:77)
W/System.err(13984):at 
com.boozel.mobiletrend.MobileTrendActivity.onOptionsItemSelected(MobileTrendActivity.java:50)
W/System.err(13984):at 
android.app.Activity.onMenuItemSelected(Activity.java:2205)
W/System.err(13984):at 
com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:748)
W/System.err(13984):at 
com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
W/System.err(13984):at 
com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
W/System.err(13984):at 
com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
W/System.err(13984):at 
com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
W/System.err(13984):at 
android.view.View$PerformClick.run(View.java:9080)
W/System.err(13984):at 
android.os.Handler.handleCallback(Handler.java:587)
W/System.err(13984):at 
android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err(13984):at android.os.Looper.loop(Looper.java:130)
W/System.err(13984):at 
android.app.ActivityThread.main(ActivityThread.java:3683)
W/System.err(13984):at java.lang.reflect.Method.invokeNative(Native 
Method)
W/System.err(13984):at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err(13984):at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/System.err(13984):at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
W/System.err(13984):at dalvik.system.NativeStart.main(Native Method)
W/System.err(13984): Caused by: java.net.SocketException: Socket closed
W/System.err(13984):at 
org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native 
Method)
W/System.err(13984):at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:474)
W/System.err(13984):at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:328)
W/System.err(13984):at 
com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1483)
W/System.err(13984):... 24 more

package com.boozel.mobiletrend;

import java.sql.Connection;
import java.sql.DriverManager;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.TextView;
import com.microsoft.sqlserver.jdbc.*;

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

sharedPreferences = 

[android-developers] Upload Audio File over Server

2011-07-21 Thread Ankit Kasliwal
Hello Everyone is any way to upload Audio file which i record through
Application
uploaded over My FTP server Folder.

-- 

Thanks and Regards,

Ankit Kasliwal
kasliwalankit2...@gmail.com
+91-9300-940-136

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

[android-developers] image button animation

2011-07-21 Thread eman
Hi,

I want the image button to grow when on focus and shrink when lost
focus? any idea? example?

cheers.
thanks a lot.

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


Re: [android-developers] Upload Audio File over Server

2011-07-21 Thread Raghav Sood
Maybe you should visit http://www.google.com and type your query once in a
while:

http://hoang17.com/posts/android/android-how-to-upload-a-file-via-ftp



On Thu, Jul 21, 2011 at 4:40 PM, Ankit Kasliwal kasliwalankit2...@gmail.com
 wrote:

 Hello Everyone is any way to upload Audio file which i record through
 Application
 uploaded over My FTP server Folder.

 --

 Thanks and Regards,

 Ankit Kasliwal
 kasliwalankit2...@gmail.com
 +91-9300-940-136

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




-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

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

2011-07-21 Thread Ankit Kasliwal
i have no username and password so how i upload fiile.

On Thu, Jul 21, 2011 at 4:59 PM, Raghav Sood raghavs...@gmail.com wrote:

 Maybe you should visit http://www.google.com and type your query once in a
 while:

 http://hoang17.com/posts/android/android-how-to-upload-a-file-via-ftp



 On Thu, Jul 21, 2011 at 4:40 PM, Ankit Kasliwal 
 kasliwalankit2...@gmail.com wrote:

 Hello Everyone is any way to upload Audio file which i record through
 Application
 uploaded over My FTP server Folder.

 --

 Thanks and Regards,

 Ankit Kasliwal
 kasliwalankit2...@gmail.com
 +91-9300-940-136

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




 --
 Raghav Sood
 http://www.raghavsood.com/
 http://wiki.androidappcheck.com/
 http://www.telstop.tel/
 https://market.android.com/developer?pub=Raghav+Sood

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




-- 

Thanks and Regards,

Ankit Kasliwal
kasliwalankit2...@gmail.com
+91-9300-940-136

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

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 7:40 AM, Ankit Kasliwal
kasliwalankit2...@gmail.com wrote:
 i have no username and password so how i upload fiile.

Get an account on the FTP server.

This has nothing to do with Android.

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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

2011-07-21 Thread lbendlin
try to pull a small amount of data from your server. Or use the network 
reachability code in the documentation

As for the GPS - you have to be aware that by default Android destroys and 
restarts your activity when you rotate the device to a new orientation.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: TrafficStats: sum of all traffic by uid is different than directly retrieving the total

2011-07-21 Thread Chitra
Hey for me am getting recv  and sent values as '-1' .  where is the
problem here??

On Jun 30, 7:02 pm, Guillaume Perrot guillaume.p...@gmail.com wrote:
 Hi everyone, I am trying to use TrafficStats and I have an issue when I try
 to get the traffic for each uid: if i sum all the traffic, I get values that
 can be completely different than the ones return by the getTotalXxBytes.
 In air plane mode, the total methods return 0 on a HTC Desire while the by
 uid methods still return the same numbers...
 Does anyone have a clue about the magic behind this API ?

 Example of my code running on a Nexus S:

 code:

     /* Get all UIDs, by the way is there an alternative way to tod this? */
     MapInteger, String users = new TreeMapInteger, String();
     PackageManager packageManager = getPackageManager();
     for (ApplicationInfo info : packageManager.getInstalledApplications(0))
     {
       int uid = info.uid;
       if (!users.containsKey(uid))
         users.put(uid, packageManager.getNameForUid(uid).split(:)[0]);
     }

     long totalRx = 0;
     long totalTx = 0;
     for (EntryInteger, String entry : users.entrySet())
     {
       int uid = entry.getKey();
       String uidName = entry.getValue();
       long recv = TrafficStats.getUidRxBytes(uid);
       long sent = TrafficStats.getUidTxBytes(uid);
       if (sent  0)
       {
         Log.v(tmp, uid= + uidName +  tx= + sent);
         totalTx += sent;
       }
       if (recv  0)
       {
         Log.d(tmp, uid= + uidName +  rx= + recv);
         totalRx += recv;
       }
     }
     Log.i(tmp, totalRx sum= + totalRx +  api= +
 TrafficStats.getTotalRxBytes());
     Log.i(tmp, totalTx sum= + totalTx +  api= +
 TrafficStats.getTotalTxBytes());

 logcat:

 06-30 15:58:24.855: VERBOSE/tmp(3109): uid=android.uid.system tx=5928
 06-30 15:58:24.855: DEBUG/tmp(3109): uid=android.uid.system rx=7593
 06-30 15:58:24.855: VERBOSE/tmp(3109): uid=android.uid.phone tx=528
 06-30 15:58:24.855: DEBUG/tmp(3109): uid=android.uid.phone rx=288
 06-30 15:58:24.855: VERBOSE/tmp(3109): uid=com.android.vending tx=35809
 06-30 15:58:24.855: DEBUG/tmp(3109): uid=com.android.vending rx=715394
 06-30 15:58:24.859: VERBOSE/tmp(3109): uid=com.google.uid.shared tx=62441
 06-30 15:58:24.859: DEBUG/tmp(3109): uid=com.google.uid.shared rx=122406
 06-30 15:58:24.859: VERBOSE/tmp(3109): uid=com.google.android.music tx=2527
 06-30 15:58:24.859: DEBUG/tmp(3109): uid=com.google.android.music rx=7449
 06-30 15:58:24.859: VERBOSE/tmp(3109): uid=android.media tx=3681
 06-30 15:58:24.859: DEBUG/tmp(3109): uid=android.media rx=8781485
 06-30 15:58:24.859: VERBOSE/tmp(3109): uid=com.google.android.apps.maps
 tx=1728
 06-30 15:58:24.859: DEBUG/tmp(3109): uid=com.google.android.apps.maps
 rx=4818
 06-30 15:58:24.859: VERBOSE/tmp(3109):
 uid=com.google.android.googlequicksearchbox tx=3238
 06-30 15:58:24.859: DEBUG/tmp(3109):
 uid=com.google.android.googlequicksearchbox rx=7977
 06-30 15:58:24.859: VERBOSE/tmp(3109): uid=com.google.android.gm tx=53463
 06-30 15:58:24.859: DEBUG/tmp(3109): uid=com.google.android.gm rx=130145
 06-30 15:58:24.859: VERBOSE/tmp(3109):
 uid=com.google.android.apps.genie.geniewidget tx=1901
 06-30 15:58:24.859: DEBUG/tmp(3109):
 uid=com.google.android.apps.genie.geniewidget rx=38193
 06-30 15:58:24.859: VERBOSE/tmp(3109): uid=com.google.android.gallery3d
 tx=1864
 06-30 15:58:24.859: DEBUG/tmp(3109): uid=com.google.android.gallery3d
 rx=1192
 06-30 15:58:24.863: VERBOSE/tmp(3109): uid=com.android.browser tx=446767
 06-30 15:58:24.863: DEBUG/tmp(3109): uid=com.android.browser rx=203230268
 06-30 15:58:24.863: VERBOSE/tmp(3109): uid=com.google.android.apps.reader
 tx=184116
 06-30 15:58:24.863: DEBUG/tmp(3109): uid=com.google.android.apps.reader
 rx=1430630
 06-30 15:58:24.863: VERBOSE/tmp(3109): uid=com.adao.android.afm tx=1407
 06-30 15:58:24.863: DEBUG/tmp(3109): uid=com.adao.android.afm rx=13693
 06-30 15:58:24.863: VERBOSE/tmp(3109): uid=com.apksoftware.compass tx=8820
 06-30 15:58:24.863: DEBUG/tmp(3109): uid=com.apksoftware.compass rx=15371
 06-30 15:58:24.863: VERBOSE/tmp(3109): uid=com.google.android.apps.docs
 tx=3967
 06-30 15:58:24.863: DEBUG/tmp(3109): uid=com.google.android.apps.docs
 rx=23985
 06-30 15:58:24.863: VERBOSE/tmp(3109): uid=*myapp* tx=27448
 06-30 15:58:24.863: DEBUG/tmp(3109): uid=*myapp* rx=33575
 06-30 15:58:24.863: INFO/tmp(3109): totalRx sum=214564462 api=2065472
 06-30 15:58:24.867: INFO/tmp(3109): totalTx sum=845633 api=443360

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

2011-07-21 Thread lbendlin
What database? SQLite? There is an option to create in-memory temporary 
databases. 

However, you may simply have the wrong requirement. To prevent anyone from 
stealing your database the only thing you can do is NOT to use a database.

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

2011-07-21 Thread lbendlin
You're overcomplicating things a little bit. Have a look at the Android 
sample codes for database handling. First and foremost decide if you really 
want to create the database on the fly, or maybe you want to go with a 
prepared database that you then copy to the documents area on first 
access/when needed.

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

2011-07-21 Thread lbendlin
Is your app the only one consuming the GPS? Did you maybe register another 
listener?

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

2011-07-21 Thread Ankit Kasliwal
Sorry Mark i mean to say that i don't have user name and password
of client FTP so is any way to upload file over FTP without asking
user name and password.


On Thu, Jul 21, 2011 at 5:13 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, Jul 21, 2011 at 7:40 AM, Ankit Kasliwal
 kasliwalankit2...@gmail.com wrote:
  i have no username and password so how i upload fiile.

 Get an account on the FTP server.

 This has nothing to do with Android.

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

 Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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




-- 

Thanks and Regards,

Ankit Kasliwal
kasliwalankit2...@gmail.com
+91-9300-940-136

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

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 8:05 AM, Ankit Kasliwal
kasliwalankit2...@gmail.com wrote:
 Sorry Mark i mean to say that i don't have user name and password
 of client FTP so is any way to upload file over FTP without asking
 user name and password.

Usually, you need an FTP username and password to perform an FTP
upload. If the user is the only one who knows the username and
password, you have to ask the user for the username and password, by
definition.

I repeat, this has nothing to do with Android.

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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

2011-07-21 Thread Ankit Kasliwal
ok mark thanks!!!

On Thu, Jul 21, 2011 at 5:38 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, Jul 21, 2011 at 8:05 AM, Ankit Kasliwal
 kasliwalankit2...@gmail.com wrote:
  Sorry Mark i mean to say that i don't have user name and password
  of client FTP so is any way to upload file over FTP without asking
  user name and password.

 Usually, you need an FTP username and password to perform an FTP
 upload. If the user is the only one who knows the username and
 password, you have to ask the user for the username and password, by
 definition.

 I repeat, this has nothing to do with Android.

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

 Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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




-- 

Thanks and Regards,

Ankit Kasliwal
kasliwalankit2...@gmail.com
+91-9300-940-136

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

2011-07-21 Thread lbendlin
even if it was sent successfully there is no guarantee that it reaches the 
intended recipients. I'd second Mark's statement - get rid of the 
requirement.

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

2011-07-21 Thread Navindian
I have developed u.i with spinner a button. When I click on a button I wish
to set one of the items available in the spinners list. I tried with
setselection, but there is no effect.any ideas?

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

[android-developers] Detecting touch in TableView

2011-07-21 Thread RLScott
I need to make a table of 12 rows and 7 columns contained in a scroll
view.  That I can do.  But in addition I want to be able to detect a
touch on any cell and dynamically alter the appearance of that cell
(sort of like a Select).  I know that table views do not support
selection like a list view does.  But I would like to implement my own
Select functionality in this scrolling table by changing the
background color of the selected cell.  That I also know how to do,
once I figure out how to detect the touch.  One problem might be that
the user needs to touch the cells in order to affect a scroll.  That
is OK in my app if the touched cell also gets selected in the
process.  But in the iPhone I was able to implement this same
scrolling selectable table and the iOS was able to distinguish between
a touch for scrolling purposes and a touch that did not scroll.  So
scrolling the table did not result in a select of the cell being
touched.   But as I said it would be OK if I can't make that
distinction in Android.  I just want to know what API I can use to
detect a touch in any cell of a scrolling table view.

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

2011-07-21 Thread Ganesh
Dear experts,

Do you have any inputs on my queries?

Thanks,
Ganesh

On Jul 20, 5:28 am, Ganesh ganesh.vija...@gmail.com wrote:
 Dear Experts,

 In case of video recording, there would be 3 major players in the flow
 graph i.e.CameraSource,Encoderencapsulated as an OMXCodec
 component and MPEG4 Writer. I am referring to the one the latest
 versions of code from android GIT and I have this doubt.

 - Each of these components read data from the predecessor through
 mSource-read.

 - MPEG4 Writer spawns off separate threads for writing tracks.

 - However, I couldn't observe that CameraSource and OMXCodec are
 running in different threads. From my current understanding, I presume
 that both of these components run in same thread, probably in a
 sequential manner.

 Hence, my doubts are:

 1) Is my current understanding correct or have I missed out any detail/
 implementation related to threads?

 2) Since the default implementation is a stub, is it expected/assumed
 that theCameraHAL implementation would implement a thread of it's
 own, thereby decoupling the capture from the OMXCodec in terms of
 picture capture.

 Please help me to correct my misunderstandings. Thanks for your help.

 Best Regards,
 Ganesh

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

2011-07-21 Thread TreKing
On Thu, Jul 21, 2011 at 2:05 AM, arun kumar arun.kata...@gmail.com wrote:

 i read the documents but not understanding how to code


Sorry, but if you don't know how to code, you're not going to get very far.
Learn to code in Java, then go back to the documentation and see how the
relevant functions / classes are used. Then come back here if you have
specific questions.

Good luck.

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

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

Re: [android-developers] Android Market signup problems...

2011-07-21 Thread TreKing
On Wed, Jul 20, 2011 at 2:52 PM, Kris Ar
battery.upgrade.andr...@gmail.comwrote:

 But when I login to my account it says Your Registration to the Android
 Market is still being processed.  It's been almost a day.  Is this typical?


http://www.google.com/search?q=Your+Registration+to+the+Android+Market+is+still+being+processed.;http://www.google.com/search?q=%22Your+Registration+to+the+Android+Market+is+still+being+processed.%22


 Is there an actual support email I can contact to learn more about my
 status?


No. See the bottom links:
http://www.google.com/support/androidmarket/developer/bin/answer.py?answer=136601hl=en

-
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 do you add an item in a list if a user presses yes button in an alert dialog box and don't add it if he presses no

2011-07-21 Thread Arif Nadeem
Hello everyone, I am making an app in which if a user selects a
submenu item I pop up an Alert dialog which asks his confirmation
whether he wishes to save that item in his list and saves it if he
presses yes and doesn't add it if he presses no.

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


Re: [android-developers] how do you add an item in a list if a user presses yes button in an alert dialog box and don't add it if he presses no

2011-07-21 Thread TreKing

 how do you add an item in a list if a user presses yes button in an alert
 dialog box and don't add it if he presses no


This is very vague ... so ... um ... do exactly what you describe. If you
have a better explanation of which part of this you're actually stuck on,
you'll likely get better help.

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

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

Re: [android-developers] Parameters passed to a .NET webservice are always null when using ksoap2 jar

2011-07-21 Thread TreKing
On Wed, Jul 20, 2011 at 9:12 PM, Shabu Thomas shabuthoma...@gmail.comwrote:

 Would you please give me a better solution for this?


I think you need to try a group or forum for SOAP or .Net web services.

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

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

Re: [android-developers] Spinner value on button click

2011-07-21 Thread TreKing
On Wed, Jul 20, 2011 at 2:52 PM, Igor Barros igorsmag...@gmail.com wrote:

 Is it possible to return a spinner selected value only when I click in a
 button in the same activity, instead of using the OnItemSelected() method?


Yes.


 Could you tell me how to proceed with it?


Read the docs for both Spinner and Button. There are functions to do exactly
what you describe.

-
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] Tmp folder max size?

2011-07-21 Thread Hugo M
Hi, what is the max size of tmp files I can create in an application? I have
a viewer with encrypted images, and I want to have a thread that stores
unencrypted images in the temp folder. There's a max size?

Regards!

Hugo

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

[android-developers] hi my name is vinodh

2011-07-21 Thread vinodh venkatesh
we have one frame work called DAB ... we need in port it in Android
platform is it 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


Re: [android-developers] Tmp folder max size?

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 10:00 AM, Hugo M ham1...@gmail.com wrote:
 Hi, what is the max size of tmp files I can create in an application?

As big as free space supports. There's probably some multi-GB upper
bound somewhere due to the underlying file system, but you should not
be creating files anywhere near that size.

 I have
 a viewer with encrypted images, and I want to have a thread that stores
 unencrypted images in the temp folder.

There is no temp folder. There is a cache folder.

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

Android Training...At Your Office: http://commonsware.com/training

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

2011-07-21 Thread TreKing
On Thu, Jul 21, 2011 at 7:57 AM, Navindian navind...@gmail.com wrote:

 When I click on a button I wish to set one of the items available in the
 spinners list.


What do you mean set one of the items available ?


 I tried with setselection, but there is no effect.any ideas?


Code?

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

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

[android-developers] Re: Detecting touch in TableView

2011-07-21 Thread RLScott

I think I figured it out.  I have to set an onTouch listener for each
and every view that is a cell in the table.  One listener will suffice
since the view is a parameter and I can tell which cell was touched
through that.

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


[android-developers] What layout the normal 2.3 WVGA 800x480 emulator use?

2011-07-21 Thread Zwiebel
Hello,

I have a program what looks like good on my HVGA emulator, everything
is fine with it (however I don't know why it is use the hdpi drawable,
when I have layout-normal-mdpi file too, with drawable-layout-mdpi
file too.), but I don't know what the 2.3 WVGA 800x480 emulator use? I
made a layout-normal-hdpi, layout-hdpi, layout-mdpi files too, but
there aren't any layout in them , what I can see in the emulator. I
tried to modify all of my layouts, but nothing was good. It's use the
mdpi files, while I want to use the hdpi drawables. What's the
problem? How can I control it?

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: Detecting touch in TableView

2011-07-21 Thread RLScott
Actually the OnClickListener turned out to be exactly what I wanted.
It distinguishes between a scroll touch and a selection touch.

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

2011-07-21 Thread nemik
Great job Fernando! Thank you for sharing your diff on this, it's
fantastic news.

On Jul 19, 5:48 am, Fernando Miguélez Palomo
fernando.migue...@gmail.com wrote:
 I got it working on 2.3.4_r1!!!

 The key was enabling discoverability but in card emulation mode. The strange
 thing is now I can detect two smart card types with an Arcontia smart card
 reader:

    - ISO14443A tag CL1 tag (This is the Mifare 4K)
    - FELICA RCS-885 424kbs tag (I suppose this is really the Javacard, not a
    Felica card)

 I managed to write and read a block (4) to the Mifare 4K with default keys.
 Next thing will be investigating wheter 2.3.4 adds support by means of
 nxp-nfc library to directly send APDUs to the SE. You and Michael Roland
 already confirmed it was not possible with prior gingerbread versions.

 I post the corrected patch to get card emulation on 2.3.4_r1.

 One thing. Card stops being readable from an external reader after screen
 goes off and back on. However if you disable NFC and re-enable it (from
 settings) card is discoverable again.

 Thanks nemik for your work (you can update your patches with these
 corretions to work with gingerbread 2.3.4_r1 at your site if you want).

  Nfc-app-2_3_4_r1.diff
 31KViewDownload

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

2011-07-21 Thread Kostya Vasilyev
You are not calling getWritableDatabase (a method inherited by your helper
class). Hence, the db never gets created.

Might be a good idea to separate addEmployee, etc., into another class, so
you have more clear separation between opening/creating the database vs.
performing data operations with it

--
Kostya Vasilyev
19.07.2011 16:32 пользователь kirti waykole kirti.carr...@gmail.com
написал:
 hello all,
 I am new in android . I have problem with database. Plz see the below
code.
 database is not creating. Plz help me
 thanksin advance

 this is my dBHelper class

 package com.example.android;



 import android.content.ContentValues;
 import android.content.Context;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 import android.database.sqlite.SQLiteOpenHelper;




 public class DBHelper extends SQLiteOpenHelper {

 static final String dbName=demoDB;
 static final String employeeTable=Employees;

 static final String colName=EmployeeName;
 String colDeptID = EmployeeID;
 static final String viewEmps=ViewEmps;


 public DBHelper(Context context) {
 super(context, dbName, null,33);

 // TODO Auto-generated constructor stub
 }

 @Override
 public void onCreate(SQLiteDatabase db) {
 // TODO Auto-generated method stub


 db.execSQL(CREATE TABLE +employeeTable+ (+colDeptID+  INTEGER
 PRIMARY KEY , +
 colName+  TEXT));



 }

 @Override
 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
 {
 // TODO Auto-generated method stub

 db.execSQL(DROP TABLE IF EXISTS +employeeTable);
 //db.execSQL(DROP TABLE IF EXISTS +deptTable);

 db.execSQL(DROP TRIGGER IF EXISTS dept_id_trigger);
 db.execSQL(DROP TRIGGER IF EXISTS dept_id_trigger22);
 db.execSQL(DROP TRIGGER IF EXISTS fk_empdept_deptid);
 db.execSQL(DROP VIEW IF EXISTS +viewEmps);
 onCreate(db);
 }

 void AddEmployee(String name)
 {


 SQLiteDatabase db= this.getWritableDatabase();


 ContentValues cv=new ContentValues();

 cv.put(colName,name);

 db.insert(employeeTable, colName, cv);
 db.close();


 }

 int getEmployeeCount()
 {
 SQLiteDatabase db=this.getWritableDatabase();
 Cursor cur= db.rawQuery(Select * from +employeeTable, null);
 int x= cur.getCount();
 cur.close();
 return x;
 }

 Cursor getAllEmployees()
 {
 SQLiteDatabase db=this.getWritableDatabase();



 //Cursor cur= db.rawQuery(Select +colID+ as _id , +colName+,
 +colAge+ from +employeeTable, new String [] {});
 Cursor cur= db.rawQuery(SELECT * FROM +viewEmps,null);
 return cur;

 }


 }




 this is my Activity class..

 package com.example.android;

 import android.app.Activity;
 import android.app.Dialog;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.text.Spannable;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.SimpleCursorAdapter;
 import android.widget.TextView;

 public class TryActivity extends Activity
 {
 EditText txtName;

 TextView txtEmps;
 DBHelper dbHelper;
 //Spinner spinDept;

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

 txtName=(EditText)findViewById(R.id.nametext);
 txtEmps=(TextView)findViewById(R.id.text);

 }

 @Override
 public void onStart()
 {
 try
 {
 super.onStart();
 dbHelper=new DBHelper(this);


txtEmps.setText(txtEmps.getText()+String.valueOf(dbHelper.getEmployeeCount()));

 }


 //never close cursor

 catch(Exception ex)
 {
 CatchError(ex.toString());
 }
 }

 public void btnAddEmp_Click(View view)
 {
 boolean ok=true;
 try
 {
 Spannable spn=txtName.getText();
 String name=txtName.getText().toString();

 dbHelper.AddEmployee(name);

 }
 catch(Exception ex)
 {
 ok=false;
 CatchError(ex.toString());
 }
 finally
 {
 if(ok)
 {
 //NotifyEmpAdded();
 Alerts.ShowEmpAddedAlert(this);
 txtEmps.setText(Number of employees
 +String.valueOf(dbHelper.getEmployeeCount()));
 }
 }
 }

 void CatchError(String Exception)
 {
 Dialog diag=new Dialog(this);
 diag.setTitle(Add new Employee);
 TextView txt=new TextView(this);
 txt.setText(Exception);
 diag.setContentView(txt);
 diag.show();
 }

 void NotifyEmpAdded()
 {
 Dialog diag=new Dialog(this);
 diag.setTitle(Add new Employee);
 TextView txt=new TextView(this);
 txt.setText(Employee Added Successfully);
 diag.setContentView(txt);
 diag.show();
 try {
 diag.wait(1000);
 } catch (InterruptedException e) {
 // TODO Auto-generated catch block
 CatchError(e.toString());
 }
 diag.notify();
 diag.dismiss();
 }
 }

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

[android-developers] Re: Bet practice for determining when a Service has done its work.

2011-07-21 Thread darrinps
Thanks. That's all I needed to make it click.

For those searching after the fact, what I did was rework the service
so I could bind to it instead of simply starting it. In my Service I
ended up with

privatefinal IBinder   binder = new AutoLoginBinder();
private  ICallback mCallback;

public class AutoLoginBinder extends Binder
{
public AutoLoginService getService()
{
return AutoLoginService.this;
}

public void setCallback(ICallback callback)
{
mCallback = callback;
}

public void doWork()
{
//work I need to do
}
}


private void stop()
{
if(mCallback != null)
{
Log.v(TAG, Invoking callback);
mCallback.callback();
}

stopSelf();
}

@Override
public IBinder onBind(Intent intent)
{
return binder;
}

In my client I implement ICallback and add a method to do what I need
done and create a ServiceConnection like this:

private ServiceConnection getServiceConnection()
{
return new ServiceConnection()
{
@Override
public void onServiceConnected(ComponentName name, 
IBinder
service)
{
serviceBinder =
((AutoLoginService.AutoLoginBinder)service).getService();


((AutoLoginService.AutoLoginBinder)service).setCallback(PrimeData.this);

((AutoLoginService.AutoLoginBinder)service).doWork();
}

@Override
public void onServiceDisconnected(ComponentName arg0)
{
serviceBinder = null;
}
};


I prime it in my client like this:

Intent intent = new Intent(this, AutoLoginService.class);

mConnection = getServiceConnection();

bindService(intent, mConnection, Context.BIND_AUTO_CREATE);


Thanks again. Hopefully this helps some other folks!


On Jul 20, 4:51 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jul 20, 2011 at 5:38 PM, darrinps darri...@gmail.com wrote:
   I don't see any way to register for a callback which was what I was 
   hoping
   for.

  That's pretty much the point of the LocalService example ... your activity
  has a reference to the Service and can do what it wants with it, including
  registering a custom callback that the Service invokes when it's done.

  I understand the reference, but I don't see any where in the example
  where any custom callback is done, and I don't see anything clear in
  the API on how to do that.

 The LocalService sample uses the binding pattern.

 In the binding pattern, you supply a Binder implementation, with your
 own custom API. If you want that Binder to accept some sort of
 listener as a parameter, you can implement that yourself. If you want
 your Service to call that listener when an event occurs, you can
 implement that yourself.

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

 Android Training...At Your Office:http://commonsware.com/training

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


[android-developers] Small screens and HDPI

2011-07-21 Thread Alex
Hey, I have recently come across a situation where drawable-hdpi
resources on a small-screen, hdpi device look terrible. I would like
to force smallscreen devices to use mdpi resources.

Copying (or resizing) all the pertinent drawables from /drawable-mdpi
to /drawable-small causes too much APK size inflation to justify, and
it would be *another* item in the resource maintenance hassle.

My first idea was to create xml reference files in /drawable-small
that reference the drawable-mdpi resources, but i dont know how to
hard-link to a specific resolution's (in this case mdpi) drawable
via the @drawable/ syntax.

Whats my way out?

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

2011-07-21 Thread rich friedel
Maybe...

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

[android-developers] MediaRecorder Padding

2011-07-21 Thread Matthew Powers
Does anyone else see, when using the MediaRecorder, that anywhere from .5 to
1 second of whitespace is injected before the start of the recording? When I
start a recording, stop a recording and playback there seems to be this
whitespace delay injected into the recording.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: What layout the normal 2.3 WVGA 800x480 emulator use?

2011-07-21 Thread rich friedel
You mention creating the files... did you put them in their respective 
directories? The directories that house your drawables have to be named 
specifically. e.g. drawable-hdpi, drawable-mdpi, etc... Also your xml layout 
files can be named anything.

My understanding is this... the system will determine which drawables to use 
by using the screen resolution and then using the appropriate drawables 
defined by the directory they are located in. Your layout will usually stay 
the same, thus you should use dip/dp so that your layout scales properly.

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

[android-developers] Yawn...active installs still broken

2011-07-21 Thread Jim Graham
The lite version of my new app is showing 4 installs, 0 active
installs.  I KNOW that 2 of those installs are active installs.
And I've been suspicious of the numbers I've been seeing on my
totally unsuccessful (as I was advised might well be the case)
photography app (too many coincidences in how the numbers
varied---I posted about that back then).

So, it looks like active installs was never fixed.  Is anyone
surprised by this?

Later,
   --jim

-- 
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W
Point Lobos Photography Set 1 (Photo-posters):  http://jdgapps.com
 No, I'm not going to explain it.  If you can't figure it
 out, you didn't want to know anyway...  --Larry Wall

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

2011-07-21 Thread rich friedel
I'm with treking and mark... It is just not worth the headache ATM. 
My philosophy is that if corporations such as Adobe, Microsoft, etc.., who 
are (collectively) way more badass than I am (individually) cannot secure 
their software then I don't have an ice cube's chance in hell of doing it 
either.

Now this is not to say that if they fixed LVL up and made it less 
cumbersome, thus less effort in applying it, I wouldn't consider it as a 
viable option. Kinda like a lock... it's only there to keep honest people 
honest ;)

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

[android-developers] Layout problem with TextView on RelativeLayout

2011-07-21 Thread Tony Farag

Hi all,
I have a question related to layout of a textView on top of a
RelativeLayout.  I have the background layout set to a 9-patch image.
When I do set it to a 9 patch image, the text in the textviews is
drawn vertically.  If all I do is change the background image from a 9-
patch to a regular image, then the text is drawn horizontally as
expected...

This snippet is within a larger portion, but everything else in the
layout is working, so I suspect it's something here.

Any help would be greatly appreciated, as I've been fighting this for
a couple hours now :(  Thank you

Snippet of layout
RelativeLayout android:layout_width=match_parent
android:layout_height=wrap_content android:id=@+id/relativeLayout1
android:background=@drawable/messagebox
TextView android:textColor=@color/my_black
android:layout_width=match_parent android:layout_marginTop=15dip
android:id=@+id/MyVideoMsgFromTextView
android:layout_marginLeft=25dip android:layout_height=20dip
android:text=TextView android:layout_marginRight=25dip/TextView
TextView android:layout_width=match_parent
android:layout_marginTop=15dip android:id=@+id/MyVideoMsgTextView
android:layout_marginLeft=25dip android:layout_height=wrap_content
android:text=TextView android:layout_marginRight=25dip
android:layout_below=@+id/MyVideoMsgFromTextView/TextView
/RelativeLayout

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 convert the raw data from Camera.takepicture(shutter, raw,jpeg) to Bitmap?

2011-07-21 Thread dilo.mt
byte[] tempdata = ur byte array;
Bitmap bm = BitmapFactory.decodeByteArray(tempdata, 0,
tempdata.length);

On Jul 20, 10:08 pm, musfiq musfiqu...@gmail.com wrote:
 Hi:
 I want to find the faces in an image after taking picture. I want to
 use the Facedetetor.findfaces(...,); But for that I need Bitmap
 file. How to convert byte [] to bitmap?
 /Musfiq

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Parameters passed to a .NET webservice are always null when using ksoap2 jar

2011-07-21 Thread dilo.mt
use soap ui application to get a good idea about how the web server
handle the request and respose.

On Jul 21, 3:12 am, Shabu Thomas shabuthoma...@gmail.com wrote:
 Hi, I tried to call a .NET web service from a sample application using
 KSOAP2. I could successfully call a web service method without any
 parameter. But, even if I set a valid value to a string
 parameter, .NET service takes it as null. Let me give the code sample.

 private static final String SOAP_ACTION = http://www.webservicex.net/
 GetGeoIP;
 private static final String METHOD_NAME = GetGeoIPResult;
 private static final String NAMESPACE = http://www.webserviceX.NET/;;
 private static final String URL = http://www.webservicex.net/
 geoipservice.asmx;
 private Object resultRequestSOAP = null;

 .

                     SoapObject request = new SoapObject(NAMESPACE,
 METHOD_NAME);

                     String ipVal = 10.0.0.15;

                     PropertyInfo p = new PropertyInfo();
                     p.name = IPAddress;
                     //p.setType(PropertyInfo.STRING_CLASS);
                     p.setValue(ipVal);

                    request.addProperty(p);

                    SoapSerializationEnvelope envelope = new
 SoapSerializationEnvelope(SoapEnvelope.VER11);
                    envelope.encodingStyle = SoapEnvelope.ENC;
                    envelope.dotNet = true;
                    envelope.setOutputSoapObject(request);

                    //envelope.implicitTypes = true;
                   // envelope.setAddAdornments(false);

                    HttpTransportSE androidHttpTransport = new
 HttpTransportSE(URL);
                    androidHttpTransport.setXmlVersionTag(?xml version=
 \1.0\ encoding=\UTF-8\?);
                    try
                    {

                             androidHttpTransport.call(SOAP_ACTION, envelope);
                             //tv.setText(The Start);
                        resultRequestSOAP =
 (Object)envelope.getResponse();
                        result = resultRequestSOAP.toString();

                    }
                    catch (Exception aE)
                    {
                            //tv.setText(aE.toString());
                        aE.printStackTrace ();;
                        result = aE.toString();
                   }

 I have searched a lot of blogs and none of them have give a proper
 solution better than what I have done. Would you please give me a
 better solution for this?

 Thanks  Regards
 Shabu Thomas

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


Re: [android-developers] How to know SoundPool play completed?

2011-07-21 Thread Leigh McRae
I don't think there is anything.  Best solution is to measure the sound 
clip duration (likely off line) and then poll or make a timer.


Leigh

On 7/20/2011 6:08 AM, Tim wrote:

Guys,

Just want to got callback after SoundPool played a sound. But
unfortunately, I found the SoundPool.play() is asynchronized ... and
no oncomplete listener like mediaplayer ... Any good idea?

-- Tim



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


[android-developers] Does anyone at Google read bug reports?

2011-07-21 Thread Peter Eastman
I've been developing for Android for about a year and a half.
Whenever I encounter a problem, I dutifully file a bug report.  I'm
now up to about a dozen.

Every single one of my reports is still listed as New in the bug
tracker, even the ones filed a full 18 months ago.  Not a single one
of them has been fixed, closed, or even had anyone from Google add a
comment to it.  This is very discouraging.

Does anyone who works on the OS actually read bug reports?  Or am I
just wasting my time, throwing them into a black hole?  I want to help
improve the OS, which is why I take the time to file bug reports, but
my experiences so far haven't encouraged me to keep doing it.

Peter

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


[android-developers] Sorting Sqlite data while display

2011-07-21 Thread saurabh kulkarni
Hi
I have date(TEXT) column in db.I want to display dates in ascending
order(i.e. group by date).but according to current date.
i.e dates greator or equal than current date should be displayed first
and past dates should get appended at last in listview automatically.I
used SimpleCursorAdapter to display list.

So how should I do this?

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


Re: [android-developers] Does anyone at Google read bug reports?

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 2:20 PM, Peter Eastman peter.east...@gmail.com wrote:
 I've been developing for Android for about a year and a half.
 Whenever I encounter a problem, I dutifully file a bug report.  I'm
 now up to about a dozen.

Match you, raise you 43.

 Every single one of my reports is still listed as New in the bug
 tracker, even the ones filed a full 18 months ago.  Not a single one
 of them has been fixed, closed, or even had anyone from Google add a
 comment to it.  This is very discouraging.

It's also not terribly shocking. A bunch of mine are Assigned,
Released, FutureRelease, and similar statuses, but there are vast
quantities of issues still in New, including the majority of mine.

 Does anyone who works on the OS actually read bug reports?

Yes. However, b.android.com is not the issue tracker of record -- an
internal one is. Hence, I am sure that there are some issues that are
being addressed but b.android.com has not been updated. And I am sure
there are plenty of issues that are largely being ignored, for
whatever reason.

 Or am I just wasting my time, throwing them into a black hole?

It's not a black hole, but if you're expecting feedback, you're liable
to be disappointed.

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

_Android Programming Tutorials_ Version 3.5 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] application not lauching on simulator when using google map api Installation error: INSTALL_FAILED_MISSING_FEATURE

2011-07-21 Thread Amit Mangal
Hi Everyone,

I want to load google map in my app. Steps i did

1) I generated google map key
2)Added google map key in xml file
3)In manifest file i added permissions for map loading

Problem is when i use uses-library android:name=com.google.android.maps
/ inside the application tag of manifest.xml i get error

Installation error: INSTALL_FAILED_MISSING_FEATURE
Please check logcat output for more details.
Launch canceled!

NOTE : Please don't tell
Your device or emulator lacks Google Maps. If this is the emulator, it
needs to be one whose target name includes Google APIs in it.

cause same code i ran separately on same emulator and same key that code was
loading google map. I have many things in my xml file what could be the
reason of this same code loading google map in sample code but when i add in
project i get error after adding uses-library
android:name=com.google.android.maps /.

Many thanks in advance

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

Re: [android-developers] Does anyone at Google read bug reports?

2011-07-21 Thread Amit Mangal
Boss if you are looking for quality then iphone is the best options .
Symbian Android winphone 7 these are only sand storm they come and go.

you cant get quality in android . android come up and after some time finish
like symbian so don worry about that.


thanks

On Thu, Jul 21, 2011 at 11:50 PM, Peter Eastman peter.east...@gmail.comwrote:

 I've been developing for Android for about a year and a half.
 Whenever I encounter a problem, I dutifully file a bug report.  I'm
 now up to about a dozen.

 Every single one of my reports is still listed as New in the bug
 tracker, even the ones filed a full 18 months ago.  Not a single one
 of them has been fixed, closed, or even had anyone from Google add a
 comment to it.  This is very discouraging.

 Does anyone who works on the OS actually read bug reports?  Or am I
 just wasting my time, throwing them into a black hole?  I want to help
 improve the OS, which is why I take the time to file bug reports, but
 my experiences so far haven't encouraged me to keep doing it.

 Peter

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

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

2011-07-21 Thread Romain Guy
We do look at bug reports yes. Thanks for taking the time to file them!

On Thu, Jul 21, 2011 at 11:48 AM, Amit Mangal
forum.amit.man...@gmail.comwrote:

 Boss if you are looking for quality then iphone is the best options .
 Symbian Android winphone 7 these are only sand storm they come and go.

 you cant get quality in android . android come up and after some time
 finish like symbian so don worry about that.


 thanks

 On Thu, Jul 21, 2011 at 11:50 PM, Peter Eastman 
 peter.east...@gmail.comwrote:

 I've been developing for Android for about a year and a half.
 Whenever I encounter a problem, I dutifully file a bug report.  I'm
 now up to about a dozen.

 Every single one of my reports is still listed as New in the bug
 tracker, even the ones filed a full 18 months ago.  Not a single one
 of them has been fixed, closed, or even had anyone from Google add a
 comment to it.  This is very discouraging.

 Does anyone who works on the OS actually read bug reports?  Or am I
 just wasting my time, throwing them into a black hole?  I want to help
 improve the OS, which is why I take the time to file bug reports, but
 my experiences so far haven't encouraged me to keep doing it.

 Peter

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


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




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

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

[android-developers] Listview oddity with imageview

2011-07-21 Thread Simon Platten
I have a listview with each item defined as:

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

 android:layout_height=?android:attr/listPreferredItemHeight
 android:padding=10dp
LinearLayout android:id=@+id/llHeader
  android:background=@color/blue
  android:orientation=vertical
  android:layout_alignParentTop=true
  android:layout_width=fill_parent
  android:layout_height=fill_parent 
CheckBox android:id=@+id/chkUse
 android:text=File-name
  android:textColor=@color/yellow
  android:textStyle=bold
 android:layout_width=fill_parent
 android:layout_height=wrap_content
  android:layout_gravity=left /
/LinearLayout
ImageView android:id=@+id/ivthumbNail
  android:src=@drawable/placeholder
  android:layout_centerHorizontal=true
  android:layout_below=@+id/llHeader
  android:layout_width=fill_parent
  android:layout_height=fill_parent /
ImageButton android:id=@+id/btnCCW
 android:src=@drawable/ccw_rotate_btn
android:layout_alignLeft=@+id/llHeader
   android:layout_below=@+id/llHeader
 android:layout_width=48dip
android:layout_height=48dip /
ImageButton android:id=@+id/btnCW
 android:src=@drawable/cw_rotate_btn
android:layout_alignRight=@+id/llHeader
android:layout_below=@+id/llHeader
 android:layout_width=48dip
android:layout_height=48dip /
/RelativeLayout


This gives a title / checkbox, under this is an imageview with a button
either side of it.  With the buttons I can rotate the image clockwise or
counter clockwise by 90 degrees, the routine that performs the rotation and
scaling of the images:

public Bitmap scaleAndRotateImage(boolean blnShow) {
try{
BitmapFactory.Options bfo = new BitmapFactory.Options();
bfo.inSampleSize = 4;
Bitmap bmpData = BitmapFactory.decodeFile(m_strFilename,
bfo);

if ( m_intOriginalWidth == 0  m_intOriginalHeight == 0 ) {
m_intOriginalWidth = bmpData.getWidth();
m_intOriginalHeight = bmpData.getHeight();
int intScaledWidth = clsWallpaper.m_intScrWidth;
float fltAspectRatio = (float)bmpData.getHeight() /
(float)bmpData.getWidth();
int intScaledHeight = (int)((float)intScaledWidth *
fltAspectRatio);
m_fltScaleWidth = ((float)intScaledWidth) /
((float)m_intOriginalWidth);
m_fltScaleHeight = ((float)intScaledHeight) /
((float)m_intOriginalHeight);
}
// Apply the scale to the matrix
Matrix mtx = new Matrix();
mtx.postScale(m_fltScaleWidth, m_fltScaleHeight);
// Apply the rotation angle to the matrix
mtx.postRotate(m_intTotalAngle);
// Get the scaled and maybe rotated version of the bitmap
Bitmap bmpScaled = Bitmap.createBitmap(bmpData,
0, 0,
m_intOriginalWidth,
m_intOriginalHeight,
mtx, true);
if ( blnShow == true  bmpScaled != null ) {
m_drwThumbnail = new BitmapDrawable(bmpScaled);
Activity a = (Activity)m_ivThumbnail.getContext();
a.runOnUiThread(updateThumbnail);
}
return bmpScaled;
} catch( Exception ex ) {
Log.e( TAG, rotateThumbnail, ex );
}
return null;
}

The strange this is when the image is rotated the scaled version is smaller
than it is supposed to be, if I scroll the listview so the item goes out of
view then scroll it back into view the item comes back with the image of the
correct size.  Is they're anything I can do about this?
-- 
Regards,
Sy

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

2011-07-21 Thread Jan Nielsen
I dont think there is any other programs requesting GPS, I have
navigation app, but not running when I tested my app.

I only request the update one place and before that I remove any
registered listeners.

LocationManager mlocManager =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);
mlocManager.removeUpdates(this);
mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER,
delay * 60 * 1000, 25000, this);

I have also tried Float.MAX_VALUE and 0 for the distance, with same
result.
Maybe the GPS system needs to be awake often when moving, to estimate
the speed more precisely, and the underlaying software handles that.

I handle the extra calls in software, and only send if 60seconds have
passed, but I guess it could have an effect on battery, if the phone
moves alot.



On 21 Jul., 14:02, lbendlin l...@bendlin.us wrote:
 Is your app the only one consuming the GPS? Did you maybe register another
 listener?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] What layout the normal 2.3 WVGA 800x480 emulator use?

2011-07-21 Thread Dianne Hackborn
On Thu, Jul 21, 2011 at 7:43 AM, Zwiebel hunzwie...@gmail.com wrote:

 I have a program what looks like good on my HVGA emulator, everything
 is fine with it (however I don't know why it is use the hdpi drawable,
 when I have layout-normal-mdpi file too, with drawable-layout-mdpi
 file too.),


layout-normal-mdpi is really wrong.  drawable-layout-mdpi shouldn't even
compile.

First.

*Always* have a default resource.  So you should have a layout/foo.xml file.
 This is the basic layout of your app.  The one that will be used if nothing
else matches the device.

Second.

Layouts care about screen size, drawables care about screen density.  If you
have a resource that selects both a screen size and density (-normal-mdpi)
there is a 99.9% chance this is not what you want.

So if you want to have an alternative layout for tablet screens, in addition
to your layout/foo.xml, you would have a layout-xlarge/foo.xml.

Third.

Densities are for bitmaps.  They are used to select between different
alternative bitmaps that are available.  The platform assumes that if it
doesn't have a matching resource for a particular density, it can pick
another and it will be scaled appropriately.  If what you are selecting is
not a bitmap then it can't actually be scaled and you can end up with
resources being used that you don't want.

So if you want to have two different bitmaps one for mdpi and one for hdpi
screens, they would be drawable-mdpi/icon.png and drawable-hdpi/icon.png.

Note also that densities are the one exception to our rule always have a
default resource -- because we assume we can scale densities, some density
will always match no matter what the screen is, so they can all serve as
defaults.

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

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

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

[android-developers] calling a client side java method from a webview html button

2011-07-21 Thread sabanim
cross post url:http://stackoverflow.com/questions/6781613/calling-a-
client-side-java-method-from-server-side-html-button

Ok In an android vebview I have a java method. Is it possible that
when a button on the web page being viewed is hit to call that method?
If so can you point me in the right direction?

I have done this in all java-script but now my method is in java.
Unless there is a way to convert the java method to java-script. I
don't know just rambling there.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] calling a client side java method from a webview html button

2011-07-21 Thread Miguel Morales
http://developer.android.com/guide/webapps/webview.html

On Thu, Jul 21, 2011 at 12:31 PM, sabanim rickd...@gmail.com wrote:
 cross post url:http://stackoverflow.com/questions/6781613/calling-a-
 client-side-java-method-from-server-side-html-button

 Ok In an android vebview I have a java method. Is it possible that
 when a button on the web page being viewed is hit to call that method?
 If so can you point me in the right direction?

 I have done this in all java-script but now my method is in java.
 Unless there is a way to convert the java method to java-script. I
 don't know just rambling there.

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



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 a service to either return a string or start a function in main activity?

2011-07-21 Thread Fred Niggle
Hello,

Thanks for taking the time to read this.

I've been on this for some time and have only recently mastered
service... or so I thought.

I found a tutorial about services at
http://marakana.com/forums/android/examples/60.html and
http://android-er.blogspot.com/2010/10/simple-example-of-alarm-service-using.html

however, my goal is to start a service which sets an alarm, and when
the alarm fires the onStart() event I wish to display another screen
(e.g. anothermain.xml)

In another  of the tutorials I found there is a secction at the foot
of the service class which defines an interface:

public interface HardButtonListener {
void onPrevButtonPress();
void onNextButtonPress();
void onPlayPauseButtonPress();
}

So it seems to me that the service can 'fire' either of the events
back in the activity, but how do I go about setting this up (the more
i google the more confused i become)?

Thanks for any help you can provide,
Fred

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


Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 4:25 PM, Fred Niggle fred.nig...@googlemail.com wrote:
 however, my goal is to start a service which sets an alarm, and when
 the alarm fires the onStart() event I wish to display another screen
 (e.g. anothermain.xml)

That's a trifle unusual. It would make sense, as a user-chosen option,
if the app is an alarm clock. Generally, services should not be
starting activities, since you don't know what the user is doing at
the time, and the user may not appreciate the interruption.

 In another  of the tutorials I found there is a secction at the foot
 of the service class which defines an interface:

 public interface HardButtonListener {
                void onPrevButtonPress();
                void onNextButtonPress();
                void onPlayPauseButtonPress();
        }

 So it seems to me that the service can 'fire' either of the events
 back in the activity, but how do I go about setting this up (the more
 i google the more confused i become)?

The way you would do that is via the binding pattern, which is not
available to you if you are using AlarmManager. Again, if you are
using AlarmManager, you have no idea whether your activity even
exists, let alone is in the foreground.

You may get more help if you explain what it is that you are trying to build.

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

_Android Programming Tutorials_ Version 3.5 Available!

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


[android-developers] Re: Listview oddity with imageview

2011-07-21 Thread Simon Platten
It doesn't do this in the emulator, but it does on my Sony X10 running 2.1

On Thu, Jul 21, 2011 at 7:54 PM, Simon Platten simonaplat...@googlemail.com
 wrote:

 I have a listview with each item defined as:

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

  android:layout_height=?android:attr/listPreferredItemHeight
  android:padding=10dp
 LinearLayout android:id=@+id/llHeader
   android:background=@color/blue
   android:orientation=vertical
   android:layout_alignParentTop=true
   android:layout_width=fill_parent
   android:layout_height=fill_parent 
 CheckBox android:id=@+id/chkUse
  android:text=File-name
   android:textColor=@color/yellow
   android:textStyle=bold
  android:layout_width=fill_parent
  android:layout_height=wrap_content
   android:layout_gravity=left /
 /LinearLayout
 ImageView android:id=@+id/ivthumbNail
   android:src=@drawable/placeholder
   android:layout_centerHorizontal=true
   android:layout_below=@+id/llHeader
   android:layout_width=fill_parent
   android:layout_height=fill_parent /
 ImageButton android:id=@+id/btnCCW
  android:src=@drawable/ccw_rotate_btn
 android:layout_alignLeft=@+id/llHeader
android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 ImageButton android:id=@+id/btnCW
  android:src=@drawable/cw_rotate_btn
 android:layout_alignRight=@+id/llHeader
 android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 /RelativeLayout


 This gives a title / checkbox, under this is an imageview with a button
 either side of it.  With the buttons I can rotate the image clockwise or
 counter clockwise by 90 degrees, the routine that performs the rotation and
 scaling of the images:

 public Bitmap scaleAndRotateImage(boolean blnShow) {
 try{
 BitmapFactory.Options bfo = new BitmapFactory.Options();
 bfo.inSampleSize = 4;
 Bitmap bmpData = BitmapFactory.decodeFile(m_strFilename,
 bfo);

 if ( m_intOriginalWidth == 0  m_intOriginalHeight == 0 ) {
 m_intOriginalWidth = bmpData.getWidth();
 m_intOriginalHeight = bmpData.getHeight();
 int intScaledWidth = clsWallpaper.m_intScrWidth;
 float fltAspectRatio = (float)bmpData.getHeight() /
 (float)bmpData.getWidth();
 int intScaledHeight = (int)((float)intScaledWidth *
 fltAspectRatio);
 m_fltScaleWidth = ((float)intScaledWidth) /
 ((float)m_intOriginalWidth);
 m_fltScaleHeight = ((float)intScaledHeight) /
 ((float)m_intOriginalHeight);
 }
 // Apply the scale to the matrix
 Matrix mtx = new Matrix();
 mtx.postScale(m_fltScaleWidth, m_fltScaleHeight);
 // Apply the rotation angle to the matrix
 mtx.postRotate(m_intTotalAngle);
 // Get the scaled and maybe rotated version of the bitmap
 Bitmap bmpScaled = Bitmap.createBitmap(bmpData,
 0, 0,
 m_intOriginalWidth,
 m_intOriginalHeight,
 mtx, true);
 if ( blnShow == true  bmpScaled != null ) {
 m_drwThumbnail = new BitmapDrawable(bmpScaled);
 Activity a = (Activity)m_ivThumbnail.getContext();
 a.runOnUiThread(updateThumbnail);
 }
 return bmpScaled;
 } catch( Exception ex ) {
 Log.e( TAG, rotateThumbnail, ex );
 }
 return null;
 }

 The strange this is when the image is rotated the scaled version is smaller
 than it is supposed to be, if I scroll the listview so the item goes out of
 view then scroll it back into view the item comes back with the image of the
 correct size.  Is they're anything I can do about this?
 --
 Regards,
 Sy




-- 
Regards,
Sy

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

2011-07-21 Thread Peter Sinnott


On Jul 21, 7:28 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jul 21, 2011 at 2:20 PM, Peter Eastman peter.east...@gmail.com 
 wrote:

  Does anyone who works on the OS actually read bug reports?

 Yes. However, b.android.com is not the issue tracker of record -- an
 internal one is. Hence, I am sure that there are some issues that are
 being addressed but b.android.com has not been updated. And I am sure
 there are plenty of issues that are largely being ignored, for
 whatever reason.

Seems a little silly to have 2 different bug trackers.
Giving the impression that the public tracker is ignored defeats the
point of having one.

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


[android-developers] Handwriting application

2011-07-21 Thread Jeremy Dagorn
Hi all,

Do you know if there is existent library, or if there is some native
methods in charge of handwriting for an application?
I have googled it but I don't find any efficient sources/indications
so if someone is aware of this kind of library, to give the
opportunity to the user to write with a stylus on the screen, and not
the keyboard, let me know!

Thank you,

Jérémy

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

2011-07-21 Thread Mark Murphy
If you are seeking an input method editor that supports writing-style
input, there's Graffiti, and perhaps others, on the Market. I am not
aware of any open source ones. Those are also things that end users
install, rather than something you integrate into your app.

Or are you looking for signature capture, handwriting recognition, or
something else?

On Thu, Jul 21, 2011 at 5:55 PM, Jeremy Dagorn jeremy.dag...@gmail.com wrote:
 Hi all,

 Do you know if there is existent library, or if there is some native
 methods in charge of handwriting for an application?
 I have googled it but I don't find any efficient sources/indications
 so if someone is aware of this kind of library, to give the
 opportunity to the user to write with a stylus on the screen, and not
 the keyboard, let me know!

 Thank you,

 Jérémy

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




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

_Android Programming Tutorials_ Version 3.5 Available!

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


Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Fred Niggle
Thank you for your prompt reply,
What I am writing is a meds reminder app, which has the option of
letting a career know if the app is not acknowledged and responded to.

The idea is that when the alarm event fires it triggered a sound
(alert) to be played (notify user to take meds), and if the alert is
not cancelled inside of a given time, then an sms is sent to inform
the carer.

I have most of the code nicely nailed down, except spawning a screen
or alert dialogue which has the Cancel button on it, and it is with
this matter that I seek help.

As you note in your reply, it is how to Bind the code from the
.alarmservice to trigger the alert dialogue or screen in which I am
lacking understanding and would hugely appreciate assistance.

Regards,
Fred



On 21/07/2011, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jul 21, 2011 at 4:25 PM, Fred Niggle fred.nig...@googlemail.com
 wrote:
 however, my goal is to start a service which sets an alarm, and when
 the alarm fires the onStart() event I wish to display another screen
 (e.g. anothermain.xml)

 That's a trifle unusual. It would make sense, as a user-chosen option,
 if the app is an alarm clock. Generally, services should not be
 starting activities, since you don't know what the user is doing at
 the time, and the user may not appreciate the interruption.

 In another  of the tutorials I found there is a secction at the foot
 of the service class which defines an interface:

 public interface HardButtonListener {
void onPrevButtonPress();
void onNextButtonPress();
void onPlayPauseButtonPress();
}

 So it seems to me that the service can 'fire' either of the events
 back in the activity, but how do I go about setting this up (the more
 i google the more confused i become)?

 The way you would do that is via the binding pattern, which is not
 available to you if you are using AlarmManager. Again, if you are
 using AlarmManager, you have no idea whether your activity even
 exists, let alone is in the foreground.

 You may get more help if you explain what it is that you are trying to
 build.

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

 _Android Programming Tutorials_ Version 3.5 Available!

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

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


Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 6:33 PM, Fred Niggle fred.nig...@googlemail.com wrote:
 What I am writing is a meds reminder app, which has the option of
 letting a career know if the app is not acknowledged and responded to.

 The idea is that when the alarm event fires it triggered a sound
 (alert) to be played (notify user to take meds), and if the alert is
 not cancelled inside of a given time, then an sms is sent to inform
 the carer.

 I have most of the code nicely nailed down, except spawning a screen
 or alert dialogue which has the Cancel button on it, and it is with
 this matter that I seek help.

 As you note in your reply, it is how to Bind the code from the
 .alarmservice to trigger the alert dialogue or screen in which I am
 lacking understanding and would hugely appreciate assistance.

You don't Bind the code from the .alarmservice to trigger the alert
dialogue or screen. You just start an activity or raise a
Notification from the service. If you wish to start an activity, use
startActivity() like you would anywhere else.

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

_Android Programming Tutorials_ Version 3.5 Available!

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


RE: [android-developers] Google Checkout Problem

2011-07-21 Thread Perry
Hi Simon,

Thanks a lot! 

 

 

From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of Simon Platten
Sent: Wednesday, July 20, 2011 6:17 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Google Checkout Problem

 

I had a similar problem, the problem was caused by a google cancelled order,
due to credit card failure.  The solution was to change the sort order by
date ascending then go to the last page until you find the offending items,
then you can go in and archive or delete those entries, it all worked fine
after that.

On Wed, Jul 20, 2011 at 7:42 AM, Perry168 perry...@netvigator.com wrote:

Hi all,
Today, I login my google checkout. I found that it can't show all
orders.
Who has the same 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
mailto:android-developers%2bunsubscr...@googlegroups.com 
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




-- 
Regards,
Sy

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

2011-07-21 Thread Kivak
Hello everyone!

Hopefully a quick question... I can't seem to find any posts in any
forum about this.

I have an image called map.jpg in my res/drawable folder. However,
the function to create the BitmapRegionDecoder seems to not like the
path that I give it. What should be the correct path to use to
initialize the BitmapRegionDecoder? Or should I use a different
version of newInstance?

Thanks a lot for any help!!
-Kivak

Code:
--

try {
brdMap = BitmapRegionDecoder.newInstance(res/drawable/map.jpg,
true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

---

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 do you add an item in a list if a user presses yes button in an alert dialog box and don't add it if he presses no

2011-07-21 Thread dilo.mt
hope this will help you..

AlertDialog.Builder b = new AlertDialog.Builder(Main.this);
b.setItems(new String[]{you, may, need, to, add}, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
AlertDialog.Builder bb = new AlertDialog.Builder(Main.this);
bb.setTitle(info);
bb.setMessage(Are you sure you want to add this to ur list?);
bb.setPositiveButton(Yes, new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(Main.this, Add to ur list,
Toast.LENGTH_SHORT).show();
//add to ur list
}
});

bb.setNegativeButton(No, new
DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
  Toast.makeText(Main.this, no need to add to ur list,
Toast.LENGTH_SHORT).show();
  //do nothing
}
});
bb.create().show();

}
});
b.create().show();

On Jul 21, 2:31 pm, Arif Nadeem arifnade...@gmail.com wrote:
 Hello everyone, I am making an app in which if a user selects a
 submenu item I pop up an Alert dialog which asks his confirmation
 whether he wishes to save that item in his list and saves it if he
 presses yes and doesn't add it if he presses no.

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

2011-07-21 Thread dilo.mt
hope this will help you.

TextView tx = new TextView(this);
tx.setClickable(true);
txtextControl.setOnClickListener(new OnClickListener() {
@Override
public void onClick(final View view) {
  //add ur alert box here, dont ask me how, read the
documentation, :D im serious read it, u will find
  //how to add a alert box
}
});

thats it...


On Jul 21, 2:28 pm, TreKing treking...@gmail.com wrote:
 On Thu, Jul 21, 2011 at 2:05 AM, arun kumar arun.kata...@gmail.com wrote:
  i read the documents but not understanding how to code

 Sorry, but if you don't know how to code, you're not going to get very far.
 Learn to code in Java, then go back to the documentation and see how the
 relevant functions / classes are used. Then come back here if you have
 specific questions.

 Good luck.

 -
 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 can adding header sharepoint webservices in android?

2011-07-21 Thread ahmet çebişli
i have a share point webservices but i must add header bu i didn't
make?
Is there any idea?

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


[android-developers] Accessing MySQL Data From Android App?

2011-07-21 Thread Mobile Pocket Apps
Hello, I have started learning Android app development and I am trying
to learn how to query and insert data to/from my Android app to a
MySQL database.  So far I have been reading about creating a web
service, but I haven't had too much luck finding information on the
implementation within the Android application.  It would be greatly
appreciated if anyone knows of a good tutorial or book that explains
how to work with MySQL databases.

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


[android-developers] Is it possible to allow Flash Socket Client in Webview?

2011-07-21 Thread 張饒輝
Dear All Senior :

I got some problem during build Socket Connection. In this project...

Android APP
|ServerSocket
|Webview
|Flash Socket Client

My Flash Socket Client will get several data from ServerSocket.

I already sure that :
1.the ServerSocket is work. I can get data from my desktop.
2.Flash is work on my desktop. I can let this flash get data from my android 
app.

So, here is my question

Is it possible to allow Flash Socket Client in Webview?

if true, how to do it?

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

[android-developers] Issues with 3.2

2011-07-21 Thread Joshua Smith
We're getting an app ready for Android, and we've just hit a complete
show-stopper with the 3.2 update.

Our app runs for about a minute, and then the XOOM just reboots. There
is absolutely no evidence that we can find in any log as to what the
problem is. The same app is running just fine in 3.1 and 2.x.

Our app uses several simultaneous HTTP connections to stream content
from a server, so we are using the whole network stack pretty
vigorously. We've noticed that during that minute before the tablet
reboots, the performance of our network connections is a lot worse in
3.1, which is why we're thinking it's probably a network issue.

We're at a loss on how to debug this further.  We'd be happy to send
an APK to someone who works on the kernel, if that could help.

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] Changing the color of ExpandableListView's group indicator

2011-07-21 Thread IanH
The problem : I've changed my app's background color to white, and now
I cannot see the ExpandableListView's group indicator anymore.

ExpandableListView has methods to change text color, background color,
and divider color, but nothing I can see for the group indicator
color.

I do not want to provide custom drawables, I just want to change the
color of the drawables that are provided by Android, programmatically.

I feel there must be some simple way to do this.

Cheers,
Ian

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


[android-developers] quick menu implementation

2011-07-21 Thread josh.bash
hi everybody
i am trying to implement quick menu design pattern. when i touch a
button a menu should pop out giving user some options to act upon. can
anybody tell me how to do it?

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


[android-developers] Confusing XML reading.

2011-07-21 Thread minh
Hi everyone.
I try to parser XML file using SAX parser. Can you help me.?
Above is some line code i think it not correct. Someone can check for
me, please:


try{
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
xmlHandler myXMLHandler = new xmlHandler();
try{
File fxml = new File(/mnt/sdcard/myXML.xml);
fxml.getName(); // test file null
try{
sp.parse(fxml,myXMLHandler);
}catch (Exception e) {
// TODO: handle exception
Log.e(ERROR,Can not parser file 
xml+e.toString());
}
}catch (Exception e) {
// TODO: handle exception
Log.e(ERROR,Can not new file xml from source);
}


/** Get result from MyXMLHandler ebook Object */
ebook = xmlHandler.getEbook();

/** Create handler to handle XML Tags ( extends
DefaultHandler ) */

}catch (Exception e) {
// TODO: handle exception
Log.e(ERROR,Error parser file);
}
try{
String author= ebook.getAuthor();
EditText txtEdit = (EditText) findViewById(R.id.editText1);
txtEdit.setText(author);
}catch (Exception e) {
// TODO: handle exception
Log.e(ERROR,Ebook can not get author);
}
}

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


[android-developers] Photo Upload

2011-07-21 Thread Nike
In my app i want to Upload my photos to my phone database.when i
click
upload option it wil show browse options and then i wil find the
location of an image i.e., any
folder...if i select  any image it wil store it into my
databse..whenever i
want to view my photo means i will click Viewphoto option ...if i
click tat
option it should display my photos from my phone Database .


can anybody tel pls.its very urgent.


 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] Converting accelerometer values into screen cordinates

2011-07-21 Thread sandeep agrawal
Hi All,

I am developing one application in which i want to paint using
accelerometer sensor, this is my code,

this is my drawmainactivity


package com.drawline;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class DrawMainActivity extends Activity {

DrawlineActivity drawView;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);

// Set full screen view
 
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
 
WindowManager.LayoutParams.FLAG_FULLSCREEN);
requestWindowFeature(Window.FEATURE_NO_TITLE);

drawView = new DrawlineActivity(this);
setContentView(drawView);
drawView.requestFocus();
}




}


This is the code in which i am trying to paint

package com.drawline;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.drawable.shapes.ArcShape;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.LinearLayout;

public class DrawlineActivity extends View implements
SensorEventListener {
private static final String TAG = DrawView;
float startx=40,starty=40,oldx,oldy,x,y;
ListPoint points = new ArrayListPoint();
Paint paint = new Paint();
SensorManager mSensorManager;
public DrawlineActivity(Context context) {
super(context);
setFocusable(true);
setFocusableInTouchMode(true);

mSensorManager =
(SensorManager)context.getSystemService(context.SENSOR_SERVICE);
mSensorManager.registerListener(this,
 
mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
   SensorManager.SENSOR_DELAY_NORMAL);
paint.setColor(Color.WHITE);
paint.setAntiAlias(true);
}

@Override
public void onDraw(Canvas canvas) {
for (Point point : points) {
canvas.drawCircle(point.x+100,  point.y +100, 5, paint);


//canvas.drawLine(startx,starty, startx,starty, paint);
// Log.d(TAG, Painting: +point);
Log.d(SANDEEP, Inside ondraw  + point.x+ point.y);
}
}

//public boolean onTouch(View view, MotionEvent event) {
//// if(event.getAction() != MotionEvent.ACTION_DOWN)
//// return super.onTouchEvent(event);
//Point point = new Point();
//point.x = event.getX();
//point.y = event.getY();
//points.add(point);
//invalidate();
//Log.d(TAG, point:  + point);
//return true;
//}

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub

}

@Override
public void onSensorChanged(SensorEvent event) {
// TODO Auto-generated method stub
Point point = new Point();

point.x= event.values[0] *5;
point.y  = event.values[1]*5;


 //   point.x=(int) (x + point.x);
   //  point.y= (int) (y+ point.y);
points.add(point);
invalidate();
Log.d(TAG, point:  + startx + starty);
  //  startx= startx + oldx;
  //  starty = starty + oldy;
oldx = startx;
oldy = starty ;
}
}


class Point {
float x=40, y=40;

@Override
public String toString() {
return x + ,  + y;
}
}

Can anyone of you please correct it what i am doing wrong.

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


[android-developers] Bi-directional IPC and data transfer in between an application and multiple services from other applications

2011-07-21 Thread winnie
I have one application, to which many other services (from other
applications say 3rd party apps) can be subscribed. And I need to get
updated data into my application from the other applications, and so I
require have bi-directional communication from my application to other
services. The kind of data that I require from all the services is
same.

Right now using Messenger and Bound Services serves my purpose for bi-
directional communication between my application and a service from
ONE other application. But now I am stuck how can I extend it to
support MULTIPLE services.
I know I can get the ComponentName in the callback function
onServiceConnected(ComponentName, IBinder) and so I can get the
corresponding IBinder interface from the corresponding service (using
just one ServiceConnection for all). But when  we unbind any service,
then we unbind it with ServiceConnection as a parameter, so would it
unbind all of my subscribed services which are attached via that
ServiceConnection? Do I really need to have multiple
ServiceConnections for every service? I am getting really confused
with this. Could someone throw some light into possible solution?

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


[android-developers] About Android 3.0 status bar hide questions

2011-07-21 Thread chibinho
Hi, everyone. Android 3.0 status bar is always appear . And I find it
can be disappear when use setting  system ui  force close. May I
develop an app which can auto force close the system ui ? Does Android
have provide this API?

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


[android-developers] fragment activity management

2011-07-21 Thread mol3ku3l3
Hello,

I have application build with fragments. I have defined all fragments
and layouts in xml.
When screen is small or medium I've divided my UI to two different
parts:
|  | |  |
| Fragment1  | | Fragment2 |
| =Activity1   | | =Activity2  |
|  | | |

But when the screen is large I want it to be displayed like that:
in portrait mode:
| |
|Fragment1 |
| |
|Fragment2 |
| |
| |

in landscape mode (large)- the same as smaller screen:
|  | | |
| Fragment1 | | Fragment2 |
| =Activity1  | | =Activity2  |
|  | | |

My problem is when I am in landscape mode, fragment 2 (=activity2) is
displayed and when I change the orientation to portrait, I would like
to have portrait mode of the large screen but I get portrait mode of
small/medium screen (so it is still activity2).
I know that this is android activity management but it there any way
that in this case I can display portrait mode after orientation change
in large screen?

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


  1   2   >