Re: [android-developers] Compiling Android Source

2011-04-09 Thread Andrew
Well that does make more sense. I guess the point at which lunch stopped 
working was when I restarted the shell. So I then when and installed lunch, 
which then overrode and use of the lunch script from then on.

Any thoughts on the linking error when compiling using -j4? (That being 
said, having completely removed and re-downloaded the source - there have 
been no errors with char casting I didn't realise that was a missing 32-bit 
library... and I am running make using -j4 and it has already gone way past 
where it normally stops...).

I am not really trying to develop for a particular device at this point - I 
am just trying to write an app that uses some of those 'private' libraries. 
However when Honeycomb source comes out I will be after that. Busy breaking 
in my XOOM right now...

Thanks for the help

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

[android-developers] View & Open files downloaded from the server

2011-04-09 Thread Salma hamed
Hi,
I'm having an Android Ftp Client, I download different types of files
(.txt , .pdf , .mp3) from the server. And then I list all the files I
downloaded.
So my questions are as follows:
1) if I downloaded it on the internal memory of the Android device. Is
there a way to view the file ??
2) If the file is on the SD card & I listed the files by their names.
What I want to do is that by clicking on the name the file is opened.
Meaning if the file name is "test.pdf" & I clicked on it it should be
opened in the same way the pdf file is opened in the pdf viewer, Same
thing goes for mp3 files for example, by clicking on the file I want
it to be played.

Thanks alot for the help in advance

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


Re: [android-developers] Compiling Android Source

2011-04-09 Thread Nathan Forbes
On 04/10/11 01:48, Andrew wrote:
> I am having some difficulty compiling the source code. This post is
> largely posting my problems and solutions that I was unable to find
> anywhere else.
>
> (I have been following the directions from here:
> http://source.android.com/source/downloading.html)
>
> Repo seems to be downloading the code without a problem.
>
> When I run make...
>
> initially I encountered compiler errors having to do with const char* -
>> char* for several instances of strchar(...) and strrchar(...) being
> invalid. I corrected these errors by casting using
> strchar((char*)...).
>
> I encountered and error having to do with something not being able to
> find '-lasound'. I reinstalled lib-asound a few times, the correct
> solution was to install the 32-bit library for it.
>
> Then I encountered and error with a something not being able to find
> the wx/wxprec.h header file. (wx was not on that list of stuff to
> install, however I needed to install libwxbase2.8-dev and then move
> the it from /usr/include/wx-2.8/wx/* to /usr/include/wx/*
>
> I have attempted to run make using 'make -j4' (my computer has a dual
> core processor), however it gets a few minutes into the compile and
> gives a linking error with a .so file. if I just run 'make' with no
> arguments it passes that point by over an hour, but obviously takes a
> longer time to get there. I was also looking into using distcc to
> spread out the load across another computer or two - but I am not sure
> if there is anything to be gained (it looks like a large portion of
> the work is linking and not actual compiling).
>
> Addititonally, while I was able to run 'lunch' the first few times, it
> seems to have broken since, and now when I run lunch it says:
>
> Using lunch master without the GUI.
> No such file: /home/andrew/.lunchrc.
>
> I have redownloaded the repo and reinstalled lunch with no effect.
>
Wait you reinstalled lunch? `lunch' is a bash function that is
accessible after sourcing build/envsetup.sh. It is not a program that is
actually 'installed'. The lunch function finds all the device/vendor
configs in the source tree and then allows you to choose one to set as
your product. Once this is done, you can build Android specifically for
that product.

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

2011-04-09 Thread Nathan Forbes
On 04/10/11 01:48, Andrew wrote:
> I am having some difficulty compiling the source code. This post is
> largely posting my problems and solutions that I was unable to find
> anywhere else.
>
> (I have been following the directions from here:
> http://source.android.com/source/downloading.html)
>
> Repo seems to be downloading the code without a problem.
>
> When I run make...
>
> initially I encountered compiler errors having to do with const char* -
>> char* for several instances of strchar(...) and strrchar(...) being
> invalid. I corrected these errors by casting using
> strchar((char*)...).
>
> I encountered and error having to do with something not being able to
> find '-lasound'. I reinstalled lib-asound a few times, the correct
> solution was to install the 32-bit library for it.
>
> Then I encountered and error with a something not being able to find
> the wx/wxprec.h header file. (wx was not on that list of stuff to
> install, however I needed to install libwxbase2.8-dev and then move
> the it from /usr/include/wx-2.8/wx/* to /usr/include/wx/*
>
> I have attempted to run make using 'make -j4' (my computer has a dual
> core processor), however it gets a few minutes into the compile and
> gives a linking error with a .so file. if I just run 'make' with no
> arguments it passes that point by over an hour, but obviously takes a
> longer time to get there. I was also looking into using distcc to
> spread out the load across another computer or two - but I am not sure
> if there is anything to be gained (it looks like a large portion of
> the work is linking and not actual compiling).
>
> Addititonally, while I was able to run 'lunch' the first few times, it
> seems to have broken since, and now when I run lunch it says:
>
> Using lunch master without the GUI.
> No such file: /home/andrew/.lunchrc.
>
> I have redownloaded the repo and reinstalled lunch with no effect.
>
Man you gotta set up the android build environment with `.
build/envsetup.sh'. And then you can run lunch, as well as a bunch of
other helpful tools.

You'll probably need to install some more 32bit libraries before it will
build.  And also, if you are building for any actual device you will
need to obtain that devices' proprietary files from its configuration
directory (if it has one).

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


[android-developers] Compiling Android Source

2011-04-09 Thread Andrew
I am having some difficulty compiling the source code. This post is
largely posting my problems and solutions that I was unable to find
anywhere else.

(I have been following the directions from here:
http://source.android.com/source/downloading.html)

Repo seems to be downloading the code without a problem.

When I run make...

initially I encountered compiler errors having to do with const char* -
> char* for several instances of strchar(...) and strrchar(...) being
invalid. I corrected these errors by casting using
strchar((char*)...).

I encountered and error having to do with something not being able to
find '-lasound'. I reinstalled lib-asound a few times, the correct
solution was to install the 32-bit library for it.

Then I encountered and error with a something not being able to find
the wx/wxprec.h header file. (wx was not on that list of stuff to
install, however I needed to install libwxbase2.8-dev and then move
the it from /usr/include/wx-2.8/wx/* to /usr/include/wx/*

I have attempted to run make using 'make -j4' (my computer has a dual
core processor), however it gets a few minutes into the compile and
gives a linking error with a .so file. if I just run 'make' with no
arguments it passes that point by over an hour, but obviously takes a
longer time to get there. I was also looking into using distcc to
spread out the load across another computer or two - but I am not sure
if there is anything to be gained (it looks like a large portion of
the work is linking and not actual compiling).

Addititonally, while I was able to run 'lunch' the first few times, it
seems to have broken since, and now when I run lunch it says:

Using lunch master without the GUI.
No such file: /home/andrew/.lunchrc.

I have redownloaded the repo and reinstalled lunch with no effect.

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

2011-04-09 Thread mathe...@gmail.com
I think the problem is that your RestaurantInfo needs to implement
toString() so that it can be filtered on correctly.

On Apr 2, 12:19 pm, "Igor Nesralla Ribeiro" 
wrote:
> Hi,
>
> i have a edittext and a listview ... I want to do thiswhen the users
> type on a edittext  this will filter a listview
> But...the problem  is the listview returns nothing when I type someword that
> i have in the list.
>
> Can anyone help me ? or there any another simple way to do this
>
> Here is my code...
> public class Restaurants extends Activity {
>
>         private ListView restaurantListView;    
>         private ArrayList mRestaurants;
>         private ListAdapter lstAdapter;
>         EditText edt;
>         public void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>                 try {
>                          setContentView(R.layout.restaurants);  
>                          mRestaurants = getRestaurants();
>                          restaurantListView = (ListView)
> findViewById(R.id.lvRestaurant);
>                          lstAdapter = new ListAdapter(this,
> R.id.lvRestaurant, mRestaurants);
>                          restaurantListView.setAdapter(lstAdapter);
>
>                          restaurantListView.setTextFilterEnabled(true);
>                          restaurantListView.setOnItemClickListener(new
> ListView.OnItemClickListener()  {
>                                 @Override
>                                 public void onItemClick(AdapterView arg0,
> View arg1,
>                                                 int arg2, long arg3) {
>                                         // TODO Auto-generated method stub
>
>                                                 Intent its = new
> Intent(getBaseContext(),RestaurantsDetails.class);
>
>                                                 Bundle b = new Bundle();
>                                                 b.putLong("key",arg3);
>
>                                                 its.putExtras(b);
>
>                                                 startActivity(its);
>                                 }
>                          });
>                          edt = (EditText)findViewById(R.id.editText);
>                          edt.addTextChangedListener(new TextWatcher()    {
>                                  @Override  
>                                  public void onTextChanged( CharSequence
> arg0, int arg1, int arg2, int arg3)        
>                                  {            // TODO Auto-generated method
> stub  
>
> Restaurants.this.lstAdapter.getFilter().filter(arg0);
>
>                                  }
>                                  @Override
>                                  public void afterTextChanged(Editable arg0)
>
>                                  {            // TODO Auto-generated method
> stub            
>
>                                  }
>                                  @Override
>                                  public void beforeTextChanged(CharSequence
> arg0, int arg1,
>                                                         int arg2, int arg3)
> {
>                                                 // TODO Auto-generated
> method stub
>
>                                         }
>
>                          });
>                 } catch (Exception e) {
>                         // TODO: handle exception
>                         Log.e("oncreate resta",e.getMessage());
>                 }
>
>         }
>         public ArrayList getRestaurants(){              
>
>                 DBAdapter dbAdapter=DBAdapter.getDBAdapterInstance(this);
>                 try {
>                         dbAdapter.createDataBase();
>                 } catch (IOException e) {
>                         Log.i("*** select ",e.getMessage());
>                 }
>         dbAdapter.openDataBase();              
>                 String query="SELECT * FROM restaurants;";
>                 ArrayList> stringList =
> dbAdapter.selectRecordsFromDBList(query, null);
>                 dbAdapter.close();
>
>                 ArrayList restaurantsList = new
> ArrayList();
>                 for (int i = 0; i < stringList.size(); i++) {
>                         ArrayList list = stringList.get(i);
>                         RestaurantsInfo restaurant = new RestaurantsInfo();
>                         try {
>                                 restaurant.id =
> Integer.parseInt(list.get(0));
>                                 restaurant.res_name = list.get(1);
>                                 restaurant.res_city = list.get(2);
>                         } catch (Exception e) {
>                                 Log.i("***" + Restaurants.class.toString(),
> e.getMessage());
>                         }
>                         restaurantsList.add(restaurant);
>                 }
>                 return restaurantsList;
>         }
>          private class ListAdapter extends ArrayA

[android-developers] green hue

2011-04-09 Thread bob
Anyone know how to make this function do a green hue







android.graphics.Canvas.drawBitmap(Bitmap bitmap, float left, float
top, Paint paint)



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: info incorrect on http://developer.android.com WHICH COULD PREVENT ECLIPSE FROM RECOGNIZING YOUR DEVICE

2011-04-09 Thread lbendlin
"Getroffene Hunde bellen"

Let me say it differently: "All capitals" is perceived as shouting on the 
intertubes. Your finding will be more effective if you use normal spelling. 

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

2011-04-09 Thread Mark Murphy
On Sat, Apr 9, 2011 at 7:47 PM, cervello  wrote:
> But in onScanCompleted one of the parameter is the uri..Shouldn't I
> use this function?

If you use the other flavor of scanFile, one that takes a
MediaScannerConnection.OnScanCompletedListener object, you will need
to implement onScanCompleted() in that listener.

You would use the Uri if you wanted to query the MediaStore to get
more information about the file that was scanned. Or, if it is null,
the file was not scanned for some reason (corrupt?).

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2011-04-09 Thread cervello
But in onScanCompleted one of the parameter is the uri..Shouldn't I
use this function?

Can you write an example code? I couldn't find how it should be.. I'm
confused..

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

2011-04-09 Thread Mark Murphy
There is no Uri. The parameters to scanFile() are a path and a MIME type.

On Sat, Apr 9, 2011 at 5:28 PM, cervello  wrote:
> I still try but first off all can you tell me what the uri means here??

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

_Android Programming Tutorials_ Version 3.3 Available!

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


[android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread cervello
I still try but first off all can you tell me what the uri means here??

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


Re: [android-developers] Re: eclipse/sdk combo crash

2011-04-09 Thread Tor Norbye
On Fri, Apr 8, 2011 at 12:06 PM, Dustin  wrote:
> Tor,
> Thanks for the input.  I was not aware of the "New Android XML File"
> wizard.  I was just creating a new folder called "Menu" and then
> placing a new xml inside it called "menu.xml".  After trying the
> wizard, everything seems to develop just fine.

I'm glad to hear you've got a solution!

However, opening the file should never cause the IDE to freeze, so I'd
like to find out exactly what you did to see if I can reproduce it
here -- and more importantly, fix it. I've tried using the "New XML
File" (the builtin Eclipse template instead of the Android specific
one) and that too worked for me. So can you tell me in very explicit
detail what you did? E.g. you created a folder called "Menu" under
"Res", presumably using the new-wizard, and then how did you place a
new XML file in there? Using a wizard (if so, which template?), or
copying from elsewhere, or did you do it on disk using file explorer
or something? If so, what were the exact contents of the file you
placed there?

Thanks,
  Tor

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


[android-developers] Re: info incorrect on http://developer.android.com WHICH COULD PREVENT ECLIPSE FROM RECOGNIZING YOUR DEVICE

2011-04-09 Thread Spiral123
then we would be able to read his expression.

On Apr 9, 3:07 pm, scott  wrote:
> let me tell you do not have to be a "troll" just have to Leira anddecide if I 
> wrote it will help.Maybe I can usemy keyboard to hit in the face
>
> On Apr 9, 6:48 am, lbendlin  wrote:
>
>
>
>
>
>
>
> > Ah, the juvenile excitement. Fond memories. Tell you what. Take your
> > keyboard, turn it keys down, and smash it on the table a few times. Maybe
> > the Caps Lock key becomes unstuck.

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

2011-04-09 Thread saurabh patil
i think it is because of threading..(ASYNC TASK),i.e UIThreading
thanks...

On Wed, Apr 6, 2011 at 12:32 AM, Justin Anderson wrote:

> When you get an exception, what does the stack trace say the cause of it
> is?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
>
> On Tue, Apr 5, 2011 at 11:18 AM, TreKing  wrote:
>
>> On Sun, Apr 3, 2011 at 3:39 PM, Saurabh Patil wrote:
>>
>>> some times it shows me message to "force to close" without any changes to
>>> code
>>>
>>
>> Debug your code 
>>
>>
>> -
>>  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
>

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

2011-04-09 Thread saurabh patil
i think it is because of threading..(ASYNC TASK),i.e UIThreading
thanks...


On Tue, Apr 5, 2011 at 10:48 PM, TreKing  wrote:

> On Sun, Apr 3, 2011 at 3:39 PM, Saurabh Patil wrote:
>
>> some times it shows me message to "force to close" without any changes to
>> code
>>
>
> Debug your code 
>
>
> -
> 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] Re: info incorrect on http://developer.android.com WHICH COULD PREVENT ECLIPSE FROM RECOGNIZING YOUR DEVICE

2011-04-09 Thread scott
dejeme a decirte que no tienes que ser un "troll"  solo hay que leir y
decide si lo yo he escrito se le vaya ayudar.  Tal vez puedo utilizar
mi keyboard a pegarle en la cara

On Apr 9, 6:48 am, lbendlin  wrote:
> Ah, the juvenile excitement. Fond memories. Tell you what. Take your
> keyboard, turn it keys down, and smash it on the table a few times. Maybe
> the Caps Lock key becomes unstuck.

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

2011-04-09 Thread ABSOLUT
Yes, everything is ok.

Anyway, I didnt know that I cant use long operations inside oncreate
method. I'm trying to use asyntask or thread to do these things.

Thanks


On 9 abr, 20:38, Kostya Vasilyev  wrote:
> And does that work? :)
> 09.04.2011 22:35 пользователь "ABSOLUT"  написал:
>
> > Many thanks,
> > I'm using now Asyntask and I'm using Toast in PreExecute and
> > PostExecute methods.
>
> > On 9 abr, 18:51, Kostya Vasilyev  wrote:
> >> Your code, as far as I can tell, runs inside onCreate. Android UI
> framework
> >> is designed so that it expects callbacks like onCreate and others to
> return
> >> control to Android within a reasonable amount of time.
>
> >> Your code prevents Android from doing things in the UI, including showing
> >> toasts (or dialogs), because it ties up the UI thread with your work
> >> function.
>
> >> Study Application fundamentals in the SDK documentation, specifically
> >> information about threads, it does a good job at explaining this.
>
> >> To run networking code, create a background thread. An easy way to do it
> is
> >> to use AsyncTask, a generic class provided by the Android framework.
> >> 09.04.2011 20:06 пользователь "ABSOLUT"  написал:
>
> >> > I dont understand what do you say Kostya
> >> > I've installed the app in the devices but the Toast doesnt shows.
> >> > The complete Oncreate is:
>
> >> > public void onCreate(Bundle savedInstanceState) {
> >> > super.onCreate(savedInstanceState);
> >> > setContentView(R.layout.main);
> >> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> >> > // Toast.makeText(ssh.this, "",
> >> > Toast.LENGTH_SHORT).show();
>
> >> > InetAddress pp;
> >> > InetAddress direccionMaquinon;
>
> >> > if (pruebaPing("221.221.221.2")){
> >> > Log.d("PRUEBA","No llega despues de comprobar el primer ping.
> >> > Hay que mandar paquete");
> >> > Toast.makeText(this, "",
> >> > Toast.LENGTH_SHORT).show();
>
> >> > wakeonLan();
> >> > Toast.makeText(this, "",
> >> > Toast.LENGTH_SHORT).show();
> >> > mandarSsh();
> >> > }else{
> >> > Log.d("PRUEBA","slllega");
> >> > mandarSsh();
> >> > }
> >> > }
> >> > public void wakeonLan (){
>
> >> > try {
> >> > Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
> >> > Toast.LENGTH_LONG).show();
>
> >> > final int PORT = 9;
> >> > String ipStr = "221.x
> >> > ...
> >> > ...
>
> >> > On 9 abr, 17:24, Kostya Vasilyev  wrote:
> >> >> The toast will only show after your code returns from onCreate, which
> it
> >> >> should.
> >> >> 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
>
> >> >> > Hi again,
> >> >> > I can't understand nothing.
> >> >> > I'm trying to execute a simple toast when the activity create but
> >> >> > doenn't show anything:
>
> >> >> > code:
>
> >> >> > public class ssh extends Activity {
> >> >> > /** Called when the activity is first created. */
> >> >> > public static final int PORT = 9;
>
> >> >> > @Override
> >> >> > public void onCreate(Bundle savedInstanceState) {
> >> >> > super.onCreate(savedInstanceState);
> >> >> > setContentView(R.layout.main);
> >> >> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> >> >> > Toast.makeText(ssh.this, "",
> >> >> > Toast.LENGTH_SHORT).show();
> >> >> > ...
> >> >> > 
>
> >> >> > On 9 abr, 12:26, Kostya Vasilyev  wrote:
> >> >> >> OK. Try calling Toast from the UI thread. You can use Handler for
> >> this.
> >> >> >> 09.04.2011 14:10 пользователь "ABSOLUT" 
> написал:
>
> >> >> >> > Yes I'm sure.
>
> >> >> >> > I have:
>
> >> >> >> > public void wakeonLan (){
> >> >> >> > ..
> >> >> >> > 
> >> >> >> > while (pruebaPing(maquina)){
> >> >> >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> >> >> >> > PROCESO
>
> >> >> >> > Thread.sleep(6000);
> >> >> >> > contadorDormido=contadorDormido+6;
> >> >> >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
> >> >> >> > paquete magico en..." + contadorDormido);
> >> >> >> > Toast.makeText(getApplicationContext(), "No responde a
> >> >> >> > ping despues de mandar el paquete magico en..." +
> contadorDormido,
> >> >> >> > Toast.LENGTH_SHORT).show();
> >> >> >> > Toast.makeText(this, "No esponde a ping despues de
> >> >> >> > mandar el paquete magico en..." + contadorDormido,
> >> >> >> > Toast.LENGTH_SHORT).show();
> >> >> >> > Toast.makeText(ssh.this.getApplicationContext(), "No
> >> >> >> > responde a ping despues de mandar el paquete magico en..." +
> >> >> >> > contadorDormido, Toast.LENGTH_SHORT).show();
> >> >> >> > 
>
> >> >> >> > And I can see the logcat
>
> >> >> >> > Please any help?
> >> >> >> > Many thanks
>
> >> >> >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> >> >> >> >> Are you sure this code actually runs, and calls Toast? Add
> logcat
> >> >> >> printouts
> >> >> >> >> just before Toast to make sure.
> >> >> >> >> 09.04.2011 13:13 пользовате

Re: [android-developers] Re: help: dont display Toast

2011-04-09 Thread Kostya Vasilyev
And does that work? :)
09.04.2011 22:35 пользователь "ABSOLUT"  написал:
> Many thanks,
> I'm using now Asyntask and I'm using Toast in PreExecute and
> PostExecute methods.
>
>
>
>
> On 9 abr, 18:51, Kostya Vasilyev  wrote:
>> Your code, as far as I can tell, runs inside onCreate. Android UI
framework
>> is designed so that it expects callbacks like onCreate and others to
return
>> control to Android within a reasonable amount of time.
>>
>> Your code prevents Android from doing things in the UI, including showing
>> toasts (or dialogs), because it ties up the UI thread with your work
>> function.
>>
>> Study Application fundamentals in the SDK documentation, specifically
>> information about threads, it does a good job at explaining this.
>>
>> To run networking code, create a background thread. An easy way to do it
is
>> to use AsyncTask, a generic class provided by the Android framework.
>> 09.04.2011 20:06 пользователь "ABSOLUT"  написал:
>>
>> > I dont understand what do you say Kostya
>> > I've installed the app in the devices but the Toast doesnt shows.
>> > The complete Oncreate is:
>>
>> > public void onCreate(Bundle savedInstanceState) {
>> > super.onCreate(savedInstanceState);
>> > setContentView(R.layout.main);
>> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>>
>> > // Toast.makeText(ssh.this, "",
>> > Toast.LENGTH_SHORT).show();
>>
>> > InetAddress pp;
>> > InetAddress direccionMaquinon;
>>
>> > if (pruebaPing("221.221.221.2")){
>> > Log.d("PRUEBA","No llega despues de comprobar el primer ping.
>> > Hay que mandar paquete");
>> > Toast.makeText(this, "",
>> > Toast.LENGTH_SHORT).show();
>>
>> > wakeonLan();
>> > Toast.makeText(this, "",
>> > Toast.LENGTH_SHORT).show();
>> > mandarSsh();
>> > }else{
>> > Log.d("PRUEBA","slllega");
>> > mandarSsh();
>> > }
>> > }
>> > public void wakeonLan (){
>>
>> > try {
>> > Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
>> > Toast.LENGTH_LONG).show();
>>
>> > final int PORT = 9;
>> > String ipStr = "221.x
>> > ...
>> > ...
>>
>> > On 9 abr, 17:24, Kostya Vasilyev  wrote:
>> >> The toast will only show after your code returns from onCreate, which
it
>> >> should.
>> >> 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
>>
>> >> > Hi again,
>> >> > I can't understand nothing.
>> >> > I'm trying to execute a simple toast when the activity create but
>> >> > doenn't show anything:
>>
>> >> > code:
>>
>> >> > public class ssh extends Activity {
>> >> > /** Called when the activity is first created. */
>> >> > public static final int PORT = 9;
>>
>> >> > @Override
>> >> > public void onCreate(Bundle savedInstanceState) {
>> >> > super.onCreate(savedInstanceState);
>> >> > setContentView(R.layout.main);
>> >> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>>
>> >> > Toast.makeText(ssh.this, "",
>> >> > Toast.LENGTH_SHORT).show();
>> >> > ...
>> >> > 
>>
>> >> > On 9 abr, 12:26, Kostya Vasilyev  wrote:
>> >> >> OK. Try calling Toast from the UI thread. You can use Handler for
>> this.
>> >> >> 09.04.2011 14:10 пользователь "ABSOLUT" 
написал:
>>
>> >> >> > Yes I'm sure.
>>
>> >> >> > I have:
>>
>> >> >> > public void wakeonLan (){
>> >> >> > ..
>> >> >> > 
>> >> >> > while (pruebaPing(maquina)){
>> >> >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
>> >> >> > PROCESO
>>
>> >> >> > Thread.sleep(6000);
>> >> >> > contadorDormido=contadorDormido+6;
>> >> >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
>> >> >> > paquete magico en..." + contadorDormido);
>> >> >> > Toast.makeText(getApplicationContext(), "No responde a
>> >> >> > ping despues de mandar el paquete magico en..." +
contadorDormido,
>> >> >> > Toast.LENGTH_SHORT).show();
>> >> >> > Toast.makeText(this, "No esponde a ping despues de
>> >> >> > mandar el paquete magico en..." + contadorDormido,
>> >> >> > Toast.LENGTH_SHORT).show();
>> >> >> > Toast.makeText(ssh.this.getApplicationContext(), "No
>> >> >> > responde a ping despues de mandar el paquete magico en..." +
>> >> >> > contadorDormido, Toast.LENGTH_SHORT).show();
>> >> >> > 
>>
>> >> >> > And I can see the logcat
>>
>> >> >> > Please any help?
>> >> >> > Many thanks
>>
>> >> >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
>> >> >> >> Are you sure this code actually runs, and calls Toast? Add
logcat
>> >> >> printouts
>> >> >> >> just before Toast to make sure.
>> >> >> >> 09.04.2011 13:13 пользователь "David Tabernero" <
>>
>> davidt...@gmail.com>
>>
>> >> >> >> написал:
>>
>> >> >> >> > Hi,
>>
>> >> >> >> > I can't display Toast in my application:
>>
>> >> >> >> > I have this code but nothing happens. Any help please?
>>
>> >> >> >> > Many thanks and sorry for my english!
>>
>> >> >> >> > 
>> >> >> >> > 
>> >> >> >> > public void wakeonLan (){
>>
>> >> >>

[android-developers] Re: help: dont display Toast

2011-04-09 Thread ABSOLUT
Many thanks,
I'm using now Asyntask and I'm using Toast in PreExecute and
PostExecute methods.




On 9 abr, 18:51, Kostya Vasilyev  wrote:
> Your code, as far as I can tell, runs inside onCreate. Android UI framework
> is designed so that it expects callbacks like onCreate and others to return
> control to Android within a reasonable amount of time.
>
> Your code prevents Android from doing things in the UI, including showing
> toasts (or dialogs), because it ties up the UI thread with your work
> function.
>
> Study Application fundamentals in the SDK documentation, specifically
> information about threads, it does a good job at explaining this.
>
> To run networking code, create a background thread. An easy way to do it is
> to use AsyncTask, a generic class provided by the Android framework.
> 09.04.2011 20:06 пользователь "ABSOLUT"  написал:
>
> > I dont understand what do you say Kostya
> > I've installed the app in the devices but the Toast doesnt shows.
> > The complete Oncreate is:
>
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> > setContentView(R.layout.main);
> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> > // Toast.makeText(ssh.this, "",
> > Toast.LENGTH_SHORT).show();
>
> > InetAddress pp;
> > InetAddress direccionMaquinon;
>
> > if (pruebaPing("221.221.221.2")){
> > Log.d("PRUEBA","No llega despues de comprobar el primer ping.
> > Hay que mandar paquete");
> > Toast.makeText(this, "",
> > Toast.LENGTH_SHORT).show();
>
> > wakeonLan();
> > Toast.makeText(this, "",
> > Toast.LENGTH_SHORT).show();
> > mandarSsh();
> > }else{
> > Log.d("PRUEBA","slllega");
> > mandarSsh();
> > }
> > }
> > public void wakeonLan (){
>
> > try {
> > Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
> > Toast.LENGTH_LONG).show();
>
> > final int PORT = 9;
> > String ipStr = "221.x
> > ...
> > ...
>
> > On 9 abr, 17:24, Kostya Vasilyev  wrote:
> >> The toast will only show after your code returns from onCreate, which it
> >> should.
> >> 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
>
> >> > Hi again,
> >> > I can't understand nothing.
> >> > I'm trying to execute a simple toast when the activity create but
> >> > doenn't show anything:
>
> >> > code:
>
> >> > public class ssh extends Activity {
> >> > /** Called when the activity is first created. */
> >> > public static final int PORT = 9;
>
> >> > @Override
> >> > public void onCreate(Bundle savedInstanceState) {
> >> > super.onCreate(savedInstanceState);
> >> > setContentView(R.layout.main);
> >> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> >> > Toast.makeText(ssh.this, "",
> >> > Toast.LENGTH_SHORT).show();
> >> > ...
> >> > 
>
> >> > On 9 abr, 12:26, Kostya Vasilyev  wrote:
> >> >> OK. Try calling Toast from the UI thread. You can use Handler for
> this.
> >> >> 09.04.2011 14:10 пользователь "ABSOLUT"  написал:
>
> >> >> > Yes I'm sure.
>
> >> >> > I have:
>
> >> >> > public void wakeonLan (){
> >> >> > ..
> >> >> > 
> >> >> > while (pruebaPing(maquina)){
> >> >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> >> >> > PROCESO
>
> >> >> > Thread.sleep(6000);
> >> >> > contadorDormido=contadorDormido+6;
> >> >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
> >> >> > paquete magico en..." + contadorDormido);
> >> >> > Toast.makeText(getApplicationContext(), "No responde a
> >> >> > ping despues de mandar el paquete magico en..." + contadorDormido,
> >> >> > Toast.LENGTH_SHORT).show();
> >> >> > Toast.makeText(this, "No esponde a ping despues de
> >> >> > mandar el paquete magico en..." + contadorDormido,
> >> >> > Toast.LENGTH_SHORT).show();
> >> >> > Toast.makeText(ssh.this.getApplicationContext(), "No
> >> >> > responde a ping despues de mandar el paquete magico en..." +
> >> >> > contadorDormido, Toast.LENGTH_SHORT).show();
> >> >> > 
>
> >> >> > And I can see the logcat
>
> >> >> > Please any help?
> >> >> > Many thanks
>
> >> >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> >> >> >> Are you sure this code actually runs, and calls Toast? Add logcat
> >> >> printouts
> >> >> >> just before Toast to make sure.
> >> >> >> 09.04.2011 13:13 пользователь "David Tabernero" <
>
> davidt...@gmail.com>
>
> >> >> >> написал:
>
> >> >> >> > Hi,
>
> >> >> >> > I can't display Toast in my application:
>
> >> >> >> > I have this code but nothing happens. Any help please?
>
> >> >> >> > Many thanks and sorry for my english!
>
> >> >> >> > 
> >> >> >> > 
> >> >> >> > public void wakeonLan (){
>
> >> >> >> > try {
> >> >> >> > while (pruebaPing(maquina)){
> >> >> >> > Toast.makeText(ssh.this, "No responde a ping despues de
> >> >> >> > mandar el paquete magico en..." + contadorDormido,
> >> >> >> > Toast.LENGTH_SHORT).show();

Re: [android-developers] Re: help: dont display Toast

2011-04-09 Thread Kostya Vasilyev
Your code, as far as I can tell, runs inside onCreate. Android UI framework
is designed so that it expects callbacks like onCreate and others to return
control to Android within a reasonable amount of time.

Your code prevents Android from doing things in the UI, including showing
toasts (or dialogs), because it ties up the UI thread with your work
function.

Study Application fundamentals in the SDK documentation, specifically
information about threads, it does a good job at explaining this.

To run networking code, create a background thread. An easy way to do it is
to use AsyncTask, a generic class provided by the Android framework.
09.04.2011 20:06 пользователь "ABSOLUT"  написал:
> I dont understand what do you say Kostya
> I've installed the app in the devices but the Toast doesnt shows.
> The complete Oncreate is:
>
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> // Toast.makeText(ssh.this, "",
> Toast.LENGTH_SHORT).show();
>
> InetAddress pp;
> InetAddress direccionMaquinon;
>
> if (pruebaPing("221.221.221.2")){
> Log.d("PRUEBA","No llega despues de comprobar el primer ping.
> Hay que mandar paquete");
> Toast.makeText(this, "",
> Toast.LENGTH_SHORT).show();
>
> wakeonLan();
> Toast.makeText(this, "",
> Toast.LENGTH_SHORT).show();
> mandarSsh();
> }else{
> Log.d("PRUEBA","slllega");
> mandarSsh();
> }
> }
> public void wakeonLan (){
>
>
> try {
> Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
> Toast.LENGTH_LONG).show();
>
>
> final int PORT = 9;
> String ipStr = "221.x
> ...
> ...
>
>
>
> On 9 abr, 17:24, Kostya Vasilyev  wrote:
>> The toast will only show after your code returns from onCreate, which it
>> should.
>> 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
>>
>> > Hi again,
>> > I can't understand nothing.
>> > I'm trying to execute a simple toast when the activity create but
>> > doenn't show anything:
>>
>> > code:
>>
>> > public class ssh extends Activity {
>> > /** Called when the activity is first created. */
>> > public static final int PORT = 9;
>>
>> > @Override
>> > public void onCreate(Bundle savedInstanceState) {
>> > super.onCreate(savedInstanceState);
>> > setContentView(R.layout.main);
>> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>>
>> > Toast.makeText(ssh.this, "",
>> > Toast.LENGTH_SHORT).show();
>> > ...
>> > 
>>
>> > On 9 abr, 12:26, Kostya Vasilyev  wrote:
>> >> OK. Try calling Toast from the UI thread. You can use Handler for
this.
>> >> 09.04.2011 14:10 пользователь "ABSOLUT"  написал:
>>
>> >> > Yes I'm sure.
>>
>> >> > I have:
>>
>> >> > public void wakeonLan (){
>> >> > ..
>> >> > 
>> >> > while (pruebaPing(maquina)){
>> >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
>> >> > PROCESO
>>
>> >> > Thread.sleep(6000);
>> >> > contadorDormido=contadorDormido+6;
>> >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
>> >> > paquete magico en..." + contadorDormido);
>> >> > Toast.makeText(getApplicationContext(), "No responde a
>> >> > ping despues de mandar el paquete magico en..." + contadorDormido,
>> >> > Toast.LENGTH_SHORT).show();
>> >> > Toast.makeText(this, "No esponde a ping despues de
>> >> > mandar el paquete magico en..." + contadorDormido,
>> >> > Toast.LENGTH_SHORT).show();
>> >> > Toast.makeText(ssh.this.getApplicationContext(), "No
>> >> > responde a ping despues de mandar el paquete magico en..." +
>> >> > contadorDormido, Toast.LENGTH_SHORT).show();
>> >> > 
>>
>> >> > And I can see the logcat
>>
>> >> > Please any help?
>> >> > Many thanks
>>
>> >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
>> >> >> Are you sure this code actually runs, and calls Toast? Add logcat
>> >> printouts
>> >> >> just before Toast to make sure.
>> >> >> 09.04.2011 13:13 пользователь "David Tabernero" <
davidt...@gmail.com>
>> >> >> написал:
>>
>> >> >> > Hi,
>>
>> >> >> > I can't display Toast in my application:
>>
>> >> >> > I have this code but nothing happens. Any help please?
>>
>> >> >> > Many thanks and sorry for my english!
>>
>> >> >> > 
>> >> >> > 
>> >> >> > public void wakeonLan (){
>>
>> >> >> > try {
>> >> >> > while (pruebaPing(maquina)){
>> >> >> > Toast.makeText(ssh.this, "No responde a ping despues de
>> >> >> > mandar el paquete magico en..." + contadorDormido,
>> >> >> > Toast.LENGTH_SHORT).show();
>> >> >> > Toast.makeText(getApplicationContext(), "No responde a ping
>> >> >> > despues de mandar el paquete magico en..." + contadorDormido,
>> >> >> > Toast.LENGTH_SHORT).show();
>> >> >> > 
>> >> >> > .
>>
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the
Google
>> >> >> > G

[android-developers] Re: help: dont display Toast

2011-04-09 Thread ABSOLUT
the condition is satisfied. Anyway, I put other toast in the else
also. I uncomment the first Toast and nothing happens



On 9 abr, 18:38, luiX_  wrote:
> You have your Toast message inside an if, are you sure that condition is
> satisfied? Also, if you uncomment the first toast, does it show?
>
> 2011/4/9 ABSOLUT 
>
> > I dont understand what do you say Kostya
> > I've installed the app in the devices but the Toast doesnt shows.
> > The complete Oncreate is:
>
> >  public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
> >        Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> >       // Toast.makeText(ssh.this, "",
> > Toast.LENGTH_SHORT).show();
>
> >         InetAddress pp;
> >            InetAddress direccionMaquinon;
>
> >            if (pruebaPing("221.221.221.2")){
> >                Log.d("PRUEBA","No llega despues de comprobar el primer
> > ping.
> > Hay que mandar paquete");
> >            Toast.makeText(this, "",
> > Toast.LENGTH_SHORT).show();
>
> >                wakeonLan();
> >                Toast.makeText(this, "",
> > Toast.LENGTH_SHORT).show();
> >                mandarSsh();
> >            }else{
> >                Log.d("PRUEBA","slllega");
> >                mandarSsh();
> >            }
> > }
> > public void wakeonLan (){
>
> >        try {
> >            Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
> > Toast.LENGTH_LONG).show();
>
> >                final int PORT = 9;
> >            String ipStr = "221.x
> > ...
> > ...
>
> > On 9 abr, 17:24, Kostya Vasilyev  wrote:
> > > The toast will only show after your code returns from onCreate, which it
> > > should.
> > > 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
>
> > > > Hi again,
> > > > I can't understand nothing.
> > > > I'm trying to execute a simple toast when the activity create but
> > > > doenn't show anything:
>
> > > > code:
>
> > > > public class ssh extends Activity {
> > > > /** Called when the activity is first created. */
> > > > public static final int PORT = 9;
>
> > > > @Override
> > > > public void onCreate(Bundle savedInstanceState) {
> > > > super.onCreate(savedInstanceState);
> > > > setContentView(R.layout.main);
> > > > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> > > > Toast.makeText(ssh.this, "",
> > > > Toast.LENGTH_SHORT).show();
> > > > ...
> > > > 
>
> > > > On 9 abr, 12:26, Kostya Vasilyev  wrote:
> > > >> OK. Try calling Toast from the UI thread. You can use Handler for
> > this.
> > > >> 09.04.2011 14:10 пользователь "ABSOLUT" 
> > написал:
>
> > > >> > Yes I'm sure.
>
> > > >> > I have:
>
> > > >> > public void wakeonLan (){
> > > >> > ..
> > > >> > 
> > > >> > while (pruebaPing(maquina)){
> > > >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> > > >> > PROCESO
>
> > > >> > Thread.sleep(6000);
> > > >> > contadorDormido=contadorDormido+6;
> > > >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
> > > >> > paquete magico en..." + contadorDormido);
> > > >> > Toast.makeText(getApplicationContext(), "No responde a
> > > >> > ping despues de mandar el paquete magico en..." + contadorDormido,
> > > >> > Toast.LENGTH_SHORT).show();
> > > >> > Toast.makeText(this, "No esponde a ping despues de
> > > >> > mandar el paquete magico en..." + contadorDormido,
> > > >> > Toast.LENGTH_SHORT).show();
> > > >> > Toast.makeText(ssh.this.getApplicationContext(), "No
> > > >> > responde a ping despues de mandar el paquete magico en..." +
> > > >> > contadorDormido, Toast.LENGTH_SHORT).show();
> > > >> > 
>
> > > >> > And I can see the logcat
>
> > > >> > Please any help?
> > > >> > Many thanks
>
> > > >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> > > >> >> Are you sure this code actually runs, and calls Toast? Add logcat
> > > >> printouts
> > > >> >> just before Toast to make sure.
> > > >> >> 09.04.2011 13:13 пользователь "David Tabernero" <
> > davidt...@gmail.com>
> > > >> >> написал:
>
> > > >> >> > Hi,
>
> > > >> >> > I can't display Toast in my application:
>
> > > >> >> > I have this code but nothing happens. Any help please?
>
> > > >> >> > Many thanks and sorry for my english!
>
> > > >> >> > 
> > > >> >> > 
> > > >> >> > public void wakeonLan (){
>
> > > >> >> > try {
> > > >> >> > while (pruebaPing(maquina)){
> > > >> >> > Toast.makeText(ssh.this, "No responde a ping despues de
> > > >> >> > mandar el paquete magico en..." + contadorDormido,
> > > >> >> > Toast.LENGTH_SHORT).show();
> > > >> >> > Toast.makeText(getApplicationContext(), "No responde a ping
> > > >> >> > despues de mandar el paquete magico en..." + contadorDormido,
> > > >> >> > Toast.LENGTH_SHORT).show();
> > > >> >> > 
> > > >> >> > 

Re: [android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread Mark Murphy
You use the MediaScannerConnection when you add a new file to external
storage that the MediaStore needs. Your code below seems to have
nothing to do with adding new files to external storage.

On Sat, Apr 9, 2011 at 12:34 PM, cervello  wrote:
> Should I do something like this? but it's not correct..
>
> public void onCreate( Bundle savedInstanceState ) {
>
>        super.onCreate( savedInstanceState );
>        setContentView( R.layout.main );
>
>        ListView videoListView = (ListView)findViewById(R.id.List);
>        videoListView.setAdapter(new ArrayAdapter(this,
> android.R.layout.simple_list_item_1, getListOfVideos()));
>
>
> videoListView.setOnItemClickListener(videoListItemClickListener);
>
>        MediaScannerConnection mScanner;
>
>        mScanner = new MediaScannerConnection(this, new
>                        MediaScannerConnection.MediaScannerConnectionClient() {
>                        public void onMediaScannerConnected() {
>                                mScanner.scanFile(filename2, null /* mimeType 
> */);
>                        }
>
>                        public void onScanCompleted(String path, Uri uri) {
>                                if (path.equals(filename2.toString())) {
>                                        mScanner.disconnect();
>                                 }
>                         }
>                        });
>
>                mScanner.connect();
>     }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] Re: help: dont display Toast

2011-04-09 Thread luiX_
You have your Toast message inside an if, are you sure that condition is
satisfied? Also, if you uncomment the first toast, does it show?

2011/4/9 ABSOLUT 

> I dont understand what do you say Kostya
> I've installed the app in the devices but the Toast doesnt shows.
> The complete Oncreate is:
>
>  public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
>   // Toast.makeText(ssh.this, "",
> Toast.LENGTH_SHORT).show();
>
> InetAddress pp;
>InetAddress direccionMaquinon;
>
>if (pruebaPing("221.221.221.2")){
>Log.d("PRUEBA","No llega despues de comprobar el primer
> ping.
> Hay que mandar paquete");
>Toast.makeText(this, "",
> Toast.LENGTH_SHORT).show();
>
>wakeonLan();
>Toast.makeText(this, "",
> Toast.LENGTH_SHORT).show();
>mandarSsh();
>}else{
>Log.d("PRUEBA","slllega");
>mandarSsh();
>}
> }
> public void wakeonLan (){
>
>
>try {
>Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
> Toast.LENGTH_LONG).show();
>
>
>final int PORT = 9;
>String ipStr = "221.x
> ...
> ...
>
>
>
> On 9 abr, 17:24, Kostya Vasilyev  wrote:
> > The toast will only show after your code returns from onCreate, which it
> > should.
> > 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
> >
> > > Hi again,
> > > I can't understand nothing.
> > > I'm trying to execute a simple toast when the activity create but
> > > doenn't show anything:
> >
> > > code:
> >
> > > public class ssh extends Activity {
> > > /** Called when the activity is first created. */
> > > public static final int PORT = 9;
> >
> > > @Override
> > > public void onCreate(Bundle savedInstanceState) {
> > > super.onCreate(savedInstanceState);
> > > setContentView(R.layout.main);
> > > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
> >
> > > Toast.makeText(ssh.this, "",
> > > Toast.LENGTH_SHORT).show();
> > > ...
> > > 
> >
> > > On 9 abr, 12:26, Kostya Vasilyev  wrote:
> > >> OK. Try calling Toast from the UI thread. You can use Handler for
> this.
> > >> 09.04.2011 14:10 пользователь "ABSOLUT" 
> написал:
> >
> > >> > Yes I'm sure.
> >
> > >> > I have:
> >
> > >> > public void wakeonLan (){
> > >> > ..
> > >> > 
> > >> > while (pruebaPing(maquina)){
> > >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> > >> > PROCESO
> >
> > >> > Thread.sleep(6000);
> > >> > contadorDormido=contadorDormido+6;
> > >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
> > >> > paquete magico en..." + contadorDormido);
> > >> > Toast.makeText(getApplicationContext(), "No responde a
> > >> > ping despues de mandar el paquete magico en..." + contadorDormido,
> > >> > Toast.LENGTH_SHORT).show();
> > >> > Toast.makeText(this, "No esponde a ping despues de
> > >> > mandar el paquete magico en..." + contadorDormido,
> > >> > Toast.LENGTH_SHORT).show();
> > >> > Toast.makeText(ssh.this.getApplicationContext(), "No
> > >> > responde a ping despues de mandar el paquete magico en..." +
> > >> > contadorDormido, Toast.LENGTH_SHORT).show();
> > >> > 
> >
> > >> > And I can see the logcat
> >
> > >> > Please any help?
> > >> > Many thanks
> >
> > >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> > >> >> Are you sure this code actually runs, and calls Toast? Add logcat
> > >> printouts
> > >> >> just before Toast to make sure.
> > >> >> 09.04.2011 13:13 пользователь "David Tabernero" <
> davidt...@gmail.com>
> > >> >> написал:
> >
> > >> >> > Hi,
> >
> > >> >> > I can't display Toast in my application:
> >
> > >> >> > I have this code but nothing happens. Any help please?
> >
> > >> >> > Many thanks and sorry for my english!
> >
> > >> >> > 
> > >> >> > 
> > >> >> > public void wakeonLan (){
> >
> > >> >> > try {
> > >> >> > while (pruebaPing(maquina)){
> > >> >> > Toast.makeText(ssh.this, "No responde a ping despues de
> > >> >> > mandar el paquete magico en..." + contadorDormido,
> > >> >> > Toast.LENGTH_SHORT).show();
> > >> >> > Toast.makeText(getApplicationContext(), "No responde a ping
> > >> >> > despues de mandar el paquete magico en..." + contadorDormido,
> > >> >> > Toast.LENGTH_SHORT).show();
> > >> >> > 
> > >> >> > .
> >
> > >> >> > --
> > >> >> > You received this message because you are subscribed to the
> Google
> > >> >> > Groups "Android Developers" group.
> > >> >> > To post to this group, send email to
> >
> > >> android-developers@googlegroups.com
> >
> > >> >> > To unsubscribe from this group, send email to
> > >> >> > and

[android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread cervello
Should I do something like this? but it's not correct..

public void onCreate( Bundle savedInstanceState ) {

super.onCreate( savedInstanceState );
setContentView( R.layout.main );

ListView videoListView = (ListView)findViewById(R.id.List);
videoListView.setAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_1, getListOfVideos()));

 
videoListView.setOnItemClickListener(videoListItemClickListener);

MediaScannerConnection mScanner;

mScanner = new MediaScannerConnection(this, new
MediaScannerConnection.MediaScannerConnectionClient() {
public void onMediaScannerConnected() {
mScanner.scanFile(filename2, null /* mimeType 
*/);
}

public void onScanCompleted(String path, Uri uri) {
if (path.equals(filename2.toString())) {
mScanner.disconnect();
 }
 }
});

mScanner.connect();
 }

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

2011-04-09 Thread ABSOLUT
I dont understand what do you say Kostya
I've installed the app in the devices but the Toast doesnt shows.
The complete Oncreate is:

 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");

   // Toast.makeText(ssh.this, "",
Toast.LENGTH_SHORT).show();

InetAddress pp;
InetAddress direccionMaquinon;

if (pruebaPing("221.221.221.2")){
Log.d("PRUEBA","No llega despues de comprobar el primer ping.
Hay que mandar paquete");
Toast.makeText(this, "",
Toast.LENGTH_SHORT).show();

wakeonLan();
Toast.makeText(this, "",
Toast.LENGTH_SHORT).show();
mandarSsh();
}else{
Log.d("PRUEBA","slllega");
mandarSsh();
}
}
public void wakeonLan (){


try {
Toast.makeText(this, "Nsdfsdfdsfd paquete magico en...",
Toast.LENGTH_LONG).show();


final int PORT = 9;
String ipStr = "221.x
...
...



On 9 abr, 17:24, Kostya Vasilyev  wrote:
> The toast will only show after your code returns from onCreate, which it
> should.
> 09.04.2011 19:01 пользователь "ABSOLUT"  написал:
>
> > Hi again,
> > I can't understand nothing.
> > I'm trying to execute a simple toast when the activity create but
> > doenn't show anything:
>
> > code:
>
> > public class ssh extends Activity {
> > /** Called when the activity is first created. */
> > public static final int PORT = 9;
>
> > @Override
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
> > setContentView(R.layout.main);
> > Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> > Toast.makeText(ssh.this, "",
> > Toast.LENGTH_SHORT).show();
> > ...
> > 
>
> > On 9 abr, 12:26, Kostya Vasilyev  wrote:
> >> OK. Try calling Toast from the UI thread. You can use Handler for this.
> >> 09.04.2011 14:10 пользователь "ABSOLUT"  написал:
>
> >> > Yes I'm sure.
>
> >> > I have:
>
> >> > public void wakeonLan (){
> >> > ..
> >> > 
> >> > while (pruebaPing(maquina)){
> >> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> >> > PROCESO
>
> >> > Thread.sleep(6000);
> >> > contadorDormido=contadorDormido+6;
> >> > Log.d("PRUEBA", "No responde a ping despues de mandar el
> >> > paquete magico en..." + contadorDormido);
> >> > Toast.makeText(getApplicationContext(), "No responde a
> >> > ping despues de mandar el paquete magico en..." + contadorDormido,
> >> > Toast.LENGTH_SHORT).show();
> >> > Toast.makeText(this, "No esponde a ping despues de
> >> > mandar el paquete magico en..." + contadorDormido,
> >> > Toast.LENGTH_SHORT).show();
> >> > Toast.makeText(ssh.this.getApplicationContext(), "No
> >> > responde a ping despues de mandar el paquete magico en..." +
> >> > contadorDormido, Toast.LENGTH_SHORT).show();
> >> > 
>
> >> > And I can see the logcat
>
> >> > Please any help?
> >> > Many thanks
>
> >> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> >> >> Are you sure this code actually runs, and calls Toast? Add logcat
> >> printouts
> >> >> just before Toast to make sure.
> >> >> 09.04.2011 13:13 пользователь "David Tabernero" 
> >> >> написал:
>
> >> >> > Hi,
>
> >> >> > I can't display Toast in my application:
>
> >> >> > I have this code but nothing happens. Any help please?
>
> >> >> > Many thanks and sorry for my english!
>
> >> >> > 
> >> >> > 
> >> >> > public void wakeonLan (){
>
> >> >> > try {
> >> >> > while (pruebaPing(maquina)){
> >> >> > Toast.makeText(ssh.this, "No responde a ping despues de
> >> >> > mandar el paquete magico en..." + contadorDormido,
> >> >> > Toast.LENGTH_SHORT).show();
> >> >> > Toast.makeText(getApplicationContext(), "No responde a ping
> >> >> > despues de mandar el paquete magico en..." + contadorDormido,
> >> >> > Toast.LENGTH_SHORT).show();
> >> >> > 
> >> >> > .
>
> >> >> > --
> >> >> > You received this message because you are subscribed to the Google
> >> >> > Groups "Android Developers" group.
> >> >> > To post to this group, send email to
>
> >> android-developers@googlegroups.com
>
> >> >> > To unsubscribe from this group, send email to
> >> >> > android-developers+unsubscr...@googlegroups.com
> >> >> > For more options, visit this group at
> >> >> >http://groups.google.com/group/android-developers?hl=en
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to
>
> android-developers@googlegroups.com
>
> >> > To unsubscribe from this group, send email to
> >> > android-developers+

[android-developers] Message Dialog appears, The market billing service is not available, Dungeons Sample, Although i have followed the steps given in documents.

2011-04-09 Thread muhammad mahmood
Hi,

As Android Market In-app Billing  is now available to developers and
users to publish applications that use Android Market's in-app billing
service.

To implement this, i followed the instruction provided in
"Implementing In-app Billing" document carefully.

1. Downloading the Sample Application
2. Configuring and building the sample application
3.Uploading the sample application
4.Running the sample application

After completing these steps when i run the sample app, dialog appears
with following title and message.

Can't make purchases
The market billing service is not available at this time. You can
continue to use this app but you would not be able to make purchase.

How to resolve this issue.?

Kind regards,
Muhammad Rashid

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


[android-developers] Custom font support for non-english characters.

2011-04-09 Thread 曾少彬

Hi all, 
 
Is there anyone tried to use custom font for non-english characters?  I see 
that it's ok for english, but it doesn't work for Chinese etc.

Best 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] Image manipulation at high level

2011-04-09 Thread luiX_
Hi,

I'm looking for any lib that allows me to apply some effects to images from
my android app. There are different effects I would like to apply, from
color filtering (ok, that's easy) to a "polarized" effect (adding the frame
around the image). I'll love to be able to use ImageMagick in Android but I
think that's not possible.

Do you guys know any lib I could use to do a high level manipulation in
Android? or any way to use ImageMagick in Android?

Thanks!

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

Re: [android-developers] Re: help: dont display Toast

2011-04-09 Thread Kostya Vasilyev
The toast will only show after your code returns from onCreate, which it
should.
09.04.2011 19:01 пользователь "ABSOLUT"  написал:
> Hi again,
> I can't understand nothing.
> I'm trying to execute a simple toast when the activity create but
> doenn't show anything:
>
> code:
>
> public class ssh extends Activity {
> /** Called when the activity is first created. */
> public static final int PORT = 9;
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
> Toast.makeText(ssh.this, "",
> Toast.LENGTH_SHORT).show();
> ...
> 
>
>
>
>
>
>
>
> On 9 abr, 12:26, Kostya Vasilyev  wrote:
>> OK. Try calling Toast from the UI thread. You can use Handler for this.
>> 09.04.2011 14:10 пользователь "ABSOLUT"  написал:
>>
>> > Yes I'm sure.
>>
>> > I have:
>>
>> > public void wakeonLan (){
>> > ..
>> > 
>> > while (pruebaPing(maquina)){
>> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
>> > PROCESO
>>
>> > Thread.sleep(6000);
>> > contadorDormido=contadorDormido+6;
>> > Log.d("PRUEBA", "No responde a ping despues de mandar el
>> > paquete magico en..." + contadorDormido);
>> > Toast.makeText(getApplicationContext(), "No responde a
>> > ping despues de mandar el paquete magico en..." + contadorDormido,
>> > Toast.LENGTH_SHORT).show();
>> > Toast.makeText(this, "No esponde a ping despues de
>> > mandar el paquete magico en..." + contadorDormido,
>> > Toast.LENGTH_SHORT).show();
>> > Toast.makeText(ssh.this.getApplicationContext(), "No
>> > responde a ping despues de mandar el paquete magico en..." +
>> > contadorDormido, Toast.LENGTH_SHORT).show();
>> > 
>>
>> > And I can see the logcat
>>
>> > Please any help?
>> > Many thanks
>>
>> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
>> >> Are you sure this code actually runs, and calls Toast? Add logcat
>> printouts
>> >> just before Toast to make sure.
>> >> 09.04.2011 13:13 пользователь "David Tabernero" 
>> >> написал:
>>
>> >> > Hi,
>>
>> >> > I can't display Toast in my application:
>>
>> >> > I have this code but nothing happens. Any help please?
>>
>> >> > Many thanks and sorry for my english!
>>
>> >> > 
>> >> > 
>> >> > public void wakeonLan (){
>>
>> >> > try {
>> >> > while (pruebaPing(maquina)){
>> >> > Toast.makeText(ssh.this, "No responde a ping despues de
>> >> > mandar el paquete magico en..." + contadorDormido,
>> >> > Toast.LENGTH_SHORT).show();
>> >> > Toast.makeText(getApplicationContext(), "No responde a ping
>> >> > despues de mandar el paquete magico en..." + contadorDormido,
>> >> > Toast.LENGTH_SHORT).show();
>> >> > 
>> >> > .
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "Android Developers" group.
>> >> > To post to this group, send email to
>>
>> android-developers@googlegroups.com
>>
>> >> > To unsubscribe from this group, send email to
>> >> > android-developers+unsubscr...@googlegroups.com
>> >> > For more options, visit this group at
>> >> >http://groups.google.com/group/android-developers?hl=en
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
android-developers@googlegroups.com
>> > To unsubscribe from this group, 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

Re: [android-developers] Re: help: dont display Toast

2011-04-09 Thread luiX_
Hmm... that should work fine.

Are you running that in a real device? I've had problems not seeing Toasts
in the emulator...

2011/4/9 ABSOLUT 

> Hi again,
> I can't understand nothing.
> I'm trying to execute a simple toast when the activity create but
> doenn't show anything:
>
> code:
>
> public class ssh extends Activity {
>/** Called when the activity is first created. */
>public static final int PORT = 9;
>
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");
>
>Toast.makeText(ssh.this, "",
> Toast.LENGTH_SHORT).show();
>...
> 
>
>
>
>
>
>
>
> On 9 abr, 12:26, Kostya Vasilyev  wrote:
> > OK. Try calling Toast from the UI thread. You can use Handler for this.
> > 09.04.2011 14:10 пользователь "ABSOLUT"  написал:
> >
> > > Yes I'm sure.
> >
> > > I have:
> >
> > > public void wakeonLan (){
> > > ..
> > > 
> > > while (pruebaPing(maquina)){
> > > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> > > PROCESO
> >
> > > Thread.sleep(6000);
> > > contadorDormido=contadorDormido+6;
> > > Log.d("PRUEBA", "No responde a ping despues de mandar el
> > > paquete magico en..." + contadorDormido);
> > > Toast.makeText(getApplicationContext(), "No responde a
> > > ping despues de mandar el paquete magico en..." + contadorDormido,
> > > Toast.LENGTH_SHORT).show();
> > > Toast.makeText(this, "No esponde a ping despues de
> > > mandar el paquete magico en..." + contadorDormido,
> > > Toast.LENGTH_SHORT).show();
> > > Toast.makeText(ssh.this.getApplicationContext(), "No
> > > responde a ping despues de mandar el paquete magico en..." +
> > > contadorDormido, Toast.LENGTH_SHORT).show();
> > > 
> >
> > > And I can see the logcat
> >
> > > Please any help?
> > > Many thanks
> >
> > > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> > >> Are you sure this code actually runs, and calls Toast? Add logcat
> > printouts
> > >> just before Toast to make sure.
> > >> 09.04.2011 13:13 пользователь "David Tabernero" 
> > >> написал:
> >
> > >> > Hi,
> >
> > >> > I can't display Toast in my application:
> >
> > >> > I have this code but nothing happens. Any help please?
> >
> > >> > Many thanks and sorry for my english!
> >
> > >> > 
> > >> > 
> > >> > public void wakeonLan (){
> >
> > >> > try {
> > >> > while (pruebaPing(maquina)){
> > >> > Toast.makeText(ssh.this, "No responde a ping despues de
> > >> > mandar el paquete magico en..." + contadorDormido,
> > >> > Toast.LENGTH_SHORT).show();
> > >> > Toast.makeText(getApplicationContext(), "No responde a ping
> > >> > despues de mandar el paquete magico en..." + contadorDormido,
> > >> > Toast.LENGTH_SHORT).show();
> > >> > 
> > >> > .
> >
> > >> > --
> > >> > You received this message because you are subscribed to the Google
> > >> > Groups "Android Developers" group.
> > >> > To post to this group, send email to
> >
> > android-developers@googlegroups.com
> >
> > >> > To unsubscribe from this group, send email to
> > >> > android-developers+unsubscr...@googlegroups.com
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/android-developers?hl=en
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, 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: help: dont display Toast

2011-04-09 Thread ABSOLUT
Hi again,
I can't understand nothing.
I'm trying to execute a simple toast when the activity create but
doenn't show anything:

code:

public class ssh extends Activity {
/** Called when the activity is first created. */
public static final int PORT = 9;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d("PRUEBA", "COMENZAMOS EL PROGRAMA");

Toast.makeText(ssh.this, "",
Toast.LENGTH_SHORT).show();
...








On 9 abr, 12:26, Kostya Vasilyev  wrote:
> OK. Try calling Toast from the UI thread. You can use Handler for this.
> 09.04.2011 14:10 пользователь "ABSOLUT"  написал:
>
> > Yes I'm sure.
>
> > I have:
>
> > public void wakeonLan (){
> > ..
> > 
> > while (pruebaPing(maquina)){
> > //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> > PROCESO
>
> > Thread.sleep(6000);
> > contadorDormido=contadorDormido+6;
> > Log.d("PRUEBA", "No responde a ping despues de mandar el
> > paquete magico en..." + contadorDormido);
> > Toast.makeText(getApplicationContext(), "No responde a
> > ping despues de mandar el paquete magico en..." + contadorDormido,
> > Toast.LENGTH_SHORT).show();
> > Toast.makeText(this, "No esponde a ping despues de
> > mandar el paquete magico en..." + contadorDormido,
> > Toast.LENGTH_SHORT).show();
> > Toast.makeText(ssh.this.getApplicationContext(), "No
> > responde a ping despues de mandar el paquete magico en..." +
> > contadorDormido, Toast.LENGTH_SHORT).show();
> > 
>
> > And I can see the logcat
>
> > Please any help?
> > Many thanks
>
> > On 9 abr, 11:49, Kostya Vasilyev  wrote:
> >> Are you sure this code actually runs, and calls Toast? Add logcat
> printouts
> >> just before Toast to make sure.
> >> 09.04.2011 13:13 пользователь "David Tabernero" 
> >> написал:
>
> >> > Hi,
>
> >> > I can't display Toast in my application:
>
> >> > I have this code but nothing happens. Any help please?
>
> >> > Many thanks and sorry for my english!
>
> >> > 
> >> > 
> >> > public void wakeonLan (){
>
> >> > try {
> >> > while (pruebaPing(maquina)){
> >> > Toast.makeText(ssh.this, "No responde a ping despues de
> >> > mandar el paquete magico en..." + contadorDormido,
> >> > Toast.LENGTH_SHORT).show();
> >> > Toast.makeText(getApplicationContext(), "No responde a ping
> >> > despues de mandar el paquete magico en..." + contadorDormido,
> >> > Toast.LENGTH_SHORT).show();
> >> > 
> >> > .
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to
>
> android-developers@googlegroups.com
>
> >> > To unsubscribe from this group, send email to
> >> > android-developers+unsubscr...@googlegroups.com
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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: Android in ARM926EJ CPU

2011-04-09 Thread luiX_
Just for apporting some search terms, I'll try to find something about
"android cross-compiling for ARM architecture" or similar...
El 09/04/2011 12:45, "lbendlin"  escribió:
> You may want to ask this question in a more appropriate group.
> My uneducated guess is that you get the source code for the latest open
> source version (ie NOT HoneyComb) from github and compile it for your
> machine.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: info incorrect on http://developer.android.com WHICH COULD PREVENT ECLIPSE FROM RECOGNIZING YOUR DEVICE

2011-04-09 Thread luiX_
I was thinking the same hehe... xD
El 09/04/2011 12:49, "lbendlin"  escribió:
> Ah, the juvenile excitement. Fond memories. Tell you what. Take your
> keyboard, turn it keys down, and smash it on the table a few times. Maybe
> the Caps Lock key becomes unstuck.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Android InetAddress.isReachable always returns False

2011-04-09 Thread Mark Murphy
On Fri, Apr 8, 2011 at 4:26 PM, David Tabernero  wrote:
> Whenever I use this method  InetAddress.isReachable to ping my pc it always
> returns false even if I'm sure that's pc reachable
>
> What can I use to ping my pc?

Ping and Java have never worked terribly well together, due to
historically weak ICMP packet support. I would try to find some other
solution to whatever problem you are trying to solve.

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

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] Regarding PreferenceFragment

2011-04-09 Thread Mark Murphy
On Fri, Apr 8, 2011 at 7:59 PM, Jay SB  wrote:
> If so, can I
> easily target a range of devices (i.e. < 3.0 and >=3.0) or will I have
> to jump through hoops?

It's not that hard, if your preferences will work OK all concatenated
together. Here's a sample project that uses PreferenceFragment on 3.0
and "classic" preferences pre-3.0:

https://github.com/commonsguy/cw-android/tree/master/Prefs/FragmentsBC

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

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] deepan_android

2011-04-09 Thread Marcin Orlowski
On 8 April 2011 08:07, Williams Deepan  wrote:

>
> I have joined as new member.
>

Welcome.


> for your kind reference , I am android developer.
>

Cool. That's quite unique here.


Regards,
Marcin Orlowski

*Tray Agenda * - keep you daily schedule handy...
WebnetMobile on *Facebook * and
*Twitter
*

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

Re: [android-developers] refresh the gallery without restart the emulator

2011-04-09 Thread Mark Murphy
Use MediaScannerConnection to tell the MediaStore about the new video:

http://developer.android.com/reference/android/media/MediaScannerConnection.html

On Sat, Apr 9, 2011 at 8:23 AM, cervello  wrote:
> Hi,
> I have a video list like;
>
> *video1
> *video2
> *video3
>
> And I chose one of these then I create a new video. My new video's
> name is added in the videolist but doesn't display in the gallery.
> To display the new video I have to restart the emulator.
>
> How can I display the video without restart emulator? 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
>



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

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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


Re: [android-developers] Access to phone's built-in OpenSSL?

2011-04-09 Thread Nikolay Elenkov
On Sat, Apr 9, 2011 at 10:42 PM, DanH  wrote:
> As I understand it, OpenSSL is a part of the standard build for
> Android phones.  Is there any way for an NDK app to access the OpenSSL
> encryption interfaces?
>

Get Android source and build against the same libs/headers.
Interfaces might differ between Android versions, so you'd
better stick with EVP/standard stuff.

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

2011-04-09 Thread Marcin Orlowski
On 9 April 2011 15:48, Eason  wrote:

> Thanks for ur reply =]
> But what i wonder is, if i only update the battery state every 5 mins,
> the update would be a bit too late.
>

http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED
Besides, you are going to monitor cellphone battery state, not control
nuclear powerplant.

Regards,
Marcin Orlowski

*Tray Agenda * - keep you daily schedule handy...
WebnetMobile on *Facebook * and
*Twitter
*

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

[android-developers] Re: Background service stay alive

2011-04-09 Thread Eason
Thanks for ur reply =]
But what i wonder is, if i only update the battery state every 5 mins,
the update would be a bit too late.

I can see on the market there is some battery widget doing the same
(i.e. give immediate response when the phone is plugged to the AC),
how can i do the same??

for the music player, the problem is, if accidentally the service is
killed, my app will be totally crapped. I use singleton on my service
and start it when my app is started, and control the media player
through the service. So if the service is died at some point, if i
want to get the playback time or do anything with the service, my app
will not be working anymore. Are there any better implementation can
be done on my app? I feel so frustrated about it...

On Apr 9, 7:10 pm, lbendlin  wrote:
> for the battery monitor an alarm manager is sufficient. No need to measure
> the battery more frequent than, let's say, every five minutes.
>
> for the music app use a foreground service. That is less likely to get
> killed by the OS. Make sure it can easily be killed by the user though.

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


[android-developers] Access to phone's built-in OpenSSL?

2011-04-09 Thread DanH
As I understand it, OpenSSL is a part of the standard build for
Android phones.  Is there any way for an NDK app to access the OpenSSL
encryption interfaces?

I understand that one could simply compile a separate copy of OpenSSL
with the app, but, in addition to being stupid from a storage point of
view, this isn't legally possible, since the app could then not be
shipped out of the US without being "blessed" (which takes months).

So, is there some way to access the built-in facilities?  (This isn't
for data transmission, so simply using HTTPS isn't a solution.)

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


[android-developers] List Selector Problem

2011-04-09 Thread Laxmi Verma
Hi,

I am facing problem with list selector.

The code is as follows:

*1) Applied list selector in the listview layout*



*2) list_selector.xml*


http://schemas.android.com/apk/res/android";>






Still it is not taking any effect on the list item getting displayed.  The
default color is coming on selection instead of customised one.
I will be grateful if any help is provided on this

Thanks!!

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

[android-developers] refresh the gallery without restart the emulator

2011-04-09 Thread cervello
Hi,
I have a video list like;

*video1
*video2
*video3

And I chose one of these then I create a new video. My new video's
name is added in the videolist but doesn't display in the gallery.
To display the new video I have to restart the emulator.

How can I display the video without restart emulator? 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: Background service stay alive

2011-04-09 Thread lbendlin
for the battery monitor an alarm manager is sufficient. No need to measure 
the battery more frequent than, let's say, every five minutes.
 
for the music app use a foreground service. That is less likely to get 
killed by the OS. Make sure it can easily be killed by the user though.

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

[android-developers] Canvas problem using drawing square around face

2011-04-09 Thread Ian Menzies
Hey guys,

I have a program that successfully accesses a gallery, allows a user
to select a picture from that gallery, and display that pic to the
user. I have tried to add a facedetector into this program but some
issues have arised, the picture is still displayed to the user but
when I try to use canvas to draw an image around a face within a
picture it doesnt and the picture is shown without any square. Im not
sure whether its an issue with Identifying the face or drawing a
square around the face. Any help would be really appreciated. Thanks
for your time.

The code is as follows

[code]



public class Activity3 extends Activity {

private static final int ACTIVITY_SELECT_IMAGE = 1;
private static final int GALLERY_ID = Menu.FIRST + 1;
public String mCurrentImagePath = null;
public int imageWidth, imageHeight;
public int numberOfFace = 5;
public FaceDetector myFaceDetect;
public FaceDetector.Face[] myFace;
float myEyesDistance;
int numberOfFaceDetected;
Bitmap bitmap;
public Canvas canvas;



private ImageView mImageView;



  /** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mImageView = new ImageView(this);
setContentView(mImageView);


}

// the canvas is below


public void onDraw(Canvas c) {
// TODO Auto-generated method stub

 canvas.drawBitmap(bitmap, 0, 0, null);

 Paint myPaint = new Paint();
 myPaint.setColor(Color.GREEN);
 myPaint.setStyle(Paint.Style.STROKE);
 myPaint.setStrokeWidth(3);

 for(int i=0; i < numberOfFaceDetected; i++)
 {
  Face face = myFace[i];
  PointF myMidPoint = new PointF();
  face.getMidPoint(myMidPoint);
  myEyesDistance = face.eyesDistance();
  c.drawRect(
(int)(myMidPoint.x - myEyesDistance),
(int)(myMidPoint.y - myEyesDistance),
(int)(myMidPoint.x + myEyesDistance),
(int)(myMidPoint.y + myEyesDistance),
myPaint);

 }
}


 //adds a menu

@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);

menu.add(0, GALLERY_ID, 0, "Gallery");
return true;
}




//if gallery is chosen begin activity and allow user to select a
pic from the gallery

@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
switch (item.getItemId()) {

case GALLERY_ID:
Intent galleryIntent = new Intent(Intent.ACTION_PICK,
Images.Media.INTERNAL_CONTENT_URI);
startActivityForResult(galleryIntent, ACTIVITY_SELECT_IMAGE);
return true;
}

return super.onMenuItemSelected(featureId, item);
}


//when the user has selected an image and no error has been occurred
retrieve the image detect faces within the image and display the
image.

@Override
public void onActivityResult(int requestCode, int resultCode, Intent
data) {

if (requestCode == ACTIVITY_SELECT_IMAGE && resultCode == RESULT_OK)
{
try {

Uri currImageURI = data.getData();
String[] proj = { Images.Media.DATA, 
Images.Media.ORIENTATION };
Cursor cursor = managedQuery(currImageURI, proj, null, 
null,null);
int columnIndex = cursor.getColumnIndex(proj[0]);
cursor.moveToFirst();
mCurrentImagePath = cursor.getString(columnIndex);


BitmapFactory.Options BitmapFactoryOptionsbfo = new
BitmapFactory.Options();
BitmapFactoryOptionsbfo.inPreferredConfig = 
Bitmap.Config.RGB_565;


bitmap = BitmapFactory.decodeFile(mCurrentImagePath);
int width = bitmap.getWidth();
int height = bitmap.getHeight();


myFace = new FaceDetector.Face[numberOfFace];
myFaceDetect = new FaceDetector(width, height, 
numberOfFace);
numberOfFaceDetected = myFaceDetect.findFaces(bitmap, 
myFace);
canvas= new Canvas();

mImageView.setImageBitmap(bitmap);





}

 catch (Exception e) {
}

}

}

   }
  [/code]








-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
Fo

[android-developers] Re: scale whole view

2011-04-09 Thread lbendlin
It is much safer (and easier) to use matrices for the scaling. You can then 
use the same matrix for the touch event transforms.

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

2011-04-09 Thread lbendlin
There is no point in downloading all the SDK versions. Only download the one 
you point to in MIN_SDK_VERSION and the one you point to in 
TARGET_SDK_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

[android-developers] Re: help: dont display Toast

2011-04-09 Thread skink


On Apr 9, 11:13 am, David Tabernero  wrote:
> Hi,
>
> I can't display Toast in my application:
>
> I have this code but nothing happens. Any help please?
>
> Many thanks and sorry for my english!
>
> 
> 
>   public void wakeonLan (){
>
>         try {
>                          while (pruebaPing(maquina)){
>                 Toast.makeText(ssh.this, "No responde a ping despues de
> mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
>                 Toast.makeText(getApplicationContext(), "No responde a ping
> despues de mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
>                 
>                 .

You cannot show Toasts in the loop - system will not show your Toasts
if it cannot dispatch messages

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: info incorrect on http://developer.android.com WHICH COULD PREVENT ECLIPSE FROM RECOGNIZING YOUR DEVICE

2011-04-09 Thread lbendlin
Ah, the juvenile excitement. Fond memories. Tell you what. Take your 
keyboard, turn it keys down, and smash it on the table a few times. Maybe 
the Caps Lock key becomes unstuck.

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

[android-developers] Re: Android in ARM926EJ CPU

2011-04-09 Thread lbendlin
You may want to ask this question in a more appropriate group.
My uneducated guess is that you get the source code for the latest open 
source version (ie NOT HoneyComb)  from github and compile it for your 
machine.

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

2011-04-09 Thread Kostya Vasilyev
OK. Try calling Toast from the UI thread. You can use Handler for this.
09.04.2011 14:10 пользователь "ABSOLUT"  написал:
> Yes I'm sure.
>
> I have:
>
>
> public void wakeonLan (){
> ..
> 
> while (pruebaPing(maquina)){
> //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
> PROCESO
>
> Thread.sleep(6000);
> contadorDormido=contadorDormido+6;
> Log.d("PRUEBA", "No responde a ping despues de mandar el
> paquete magico en..." + contadorDormido);
> Toast.makeText(getApplicationContext(), "No responde a
> ping despues de mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
> Toast.makeText(this, "No esponde a ping despues de
> mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
> Toast.makeText(ssh.this.getApplicationContext(), "No
> responde a ping despues de mandar el paquete magico en..." +
> contadorDormido, Toast.LENGTH_SHORT).show();
> 
>
>
> And I can see the logcat
>
> Please any help?
> Many thanks
>
>
> On 9 abr, 11:49, Kostya Vasilyev  wrote:
>> Are you sure this code actually runs, and calls Toast? Add logcat
printouts
>> just before Toast to make sure.
>> 09.04.2011 13:13 пользователь "David Tabernero" 
>> написал:
>>
>> > Hi,
>>
>> > I can't display Toast in my application:
>>
>> > I have this code but nothing happens. Any help please?
>>
>> > Many thanks and sorry for my english!
>>
>> > 
>> > 
>> > public void wakeonLan (){
>>
>> > try {
>> > while (pruebaPing(maquina)){
>> > Toast.makeText(ssh.this, "No responde a ping despues de
>> > mandar el paquete magico en..." + contadorDormido,
>> > Toast.LENGTH_SHORT).show();
>> > Toast.makeText(getApplicationContext(), "No responde a ping
>> > despues de mandar el paquete magico en..." + contadorDormido,
>> > Toast.LENGTH_SHORT).show();
>> > 
>> > .
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: help: dont display Toast

2011-04-09 Thread ABSOLUT
Yes I'm sure.

I have:


public void wakeonLan (){
..

while (pruebaPing(maquina)){
 //MIENTR=AS NO RESPONDA A PING. DORMIMOS 6 SEGUNDOS EL
PROCESO

Thread.sleep(6000);
contadorDormido=contadorDormido+6;
Log.d("PRUEBA", "No responde a ping despues de mandar el
paquete magico en..." + contadorDormido);
Toast.makeText(getApplicationContext(), "No responde a
ping despues de mandar el paquete magico en..." + contadorDormido,
Toast.LENGTH_SHORT).show();
Toast.makeText(this, "No esponde a ping despues de
mandar el paquete magico en..." + contadorDormido,
Toast.LENGTH_SHORT).show();
Toast.makeText(ssh.this.getApplicationContext(), "No
responde a ping despues de mandar el paquete magico en..." +
contadorDormido, Toast.LENGTH_SHORT).show();
 


And I can see the logcat

Please any help?
Many thanks


On 9 abr, 11:49, Kostya Vasilyev  wrote:
> Are you sure this code actually runs, and calls Toast? Add logcat printouts
> just before Toast to make sure.
> 09.04.2011 13:13 пользователь "David Tabernero" 
> написал:
>
> > Hi,
>
> > I can't display Toast in my application:
>
> > I have this code but nothing happens. Any help please?
>
> > Many thanks and sorry for my english!
>
> > 
> > 
> > public void wakeonLan (){
>
> > try {
> > while (pruebaPing(maquina)){
> > Toast.makeText(ssh.this, "No responde a ping despues de
> > mandar el paquete magico en..." + contadorDormido,
> > Toast.LENGTH_SHORT).show();
> > Toast.makeText(getApplicationContext(), "No responde a ping
> > despues de mandar el paquete magico en..." + contadorDormido,
> > Toast.LENGTH_SHORT).show();
> > 
> > .
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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

2011-04-09 Thread ABSOLUT
Yes, I'm sure
I have:

 public void wakeonLan (){

  .

Thread.sleep(6000);
contadorDormido=contadorDormido+6;
Log.d("PRUEBA", "No responde a ping despues de mandar el
paquete magico en..." + contadorDormido);
On 9 abr, 11:49, Kostya Vasilyev  wrote:
> Are you sure this code actually runs, and calls Toast? Add logcat printouts
> just before Toast to make sure.
> 09.04.2011 13:13 пользователь "David Tabernero" 
> написал:
>
> > Hi,
>
> > I can't display Toast in my application:
>
> > I have this code but nothing happens. Any help please?
>
> > Many thanks and sorry for my english!
>
> > 
> > 
> > public void wakeonLan (){
>
> > try {
> > while (pruebaPing(maquina)){
> > Toast.makeText(ssh.this, "No responde a ping despues de
> > mandar el paquete magico en..." + contadorDormido,
> > Toast.LENGTH_SHORT).show();
> > Toast.makeText(getApplicationContext(), "No responde a ping
> > despues de mandar el paquete magico en..." + contadorDormido,
> > Toast.LENGTH_SHORT).show();
> > 
> > .
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: android nfc tech API help

2011-04-09 Thread Michael Roland
Hallo Priti,

> I can get a NfcA object using the getTag(tag) method.
> NfcA myTag = NfcA.getTag(tag);
>
> I then do a
> [...]
>     retData = myTag.transcieve(apduCmd); //where apduCmd has a Select
> AID cmd}

Right, you are supposed to get an exception with this. The NfcA tech
is for "low-level" access to ISO 14443 Type A tags (i.e. the
proprietary protocol as mentioned in ISO 14443-3.) Exchanging APDUs
happens on top of ISO 14443-4 data exchange protocol (which is
independend of whether you use type A or B by the way). The correct
tech for this is IsoDep.

br
Michael

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


Re: [android-developers] help: dont display Toast

2011-04-09 Thread Kostya Vasilyev
Are you sure this code actually runs, and calls Toast? Add logcat printouts
just before Toast to make sure.
09.04.2011 13:13 пользователь "David Tabernero" 
написал:
> Hi,
>
> I can't display Toast in my application:
>
> I have this code but nothing happens. Any help please?
>
> Many thanks and sorry for my english!
>
> 
> 
> public void wakeonLan (){
>
> try {
> while (pruebaPing(maquina)){
> Toast.makeText(ssh.this, "No responde a ping despues de
> mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
> Toast.makeText(getApplicationContext(), "No responde a ping
> despues de mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
> 
> .
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-09 Thread David Tabernero
Hi,

I can't display Toast in my application:

I have this code but nothing happens. Any help please?

Many thanks and sorry for my english!



  public void wakeonLan (){

try {
 while (pruebaPing(maquina)){
Toast.makeText(ssh.this, "No responde a ping despues de
mandar el paquete magico en..." + contadorDormido,
Toast.LENGTH_SHORT).show();
Toast.makeText(getApplicationContext(), "No responde a ping
despues de mandar el paquete magico en..." + contadorDormido,
Toast.LENGTH_SHORT).show();

.

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

[android-developers] Background service stay alive

2011-04-09 Thread Eason
Hi all,

I am trying to make several apps that can listen to system states all
the time and give responses when there is any event happens. For
example, a battery state widget, but my widget doesnt work after a
certain period of time. I found that the problem is, the background
service is not functioning after some time. So how can i solve that??

Say, for the battery widget, is that wrong to create a background
service and listen to the battery state (battery level, plugged to USB/
AC)? if else then what should i do to keep track with the battery
status?

Another app im working on is a music player, i created a background
service to allow user listen to music in background (even if the
application is closed), it is also a better way for me to manage the
life cycle of the media player in the app), but the service is gone
after some time and it annoys me.

Please help =[

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


[android-developers] Re: Creating test application Dungeons

2011-04-09 Thread grndvl1
Disregard post as it was an issue with my browser, switched to Chrome
and everything is okay.

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


[android-developers] Creating test application Dungeons

2011-04-09 Thread grndvl1
I am stuck at the part where you setup in app products.  per the
Google guide it says not to publish the example but lto leave it as a
draft.  Only problem is that the Developer Market won't let you
create in-App Products unless you publish it.  So which is it to
publish or not to publish or am I missing some trick?

Here is from googles guide:

Uploading the sample application

After you build a release version of the sample application and sign
it, you need to upload it as a draft to the Android Market publisher
site. You also need to create a product list for the in-app items that
are available for purchase in the sample application. The following
instructions show you how to do this.

   1. Upload the release version of the sample application to Android
Market.

  Do not publish the sample application; leave it as an
unpublished draft application. The sample application is for
demonstration purposes only and should not be made publicly available
on Android Market. To learn how to upload an application to Android
Market, see Uploading applications.
   2. Create a product list for the sample application.

  The sample application lets you purchase two items: a two-handed
sword (sword_001) and a potion (potion_001). We recommend that you set
up your product list so that sword_001 has a purchase type of "Managed
per user account" and potion_001 has a purchase type of "Unmanaged" so
you can see how these two purchase types behave. To learn how to set
up a product list, see Creating a Product List.

  Note: You must publish the items in your product list (sword_001
and potion_001) even though you are not publishing the sample
application. Also, you must have a Google Checkout Merchant account to
add items to the sample application's product 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] In-app billing problem

2011-04-09 Thread Kostya Vasilyev

FWIW,

It's still not working for me - although it worked fine two or three 
days ago.


Same phone, same account, same modified Dungeons sample. In fact, I made 
no changes at all.


Now purchases for android.test.* are sent to Market, but never get any 
response. This is as if I was running the unsigned debug build on my 
test phone, but I'm running a signed release build. I even tried 
removing and adding back the test account in Market profile, no change.


They are presently rolling out per-country pricing for in-app billing, 
perhaps it's related.


PS - I don't see a way to set country-specific prices in my console. All 
I see is USD with no way to choose another currency. Their email said 
"available immediately".


-- Kostya

09.04.2011 4:23, Seba ?:

Hi Ivan/Kostya,

I am having the exact same problem, and I am also seeing the same 
output regarding the GTalkService.


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

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

[android-developers] Re: Intent not received after application started

2011-04-09 Thread nadam
Make sure onNewIntent is overridden correctly. Should look like this:

@Override
public void onNewIntent(Intent intent) {
...
}

On 8 Apr, 16:11, Gorka  wrote:
> Hi,
>
> I am trying to read NFC tags with my Nexus S mobile.
>
> In my Manifest file I have the intent filtered:
>
>          
>                  android:name="android.nfc.action.NDEF_DISCOVERED"/
>
>                         
>
>                   android:name="android.intent.category.DEFAULT"/>
>         
>
> When the mobile detects a tag and the intent is created by the system,
> my application is started. So, the filter works fine.
>
> The problem is that, once the application is opened via Intent, if the
> mobile detects another NDEF_DISCOVERED the application does not
> receive it.
>
> I have implemented the onNewIntent method, but it is not called. I
> also have added the android:launchMode="singleTop" line to my
> activity.
>
> Does anyone know can I solve my problem?
>
> Thanks and bye.

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


[android-developers] setPreviewCallbackWithBuffer issue

2011-04-09 Thread chen ji
Hi All,

I use Android 2.3 on NeuseOne.

Now, I use setPreviewCallbackWithBuffer to get preview callback and it
works well. But if I call takepicture, it will halt and I can not get
jpegcallback. But if I use setPreviewCallback, all things works well.
But as you know, its memroy is inefficient.

I just want to know what is the special thing before I call
takepicture when i use setPreviewCallbackWithBuffer .

BTW, my set preview call back code is just below:


 Size size = p.getPreviewSize();
callbackBuffer1 = new byte[ size.width * size.height * 3 / 2 + 1];
callbackBuffer2 = new byte[size.width * size.height * 3 / 2 + 1]; ;
mCamera.setPreviewCallbackWithBuffer(mPreviewCallback);
// if I use mCamera.setPreviewCallback(mPreviewCallback); it works
well

 mCamera.addCallbackBuffer(callbackBuffer1);
 mCamera.addCallbackBuffer(callbackBuffer2);

Thanks,

Ji

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