[android-developers] Re: How trigger intent to execute a specific method from a specific activity

2010-06-16 Thread a2ronus
1. Register a BroadcastReceiver that listens for a specific Intent.
2. When the user clicks on the Notification, the PendingIntent will be
launched. You can put extra's in this Intent. You can use the extra's
to determine which method will be launched in the Service.

Good luck, a2ronus

On Jun 16, 1:12 am, Gabriel Simões gsim...@gmail.com wrote:
 any ideas on this one?

 tnx

 On 14 jun, 21:33, Gabriel Simões gsim...@gmail.com wrote:



  I need to send it to a service.

  How can a notification message start an specific action (method) on a
  service? is that possible (for example ... a service downloading a
  file would stop the download as the user clicks on the
  notification)?

  tnx

  On 14 jun, 00:21, Kumar Bibek coomar@gmail.com wrote:

   Broadcast will only work if your activity is in the foreground. If
   your activity is not yet started, you can however start it with
   specific data passed via bundle and in the onCreate() do specific
   task.

   If your activity is currently in the foreground, you need to listen to
   broadcasts.

   Thanks and Regards,
   Kumar Bibek

   On Jun 14, 6:17 am, Gabriel Simões gsim...@gmail.com wrote:

Hello,

I´ve been searching a way to implement an intent so when a user clicks
on a notification, an specific method from an activity is executed (or
an specific behavior happens).
Right now I´m thinking about using broadcast but I don´t know if this
is the best way to implement this functionality.
How would you implement it?

Thanks,
Gabriel

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

2010-04-15 Thread a2ronus
Mark, another problem with your approach might be that when the user
presses the back button, you go back to the previous activity, but the
user might expect to go back to the previous ContentView state.

Good luck.

On 14 apr, 21:44, Wayne Wenthin wa...@fuligin.com wrote:
 Why not just make the extra image invisible and set it visible when you need
 it?





 On Wed, Apr 14, 2010 at 12:25 PM, ~ TreKing treking...@gmail.com wrote:
  On Wed, Apr 14, 2010 at 12:28 PM, Mark Wyszomierski mar...@gmail.comwrote:

  What is the effect of calling setContentView() in an activity twice?

  Probably the second call overwrites the first. Why don't you try and find
  out?

  So layout.a and layout.b are the same, they're a copy-paste of one
  another. B just has
  an extra ImageView appended.

  This is terrible. You can reuse layouts by including an existing one in
  another. So layout b could just do:
  include:layout.a / (or whatever the XML syntax is, look it up)
  ImageView /

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

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

 --
 Writing code is one of few things
 that teaches me I don't know everything.

 Make Call Girl Manager great!
 Join the forums.http://www.fuligin.com/forums

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: EditText functionality

2010-04-08 Thread a2ronus
Concerning the EditText with a single line in XML: adding this XML
code to your EditText should work:

android:singleLine=true



On 7 apr, 14:54, Nandan . bhavesh2...@gmail.com wrote:
 yaa you can do this using coding in java

 EditText1.setSingleLine(true);

 Regards**

 Bhavesh kumar
 **





 On Wed, Apr 7, 2010 at 5:55 PM, Mark Murphy mmur...@commonsware.com wrote:
   I have a login view on an application with an EditText for entering a
   username.  I can't seem to restrict the EditText to be a single line.  I
   don't want the user to be able to press return on the soft keyboard and
   get a second line.  I tried setting maxLines to 1, but that appears to
   control only the number of lines visible. Is there a way to limit the
   EditText to a single line?

  Look at android:inputType.

   I am also wondering if there is a way to set the soft keyboard's return
   key to a done key.  I am basically trying to have the user touch the
   username EditText, enter a username, press done, and do the same with
   the password field.  Here is the snippet of layout xml that has not been
   working for me:

  Your XML did not make it into the email.

  --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
  Android App Developer Books:http://commonsware.com/books.html

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

  To unsubscribe, reply using remove me as the subject.

 --
 B!-!/-\\/!=$!-!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: (Update) Re: Talking to wpa_supplicant for TTLS / PEAP / TLS (Runtime+wpa_cli / JNI / LocalSocket(Unix domain socket) / wpa_supplicant.conf?)

2010-04-08 Thread a2ronus
Ok, I realize now that my post above is way too long. Sorry for that.

Let's keep it simple: I currently have an app that runs with the
system sharedUserId by siging it with the platform key. See also:
http://groups.google.com/group/Android-DevPhone-Updating/browse_thread/thread/b123575d8fb258b8/9a267a5020735de6?q=a2ronus#9a267a5020735de6.

I still want to talk to wpa_supplicant for WPA2 Enterprise. I'm also
trying a new approach: using Runtime and Process to be able to talk to
wpa_cli, the command line interface program for talking to
wpa_supplicant.

When I run wpa_cli from adb shell(as root) I can enter a command
such as 'help'. However, when I start wpa_cli (as system) using
Runtime and Process (and Input- and OutputStreams) in my app and push
the help command to wpa_cli, I don't get anything back.


On 3 mrt, 19:35, YCW ychinw...@gmail.com wrote:
 Does anyone know if Dount support WPA2-EAP or not ?!!

 much thanks

 On 2月23日, 下午8時18分, a2ronus aaron.jan...@gmail.com wrote:



  (Update: I got a reply from Jouni Malinen on the hostap mailinglist, I
  tried his approachm but that doesn't seem to work either. I posted the
  message below on the hostap mailinglist as well, since it seems to be
  an Android-wpa_supplicant combination problem)

  Hello Jouni,

  Thanks for the reply. I've tried talking to the Unix domain Socket,
  but it doesn't work. It appears to be a permission problem.

  You mentioned that Solution 3 should work.
  Quote from my previous post; - Solution 3: Talking directly to the
  control interface of wpa_suplicant using Unix domain sockets. I found
  that the Android API supplies us with the LocalSocket class for
  this. ...

  I have tried 2 ways of connecting to the wpa_supplicant Unix domain
  socket(s).

  1. From an Android terminal emulator through wpa_cli.
  2. I adapted an example Java Android program 
  (original:http://all4dev.blogspot.com/2009/02/android-localsocket-localserverso...).

  For clarity: each Android app has its own group and username, for
  example group:user = app_35:app_35. For each approach I adjusted
  wpa_supplicant.confctrl_interface_group to allow an app access to the
  domain sockets, for example (ctrl_interface_group=app_35).

  Results approach 1 ( From an Android terminal emulator through
  wpa_cli. ):
  1. I start up the Android terminal emulator and enter the command
  wpa_cli -p/data/misc/wifi/sockets/ctrl_wpa_79-0. I get the message:

  Using interface 'tiwlan0'
  Could not connect to wpa_supplicant - re-trying
  (The output is the same if I don't add the path to the socket, or
  change the path to /data/misc/wifi/sockets.)

  Results approaches 2a and 2b:
  Next, I tried it from an Android Java program (with the correct
  wpa_supplicant.conf.ctrl_interface_group and after
  wpa_clireconfigure) using 2 slightly different approaches:
  a. When I use 'tiwlan0' as LocalSocketAddress, I use an abstract
  namespace for the LocalSocket. When I do this I get a 'connection
  refused' error message from the Android debug tool logcat.
  b. When In use /data/misc/wifi/sockets/ctrl_wpa_79-0, I use the
  Filesystem Namespace. I then get a 'permission denied' error message.
  ab Both throw an IOException at the line receiver.connect(new
  LocalSocketAddress(SOCKET_ADDRESS, NAMESPACE));  (this happens when
  if socket is in invalid state or the address does not exist.).

  So, or I'm doing something wrong, or something goes wrong with the
  socket permissions. In the adb shell output the file permissions for
  the sockets are set to group:user system:wifi.

  Below this message you can find the shell output and the Java code.

  Thanks for any help in advance.

  Kind regards,

  Aäron Jansen

  * Extra = ADB shell output showing location of sockets, and
  wpa_supplicant.conf *
  C:\Users\ajansen\Desktop\android-sdk-windows\toolsadb root
  adbd is already running as root

  C:\Users\ajansen\Desktop\android-sdk-windows\toolsadb shell
  # cd /data/misc/wifi
  cd /data/misc/wifi

  # cat wpa_supplicant.conf
  cat wpa_supplicant.conf

  ctrl_interface=tiwlan0
  ctrl_interface_group=app_35
  network={
  ssid=aaron
  proto=WPA2
  key_mgmt=WPA-EAP
  eap=PEAP
  pairwise=CCMP}

  #

  # cd sockets
  cd sockets
  # pwd
  pwd
  /data/misc/wifi/sockets
  # ls
  ls
  wpa_ctrl_79-1
  wpa_ctrl_79-0
  # ls -l
  ls -l
  srw-rw system  wifi             2010-02-23 10:23 wpa_ctrl_79-1
  srw-rw system  wifi             2010-02-23 10:23 wpa_ctrl_79-0
  #

  * Java code *
  package com.example.demolocalsocket;

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

  import android.app.Activity;
  import android.net.LocalServerSocket;
  import android.net.LocalSocket;
  import android.net.LocalSocketAddress;
  import android.os.Bundle;
  import android.os.Handler;
  import android.util.Log;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.Toast;

  /**
  *
  * @author Denis

[android-developers] Re: (Update) Re: Talking to wpa_supplicant for TTLS / PEAP / TLS (Runtime+wpa_cli / JNI / LocalSocket(Unix domain socket) / wpa_supplicant.conf?)

2010-04-08 Thread a2ronus
And I've also tried using the wpa_supplicant.conf file. However, when
I use the FileInputStream to read /data/misc/wifi/wpa_supplicant.conf
file I get a FileNotFoundException. My app is again running as system
user. Apparantly the system user cannot access a wifi-user-secured-
directory. The acces permissions are /data(system)/misc(system)/
wifi(wifi).

I've also tried android.uid.wifi: This leads to the app running again
in it's own sandbox (user id = something like app_20). I've tried to
sign this using other certificates as well: shared, media and
release.

In the AndroidManifest.xml / Android.mk of the Phone app (http://
android.git.kernel.org/?p=platform/packages/apps/
Phone.git;a=tree;hb=abc47110c17fa8e8cb6161bc045e87f31eeb7a1c) we find
the combination android.uid.phone / LOCAL_PACKAGE_NAME := Phone. When
we use this for our app (android.uid.phone and siging with the
platform certificate/key) this leads to a failure when installing:
INSTALL_FAILED_UPDATE_INCOMPATIBLE. Apparently something else is at
play here too.

So, my question: Is it possible to give an app wifi user permissions?



On 8 apr, 11:49, a2ronus a...@theipcompany.nl wrote:
 Ok, I realize now that my post above is way too long. Sorry for that.

 Let's keep it simple: I currently have an app that runs with the
 system sharedUserId by siging it with the platform key. See 
 also:http://groups.google.com/group/Android-DevPhone-Updating/browse_threa

 I still want to talk to wpa_supplicant for WPA2 Enterprise. I'm also
 trying a new approach: using Runtime and Process to be able to talk to
 wpa_cli, the command line interface program for talking to
 wpa_supplicant.

 When I run wpa_cli from adb shell(as root) I can enter a command
 such as 'help'. However, when I start wpa_cli (as system) using
 Runtime and Process (and Input- and OutputStreams) in my app and push
 the help command to wpa_cli, I don't get anything back.

 On 3 mrt, 19:35, YCW ychinw...@gmail.com wrote:



  Does anyone know if Dount support WPA2-EAP or not ?!!

  much thanks

  On 2月23日, 下午8時18分, a2ronus aaron.jan...@gmail.com wrote:

   (Update: I got a reply from Jouni Malinen on the hostap mailinglist, I
   tried his approachm but that doesn't seem to work either. I posted the
   message below on the hostap mailinglist as well, since it seems to be
   an Android-wpa_supplicant combination problem)

   Hello Jouni,

   Thanks for the reply. I've tried talking to the Unix domain Socket,
   but it doesn't work. It appears to be a permission problem.

   You mentioned that Solution 3 should work.
   Quote from my previous post; - Solution 3: Talking directly to the
   control interface of wpa_suplicant using Unix domain sockets. I found
   that the Android API supplies us with the LocalSocket class for
   this. ...

   I have tried 2 ways of connecting to the wpa_supplicant Unix domain
   socket(s).

   1. From an Android terminal emulator through wpa_cli.
   2. I adapted an example Java Android program 
   (original:http://all4dev.blogspot.com/2009/02/android-localsocket-localserverso...).

   For clarity: each Android app has its own group and username, for
   example group:user = app_35:app_35. For each approach I adjusted
   wpa_supplicant.confctrl_interface_group to allow an app access to the
   domain sockets, for example (ctrl_interface_group=app_35).

   Results approach 1 ( From an Android terminal emulator through
   wpa_cli. ):
   1. I start up the Android terminal emulator and enter the command
   wpa_cli -p/data/misc/wifi/sockets/ctrl_wpa_79-0. I get the message:

   Using interface 'tiwlan0'
   Could not connect to wpa_supplicant - re-trying
   (The output is the same if I don't add the path to the socket, or
   change the path to /data/misc/wifi/sockets.)

   Results approaches 2a and 2b:
   Next, I tried it from an Android Java program (with the correct
   wpa_supplicant.conf.ctrl_interface_group and after
   wpa_clireconfigure) using 2 slightly different approaches:
   a. When I use 'tiwlan0' as LocalSocketAddress, I use an abstract
   namespace for the LocalSocket. When I do this I get a 'connection
   refused' error message from the Android debug tool logcat.
   b. When In use /data/misc/wifi/sockets/ctrl_wpa_79-0, I use the
   Filesystem Namespace. I then get a 'permission denied' error message.
   ab Both throw an IOException at the line receiver.connect(new
   LocalSocketAddress(SOCKET_ADDRESS, NAMESPACE));  (this happens when
   if socket is in invalid state or the address does not exist.).

   So, or I'm doing something wrong, or something goes wrong with the
   socket permissions. In the adb shell output the file permissions for
   the sockets are set to group:user system:wifi.

   Below this message you can find the shell output and the Java code.

   Thanks for any help in advance.

   Kind regards,

   Aäron Jansen

   * Extra = ADB shell output showing location of sockets, and
   wpa_supplicant.conf *
   C:\Users\ajansen\Desktop

[android-developers] Re: browse via usb

2010-04-06 Thread a2ronus
Have you tried the adb shell command? Still, this might be limited.


On 5 apr, 21:53, ~ TreKing treking...@gmail.com wrote:
 On Sun, Apr 4, 2010 at 2:23 AM, justin justinnrroeb...@gmail.com wrote:
  Is their a way to browse/edit the phones files via usb?

 If you mean the files stored locally on the phone, no, you can't browse or
 edit these.

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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: application installer

2010-04-06 Thread a2ronus
For installing applications, you might want to take a look at Aptoide
as well.

http://www.aptoide.com
http://www.aptoide.org



On 5 apr, 23:13, rhardy rha...@austin.polycom.com wrote:
 My company is developing a new device that will run on Android.  I'm
 tasked to develop the software installation process, including
 application installations and updates as well as system software
 updates.  I want to leverage as much as possible from the Android
 SDK.  I'm looking for any advice or references to help me get
 started.  I've downloaded the source code for Android 2.1 and have
 been tracing the source code path for software installations via adb.
 The path has taken me through adb client - adb server - adb deamon -

  PackageManagerService - installd.

 I'm thinking my software update process will begin with downloading an
 update package to our device's SD card.  Then, if the update package
 contains apk files to install, I guess I'll have to develop a package
 installer app that get the apk files individually and command
 PackageManagerService to install them similar to how adb does?

 If my update package has system software to update, such as a new
 version of Android, I'll have to reboot the system in recovery mode
 and somehow make it install the system software components?

 Am I on the right track or totally off?  I'd appreciate any advice or
 pointers to related reference docs or examples.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Application as root

2010-03-29 Thread a2ronus
Hello Dianne, I have a question related to this. Is it possible to use
sharedUserId=android.uid.system in combination with (re-)signing a
(newly) built Android and the app with the same key to achieve having
more permissions for an app?

Thanks in advance.


On 26 mrt, 22:10, Dianne Hackborn hack...@android.com wrote:
 You can't as a third party application (in fact you can't at all without
 hacking the platform or possibly running in factory test mode).  Modifying
 the platform is more appropriate for android-porting.

 On Fri, Mar 26, 2010 at 5:22 AM, manjunath phc2h5nh3.ma...@gmail.comwrote:





  Hi,

  I want to run a application as root to check one of my API
  functionality. I know that Android won't permit applications with root
  access i.e. setting UID = 0.  Can anyone provide a hack so that I can
  run my application as root.

  I saw in Process.java file that FIRST_APPLICATION_UID is set to 1
  and so on. If I set it to 0 my homescreen doesn't come up.
  Can anyone tell me where this security check is done.

  I also want to know the actual flow for any application to run on
  android.

  Thanks,
  Manjunath

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

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.

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

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

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Avoid Black Screen on starting application?

2010-03-22 Thread a2ronus
More details on Mark Murphy's reply can be found here:
http://developer.android.com/resources/articles/window-bg-speed.html


On 22 mrt, 13:01, Mark Murphy mmur...@commonsware.com wrote:
 javame_android wrote:
  Hi,

  Below is the code that I am using in onCreate() method.

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

          /* New Handler to start the Menu-Activity
           * and close this Splash-Screen after some seconds.*/
          new Handler().postDelayed(new Runnable()
          {
              �...@override
               public void run()
               {
                    /* Create an Intent that will start the Toodalu Main
  Screen-Activity. */
                    Intent mainIntent = new Intent(Main.this,
  Login.class);
                    Main.this.startActivity(mainIntent);
                    Main.this.finish();
               }
          },3000);
      }

  I don't think its lot of work in this method but still the black
  screen does appears for a split of a second.

  Isn't there any way of stopping this?

 Add:

 android:theme=@android:style/Theme.NoDisplay

 to the appropriate activity element in the manifest.

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

 Android 2.0 Programming Books:http://commonsware.com/books

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Basic program structure questions

2010-03-18 Thread a2ronus
Interesting indeed that it freezes. Could you copy-paste the adb
logcat output?

Furthermore, you might wanna take a look at
http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/


On Mar 17, 8:30 am, Andreas andreas.bex...@gmail.com wrote:
 I think it is interesting that your program freezes. What can you see
 in your log?

 On Mar 17, 5:17 am, ARB andrewrbro...@gmail.com wrote:



  Hello everyone, I am starting my first Android program, and I am just
  having trouble structuring my program appropriately (in terms of
  views, activities, etc...)

  Basically, the program is a simple multiplayer trivia game where the
  phone is passed from player to player for each turn.  Right now, I am
  storing game state in an object that is accessible in all other
  classes of the program.  I have an activity that successfully
  retrieves a question, displays it for the current player, and
  correctly verifies input.  Then, how do I change it so that it is the
  next player's turn?  I tried starting a new instance of that same
  activity, since it could get the new game state from the separate
  object, but that just causes my program to freeze.  Similarly, a while
  loop inside my activity causes the program to loop infinitely at that
  spot.

    I'm sure I just don't quite understand how it all fits together, and
  I'd appreciate some help.  So, to be clear, here are the important
  parts of my program that I have so far:

  StartGame - activity that allows you to set up a new game launches
  PlayGame activity as an intent

  PlayGame - activity that displays a question and verifies input as an
  answer.  I can only launch it once and display one question.  This
  activity is meant to be re-used to display all the questions, since it
  gets information on the game state (turns, current question, answer,
  etc...) from the Game class.

  Game - object that is statically available to all other parts of the
  program.  It is a singleton, so there will only ever be one instance
  of it.

  How should I structure my program so that it can show multiple
  questions in succession until a certain condition is met (i.e. each
  player has had 4 turns, or there have been 10 total rounds, etc...)?

  Thanks in advance.

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


[android-developers] Re: on configuration change landscape to portrait it always start activity from beginning.

2010-03-11 Thread a2ronus
Maybe you can use the information in
http://android-developers.blogspot.com/2009/02/faster-screen-orientation-change.html
to save the current image information (but not the current image)?

Good luck,

Aaron Jansen


On Mar 10, 8:23 am, nomi nomeshga...@gmail.com wrote:
 hi ,
 i have written code to display images in sequence.
 when click on next button it shows next image.and so on.
 i m using android 1.5 and save landscape images with same name(as
 portrait images have) in drawable-land folder.
 when i rotate the device it takes all landscape image from drawable-
 land folder.
 but the problem is ,it again start showing images from the beginning.
 how to solve this problem.
 plz send me answer as its argent

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

2010-02-25 Thread a2ronus
I assume your dev phones are running wpa_supplicant? If so, try the
website and mailinglist of wpa_supplicant as well.

http://hostap.epitest.fi/wpa_supplicant/

Good luck,

Aäron


On 25 feb, 18:26, BenYL blon...@gmail.com wrote:
 We are setting up a WiFi VoIP network in the office, but are having
 trouble getting smooth roaming with Android phones (dev 2). They seems
 to wait until the signal is very weak before negotiating a hand-off.
 The iPod Touch handles this process much more smoothly. Can we tweak
 roaming performance with calls to the Android OS?

 Ben

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


[android-developers] (Update) Re: Talking to wpa_supplicant for TTLS / PEAP / TLS (Runtime+wpa_cli / JNI / LocalSocket(Unix domain socket) / wpa_supplicant.conf?)

2010-02-23 Thread a2ronus
 of
wpa_suplicant using Unix domain sockets. I found that the Android API
supplies us with the LocalSocket class for this. However, I have no
idea how to cummunicate with the wpa_supplicant control interface
domain socket. (I will also post this on a wpa_supplicant forum).

- Solution 4: Using java.lang.Runtime and .Process for running wpa_cli
and communicating with it. Problem: I expect there will be
Manifest.permission conflicts.

- Solution 5: Another option might be to use Android NDK / JNI to be
able to use the helper functions in c that wpa_supplicant provides.
Problem: This might be a solution, but it seems to me that it
complicates matters a lot. And I also wonder if there might be some
Manifest.permission conflicts.

- Solution 6: Finding some open source Java supplicant code and
adapting this. Problem: I haven't found it yet. (My C skills aren't so
good, and it needs to work on Android).

I really need some help on this. Is there somebody with some more
experience on this topic? I hope somebody would be able to enlighten
me by providing some answers or pointers on where to look.

Any help would be greatly appreciated. Thanks in advance,

a2ronus



--
Met vriendelijke groet,

Aäron Jansen

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

2010-02-22 Thread a2ronus
Hello Sean,

Thank for your reply. My aswers to your questions are below.

On 22 feb, 01:37, Sean Hodges seanhodge...@googlemail.com wrote:
 I dont think I fully understand your question... Are you looking for
 something in the public API that will render a user's Android device
 useless for a period of time?

Yes. It's to be used in a company setting.

 Just how far do you expect this bricking to go? Will they still be
 able to use their phone for other purposes, e.g. making emergency
 calls?

It should be completely blocked, even when the phone reboots.
Emergency calls are not relevant in the user setting, so those should
be blocked too. Furthermore, only a superuser should know some kind of
unlock mechanism to unbrick/unlock the phone again. Rebooting the
phone should not diable the blocking / bricking.

 If you're looking for your app to be invasive to the user, you're
 unlikely to find it in the public API. Perhaps take a look at how the
 various lock screen apps work.

Thanks for the suggestion. I'll take a look.

Kind regards,

a2ronus




 On Fri, Feb 19, 2010 at 9:49 PM, a2ronus aaron.jan...@gmail.com wrote:
  Hi,

  (I'm new to posting questions on Google Groups. Suggestions on good
  posting behaviour are appreciated. :)  )

  I would like to achieve the following: I would like to temporarily
  disable the Android device when the user performs 3 wrong logins in a
  row. The login is another issue I'm not interested in here. I'm
  interested in blocking the phone.

  I've been searching for some time now. I found some messages on
  disabling buttons, but they seem to be bad usability. On top of that,
  it might not be supported anymore in future APIs. So I kept looking
  and 
  found:http://developer.android.com/reference/android/Manifest.permission.ht
  This seems to suggest something in the API that I can use, but can't
  find it. I'm interested in how to use this permission, and I'm also
  interested in what the consequences are. Does using some bricking
  method imply that the phone is permanently bricked, or is there still
  a way to restore the phone, so you don't have to throw it away?

  I hope somebody would be able to enlighten me by providing some
  answers or pointers on where to look.

  Thanks in advance,

  a2ronus

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, 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: Expanding the status bar from an app (android . permission . EXPAND_STATUS_BAR?)

2010-02-22 Thread a2ronus
Hello TreKing,

Thanks for the reply.

On 22 feb, 01:15, TreKing treking...@gmail.com wrote:
 On Fri, Feb 19, 2010 at 3:59 PM, a2ronus aaron.jan...@gmail.com wrote:
  Hi, for good usability in an app that I'm developing I would like to
  expand the status bar to show the user the first time that there is
  more information to be found on the expanded status bar.

 I doubt you can do this and I personally don't think this is good
 usability. As a user, I want to determine when to expand the status bar,
 not you. You can post a notification with an alert and vibration to let me
 know there's something to check, but I will check when I'm good and ready,
 not when you tell me to. If I had an app that randomly expanded the status
 bar when I was in the middle of something, I would probably promptly
 uninstall it.

Ok, thanks for the idea. But then I still wonder why this permission
can be found in the API.

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


Kind regards,

a2ronus

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


[android-developers] Expanding the status bar from an app (android . permission . EXPAND_STATUS_BAR?)

2010-02-21 Thread a2ronus
Hi all,

(I'm new to posting questions on Google Groups. Suggestions on good
posting behaviour are appreciated. :)  )

Hi, for good usability in an app that I'm developing I would like to
expand the status bar to show the user the first time that there is
more information to be found on the expanded status bar. (The user
will run several apps at the same time, and background services will
post notifications. The expanded notifications link back to several
the apps/activities that the user is running. )

I've been searching for a while now, but the only thing I could find
was: 
http://developer.android.com/reference/android/Manifest.permission.html#EXPAND_STATUS_BAR.

I'm looking for a code example on how to expand the status bar.

I hope somebody would be able to enlighten me by providing some
answers or pointers on where to look.

Thanks in advance,

a2ronus

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


[android-developers] Talking to wpa_supplicant for TTLS / PEAP / TLS (Runtime+wpa_cli / JNI / LocalSocket(Unix domain socket) / wpa_supplicant.conf?)

2010-02-21 Thread a2ronus
Hi,

(I'm new to posting questions on Google Groups. Suggestions on good
posting behaviour are appreciated. :)  )

This is what I'm trying to achieve: I would like to write an Android
app that is capable of talking to wpa_supplicant. More specifically, I
would like to connect to a WPA2-EAP secured network (with
authentication methods TTLS / PEAP / TLS), but since the device will
be used by several users, the user credentials will be supplied by the
user in my app, instead of by wpa_suplicant.conf. I don't want to
write my own supplicant software, I would like to be able to
communicate with it. (I am able to connect to the network when I
provide the user credentials as well in the /data/misc/wifi/
wpa_supplicant.conf file)

I've looked at several solutions and their problems, and I would like
some advice on them. Maybe I've overlooked something:

- Solution 1: Using the Android Wifi API. Problem: The Android WiFi
API doesn't seem to support TTLS / PEAP / TLS. Strange other thing is:
It appears to support LEAP, but I can't find a way to supply the user
credentials to the WifiConfiguration.

- Solution 2: Letting the app write to /data/misc/wifi/
wpa_supplicant.conf and then reassociating. Problem: I understand from
the API that apps can only write to their own private space or the
external SD store. I've also tried writing to a file with the Terminal
Emulator app. This doesn't work. I can only write wpa_supplicant.conf
in the adb shell with root acces.

- Solution 3: Talking directly to the control interface of
wpa_suplicant using Unix domain sockets. I found that the Android API
supplies us with the LocalSocket class for this. However, I have no
idea how to cummunicate with the wpa_supplicant control interface
domain socket. (I will also post this on a wpa_supplicant forum).

- Solution 4: Using java.lang.Runtime and .Process for running wpa_cli
and communicating with it. Problem: I expect there will be
Manifest.permission conflicts.

- Solution 5: Another option might be to use Android NDK / JNI to be
able to use the helper functions in c that wpa_supplicant provides.
Problem: This might be a solution, but it seems to me that it
complicates matters a lot. And I also wonder if there might be some
Manifest.permission conflicts.

- Solution 6: Finding some open source Java supplicant code and
adapting this. Problem: I haven't found it yet. (My C skills aren't so
good).

I really need some help on this. Is there somebody with some more
experience on this topic? I hope somebody would be able to enlighten
me by providing some answers or pointers on where to look.

Any help would be greatly appreciated. Thanks in advance,

a2ronus

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


[android-developers] Code example on possibilities of android . permission . STATUS_BAR?

2010-02-21 Thread a2ronus
Hi,

The following page seems to imply that it's possible to hide icons on
the status bar, but I can't seem to find information or examples that
show which icons you can disable, and what is meant by opening or
closing the status bar.

http://developer.android.com/reference/android/Manifest.permission.html#STATUS_BAR:
Allows an application to open, close, or disable the status bar and
its icons..

I'm looking for code examples to use this permission.

I hope somebody would be able to enlighten me by providing some
answers or pointers on where to look.

Thanks in advance,

a2ronus

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


[android-developers] How to disable the Android device (android.permission.BRICK?)

2010-02-21 Thread a2ronus
Hi,

(I'm new to posting questions on Google Groups. Suggestions on good
posting behaviour are appreciated. :)  )

I would like to achieve the following: I would like to temporarily
disable the Android device when the user performs 3 wrong logins in a
row. The login is another issue I'm not interested in here. I'm
interested in blocking the phone.

I've been searching for some time now. I found some messages on
disabling buttons, but they seem to be bad usability. On top of that,
it might not be supported anymore in future APIs. So I kept looking
and found: 
http://developer.android.com/reference/android/Manifest.permission.html#BRICK.
This seems to suggest something in the API that I can use, but can't
find it. I'm interested in how to use this permission, and I'm also
interested in what the consequences are. Does using some bricking
method imply that the phone is permanently bricked, or is there still
a way to restore the phone, so you don't have to throw it away?

I hope somebody would be able to enlighten me by providing some
answers or pointers on where to look.

Thanks in advance,

a2ronus

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