Re: [android-developers] Re: ActionBar/Mode Style Regressions with SDK 12r2 and 13r1

2011-07-29 Thread Dianne Hackborn
Yes, that is terrible, and pretty much guaranteed to break.

On Mon, Jul 18, 2011 at 6:54 AM, dmitry.lukas...@gmail.com 
dmitry.lukas...@gmail.com wrote:

 I've found only one way to change default search view icon:-) But this is
 terrible solution

 SearchView sv = new SearchView(mActivity);
 sv.setOnQueryTextListener(mOnSearchQueryTextListener);
 menuItemSearch.setActionView(sv);
 searchViewChangeHack(sv);

 private static int sViewIndex = 0;

 private void searchViewChangeHack(ViewGroup sv) {
 for (int i = 0; i  sv.getChildCount(); i++) {
 View v = sv.getChildAt(i);
 if (v instanceof ViewGroup) {
 searchViewChangeHack((ViewGroup)v);
 } else if (v instanceof ImageView) {
 if (sViewIndex == 0 || sViewIndex == 1) {
 ((ImageView)
 v).setImageResource(R.drawable.common_bar_search);
 }
 sViewIndex++;

 }
 }
 }

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




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

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

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

[android-developers] place Gif image in android

2011-07-29 Thread Kunju Vava
Hi all
I want to  place a GIF image ia sceen in android , i just create image view
and place the image from the drawable directory , while running it is
displaying but it is not anmating what i do


plse help me 
-- 
-- 
ωιтн яєgαя∂ѕ
Ratheesh * *...

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

2011-07-29 Thread Julius Spencer
Hi,

I have been taking all my database reads off the main UI thread and have come 
across some new problems.

I'm receiving the following error(s):

ERROR/CursorWindow(26242): CursorWindow heap allocation failed

followed by:

ERROR/AndroidRuntime(26242): java.lang.RuntimeException: An error occured while 
executing doInBackground()
ERROR/AndroidRuntime(26242): at 
android.os.AsyncTask$3.done(AsyncTask.java:200)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask.setException(FutureTask.java:125)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask.run(FutureTask.java:138)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
ERROR/AndroidRuntime(26242): at java.lang.Thread.run(Thread.java:1019)
ERROR/AndroidRuntime(26242): Caused by: java.lang.IllegalStateException: 
Couldn't init cursor window
ERROR/AndroidRuntime(26242): at 
android.database.CursorWindow.native_init(Native Method)
ERROR/AndroidRuntime(26242): at 
android.database.CursorWindow.init(CursorWindow.java:41)
ERROR/AndroidRuntime(26242): at 
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:276)
ERROR/AndroidRuntime(26242): at 
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
ERROR/AndroidRuntime(26242): at 
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
ERROR/AndroidRuntime(26242): at 
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)

I can't seem to find much online about this and don't know what it really means.

Regards,
Julius.

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


[android-developers] Re: Help... IllegalStateException: Couldn't init cursor window

2011-07-29 Thread KP
Code will help.

On Jul 29, 11:16 am, Julius Spencer jul...@msa.co.nz wrote:
 Hi,

 I have been taking all my database reads off the main UI thread and have come 
 across some new problems.

 I'm receiving the following error(s):

 ERROR/CursorWindow(26242): CursorWindow heap allocation failed

 followed by:

 ERROR/AndroidRuntime(26242): java.lang.RuntimeException: An error occured 
 while executing doInBackground()
 ERROR/AndroidRuntime(26242):     at 
 android.os.AsyncTask$3.done(AsyncTask.java:200)
 ERROR/AndroidRuntime(26242):     at 
 java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
 ERROR/AndroidRuntime(26242):     at 
 java.util.concurrent.FutureTask.setException(FutureTask.java:125)
 ERROR/AndroidRuntime(26242):     at 
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
 ERROR/AndroidRuntime(26242):     at 
 java.util.concurrent.FutureTask.run(FutureTask.java:138)
 ERROR/AndroidRuntime(26242):     at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
 ERROR/AndroidRuntime(26242):     at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
 ERROR/AndroidRuntime(26242):     at java.lang.Thread.run(Thread.java:1019)
 ERROR/AndroidRuntime(26242): Caused by: java.lang.IllegalStateException: 
 Couldn't init cursor window
 ERROR/AndroidRuntime(26242):     at 
 android.database.CursorWindow.native_init(Native Method)
 ERROR/AndroidRuntime(26242):     at 
 android.database.CursorWindow.init(CursorWindow.java:41)
 ERROR/AndroidRuntime(26242):     at 
 android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:276)
 ERROR/AndroidRuntime(26242):     at 
 android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
 ERROR/AndroidRuntime(26242):     at 
 android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
 ERROR/AndroidRuntime(26242):     at 
 android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)

 I can't seem to find much online about this and don't know what it really 
 means.

 Regards,
 Julius.

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

2011-07-29 Thread Ellen
thanks for your response :)

Sorry, I didn't described clearly. What I was mean the way PC connect
to internet via android USB is by programing.
So, is there API or something could do this?

On 7月29日, 上午11时46分, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Fri, Jul 29, 2011 at 11:40 AM, Ellen ellen...@hotmail.com wrote:
  Hi,

  when a PC connected with an android device via USB, could this PC get
  connection to internet through android device?
  3G or GPRS or wifi, anyway?

 Not the right list to ask this sort of question, but yes.
 It's called 'USB tethering', but your carrier might have
 disabled this, or you might need to get a different plan
 to get it. Or root your device if you are using and older
 Android version.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ActionBar/Mode Style Regressions with SDK 12r2 and 13r1

2011-07-29 Thread dmitry . lukashev
My concern is why I can easily change android:actionOverflowButtonStyle... 
and cannot do the same with search icon. Gray search icon is not acceptable 
for our brand style... so default action bar became useless for us, and we 
should create custom bar for tablet that is ridiculous:)

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

[android-developers] AlarmManager and Service

2011-07-29 Thread kirti waykole
Hello,
I am new in android. I am using AlarmMagener in my
application. i am setting Alarm to some date. now i am giving direct
date. when the system date is not equal to hardcoded date alarm in not
invoking. But when i change system date to given date still is not
invoking.

Please help me where i am going wrong and  how i proceed.



this is my Activity


package com.exercise.AndroidAlarmService;

import java.util.Calendar;


import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class AndroidAlarmService extends Activity
{


private PendingIntent pendingIntent;
String full=;

 @Override
 public void onCreate(Bundle savedInstanceState)
 {
 super.onCreate(savedInstanceState);
 Intent myIntent = new Intent(AndroidAlarmService.this,
MyAlarmService.class);
   pendingIntent =
PendingIntent.getService(AndroidAlarmService.this, 0, myIntent, 0);

 setContentView(R.layout.main);
 Button buttonStart = (Button)findViewById(R.id.startalarm);
 Button buttonCancel = (Button)findViewById(R.id.cancelalarm);

 buttonStart.setOnClickListener(new Button.OnClickListener()
 {

  @Override
 public void onClick(View arg0)
 {


AlarmManager alarmManager =
(AlarmManager)getSystemService(ALARM_SERVICE);

Calendar calendar = Calendar.getInstance();

int month=calendar.get(Calendar.MONTH);
int month1=month+1;
int date=calendar.get(Calendar.DATE);
int year=calendar.get(Calendar.YEAR);
full=month1+/+date+/+year;

int h=calendar.get(Calendar.HOUR_OF_DAY);
int m=calendar.get(Calendar.MINUTE);

calendar.set(Calendar.HOUR_OF_DAY, h);

calendar.set(Calendar.MINUTE,55);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);



//calendar.setTimeInMillis(System.currentTimeMillis());
//calendar.add(Calendar.SECOND, 10);
if(full.equals(7/31/2011))
{

alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
calendar.getTimeInMillis(), SystemClock.elapsedRealtime(),
pendingIntent);


Toast.makeText(AndroidAlarmService.this, Start Alarm
 + +full+- +h+:+m , Toast.LENGTH_LONG).show();
//Alerts.ShowEmpAddedAlert(this);
}
}
  });

 buttonCancel.setOnClickListener(new Button.OnClickListener()
{

  @Override
  public void onClick(View arg0)
  {
   // TODO Auto-generated method stub
   AlarmManager alarmManager =
(AlarmManager)getSystemService(ALARM_SERVICE);
   alarmManager.cancel(pendingIntent);

// Tell the user about what we did.

Toast.makeText(AndroidAlarmService.this, Cancel!,
Toast.LENGTH_LONG).show();
  }
 });

}
}



this is my Service

package com.exercise.AndroidAlarmService;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class MyAlarmService extends Service {

@Override
public void onCreate() {
 // TODO Auto-generated method stub
 Toast.makeText(this, MyAlarmService.onCreate(), Toast.LENGTH_LONG).show();
}

@Override
public IBinder onBind(Intent intent) {
 // TODO Auto-generated method stub
 Toast.makeText(this, MyAlarmService.onBind(), Toast.LENGTH_LONG).show();
 return null;
}


Re: [android-developers] Re: Help... IllegalStateException: Couldn't init cursor window

2011-07-29 Thread Julius Spencer
The problem occurs on the line with rawQuery(


ArrayListLong myIds = new ArrayListLong();
Cursor c = null;
try {
c = ((MyApplication) 
MyApplication.getApplication()).getDbHelper().getReadableDatabase().rawQuery(queryString,null);
if(c.moveToFirst()) {
while(!c.isAfterLast()) {

myIds.add(c.getLong(c.getColumnIndex(MYID)));
c.moveToNext();
}
}
} finally {
if(null!=c)
c.close();
}
return myIds;

Thanks for any help.


On 29/07/2011, at 6:35 PM, KP wrote:

 Code will help.
 
 On Jul 29, 11:16 am, Julius Spencer jul...@msa.co.nz wrote:
 Hi,
 
 I have been taking all my database reads off the main UI thread and have 
 come across some new problems.
 
 I'm receiving the following error(s):
 
 ERROR/CursorWindow(26242): CursorWindow heap allocation failed
 
 followed by:
 
 ERROR/AndroidRuntime(26242): java.lang.RuntimeException: An error occured 
 while executing doInBackground()
 ERROR/AndroidRuntime(26242): at 
 android.os.AsyncTask$3.done(AsyncTask.java:200)
 ERROR/AndroidRuntime(26242): at 
 java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
 ERROR/AndroidRuntime(26242): at 
 java.util.concurrent.FutureTask.setException(FutureTask.java:125)
 ERROR/AndroidRuntime(26242): at 
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
 ERROR/AndroidRuntime(26242): at 
 java.util.concurrent.FutureTask.run(FutureTask.java:138)
 ERROR/AndroidRuntime(26242): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
 ERROR/AndroidRuntime(26242): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
 ERROR/AndroidRuntime(26242): at java.lang.Thread.run(Thread.java:1019)
 ERROR/AndroidRuntime(26242): Caused by: java.lang.IllegalStateException: 
 Couldn't init cursor window
 ERROR/AndroidRuntime(26242): at 
 android.database.CursorWindow.native_init(Native Method)
 ERROR/AndroidRuntime(26242): at 
 android.database.CursorWindow.init(CursorWindow.java:41)
 ERROR/AndroidRuntime(26242): at 
 android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:276)
 ERROR/AndroidRuntime(26242): at 
 android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
 ERROR/AndroidRuntime(26242): at 
 android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
 ERROR/AndroidRuntime(26242): at 
 android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
 
 I can't seem to find much online about this and don't know what it really 
 means.
 
 Regards,
 Julius.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: About Android 3.0 status bar hide questions

2011-07-29 Thread keyboardr
In the case of a kiosk app you'd need to build it into the ROM.  Since
the honeycomb source hasn't been released you'll have a hard time with
that.  Looks like your best bet would be to base it on a 2.3 ROM and
have the app work for xlarge screens.  That means porting 2.3
yourself, most likely.

If it's just a cosmetic thing, you can put it into lights out mode,
which dims the buttons (see the youtube app), but does not remove the
bar.

On Jul 28, 6:42 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 I see this a legitimate use case for a kiosk app.  But he cannot do
 this right now, simple as that.

 On Jul 29, 4:36 am, Mark Murphy mmur...@commonsware.com wrote:







  On Thu, Jul 28, 2011 at 4:29 PM, Richard Lalancette

  richard.lalance...@gmail.com wrote:
   The navigation bar breaks the look and feel of our app

  You have *got* to be kidding me. You're willing to crash an OS because
  the system bar breaks the look and feel of your app? You're one sick
  puppy.

   and we do not need to
   go to the desktop once our app is started.

  You are welcome to write your own firmware that eliminates the system
  bar, as Ms. Hackborn advised. You will need to wait until the source
  code for Honeycomb is released, of course, which may be several months
  away.

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

  Android Training in NYC:http://marakana.com/training/android/

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


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

2011-07-29 Thread keyboardr
I forget who it was specifically that had said it, but the Android
team in general does not like OS level gestures.  They limit what
applications are able to do.  I tend to agree with them.

On Jul 28, 7:38 pm, bmjg b...@home.nl wrote:
 Maybe the status bar should optionally be able to hide (visually slide down)
 and slide up again when the user makes the appropriate guesture?
 And/or only show a minimal slide up button in the bottom-center in the
 hidden state.

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


[android-developers] Get digit mobile number

2011-07-29 Thread subha
Hi Developers!


How to get mobile number through the android application(which one is used
that app);

this is possible?


Thanks,
Subha

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

Re: [android-developers] Get digit mobile number

2011-07-29 Thread Amit Mangal
Mobile number calculated on network side not on handset. you can get your
sim number IMSI but you cant get mobile number by any api.

thanks

On Fri, Jul 29, 2011 at 1:00 PM, subha subhashini.andr...@gmail.com wrote:

 Hi Developers!


 How to get mobile number through the android application(which one is used
 that app);

 this is possible?


 Thanks,
 Subha

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

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

Re: [android-developers] Re: How can we keep a particular application on the top always

2011-07-29 Thread Dianne Hackborn
What I am saying is you shouldn't use an activity, you should go modify the
SystemUI code to introduce your window there in the same way the status bar
is done.

On Thu, Jul 28, 2011 at 10:37 PM, trickybit jmack...@gmail.com wrote:

 Is there a way for an activity to specify the type of its main window,
 in time for it to matter?

 Thanks

 On Jul 28, 12:11 pm, Dianne Hackborn hack...@android.com wrote:
  I suggest looking at the SystemUI process
  (frameworks/base/packages/SystemUI), which is responsible for showing the
  status bar and extending as desired.
 
  First question you will need to answer is what layer your UI goes in to:
  above everything including the lock screen, above the system bar /
  notifications, above toasts, just above apps.  It is likely you will need
 to
  define a new private window type with its own layer (assigned in
  PhoneWindowManager) to get it z-ordered where you want.
 
 
 
 
 
 
 
 
 
  On Thu, Jul 28, 2011 at 1:32 AM, Ankit ank82...@gmail.com wrote:
   Hi ,
   I want to keep my application ( Application A ) on the top always in
   Android.  Application A is not a full screen  application, it is a
   floating window or dialog theme based application. The Application A
   can launch other application.\ from its own UI portion also other
   applications can be launched from background from Home screen
   shortcut / Application Launcher screen.
   How can we do it?
 
   Also the application which are in the background with Application A on
   top should work normally. e.g. it can Launch other activities (of it
   own own or some other application), dialog etc.
 
   Second doubt/ requirement  is -  Activity Y is below Activity X,
   Activity X is below Activity A (of Application A) . Activity X has a
   close/exit button which would finish its own activity X. Now when that
   button is pressed the activity get closed but leaves a black screen
   below activity A.
 
   Why does this happen (i think may be because it requires the Back
   stack to be rearranged)  and is their a turn around way of being able
   to do this.
 
   If any  application in the background  launches another activity/
   application then also my application ( Application A ) should come at
   the top of the launched activity/application.
 
   Thanks ,
   Ankit
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




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

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

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

Re: [android-developers] Re: get internet from android device via USB

2011-07-29 Thread Nikolay Elenkov
On Fri, Jul 29, 2011 at 3:38 PM, Ellen ellen...@hotmail.com wrote:
 thanks for your response :)

 Sorry, I didn't described clearly. What I was mean the way PC connect
 to internet via android USB is by programing.
 So, is there API or something could do this?


Do you mean an API to disable or enable tethering on the device?
I don't think there are any public APIs, but you could look at the
source to see how the Settings app does 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] Android Proguard with external jar

2011-07-29 Thread Moshik Levi
Hello everybody,

I'm have added external jar file to the libs folder of mt project and
configure it in the build path.
When i try to Export Android Package i receive a Proguard error
message for a lot of reference classes that aren't found, For example:
Warning: com.itextpdf.text.BaseColor: can't find referenced class
java.awt.Color

When i tried to debug the BaseColor class worked fine, so i can't
figure out why does it warns me.

Any help will be appreciated,

Thanks

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


Re: [android-developers] dialogbox

2011-07-29 Thread gaurav gupta
hi ,
U can set padding of dialog box.



On Fri, Jul 29, 2011 at 10:28 AM, arun kumar arun.kata...@gmail.com wrote:

 how to show dialog box as at the bottom of the layout(can we make
 dialog box as a floating list)

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

2011-07-29 Thread Ellen
please let me list the steps for this feature:
1. connect Android device to a PC via USB
2. a list view display on device side to give some choice, one of the
choice is share internet from device
3. when choose this share internet from device choice, (precondition
is the device already connected to internet, and PC couldn't)
4. maybe a desktop app needed to make such configuration

On 7月29日, 下午4时18分, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Fri, Jul 29, 2011 at 3:38 PM, Ellen ellen...@hotmail.com wrote:
  thanks for your response :)

  Sorry, I didn't described clearly. What I was mean the way PC connect
  to internet via android USB is by programing.
  So, is there API or something could do this?

 Do you mean an API to disable or enable tethering on the device?
 I don't think there are any public APIs, but you could look at the
 source to see how the Settings app does 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] Re: get internet from android device via USB

2011-07-29 Thread Ellen
yes, it is disable/enable tethering on device. Maybe a desktop app of
PC side is needed, I've no idea about it this moment.
I couldn't find the setting app about tethering from source code. I
develop it base on froyo API 8.

would you please give some detail prompt?

On 7月29日, 下午4时18分, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Fri, Jul 29, 2011 at 3:38 PM, Ellen ellen...@hotmail.com wrote:
  thanks for your response :)

  Sorry, I didn't described clearly. What I was mean the way PC connect
  to internet via android USB is by programing.
  So, is there API or something could do this?

 Do you mean an API to disable or enable tethering on the device?
 I don't think there are any public APIs, but you could look at the
 source to see how the Settings app does 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] wordle effect

2011-07-29 Thread vani reddy
Hi friends,
How to create wordle effect  in android  i.e moving words on android screen.


-- 
Regards,
Vani Reddy

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

2011-07-29 Thread arun kumar
can we make dialog box as floating list

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

2011-07-29 Thread Kostya Vasilyev

Julius,

Judging by the CursorWindow heap allocation failed message, your 
query's result set may be too large. If you only care about getting the 
IDs, make sure you specify SELECT _id FROM..., and not SELECT * FROM


Also consider how many rows your query is expected to return. Database 
queries are cached in RAM, and the default limit in Cursor is to try to 
allocate up to 2 billion rows. Clearly, that won't work, and the real 
limit imposed by heap size is smaller still.


Other than that, I usually write cursor loops like this:

Cursor c = 
try {
int nIndex = c.getColumnIndexOrThrow(column_name);
while (c.moveToNext()) {
long id = c.getLong(nIndex);
.
}
}
finally {
c.close();
}

-- Kostya

29.07.2011 10:50, Julius Spencer пишет:

The problem occurs on the line with rawQuery(


ArrayListLong  myIds = new ArrayListLong();
Cursor c = null;
try {
c = ((MyApplication) 
MyApplication.getApplication()).getDbHelper().getReadableDatabase().rawQuery(queryString,null);
if(c.moveToFirst()) {
while(!c.isAfterLast()) {

myIds.add(c.getLong(c.getColumnIndex(MYID)));
c.moveToNext();
}
}
} finally {
if(null!=c)
c.close();
}
return myIds;

Thanks for any help.


On 29/07/2011, at 6:35 PM, KP wrote:


Code will help.

On Jul 29, 11:16 am, Julius Spencerjul...@msa.co.nz  wrote:

Hi,

I have been taking all my database reads off the main UI thread and have come 
across some new problems.

I'm receiving the following error(s):

ERROR/CursorWindow(26242): CursorWindow heap allocation failed

followed by:

ERROR/AndroidRuntime(26242): java.lang.RuntimeException: An error occured while 
executing doInBackground()
ERROR/AndroidRuntime(26242): at 
android.os.AsyncTask$3.done(AsyncTask.java:200)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask.setException(FutureTask.java:125)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.FutureTask.run(FutureTask.java:138)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
ERROR/AndroidRuntime(26242): at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
ERROR/AndroidRuntime(26242): at java.lang.Thread.run(Thread.java:1019)
ERROR/AndroidRuntime(26242): Caused by: java.lang.IllegalStateException: 
Couldn't init cursor window
ERROR/AndroidRuntime(26242): at 
android.database.CursorWindow.native_init(Native Method)
ERROR/AndroidRuntime(26242): at 
android.database.CursorWindow.init(CursorWindow.java:41)
ERROR/AndroidRuntime(26242): at 
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:276)
ERROR/AndroidRuntime(26242): at 
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
ERROR/AndroidRuntime(26242): at 
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
ERROR/AndroidRuntime(26242): at 
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)

I can't seem to find much online about this and don't know what it really means.

Regards,
Julius.

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

2011-07-29 Thread suresh achari
hi use menu inflater.

On Fri, Jul 29, 2011 at 6:59 AM, Damien Cooke cooke.dam...@gmail.comwrote:

 All,
 I have a app with a menu.  In releases prior to Android 2.3.4 all looks
 good with white background and black icons.  However in 2.3.4 and above the
 Options menu has a black background. How can I set the background of the
 options menu to white.  I do not fully understand if the Menu object is a
 View why I can not use setBackgroundColor().

 Thanks for your help.
 Damien

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




-- 
Suresh.K

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ActionBar/Mode Style Regressions with SDK 12r2 and 13r1

2011-07-29 Thread Dianne Hackborn
Sorry at this point you can't customize it like that.  If you seriously
can't live with the standard style, you'll need to make your own.

On Thu, Jul 28, 2011 at 11:42 PM, dmitry.lukas...@gmail.com wrote:

 My concern is why I can easily change android:actionOverflowButtonStyle...
 and cannot do the same with search icon. Gray search icon is not acceptable
 for our brand style... so default action bar became useless for us, and we
 should create custom bar for tablet that is ridiculous:)

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




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

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

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

Re: [android-developers] Re: How to add header in ListFragment?

2011-07-29 Thread Dianne Hackborn
You don't need to be a fragment to participate in the action bar tabs, they
just let you do that as a convenience.  They are just calling back to you
when the tabs are changed.  They make it easy to at that point switch
fragments, but you can just as well switch views.

I'd prefer to not start introducing dependencies on fragments for doing
basic UI stuff.  The app package has always been layered on top of view and
widget, and that is a good thing.

On Thu, Jul 28, 2011 at 9:30 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, Jul 28, 2011 at 12:26 PM, nadam a...@anyro.se wrote:
  Another option is to skip the ListFragment and use a ListView directly
  instead. You only need to use ListFragment if the same list (and
  related logic) should be displayed in two different activities.

 Or if the list needs to be a Fragment for other reasons (e.g., to
 participate in the tab navigation in the action bar). Right now, there
 are few of these, but I suspect that there will be more of those
 Fragment dependencies in the future.

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

 Android Training in NYC: http://marakana.com/training/android/

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




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

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

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

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

2011-07-29 Thread Richard Lalancette
That is very similar to what we want to do, indeed.
On 2011-07-28 9:44 PM, Zsolt Vasvari zvasv...@gmail.com wrote:
 I see this a legitimate use case for a kiosk app. But he cannot do
 this right now, simple as that.



 On Jul 29, 4:36 am, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jul 28, 2011 at 4:29 PM, Richard Lalancette

 richard.lalance...@gmail.com wrote:
  The navigation bar breaks the look and feel of our app

 You have *got* to be kidding me. You're willing to crash an OS because
 the system bar breaks the look and feel of your app? You're one sick
 puppy.

  and we do not need to
  go to the desktop once our app is started.

 You are welcome to write your own firmware that eliminates the system
 bar, as Ms. Hackborn advised. You will need to wait until the source
 code for Honeycomb is released, of course, which may be several months
 away.

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

 Android Training in NYC:http://marakana.com/training/android/

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

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

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

2011-07-29 Thread Richard Lalancette
That is ondeed getting a bit complicated. ;-)
On 2011-07-29 3:10 AM, keyboardr keyboa...@gmail.com wrote:
 In the case of a kiosk app you'd need to build it into the ROM. Since
 the honeycomb source hasn't been released you'll have a hard time with
 that. Looks like your best bet would be to base it on a 2.3 ROM and
 have the app work for xlarge screens. That means porting 2.3
 yourself, most likely.

 If it's just a cosmetic thing, you can put it into lights out mode,
 which dims the buttons (see the youtube app), but does not remove the
 bar.

 On Jul 28, 6:42 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 I see this a legitimate use case for a kiosk app.  But he cannot do
 this right now, simple as that.

 On Jul 29, 4:36 am, Mark Murphy mmur...@commonsware.com wrote:







  On Thu, Jul 28, 2011 at 4:29 PM, Richard Lalancette

  richard.lalance...@gmail.com wrote:
   The navigation bar breaks the look and feel of our app

  You have *got* to be kidding me. You're willing to crash an OS because
  the system bar breaks the look and feel of your app? You're one sick
  puppy.

   and we do not need to
   go to the desktop once our app is started.

  You are welcome to write your own firmware that eliminates the system
  bar, as Ms. Hackborn advised. You will need to wait until the source
  code for Honeycomb is released, of course, which may be several months
  away.

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

  Android Training in NYC:http://marakana.com/training/android/

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

2011-07-29 Thread andromedesoft
Just send a message back from c to b.
You should use startActivityForResult.
So B reads the message and depending on the value, calls A or paints
itself.
It works.

Greetings,

andromedesoft

On Jul 28, 7:20 pm, Ab Caballero a...@mac.com wrote:
 I have an application with 3 activities, which i will call A, B and C.
 The activities fire in sequence A-B-C, with each previous activity
 being paused. My question is, how do i go from the C activity back to
 the A activity, without going to the B activity first, i.e. C-A?

 Finish() will only bring me back to the previous activity and i do not
 wish to use an intent to restart the A activity. Any ideas?

 Ab

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

2011-07-29 Thread ANKUR GOEL
on back pressed of activity c

set the setflag(intent.flag_activity_clear_top)

this will give you the activity A


Thanks and Regards:-

Ankur Goel



On Fri, Jul 29, 2011 at 12:50 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, Jul 28, 2011 at 1:20 PM, Ab Caballero a...@mac.com wrote:
  I have an application with 3 activities, which i will call A, B and C.
  The activities fire in sequence A-B-C, with each previous activity
  being paused. My question is, how do i go from the C activity back to
  the A activity, without going to the B activity first, i.e. C-A?

 startActivity(), with an Intent identifying A. Use
 FLAG_ACTIVITY_REORDER_TO_FRONT to bring the existing instance to the
 top of the stack.

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

 Android Training in NYC: http://marakana.com/training/android/

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

2011-07-29 Thread baran bartu demirci
Hi,

i want to make an application ,this application include that, when the phone
connected the network ,program will start automatically.


i used the below as broadcast receiver;

/*
public class ConnectivityReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
 Intent startupIntent= new Intent(context,networkDinleActivity.class);
startupIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(startupIntent);

}
*/

i used the below in the manifest.xml ;

/*

uses-permission android:name=android.permission.ACCESS_NETWORK_STATE /
//is it true?

receiver android:name=.ConnectivityReceiver

 intent-filter

  action android:name=android.net.wifi.STATE_CHANGE/// is it
true?if it wasn't,what is true?

 /intent-filter

/receiver
*/

i have tried them but it didn't work.
what is wrong ?

thanks for advices...

Baran

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

[android-developers] Confusion in Task and Back Stack

2011-07-29 Thread Ant
Hi,
Scenario : Application A -(Containing) Activities - A1, A2, A3
Now all activities are floating Windows(not full screen), that is
having dialog theme. Now the current backstack is like
A1-A2-A3 (i.e. A3 on top home screen is visible since activities are
not full screen). Also each activity has close button which upon
clicking finishes the activity.
Now it placed such that i can see whole of activity A1, A2 and A3
(Since they are not full screen). Now with A3 on top of backstack I
click the close button of activity A2.
I see a home screen with A1, A3 on top. This seems normal behavior.

But if I keep A1 and A2 full screen and A3 and floating window that is
not full screen. Now Home screen is not visible. I click close button
of A2.
I see a Black screen with A3 on top. This seems abnormal.
Should it not generate the A1 with A3 on Top like previous scenario.

Please Help!  what is happening.

Also, I need to see the part of Source Code of Android that handle the
different Activity Launching Intent Management, Task Handling. So that
I can easily to go the part of source code that would properly explain
which task any activity will go in. Please if somebody can guide me to
these files it will be a great help. And I promise to reveal my
findings in any.
Thank you

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


[android-developers] Re: Photo Gallery in Android App

2011-07-29 Thread nadam
http://developer.android.com/guide/tutorials/views/hello-gallery.html

On 26 Juli, 18:47, Laxmi Verma laxmiverma.andr...@gmail.com wrote:
 Hi,

 Anybody please help me regarding how to create photo gallery in android
 application.
 Thanks in advance.

 Thanks  Regards,
 Laxmi Verma

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

2011-07-29 Thread Neilz
Hi all. I'm altering my app so that it fits nicely into a tablet, by
specifing layout-xlarge and drawable-xlarge resources.

One thing I don't seem to be able to alter is the dialogs. I have a
number of these in my code:

AlertDialog.Builder alert = new AlertDialog.Builder(MyActivity.this);
alert.setTitle(R.string.dialog_title);
alert.setIcon(R.drawable.icon);
alert.setMessage(R.string.dialog_desc);
// add some buttons and actions
alert.show();

These are appearing very small, with tiny text, and don't seem to be
being re-sized according to the device type. How can I achieve this
please?

I'm using the standard emulator for testing this, by the way.

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


[android-developers] Avoid to handle click event on a LinearLayout

2011-07-29 Thread Paolo
Hi there,

I have a FrameLayout with two inner LinerLayouts overlayed.

+ FrameLayout
  + LinearLayout 1
  + LinearLayout 2


In some cases I'd like the LinearLayout 2 doesn't handle the click
event. I can't set Visibility to GONE, but only to INVISIBLE.
The aim is that the LinearLayout 1, that is under, can handle that
click.

is it possible to do that without using onTouchListener?

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


Re: [android-developers] dialogbox

2011-07-29 Thread gaurav gupta
floating list means...??
u want to use marquee in dialog box?
if its ur requriment then sure its possible.
please specify ur requriment and anyone can help u.



On Fri, Jul 29, 2011 at 3:02 PM, arun kumar arun.kata...@gmail.com wrote:

 can we make dialog box as floating list


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


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

Re: [android-developers] Re: Extending Interface of Dynamically Loaded Dex File

2011-07-29 Thread Marcin Orlowski
On Jul 28, 2011 9:42 PM, Matt mattg...@gmail.com wrote:


  maybe this will be of any helphttp://
android-developers.blogspot.com/2011/07/custom-class-loading-i...

 Thanks for the pointer.  But that page describes the method I am using
 to load and run the plugin, but doesn't say much about where the
 interface classes should be loaded or how I could update the interface
 that the loaded classes implement without making changes to the client.

I'd contact that guy who wrote the that article...

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

2011-07-29 Thread TreKing
On Fri, Jul 29, 2011 at 12:54 AM, arun kumar arun.kata...@gmail.com wrote:

 i tried for 1 week but could not got the solution...


What did you try?

-
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: Extending Interface of Dynamically Loaded Dex File

2011-07-29 Thread Streets Of Boston
You are changing the public set of interfaces in Interface.jar by adding a 
new Foo2 interface.
You are trying to have clients with an 'old' Interface.jar (ones without 
Foo2) interact with an Implementation based on a 'new' Interface.jar. This 
won't work.

Older clients have to update their Interface.jar first before they can make 
use of implementations (compiled into Implementation.jar) of Foo2 or 
implementations that indirectly may use or load Foo2.

You should be able to swap in any (new) Implementation.jar based on the 
'old' Interface.jar. But when Implementation.jar doesn't 'match' up with the 
client's Interface.jar, you will run into trouble. And i think this is a 
Java issue, not so much an Android issue :-)

If you want to be able to update Interface.jar, you would have to make that 
a 'plugin' as well, loading it through the Dex class loader.

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

2011-07-29 Thread TreKing
On Fri, Jul 29, 2011 at 1:02 AM, Kunju Vava android...@gmail.com wrote:

 I want to  place a GIF image ia sceen in android , i just create image view
 and place the image from the drawable directory , while running it is
 displaying but it is not anmating what i do


Search Google to discover that this is not supported.

-
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: Offering free and paid APKs on the Market

2011-07-29 Thread Rainbowbreeze
I like, and currently use, your solution: common library, one paid
version, one free version. If the problem is only the user base, why a
user with a pro app should also have the free app installed?


--
.enjoy.
Alfredo

@rainbowbreeze

Io sono un clown, e faccio collezione di attimi...
(Heinrich Boll - Opinioni di un clown)

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

2011-07-29 Thread Richard Diuk
Hey,
I used this methodology

http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html

in this example

http://yekmer.posterous.com/how-to-make-a-loading-animator-in-android

to get mine to work.

On Fri, Jul 29, 2011 at 10:53 AM, TreKing treking...@gmail.com wrote:

 On Fri, Jul 29, 2011 at 1:02 AM, Kunju Vava android...@gmail.com wrote:

 I want to  place a GIF image ia sceen in android , i just create image
 view and place the image from the drawable directory , while running it is
 displaying but it is not anmating what i do


 Search Google to discover that this is not supported.


 -
 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

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

[android-developers] Pain taking db reads off UI thread

2011-07-29 Thread Julius Spencer
Hi,

I have been trying to take database reads off the UI thread and am currently 
using an AsyncTask, however I am running into trouble swapping out an updated 
Cursor for a new one in the adapter.
(I was previously using requery() on the Cursor which had to be on the main UI 
thread)

The documentation regarding requery() says:
Just request a new cursor, so you can do this asynchronously and update your 
list view once the new cursor comes back.

If I update the existing Cursor (mCursor) with the results from a new query and 
do the following in onPostExecute of an AsyncTask:

mAdapter.changeCursor(mCursor);

it works pretty well on a Nexus 1.  On other devices I am getting errors 
because I haven't closed the old Cursor. 
(java/lang/IllegalStateException;: Finalizing cursor 
android.database.sqlite.SQLiteCursor on null that has not been deactivated or 
closed)

I have tried creating a new Cursor and swapping the Cursors out like so:

if(null!=mArtists)
mCursor.close();
mArtists = newCursor;

but I get performance issues and the view of the list goes back to the top.

Has anyone got any ideas on this?  Alternatively does anyone have or know of 
any documentation for using a CursorLoader against a SQLiteDatabase rather than 
a ContentProvider?

Thanks for any help.  

Regards,
Julius.

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

2011-07-29 Thread Nick Risaro
Then you need to add the jar containing the ca package to your classpath

On Fri, Jul 29, 2011 at 12:54 AM, Wan Cekang kesyahd...@gmail.com wrote:

 the info - The import ca cannot be resolved

 On Jul 28, 8:49 pm, Nick Risaro nris...@gmail.com wrote:
  Did you read the info about the error? What does it say?
 
 
 
 
 
 
 
  On Fri, Jul 29, 2011 at 12:42 AM, Wan Cekang kesyahd...@gmail.com
 wrote:
   hi,
   when I want to import this : import ca.uol.aig.fftpack.RealDoubleFFT;
   got an error. (red underline bellow the code).
   Im new in android.how to solve 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

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

2011-07-29 Thread Frank
Hi All,

Just FYI, I found that you need to turn off the long press detection
in GestureDetector using setIsLongpressEnabled. This way, subsequent
events after long press will be triggered. However, there will be no
long press generated automatically and you need to make it yourself.

Cheers,
Frank

On Jul 25, 5:53 pm, Frank frank.android@gmail.com wrote:
 Hi All,

 I am using GestureDetector to fire some events. Everything works fine
 except for the following:
 If I do a long press and then move my finger (without lifting it and
 scrolling again), long press is fired but not scroll event. Doesn't
 anyone know what is going on here? Is this supposed to be the case? If
 so, what if I do need scroll event after a long press? Thanks a lot.

 Regards,
 Frank

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

2011-07-29 Thread Matt
On Jul 29, 7:41 am, Streets Of Boston flyingdutc...@gmail.com wrote:
 You are changing the public set of interfaces in Interface.jar by adding a
 new Foo2 interface.
 You are trying to have clients with an 'old' Interface.jar (ones without
 Foo2) interact with an Implementation based on a 'new' Interface.jar. This
 won't work.

 Older clients have to update their Interface.jar first before they can make
 use of implementations (compiled into Implementation.jar) of Foo2 or
 implementations that indirectly may use or load Foo2.

What I would like to be able to do is support both old and new clients
with a single implementation.jar.  Older clients that don't know about
the Foo2 interface won't use it and will stick with the functionality
exposed in Foo, but new clients that want to can also use Foo2
functionality.  The Foo2 interface is an extension of Foo, so a single
implementation object would be castable to either one, and, in theory,
the new implementation.jar would match both the old and new
interface.jar.  I might not be explaining the situation well, but does
that make sense?  This might be heresy to say, but I'm thinking of
something like what MS COM does in C++, where you have IWebBrowser,
IWebBrowser2, etc.  There, a single implementation DLL can maintain
binary compatibility with multiple nested levels of interfaces.

I have written a small test program in Java that runs on a normal JVM,
and this works.  The difference is that the normal JVM does not
complain that there is a definition of the Foo class in both
interface.jar and implementation.jar, whereas the Dalvik VM throws an
error in that case.

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

2011-07-29 Thread DB12
Adam, that makes some sense, I'll investigate it.

I took my app home from work and for some reason it did not crash when
I added that 3rd id (my home comp runs windows 7).  Then I took it
back to work (where we have xp) and it works fine with the extra id.
But then I added another custom dialog with 3 buttons and it crashed
again.

On Jul 28, 10:22 am, Adam Ratana adam.rat...@gmail.com wrote:
 On Wednesday, July 27, 2011 9:11:08 AM UTC-4, DB12 wrote:

  the app crashes when you try to load it, i don't even get to press the
  button that opens my custom dialog

  On Jul 22, 11:41 am, DB12 daniel@gmail.com wrote:
   Howdy, I searched for about 30 minutes to see if anyone had the same
   issue but couldn't find anything.

  I've had this happen before, typically when refactoring resources and such.

  Try to Clean your project and then rebuild it, what is happening here
 most likely is that R.java is not getting re-generated correctly so it is
 using the wrong identifier mapping for your button id.   Another example of
 this type of behavior is when you see the wrong images being loaded right
 after you do some renaming of image resources.

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

2011-07-29 Thread DB12
heres the log

D/AndroidRuntime(  344):
D/AndroidRuntime(  344):  AndroidRuntime START

D/AndroidRuntime(  344): CheckJNI is ON
D/AndroidRuntime(  344): --- registering native functions ---
D/ddm-heap(  344): Got feature list request
I/ActivityManager(   52): Starting activity: Intent
{ act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000
cmp=com.alion.android
.rangecard/.MainActivity }
I/ActivityManager(   52): Start proc com.alion.android.rangecard for
activity co
m.alion.android.rangecard/.MainActivity: pid=351 uid=10028 gids={1015}
D/AndroidRuntime(  344): Shutting down VM
D/dalvikvm(  344): DestroyJavaVM waiting for non-daemon threads to
exit
D/dalvikvm(  344): DestroyJavaVM shutting VM down
D/dalvikvm(  344): HeapWorker thread shutting down
D/dalvikvm(  344): HeapWorker thread has shut down
D/jdwp(  344): JDWP shutting down net...
I/dalvikvm(  344): Debugger has detached; object registry had 1
entries
D/dalvikvm(  344): VM cleaning up
E/AndroidRuntime(  344): ERROR: thread attach failed
D/dalvikvm(  344): LinearAlloc 0x0 used 639500 of 5242880 (12%)
D/ddm-heap(  351): Got feature list request
D/dalvikvm(  351): GC freed 682 objects / 53944 bytes in 105ms
D/AndroidRuntime(  351): Shutting down VM
W/dalvikvm(  351): threadid=3: thread exiting with uncaught exception
(group=0x4
001b188)
E/AndroidRuntime(  351): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime(  351): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.alion.android.rangecard/
com.alion.android.rangecard.MainActivity
}: java.lang.ClassCastException: android.widget.Button
E/AndroidRuntime(  351):at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2496)
E/AndroidRuntime(  351):at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2512)
E/AndroidRuntime(  351):at android.app.ActivityThread.access
$2200(Activi
tyThread.java:119)
E/AndroidRuntime(  351):at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:1863)
E/AndroidRuntime(  351):at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime(  351):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  351):at
android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime(  351):at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  351):at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime(  351):at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(  351):at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime(  351):at
dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(  351): Caused by: java.lang.ClassCastException:
android.widget
.Button
E/AndroidRuntime(  351):at
com.alion.android.rangecard.MainActivity.onCr
eate(MainActivity.java:60)
E/AndroidRuntime(  351):at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime(  351):at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2459)
E/AndroidRuntime(  351):... 11 more
I/Process (   52): Sending signal. PID: 351 SIG: 3
I/dalvikvm(  351): threadid=7: reacting to signal 3
E/dalvikvm(  351): Unable to open stack trace file '/data/anr/
traces.txt': Permi
ssion denied
I/Process (  351): Sending signal. PID: 351 SIG: 9
I/ActivityManager(   52): Process com.alion.android.rangecard (pid
351) has died
.
I/UsageStats(   52): Unexpected resume of com.android.launcher while
already res
umed in com.alion.android.rangecard
E/gralloc (   52): [unregister] handle 0x4b08d8 still locked
(state=4001)
W/InputManagerService(   52): Window already focused, ignoring focus
gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44dcb100
E/gralloc (   52): [unregister] handle 0x4bff90 still locked
(state=4001)
D/dalvikvm(  172): GC freed 192 objects / 8832 bytes in 127ms

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


[android-developers] Problem after upgrading to revision 12

2011-07-29 Thread darrinps
Everything was working fine until I upgraded to revision 12. Now every
layout I try to bring up gives me the message:

LayoutLib is too recent. Update your tool

Well, I did update it!

Anyone know what the problem is?

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] Update Process

2011-07-29 Thread Security

Hi
Could someone please explain the process to update an apk
NOT using the Android Market , I wish to use my own (guessing web server)

1) Is it a web server that I place my apk on ?
2) How do I trigger the app to check for a new(er) version?  generic 
process is fine / or code


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: What layout the normal 2.3 WVGA 800x480 emulator use?

2011-07-29 Thread Zwiebel
Thanks you could help me a lot!

On júl. 21, 21:16, Dianne Hackborn hack...@android.com wrote:
 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


Re: [android-developers] Update Process

2011-07-29 Thread Raghav Sood
You would need to have your apk on a webserver. Somewhere else (on the same
server or wherever you feel like) have a text file that has a version
number. Have your app retrieve that file and check its own version number
against the one in the file. If the files is greater you have a new version
to update to.

Thanks

On Fri, Jul 29, 2011 at 11:05 PM, Security secur...@isscp.com wrote:

 Hi
 Could someone please explain the process to update an apk
 NOT using the Android Market , I wish to use my own (guessing web server)

 1) Is it a web server that I place my apk on ?
 2) How do I trigger the app to check for a new(er) version?  generic
 process is fine / or code

 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.comandroid-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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=Appaholics

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

[android-developers] TIP: An approach for creating backward-compatible classes

2011-07-29 Thread guich
Hi,

I'm implementing Bluetooth support on my application, which is
compatible with Android 1.6 (and must remain since in Brazil we still
have those devices running out).

By reading this article:
http://developer.android.com/resources/articles/backward-compatibility.html

I found an easy way that allow you to create classes that can be used
in new and old devices.

The idea is the creation of a DUMB class, that would work in devices
that are not compatible, and an IMPLementation class that extends the
DUMB class and would work on devices that are compatible.

So, this is the dumb class:

public class Level5
{
   public static Level5 instance = android.os.Build.VERSION.SDK_INT =
5 ? new Level5Impl() : new Level5();

   public boolean btIsSupported()
   {
  return false;
   }
}

And here the implementation class:

public class Level5Impl extends Level5
{
   public boolean btIsSupported()
   {
  bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  return bluetoothAdapter != null;
   }
}

Then, you can call:

Level5.instance.btIsSupported();

All public fields that are used inside Level5Impl must be declared
inside Level5, and all public methods must be declared in Level5 too,
so they are overriden in Level5Impl.

Hope this helps,

  Guilherme C. Hazan (guich)
  www.totalcross.com

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


Re: [android-developers] Re: button id causes app to crash

2011-07-29 Thread TreKing
On Fri, Jul 29, 2011 at 12:01 PM, DB12 daniel.burg...@gmail.com wrote:

 E/AndroidRuntime(  351): Caused by:
 java.lang.ClassCastException: android.widget.Button
 E/AndroidRuntime(  351):
  at com.alion.android.rangecard.MainActivity.onCreate(MainActivity.java:60)


OK. And now the code at and around your onCreate method, line 60.

-
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] MapActivity MapView Ontouch events

2011-07-29 Thread crem
Hello,
I have a MapActivity and i want to listen if the user taps on the map
(no matter where).
I realized that the onTouchEvent(...) method will not work, because
according to the documentation this method is only called when a touch
screen event was not handled by any of the views under it.
Ok then i tried to register a Listener directly on the map:

map.setOnTouchListener(new OnTouchListener() {

@Override
public boolean onTouch(View v, MotionEvent event) {
log.d(tmp,moo);
return false;
}
});

this works! But only the first time when the user touches the screen.
What's wrong here?

greets

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

2011-07-29 Thread Dianne Hackborn
Consider using loaders, for example:

http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCursorSupport.html

On Fri, Jul 29, 2011 at 9:23 AM, Julius Spencer jul...@msa.co.nz wrote:

 Hi,

 I have been trying to take database reads off the UI thread and am
 currently using an AsyncTask, however I am running into trouble swapping out
 an updated Cursor for a new one in the adapter.
 (I was previously using requery() on the Cursor which had to be on the main
 UI thread)

 The documentation regarding requery() says:
 Just request a new cursor, so you can do this asynchronously and update
 your list view once the new cursor comes back.

 If I update the existing Cursor (mCursor) with the results from a new query
 and do the following in onPostExecute of an AsyncTask:

mAdapter.changeCursor(mCursor);

 it works pretty well on a Nexus 1.  On other devices I am getting errors
 because I haven't closed the old Cursor.
 (java/lang/IllegalStateException;: Finalizing cursor
 android.database.sqlite.SQLiteCursor on null that has not been deactivated
 or closed)

 I have tried creating a new Cursor and swapping the Cursors out like so:

if(null!=mArtists)
mCursor.close();
mArtists = newCursor;

 but I get performance issues and the view of the list goes back to the top.

 Has anyone got any ideas on this?  Alternatively does anyone have or know
 of any documentation for using a CursorLoader against a SQLiteDatabase
 rather than a ContentProvider?

 Thanks for any help.

 Regards,
 Julius.

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




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

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

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

[android-developers] Prolblem with special key numbers and ACTION_CALL

2011-07-29 Thread Sanchiski
i found a problem which I can't find solution, maybe someone has seen
this before?

I use this to perform a call, now if the call is a special number such
as *111#, the character # is not sent to the activity, resulting in a
call to *111 without the # character.

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: +
phoneNumber));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(intent);

Anyone understand what happens?

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


[android-developers] Re: Problem after upgrading to revision 12

2011-07-29 Thread Scott Hammer
I'm in the same boat here. Recently updated to r12 and I can no longer
preview layouts.

On Jul 29, 1:01 pm, darrinps darri...@gmail.com wrote:
 Everything was working fine until I upgraded to revision 12. Now every
 layout I try to bring up gives me the message:

 LayoutLibistoorecent.Updateyourtool

 Well, I didupdateit!

 Anyone know what the problem is?

 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: Prolblem with special key numbers and ACTION_CALL

2011-07-29 Thread Sanchiski
Already found the answer, but in case it might be useful to other
people here goes the answer:

It is required to enconde the number as Uri.enconde(phonenumber), look
next

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: +
Uri.encode(phoneNumber)));

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

2011-07-29 Thread Xavier Ducrohet
You need to update to ADT 12 as well.

On Fri, Jul 29, 2011 at 11:36 AM, Scott Hammer shamme...@gmail.com wrote:
 I'm in the same boat here. Recently updated to r12 and I can no longer
 preview layouts.

 On Jul 29, 1:01 pm, darrinps darri...@gmail.com wrote:
 Everything was working fine until I upgraded to revision 12. Now every
 layout I try to bring up gives me the message:

 LayoutLibistoorecent.Updateyourtool

 Well, I didupdateit!

 Anyone know what the problem is?

 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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

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


Re: [android-developers] Update Process

2011-07-29 Thread New Developer

Thanks
But how do I update it
I check the text file and the apk and text file on the webserver reports 
that there is a new version

What is the process to update it

Thanks again


On 07/29/2011 01:41 PM, Raghav Sood wrote:
You would need to have your apk on a webserver. Somewhere else (on the 
same server or wherever you feel like) have a text file that has a 
version number. Have your app retrieve that file and check its own 
version number against the one in the file. If the files is greater 
you have a new version to update to.


Thanks

On Fri, Jul 29, 2011 at 11:05 PM, Security secur...@isscp.com 
mailto:secur...@isscp.com wrote:


Hi
Could someone please explain the process to update an apk
NOT using the Android Market , I wish to use my own (guessing web
server)

1) Is it a web server that I place my apk on ?
2) How do I trigger the app to check for a new(er) version?
 generic process is fine / or code

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
mailto: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




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

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

2011-07-29 Thread Adam Ratana
On Friday, July 29, 2011 12:58:04 PM UTC-4, DB12 wrote:

 Adam, that makes some sense, I'll investigate it. 

 I took my app home from work and for some reason it did not crash when 
 I added that 3rd id (my home comp runs windows 7).  Then I took it 
 back to work (where we have xp) and it works fine with the extra id. 
 But then I added another custom dialog with 3 buttons and it crashed 
 again. 


The other thing I found is that sometimes you may need to check all your 
XMLs for any errors, too.  But if its getting a class cast exception and 
you're absolutely positive the ID you're using is the right one, it's 
probably an R generation issue, it may not be ordering the IDs right so 
yours is now pointing to the wrong type of 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: AppWidgetManager#updateAppWidget behavior question

2011-07-29 Thread Padma
Even I am facing a similar issue with lists in appwidgets. And I
haven't been able to find a solution till now. I tried using the
notifyAppWidgetViewDataChanged(). This has fixed a few cases of the
list not getting refreshed. But I am still getting the issue randomly.

On Jul 28, 4:35 pm, Brad mcmanus.b...@gmail.com wrote:
 I am developing an appwidget for 3.x and I have run into a roadblock.
 I would like to manually update an appwidget that contains a list by
 pressing a refresh button on the appwidget. I am unable to manually
 update the content of my appwidget because it appears that the
 AppWidgetManager does not push my updates to the home screen promptly,
 rather it waits until the ListView is scrolled to constructed apply
 the new RemoteView. Here is the relevant code:

 MyAppWidgetProvider extends AppWidgetProvider {
 
    @Override
    public void onReceive(Context context, Intent intent) {

 if(intent.getAction().equals(AppWidgetManager.ACTION_APPWIDGET_UPDATE))
 {
          AppWidgetManager mgr = AppWidgetManager.getInstance(context);
          int appWidgetId =
 intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID);

          // create the RemoteView
          Intent serviceIntent = new Intent(mContext,
 MyAppWidgetService.class);
          serviceIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
 appWidgetId);

          RemoteViews appWidget = new
 RemoteViews(context.getPackageName(),
 R.layout.appwidget_widget_layout);

         // set the listener for my configuration activity
         Intent configureAction = new Intent(mContext,
 MyAppWidgetConfigure.class);
         configureAction.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
 appWidgetId);
         PendingIntent configurePendingIntent =
 PendingIntent.getActivity(mContext, 0, configureAction,
 Intent.FLAG_ACTIVITY_NEW_TASK);

 appWidget.setOnClickPendingIntent(R.id.appwidget_configure_widget_button,
 configurePendingIntent);

          appWidget.setRemoteAdapter(appWidgetId,
 R.id.appwidget_flight_list, serviceIntent);
          mgr.updateAppWidget(appWidgetId, appWidget);
       }
    }

 }

 MyAppWidgetService extends RemoteViewsService {
    @Override
     public RemoteViewsFactory onGetViewFactory(Intent intent) {
        return(new MyRemoteViewsFactory(this.getApplicationContext(),
 intent));
     }

    public class MyRemoteViewsFactory implements
 RemoteViewsService.RemoteViewsFactory {
       ….
       ….
       // this contains all of the code for downloading the proper data
 for the list, etc...
     }

 }

 Here is my problem: my configure activity (which just so happens to be
 the same activity that is launched when the appwidget is first
 created, by placing it in the xml metadata object) broadcasts the
 ACTION_APPWIDGET_UPDATE intent, which is received by
 MyAppWidgetProvider correctly. The mgr.updateAppWidget() method gets
 executed (I have confirmed by placing log statements on either side),
 yet for some reason the widget does not get updated on the home screen
 promptly. Instead, it will update only if I scroll the ListView and it
 needs to grab new rows, then the MyWidgetService gets constructed and
 applied to the widget (with the correctly updated data that I intended
 it to have).

 So, after scouring the documentation/web for days this seems like the
 correct usage. Unfortunately, the app widget does not update as I
 would like. What am I doing wrong? Thanks for any help, in advance. I
 would love to talk about this problem and share more code if need be.
 I just want to figure out this problem!

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


[android-developers] Activity question

2011-07-29 Thread b_t
Hi,

I have an app A and an app B. B has an activity called C.

C can be displayed in two ways:

- launch B which displays C
- launch A and from A I start activity C

Now C activity is displayed in two different task.

What flag should I use when I start C from app A if I would like
that C belongs to only B, not to A.

I hope I was clear :)
So I don't want that activity C could be displayed in two tasks
in two different states.

Thanks, Tamás

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

2011-07-29 Thread TreKing
On Fri, Jul 29, 2011 at 2:13 PM, b_t bartata...@gmail.com wrote:

 I have an app A and an app B. B has an activity called C.

 C can be displayed in two ways:

 - launch B which displays C
 - launch A and from A I start activity C


How are you launching Activity C that belongs to App B from App A?

-
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: Extending Interface of Dynamically Loaded Dex File

2011-07-29 Thread Streets Of Boston
Are you sure that any of the old interfaces does not refer to one of the new 
one(s) (indirectly)?
If you're sure that Foo2 (as an example) is entirely self-contained not 
referred to by any other 'old' interface/class in Interface.jar, then you 
should not have any problems.

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

[android-developers] Strange behavior after signing build with release keystore

2011-07-29 Thread draf...@gmail.com
Having some really strange bugs with my Android application at the
minute, it I run it from Eclipse it runs fine, pretty much perfect.

It contains a login screen that I can access and get to my main screen
fine when running through Eclipse. When I press the home key and
return to my application it returns to the last position (Activity)
the application was in.

However when I release sign a build and deploy it on the device it has
different behavior,after going through the login screen when I press
home and then return to the application the login screen always
appears.

Code is identical in both builds, only difference is one is signed
with the default debug keystore while the other is signed with my own
release keystore.

Has anyone come across this? Its really confusing!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: “fixing” a live wallpaper in portrait mode

2011-07-29 Thread Hal Harrison
See if this makes any sense in your case.

Start with a background large enough to look OK in either orientation
without change. Upon twist, onSurfaceChanged(), recalculate the
locations of your bitmaps and display them at the new locations.

Hal Harrison.

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


[android-developers] Re: Problem after upgrading to revision 12

2011-07-29 Thread darrinps
Thanks. Doing that now.

It would be GREAT if the error message would mention that. So instead
of:

LayoutLib is too recent. Update your tool

How about saying something like:

LayoutLib is at version 12. Please update ADT to match.


On Jul 29, 1:39 pm, Xavier Ducrohet x...@android.com wrote:
 You need to update to ADT 12 as well.









 On Fri, Jul 29, 2011 at 11:36 AM, Scott Hammer shamme...@gmail.com wrote:
  I'm in the same boat here. Recently updated to r12 and I can no longer
  preview layouts.

  On Jul 29, 1:01 pm, darrinps darri...@gmail.com wrote:
  Everything was working fine until I upgraded to revision 12. Now every
  layout I try to bring up gives me the message:

  LayoutLibistoorecent.Updateyourtool

  Well, I didupdateit!

  Anyone know what the problem is?

  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

 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. Thanks!

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


[android-developers] Image Gallery

2011-07-29 Thread zahiritpro
Hi guys :)..I'm planning to buid an image gallery .How to develop an
application that would modify the existing gallery of the installed
device by adding some additional toolsPlease let me know as soon
as possible.

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


[android-developers] Green to java

2011-07-29 Thread Marcelo Duende
Hey people,

I wanted to introduce myself. My name is Marcelo, actionscript
developer and now working with Java/Android.

I would like to encourage you guys to take a look in my toolkit which
I have started this week. There's some interesting code optimization
over there.

https://github.com/marceloduende/JZoo/tree/master/src/com/marceloduende/jzoo

There's a lot to do and I'm keeping it updated as much as I can.

As seniors in Java, I'd like to hear your opinions about the code, and
if I'm going in the right way.

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] Need Information on Bluez Stack of Android(v 2.2 Froyo)

2011-07-29 Thread skalluraya
Hi All,

I require some information about Bluez stack.

What are the Bluetooth profile supported by Bluez stack in Android
version 2.2(Froyo)?

Out of the above profile which profiles are exposed to Android
framework or Applcaition layer for Android v2.2(Froyo)?

Is File Transfer Profile supported in the Dalvik VM, so that I could
make use of these api and access the profiles from Applicaiton Layer?

If these profile are not supported in Application or Dalvik layer How
can I go enable these profiles and use in Application Layer without
rebuilding the Android Source?

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

2011-07-29 Thread neo
Hey,

I was just trying to identify my app's users uniquely through their
device Ids. I came across the concept of using TelephonyManager [which
gives IMEI, unique for each phone] and ANDROID_ID but i read on blogs
that at times ANDROID_ID returns just 'null' . I tested using
ANDROID_ID on a few devices and didn't face this issue.

Has anyone faced this issue (ANDROID_ID giving 'null' or ANDROID_IDs
getting repeated on same or different devices) ??

P.S. I have to use both of them [IMEI+ANDROID_ID] for certain
purposes.

Thanks and Regards

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


[android-developers] maps not visible in android emulator

2011-07-29 Thread Rajesh V
Hi,i'm new for developing android application...When i'm trying to
display google maps in emulator there is an error,,i installed the
application.but when i'm opening this error is coming The application
* stopped unexpectedly,please try again.-force close The other
application which is not using the maps like facebook,that are running
normally. i'm developing using Eclipse.here is the source code
AndroidManifest.xml,MapMe.java and main.xml respectively.. pls guide
me..
My sys config:
windows 7,64 bit,
emulator is Google_API 10
Eclipse EE IDE

http://www.jameselsey.co.uk/blogs/techblog/android-how-to-display-a-map-the-easy-way/
from this link only i tried the application.--

SOURSE CODES:
AndroidManifest.xml::
?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
 package=com.jameselsey.mapme
 android:versionCode=1
 android:versionName=1.0
   application android:label=MapMe android:icon=@drawable/icon
   activity android:name=MapMe
 android:label=@string/app_name
   intent-filter
   action android:name=android.intent.action.MAIN /
   category
android:name=android.intent.category.LAUNCHER /
   /intent-filter
   /activity
   uses-library android:name=com.google.android.maps /
   /application
   uses-permission android:name=android.permission.INTERNET /
/manifest

MapMe.java::
package com.jameselsey.mapme;

import android.os.Bundle;
import com.google.android.maps.MapActivity;

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

   @Override
   protected boolean isRouteDisplayed()
   {
   return false;
   }
}

main.xml::

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
   android:orientation=vertical
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   
TextView
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   android:text=@string/hello
   android:apiKey=0yKqyux1_CwihgyJqP6BttGJ_0Pnc9pvCQ9vmNA
   /
/LinearLayout



Pls help me!

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


Re: [android-developers] information about android softare

2011-07-29 Thread Nirav Parmar
Deepak,
  Android is not lyk ny software..u can say android, OS for
moblies...n yes u can install android in PC but jst for developing
applications..

Nirav Parmar.


On Tue, Jul 26, 2011 at 1:44 PM, deepak gusain deepakgusai...@gmail.comwrote:

 Dear all android-developers,

 I want to know or information about android software. android software is a
 mobile software or now its possible to install in pc.

 so please give me details about this software

 thanks

 --
 Regards
 Deepak Gusain
 RHCSA - MCITP
 M.no:- 9417248523

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Is there a maximum limit of apps a user can install in the phone?

2011-07-29 Thread Mikey
Hi,

i'm testing out the limits of android phones and i've installed about
1087 apps (including some system apps that is already there) in my
Galaxy S2 phone.

There's still quite a lot of space:

System ROM: 528MB (43.0MB free)
Internal: 2.11GB (711MB free)
SD: 12.3GB (10.0 GB free)
Ext. SD: 32GB (15GB free)

No matter how i configure or uninstall and install, i'm always stuck
at 1087 apps. I've tried uninstalling a really small app (less than a
M) and install a big app like 2-6M, it allows me to install. But once
i try to install another, it kept giving me Insufficient Storage
Available.

It seems like there is a hard limit on the number of apps one can
install on an android phone. Is this true?

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


[android-developers] Need Guidance For Creating A Phone Book Application

2011-07-29 Thread vikas singh

I need to create a phone-book AS MY PROJECT. I'm following
PROFESSIONAL ANDROID DEVELOPMENT BOOK OF Wrox Publication  the DEV
GUIDE given on developer.android.com. I do know the basic terms and
behavior of the android calls and functions.. SO some one, please
guide me the sequential step wise mechanism of creating it..

Just show me the path, I'll try to follow the step and post the
problem, if I'll have any.

please Help me :) :) thank you 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] can't find The Device Availability dialog

2011-07-29 Thread martypantsROK
This is my first app and on uploading it tells me my app is available
to 0 devices. Apparently, it is
devices with these features, as defined in your application
manifest  Well, no where in the developer resources does it tell me
how to put devices into my manifest and there is not a link on the
Developer Console. This is only a link to learn more that tells me I
can click on a Show Devices link back on the DC that doesn't
exist.

So, how can I either
   - put devices in my manifest
 or
  - find the hidden link to the device list?

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


[android-developers] ListFragment doesn't save the bundle in onSaveInstanceState()

2011-07-29 Thread Maria D.
I'm new to android and I'm facing the following problem. I'm
developing for both, Android 2 and 3, and this is why I use fragments.
However to make the app working on Android 2 devices I import
android.support.v4.app.ListFragment (not sure if it makes any
difference with this problem). I need to maintain selection within my
ListFragment when orientation of the screen changes. I'm overriding
onSaveInstanceState() method and put an int into the bundle. When the
screen is rotated, this method is called and the int is added to the
bundle. However when onActivityCreated() is called, its bundle is
null. I am following the example provided on Android website:
http://developer.android.com/reference/android/app/Fragment.html, but
as mentioned above - after onSaveInstanceState() is called, the bundle
in onActivityCreated() is still null.

Here's the code:

import android.support.v4.app.ListFragment;
public class VisitsHomeFragment extends ListFragment {
private int selectedPosition = -1;

@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (savedInstanceState != null) {  //savedInstanceState is
always null here!
if (savedInstanceState.containsKey(SELECTED_POSITION)) {
selectedPosition =
savedInstanceState.getInt(SELECTED_POSITION);
}
}
}

@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt(SELECTED_POSITION, selectedPosition);
}
}

I would appreciate any help with this problem.

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


[android-developers] A textview in Preference Custom Layout not updating

2011-07-29 Thread na89
A Textview in Preference Custom Layout is not updating even from
onCreate of the preference activity..
I have also tried doing it on UI thread...

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


[android-developers] Re: Eclipse - Emulator is not running

2011-07-29 Thread Dalton Cézane
Anyone? Is this kind of doubt in the wrong place? If it is, please tell me
in what list I must ask.

Thanks.

On Wed, Jul 27, 2011 at 4:12 PM, Dalton Cézane daltoncez...@gmail.comwrote:

 Hi, I am new with Android development and I was trying some examples. But
 when I realize the high delay of the emulator, I did something and now I
 just get these messagens when I run my codes:

 [2011-07-27 15:56:42 - Emulator] WARNING: Data partition already in use.
 Changes will not persist!
 [2011-07-27 15:56:43 - Emulator] WARNING: SD Card image already in use:
 /home/dalton/.android/avd/AndroidVM.avd/sdcard.img
 [2011-07-27 15:56:45 - Emulator] ko:Snapshot storage already in use:
 /home/dalton/.android/avd/AndroidVM.avd/snapshots.img

 Can anyone help me to solve this problem, please? After these messages the
 emulator is not initializing...

 Thanks in advance.

 --
 ===
 Dalton Cézane - Smarteju Tecnologia
 Especialista em Ciência da Computação (UFCG)
 Bacharel em Ciência da Computação (UFCG)
 Técnico em Informática (ETER)




-- 
===
Dalton Cézane - Smarteju Tecnologia
Especialista em Ciência da Computação (UFCG)
Bacharel em Ciência da Computação (UFCG)
Técnico em Informática (ETER)

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

2011-07-29 Thread ashispoddar
Hi All,
I'm trying to use the Nexus S model and do P2P comm between 2 phones
but it seems I cannot exchange more than 1 message each side with a
TAP. Reading some other threads , it seems OS still doesn't support
TRUE P2P mode where we can exchange multiple messages in sequences in
a request/response mode.
Is there anyone successfully implemented continuous messages exchanges
using public/private API in android 2.3.3 ?  I have some proposal to
use reflection to access low-level LLCP classes to get the behavior.

thanks in advance,
-ashis poddar

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

2011-07-29 Thread MUZAMMIL
Hi everyone,

I am a new developer in android, I trying to develop a nook color
application in android for interactive kids book.

Thanks,
Muzammil

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


[android-developers] Solve my problem!

2011-07-29 Thread Rajesh V
Hi,i'm new for developing android application...When i'm trying to
display google maps in emulator there is an error,,i installed the
application.but when i'm opening this error is coming The application
* stopped unexpectedly,please try again.-force close The other
application which is not using the maps like facebook,that are running
normally. i'm developing using Eclipse.here is the source code
AndroidManifest.xml,MapMe.java and main.xml respectively.. pls guide
me..
My sys config:
windows 7,64 bit,
emulator is Google_API 10
Eclipse EE IDE

http://www.jameselsey.co.uk/blogs/techblog/android-how-to-display-a-map-the-easy-way/
from this link only i tried the application.--

SOURSE CODES:
AndroidManifest.xml::
?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.jameselsey.mapme
  android:versionCode=1
  android:versionName=1.0
application android:label=MapMe android:icon=@drawable/icon
activity android:name=MapMe
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
uses-library android:name=com.google.android.maps /
/application
uses-permission android:name=android.permission.INTERNET /
/manifest

MapMe.java::
package com.jameselsey.mapme;

import android.os.Bundle;
import com.google.android.maps.MapActivity;

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

@Override
protected boolean isRouteDisplayed()
{
return false;
}
}

main.xml::

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

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:text=@string/hello
android:apiKey=0yKqyux1_CwihgyJqP6BttGJ_0Pnc9pvCQ9vmNA
/
/LinearLayout



Pls help me!

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


[android-developers] Re: SDK Tools r12 causing aapt to fail

2011-07-29 Thread Diederik
From the logged bug:

Comment 6 by tomy...@gmail.com, Jul 26
parent=@*android:style/x seems to be the work around in the new
Tool.

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

2011-07-29 Thread Yue Zeng
Chinese?
On 26/07/2011 12:49 PM, work_84 work8...@gmail.com wrote:
 Hello,

 I am developing an Android application which has to send/receive data
 to/from a remote server securely.
 The Android application has to authenticate the server and the server
 needs to authenticate the device. The data sent/received should also
 be encrypted.
 I have implemented similar feature on desktop applications using
 OpenVPN and thrift(Since the server is in C++ and the client in java).
 I was planning to use the same on Android but am not sure if openvpn
 package is available to be used by android applications.

 Any suggestions on this will be very much helpful.

 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

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

[android-developers] Eclipse - Emulator is not running

2011-07-29 Thread Dalton Cézane
Hi, I am new with Android development and I was trying some examples. But
when I realize the high delay of the emulator, I did something and now I
just get these messagens when I run my codes:

[2011-07-27 15:56:42 - Emulator] WARNING: Data partition already in use.
Changes will not persist!
[2011-07-27 15:56:43 - Emulator] WARNING: SD Card image already in use:
/home/dalton/.android/avd/AndroidVM.avd/sdcard.img
[2011-07-27 15:56:45 - Emulator] ko:Snapshot storage already in use:
/home/dalton/.android/avd/AndroidVM.avd/snapshots.img

Can anyone help me to solve this problem, please? After these messages the
emulator is not initializing...

Thanks in advance.

-- 
===
Dalton Cézane - Smarteju Tecnologia
Especialista em Ciência da Computação (UFCG)
Bacharel em Ciência da Computação (UFCG)
Técnico em Informática (ETER)

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

2011-07-29 Thread Joshua Smith
Reboot.  Uptime reported 30 seconds up when we reconnected.

On Jul 28, 2011, at 1:02 PM, Chris Stratton wrote:

 On Thursday, July 28, 2011 11:21:18 AM UTC-4, Joshua Smith wrote:
 Our app, which works fine in 3.1 and earlier, has started experiencing 
 a hard crash that cause our XOOM to reboot.
 
 Kernel reboot, or android runtime restart?
 
 You can tell the difference soon thereafter from cat /proc/uptime or (if 
 present) the uptime command at the adb shell
 
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: grab original image file from Camera intent

2011-07-29 Thread Austin
Bump, I would like to hear a response to this as well. I am developing
a camera app using the stock camera and I would like to know how to
have the app only store the image in the directory of my choice and
NOT the dcim folder.

On Jun 24, 11:39 am, Grig grig.w...@gmail.com wrote:
 I have followed the instructions and everything is working fine with
 the camera.  I can kick off the camera and get the Bitmap returned and
 do with it what I want.

 Is it possible to retrieve the actual path to the image file that was
 taken by the camera?  I am seeing that is actually storing the image
 under an Image*.jpg file name.

 My application is making a new file from the bitmap, compressing it,
 and storing it under my own application directory.

 What I am trying to accomplish is if I delete my application picture,
 I want to delete the picture stored by the camera itself.  Or pass in
 a location where the camera can store the picture once its taken.

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


[android-developers] Processing camera frames on Android

2011-07-29 Thread redrum008
Hi,
i want to use my android phone to process image, for example, make any
operation with de frame and show it with de change (show the image in
black/white, grayscale, sepia, etc).
This is my code:

public class CameraPreview extends SurfaceView implements
SurfaceHolder.Callback, PreviewCallback {
SurfaceHolder mHolder;

Camera mCamera;

/** The drawable to use as the background of the animation canvas */
private Bitmap mBackgroundImage;

// This variable is responsible for getting and setting the camera
settings
private Parameters parameters;
// this variable stores the camera preview size
private Size previewSize;
// this array stores the pixels as hexadecimal pairs
private int[] pixels;

public CameraPreview(Context context) {
super(context);
SurfaceHolder mHolder = getHolder();
mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_NORMAL);
this.setFocusable(true);
this.requestFocus();
}

public void surfaceCreated(SurfaceHolder holder) {

mCamera = Camera.open();
}

public void surfaceDestroyed(SurfaceHolder holder) {
mCamera.stopPreview();
mCamera.release();
mCamera = null;
}

public void surfaceChanged(SurfaceHolder holder, int format, int w,
int h) {
setImageSize();
mCamera.startPreview();
mCamera.setPreviewCallback(this);

}

public void onPreviewFrame(byte[] data, Camera camera) {
// transforms NV21 pixel data into RGB pixels
decodeYUV420SP(pixels, data, previewSize.width, 
previewSize.height);
//here process the image
}
}

the problem is that i don't know how to show the new image processed.
In onPreviewFrame I convert yuv to rgb, I process the image i.e.
convert in grayscale, but what i do for show the new image?

I need help, thanks!!!

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


[android-developers] ListView borders

2011-07-29 Thread mausim
Hi,
My simple project is to populate a ListView with an array from
arrays.xml.

The graphic result is a serie of lines of text with border, like
cells.
I would like to remove these borders, in order to the window show
characters only, like a plain text.

It would be possible?

Thank you.

main.xml

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

ListView
android:id=@+id/minhaText
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_gravity=left
/
/LinearLayout
*
arrays.xml

?xml version=1.0 encoding=utf-8?
resources
string-array name=meuArray
item![CDATA[A luz forte do sol lá fora fazia um grande contraste
com o escuro do cômodo.]]/item
item![CDATA[Poucas pessoas.
*
Java:

(...)
Resources res = getResources();
  String [] meuArrayConto = res.getStringArray(R.array.meuArray);
  ArrayAdapterString adapter = new
ArrayAdapterString(this,R.layout.menu_item,meuArrayConto);
  setListAdapter(adapter);
  ListView lv = getListView();
  lv.setTextFilterEnabled(true);
  lv.setOnItemClickListener(new OnItemClickListener() {
@Override
(...)

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

2011-07-29 Thread Shreyas Dhond
I am trying to make an app that loads and displays obj files. I came
across a model loader on the downloads page (http://code.google.com/p/
android-gl/downloads/detail?name=ModelLoader_0.1.zipcan=2q=) and I
am trying to implement it. I am having trouble figuring out how the
modelloader.jar file posted previously on the download can be
incorporated into my android project.

If anyone has used any 3D model loader and has gone through this
process, I would really appreciate some help on how to get this
working.

Regards,
Shreyas

P.S to Brendan: Since you posted both downloads, I would really
appreciate your feedback.

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


[android-developers] Interaction between activities

2011-07-29 Thread Victor Basurto
Hi, I'm new in android, i have a problem, i have 3 activities, in the
first one i have a map where i want to draw a point with a coordinates
that obtain in the second activity and third one i have a picture, but
i want to use and refresh this coordinates and navigate between
activities one and third, how can i refresh this coordinates obtained
in the second activity without go to this.

Thanks excuses for my english

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

2011-07-29 Thread kus
Hello,

do you have the answer ?

Thinks,

Guillaume

On 7 juin, 16:07, Jerry Joe yuleib...@gmail.com wrote:
 I'd like to create anAutoCompleteTextView, and make its dropdown
 items to be rendered in one separate ListView. This is just like
 Google's instant search page.

 I tried the following ways to do, but failed:
 1) in inherited class of CursorAdapter, override method newView() to
 append view item to ListView.
     public View newView(Context context, Cursor cursor, ViewGroup
 parent) {
         LayoutInflater inflater =
 (LayoutInflater)context.getSystemService(LAYOUT_INFLATER_SERVICE);
         TextView view =
 (TextView)inflater.inflate(android.R.layout.simple_dropdown_item_1line,
 mListView, true);
         return view;
     }
     But finally I got unsupportedOperationException, because after the
 adapter being set, adding new views to the ListView is prohibited.

 2) call method mAutoTextView.setDropDownAnchor(R.id.memo_listview) to
 anchor the dropdown list to the ListView. But after test, I found that
 the dropdown list is not rendered in the ListView, but floating at top
 of theAutoCompleteTextView.

 Please help me on this or just give me some tips. Thanks!

 -- Jerry Joe

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


[android-developers] Cannot stop timer from onDeleted() in Android Widget

2011-07-29 Thread Superjelli
I have got a Widget and it starts a task in onUpdate():

timer = new Timer();
myTime = new MyTime(appWidgetManager);
timer.scheduleAtFixedRate(myTime, 1, 1);


I try to stop it in onDeleted, because if I won't it would still be
active in the background, although I already deleted this Widget from
my Homescreen.

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
timer.cancel();
super.onDeleted(context, appWidgetIds);
};

But Eclipse gives me this error:

07-28 22:32:39.191: ERROR/AndroidRuntime(3804): FATAL EXCEPTION: main
07-28 22:32:39.191: ERROR/AndroidRuntime(3804):
java.lang.RuntimeException: Unable to start receiver
com.zucizu.waden.WadenNewsWidget: java.lang.NullPointerException
07-28 22:32:39.191: ERROR/AndroidRuntime(3804): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:1926)
07-28 22:32:39.191: ERROR/AndroidRuntime(3804): at
android.app.ActivityThread.access$2400(ActivityThread.java:123)
07-28 22:32:39.191: ERROR/AndroidRuntime(3804): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)
...

What am I 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] How to force stop launched process even running on front ?

2011-07-29 Thread rony
I am writing a task manager service and need to force close any
running process, lets say browser, I tried using
killBackgroundProcesses,restartPackage,killProcess but none of these
force closes process ( e.g browser ) when process is on front else
they are working.

I want to force stop the process even when process is running on
front. What should I do now ??

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


[android-developers] Problem in starting Android emulator

2011-07-29 Thread SamShah
Hej,

I am having problem in setting it up and running for the first time.
Each time when I try to start it it gives an error of,
invalid command-line parameter: Files.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information
I had no idea where to look for the solution?
Can somebody help me please
tnx

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 I find cause of Conversion to Dalvik format failed with error 1 (Possibly Proguard related?)

2011-07-29 Thread Mareng
I am using the latest version of the ADT plugin for Eclipse  (12), and
suddenly I started to get the following error.

 Conversion to Dalvik format failed with error 1

The error message is a popup window, and even though I have changed
the build output to verbose, there are no errors shown in the window.

Basically Proguard seems to run properly but then the error pops up,
no errors in the console though.

The problem seems to go away when I disable proguard.

All of the advice on this problem I can find talks about doing a clean
build. This does not help. I have even tried re-installing my
environment also does not help.

Please can someone point me in the right direction, I have no idea at
the moment where to even start looking for the problem. This is
preventing the release of our app.

Many 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] hiii dearssssss

2011-07-29 Thread Suresh Indian
plsss help me , iam new to android ,,, pls give the
code for bluetooth printingg:)
thanks in advance





















Together For ever
(¨`·.·´¨)
`·.¸(¨`·.·´¨)Thanks
(¨`·.·´¨)¸.·´  
`·.¸.·´Regards
  §u®€§#[!ѝÐ!@ѝ]

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

[android-developers] SMS_RECEIVED priority level problem in apps

2011-07-29 Thread Jim
Hey,

Like a lot of developers, we have apps that use the permission
android.permission.RECEIVE_SMS and the intent filter
android.provider.Telephony.SMS_RECEIVED, an ordered broadcast intent.
Android documentation states (here:
http://developer.android.com/reference/android/content/IntentFilter.html#SYSTEM_HIGH_PRIORITY)
that an intent-filter, non-system maximum priority should be less than
1000 (such as 999) and minimum priority greater than -1000 (such as
-999). Anything outside of that range results in “unpredictable”
behavior, which is what we see. We also see system apps that are not
flagged as system apps, so their priority level is also “wrong” even
though it would have been permissible.

If the documentation is wrong, please correct it. If not, I hope this
helps raise awareness of a problem that hurts a user’s overall Android
experience, as well as app-specific experience. These apps are causing
problems, I see user complaints on the market for these apps, but the
problem does not get solved.

Can future versions of Android provide a warning or even throw a
compilation or installation error? Or is there a reason that non-
system apps are allowed to install with intent priorities outside of
the acceptable range?

This is a long list (135 apps, some are old and have been fixed,
Handcent for one) with well-known apps and demonstrates the scope of
the problem. We know there are many more out there, and will add to
this list.

I suggest that text message replacement apps (like Handcent or GoSMS)
use priorities that range from -499 to 499. That would allow app-level
text message communication (like Lookout) and SMS spam blockers 500 to
999 and -999 to -500. The obvious conflict is that a text message
replacement app that receives app-level messages or spam will attempt
to process it, display it, etc. Then spam or meaningless/blank
messages appear to the user, or post-processing effects occur. When
the priority is set outside of the acceptable range, the behavior is,
as stated in the documentation, unpredictable. It is not even
consistent on a single phone (an incorrect priority setting leads to
blank messages, unwanted display of messages, duplicate messages or no
processing at all; sometimes there is a substantial processing delay,
sometimes none at all – all on a single phone).

If your app is on this list, please fix it. We have advised some of
our users to uninstall apps on the list, and that has solved problems
on their phones. We do not want to police this – or advise that an app
be uninstalled.

Thanks,
Jim

This list of apps has the intent filter priority and the package name.

PriorityPackage
1000com.lookout
1000com.parag.smsboxad
1000com.elinext.android.fivemfive
1000com.mymobileprotection20
1000com.techD.privacy
1000net.anei.cadpage
1000com.myandroidprotection20
1000com.parag.smartcallexlite
1000com.rvo.plpro
1000com.lums.tracker
1000the.sinbox2
1000com.devfo.mkt.tex2utils
1000com.oneos.comp
1000com.vzw.vvm.androidclient
1000com.parag.smsbox
1000com.silenttracker
1000com.som4tress
1000com.soonoh.android.purifytext
1000com.tobwithu.lightsms
1000de.telekom.mds.mbp
1000jp.co.telemarks.callfilterpro
1000net.juniper.junos.pulse.android
1000samsapps.games.domino
1001org.thoughtcrime.securesms
1002com.aegislab.sd3prj.egismobile
1002org.thoughtcrime.redphone
1150com.nqmobile.antivirus20
1150com.netqin.antivirusgm20
1150com.nqmobile.antivirus15
1150com.mymobileprotection15
1150com.netqin.antivirusgm15
1151com.nqmobile.antivirus20
2000com.vzw.vvm.androidclient
com.mobegen.qcus001603
com.mobegen.qcus001604
com.wali.walisms
com.mblox.xrio.rio
com.mobegen.qcus001602
com.mobegen.qcus001612
com.mobegen.qcus001614
com.snuko.android
com.ammeon.gcs
com.boardgame.main
com.joansoft.track
com.tictactoe.vs.main
com.tictactoefriends.main
zeroio.developer.ringfilter
1   com.netqin.mm
1   cri.sanity
1   com.smitten.wellstext
1   com.tictactoefriends.main
1   de.SmartDyne.Donate.EasyProfiles
1   com.lancelesslie.PhoneLocator
10001   com.rhymes.client.tictactoe
10001   com.tictactoexox.main
10001   com.xoxowinapp.main
18977   com.joansoft.shareit
1   com.joansoft.mapus
32000   com.iba.ussdchecker
32768   com.webroot.security
65000   com.Guardam.SmsGuard
65000   com.jigrahak.ngpay
65000   com.Guardam.JunkFirewall
65530   CN.MyPrivateMessages
65530   com.guardam.gblockerTrial

Re: [android-developers] Nexus NFC PN544 Stack/Hardware

2011-07-29 Thread Nick Pelly
Hi Dean,

On Mon, Jun 27, 2011 at 1:11 PM, Dean Brotzel dean.brot...@gmail.comwrote:

 This is for Google NFC engineers (Nexus S, PN544 hardware/firmware
 stack), hopefully they will see this.  Or perhaps there is a better
 why to contact said engineers?

 I'm working on a semi passive NFC (ISO14443A) custom sensor tag
 (hardware/firmware stack) which I would like to pair with the Nexus S
 and future android smart phones.  This tag is a much more than your
 basic run of the mill passive NFC tag.  The tag sports multiple
 environmental sensors, large memory and a large command set to name a
 few.

 Development has been going smoothly until I started to implement
 commands that take longer to process and return.  I had anticipated
 such issues and was hoping I could use FWT via FWI (frame waiting
 time) and the S(WTX) command via WTXM (frame waiting time extension
 command) from the ISO 14443-4 protocol.  (I have used ISO 14443A
 terminology here)  I have verified the Nexus S utilizes the above
 mechanisms but the accuracy differs from the standard.  I have found 2
 issues:

 1) the FWT provided by the Nexus S is much greater (at least 4X) than
 what the standards specifies for a specific FWI
 2) also the frame waiting time extension command doesn't seem to
 actually extend the wait time.  The Nexus S will respond to a S(WTX)
 command but doesn't seem to actually increase the time before a
 timeout occurs.

 I'm wondering if these are known issues? Is this question better
 suited for NXP or Samsung as I'm not sure how much is done in the
 PN544 and who actually wrote the firmware for the PN544 with the Nexus
 S.


These are not know issues, I have raised them internally, and with some luck
hope to update you if we can reproduce and/or fix them in the future.

Cheers,
Nick

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

[android-developers] How to tell if an intent-filter caught a custom url from the browser

2011-07-29 Thread Tom Fairfield
From a webpage I need to try several different custom urls:

foo://bar.baz
bar://bar.baz
baz://bar.baz

Each of these has an intent filter registered by a native app.  Zero or more
of these native apps may be installed.

I want to try each url in order and, when the first url is handled by a
native app, stop trying any further.

Is there a way to determine that a native app has launched?  I tried
window.onblur but that doesn't seem to fire when the browser leaves the
foreground.

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