[android-developers] NFC phone operated Mifare Classic

2011-09-20 Thread xiaoailsa
Hi,everyone!
I have learn nfc phone how to read different card. For the Mifare
Classic, i have a problem for value block.
For the MifareClassic api , i can read and write with nfc phone. But i
can't decrement,increment,restore, transfer.
The api is :decrement(int blockIndex, int value) Decrement a value
block, storing the result in the temporary block on the tag. How
should I do in the program?
I know value block have a fixed data format in the specification.Had
the api take blockindex converted into value block automatically??Who
can provide a code for my reference?

Thank 's your help!

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


[android-developers] Re: How can i close current running application in android application?

2011-09-20 Thread Reddy
1. Go to Settings-Applications-Manage Applications
2. Select your application and force stop will close your application.


On Sep 20, 9:54 am, venugopal reddy venugopal.re...@tspl.com wrote:
 Hi guys,

 In my emulator 4 applications are there. one is webview related and
 one is buttons related..
 First I run the webview application.. its run successfully.(open
 google and i did some work...)
 now i press home button  and open applications and run the another
 application(mean run buttons related application) its run
 successfully).

 Now again i came to home and open application and run the previous
 webview application.now this time its not opened( i think its already
 running background).. how can i stop privoius running applications

 pls help me

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


[android-developers] How to enable GPRS through code

2011-09-20 Thread Reddy
Hi All,

Can some one help me out to enable the GPRS through code.

Regards,
Reddy

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


Re: [android-developers] Implementing database in Android

2011-09-20 Thread TreKing
On Sun, Sep 18, 2011 at 10:40 PM, Gaurav Srivastava 
gaurav.srivastava0...@gmail.com wrote:

 so anyone is having a demo or sample application which is running properly
 and will be useful for me?


You of course checked the documentation and did some simple Google search,
yes?

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

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

Re: [android-developers] Activity issue

2011-09-20 Thread TreKing
On Fri, Sep 16, 2011 at 7:19 AM, vijay pratap vijayprata...@gmail.comwrote:

 I have 4 individual activities  in my project. One of them i made tabhost
 and other three activities are active on its three tab.


That's generally a bad idea. Look into fragments.

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

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

Re: [android-developers] Using Google weather api in android (can't parse Xml correctly)

2011-09-20 Thread TreKing
On Sun, Sep 18, 2011 at 12:05 PM, shihab Shuvro shihab@gmail.comwrote:

 i use below method to get xml data but i can't .


Why not?

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

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

[android-developers] Question About Upload Application on Market

2011-09-20 Thread Chirag Raval
I have one simple and silly question about upload application on
market.

I am developing one application using android 2.2 build version and in
android manifest file i am declare minimum version as 1.6 . Like(uses-
sdk android:minSdkVersion=4 /)

So when i am upload this application on market, is it available for
android 1.6 and 2.1 user ? Is it listing for that users ?

Thanks in Advance.
Chirag Raval.


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


Re: [android-developers] What can block my ProgtessDialog

2011-09-20 Thread TreKing
On Mon, Sep 19, 2011 at 11:54 AM, nika-...@ya.ru nika-...@ya.ru wrote:

 And my dialog doesn't want to spin during this process.
 Why? Can anyone help me?


There is no mention of a progress dialog in the code you posted.

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

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

Re: [android-developers] What can block my ProgtessDialog

2011-09-20 Thread Chirag Raval
Can you post some code please ?

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

2011-09-20 Thread gjs
Hi,

Create the table.

Regards

On Sep 20, 1:54 pm, Devendran Raju devendran...@gmail.com wrote:
 On Tue, Sep 20, 2011 at 9:08 AM, Devendran Raju devendran...@gmail.comwrote:









  -- Forwarded message --
  From: Devendran Raju devendran...@gmail.com
  Date: Mon, Sep 19, 2011 at 7:56 PM
  Subject: Doubt on database access.
  To: a...@androidpower.com

  This is my code. While run this program i could not access the database.
  Exception is coming. Please give me the sollution.

  import android.app.Activity;
  import android.content.Intent;
  import android.database.Cursor;
  import android.database.sqlite.SQLiteDatabase;
  import android.database.sqlite.SQLiteException;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.Spinner;

  public class OwnerRegistration extends Activity implements
  AdapterView.OnItemSelectedListener {
      private final String SAMPLE_DB_NAME = my_Db;
      private final String SAMPLE_TABLE_NAME = login;
      private final String SAMPLE_TABLE_COL = Questions;
      private final String SQ_Table_Name = tblSecurityQuestion;
      int i=0;
      String[] ques=new String[10];

    EditText user_name, password, c_password, F_n, L_n, adr, cty, state, zip,
  email, security_A;
  Spinner security_Q;
  Button button_1, button_2;
  String user, pass, c_pass, F_name, L_name, Addr, City, State, Zip, Email,
  Security_A;
  //String pass;

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.registration);
         user_name=(EditText)findViewById(R.id.editText1);
         password=(EditText)findViewById(R.id.editText2);
         c_password=(EditText)findViewById(R.id.editText3);
         F_n=(EditText)findViewById(R.id.editText4);
         L_n=(EditText)findViewById(R.id.editText5);
         adr=(EditText)findViewById(R.id.editText6);
         cty=(EditText)findViewById(R.id.editText7);
         state=(EditText)findViewById(R.id.editText8);
         zip=(EditText)findViewById(R.id.editText9);
         email=(EditText)findViewById(R.id.editText10);
         security_Q=(Spinner)findViewById(R.id.spinner1);
         security_A=(EditText)findViewById(R.id.editText11);

         Button myButton = (Button) findViewById(R.id.b1);
         myButton.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 insert();
             }
         });
         Button myButton2 = (Button) findViewById(R.id.b2);
         myButton2.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 Intent intent = new Intent(getApplicationContext(),
                         Session_2Activity.class);
                 startActivity(intent);
             }
         });

         spinnerQry();

         security_Q.setOnItemSelectedListener(this);
         ArrayAdapterString adp=new ArrayAdapterString(this,
  android.R.layout.simple_spinner_item, ques);

  adp.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
         security_Q.setAdapter(adp);
     }
         public void onItemSelected(AdapterView? parent, View v, int
  position, long id) {
                 //tv.setText(items[position]);
                 }
                 public void onNothingSelected(AdapterView? parent) {
                 //tv.setText();

  }

       public void insert( ) {
           user=user_name.getText().toString();
           pass=password.getText().toString();
           c_pass=c_password.getText().toString();
           F_name=F_n.getText().toString();
           L_name=L_n.getText().toString();
           Addr=adr.getText().toString();
           City=cty.getText().toString();
           State=state.getText().toString();
           Zip=zip.getText().toString();
           Email=email.getText().toString();
          // Security_Q=security_Q.getText().toString();
           Security_A=security_A.getText().toString();

          Log.v(first,user);
          Log.v(last,pass);

           SQLiteDatabase sampleDB = null;

           try {
                  sampleDB =  this.openOrCreateDatabase(SAMPLE_DB_NAME,
  MODE_PRIVATE, null);

                  //sampleDB.execSQL(SELECT +SAMPLE_TABLE_Spnner+ from
  +SQ_Table_Name,new String [] {});

                  sampleDB.execSQL(INSERT INTO  + SAMPLE_TABLE_NAME
  +(user, pwd, c_pwd, f_name, l_name, address, city, state, zip, email,
  security_a)+
                           Values
  ('+user+','+pass+','+c_pass+','+F_name+','+L_name+','+Addr+',' 
  +City+','+State+','+Zip+','+Email+','+Security_A+'););

              } catch (SQLiteException se ) {
                  Log.e(getClass().getSimpleName(), Could not create or Open
  

Re: [android-developers] Question About Upload Application on Market

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 1:44 AM, Chirag Raval 
chirag.android.develo...@gmail.com wrote:

 So when i am upload this application on market, is it available for android
 1.6 and 2.1 user ? Is it listing for that users ?


It should be, but with the Android Market is like a box of choc-lates ...
you just never know what ya gonna get.

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

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

Re: [android-developers] Question About Upload Application on Market

2011-09-20 Thread Chirag Raval
should be or must be ?

On Tue, Sep 20, 2011 at 12:26 PM, TreKing treking...@gmail.com wrote:

 On Tue, Sep 20, 2011 at 1:44 AM, Chirag Raval 
 chirag.android.develo...@gmail.com wrote:

 So when i am upload this application on market, is it available
 for android 1.6 and 2.1 user ? Is it listing for that users ?


 It should be, but with the Android Market is like a box of choc-lates ...
 you just never know what ya gonna get.


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

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

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

Re: [android-developers] Re: Read NfcA card

2011-09-20 Thread Michael Roland
Hallo,

 byte[] commandAPDU= new byte[]{
 (byte)0x00, (byte)0xA4, (byte)0x04, (byte)0x00, (byte)7,
 (byte)0xAB, (byte)0xE5, (byte)0xBC, (byte)0x08, (byte)0x85,
 (byte)0x01, (byte)0x00};
 byte[] responseAPDU = tag.transceive(commandAPDU);
 String m1=Hex.byteArrayToHex(responseAPDU);
 
 But the result is wrong. It is :6A82. IS it meaning the file can't
 found?

Correct. This error code means file or application not found.
Therefore, there is no applet (dedicated file) with the name
ABE5BC08850100h. Possibly you have mistyped the file name?

 Have some wrongs in this commands ? What should I change my program?
 Where the command APDU come from?

APDU commands are standardized in ISO/IEC 7816-4. What commands your
card understands depends on the card. (And in case of a JavaCard: on
what applets you have installed on that card.)

Anyways, as you received a response from the card (even if that response
is not what you expected) you successfully communicated with the card.

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] Implementing database in Android

2011-09-20 Thread Devendran Raju
Thanks.


Devendran.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] [HoneyComb]GIF Movie can't draw when hardware acceleration is enabled...

2011-09-20 Thread wsgfz...@gmail.com
I use android.graphics.Movie to display a animated GIF image (just
like the BitmapDecode sample in APIDemos do).
this works well if i turned off hardware acceleration.

it looks like the android.graphics.Movie hasn't been updated since API
level 1.

And i guess the canvas' drawing logic is different when hardware
acceleration is on.

Is it another bug about hardware acceleration? Should i submit an
issue in the Android Project Home?

PS
the BitmapDecode sample also can't display the test GIF when i enable
hardware acceleration;

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

2011-09-20 Thread Michael Roland
Hallo Reddy,

 I am planning to write a full duplex peer 2 peer application in 2.3.3.
 Can any one please tell me how it can be possible.

the P2P communication capabilities of Android on current devices
(Nexus S, Galaxy SII) are limited to the NDEF Push Protocol (i.e. you
can exchange a single message on each tap).

 I read that we can implement this using org.opennfc, integrate with
 2.3.3. But this can be done by only device manufacturers. Please let
 me know is there any way that a user can integrate the open nfc with
 2.3.3.

OpenNFC is a software stack for Inside Secure's NFC controllers, while
the NFC stack integrated into Android is for NXP's NFC controllers
(NXP is the manufacturer of the PN544 integrated into Nexus S and
Galaxy SII).

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


[android-developers] Suggestions not working properly in Gingerbread 2.3.4

2011-09-20 Thread anand
Hi all,

Suggestions in Gingerbread 2.3.4 is not working properly.

Steps to reproduce the issue:
1.Select the keyboard as Android Keyboard.
2.Compose a new message by selecting Messaging-New Message-Type to
message.
3. Ensure that suggestion settings like Quick fixes,Show
Suggestions,Auto-complete options are turned ON.
4. Now type youre through softkeyboard.
5.Suggestions will appear just below the editing box.
6.Now tap on space bar in soft keyboard.

Expected behavior:
Suggested word should be entered into the editing box ie you're
should be entered.

Observed behavior:
When we tap on space bar, the word that is entered is retained as is.
Suggested word is not entered into the editing box.

When we analyzed this issue, there is a check whether main dictionary
is there.
In the file packages\inputmethods\LatinIME\java\src\com\android
\inputmethod\latin\Suggest.java,
there is a check for it using the follwoing code.
 public boolean hasMainDictionary() {
 return mMainDict.getSize()  LARGE_DICTIONARY_THRESHOLD;
}

Value of mMainDict.getSize() always returns a value less than
LARGE_DICTIONARY_THRESHOLD and it returns false.
Hence when the suggested word is selected using the space bar, it is
not entered in the editing box.

When we hard this function to return true, we get the expected
behavior.

Can anyone tell why this check is required and will it have some side
effects when we hard code return value to true.

Also please let us know from where the size of dictionary is got ie
value of mMainDict.getSize().

Please help us

Thanks in advance

Regards,
Anand.

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


Re: [android-developers] Re: Problem with Exceptions that are thrown deep in the System of my app

2011-09-20 Thread Joachim Gugenberger
No i do not need that. And this is the reason wy i was asking this
question... ?

Can anyone please post here, that has a sensefull comment?

2011/9/20 Chambras marcech...@gmail.com

 yeah, i do not get the use case. If you just want to debug it, you should
 print everything in the logs.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: ViewFlipper class does not support SurfaceView like it should

2011-09-20 Thread MobileVisuals
Thanks for the info, I have spent many hours investigating this issue
and now I finally know what the problem is. My app has a standard 2d
menu. It is possible to view different 3d visual effects from the
menu. The 3d visual effects are rendered in a GLSurfaceView. That
class extends SurfaceView.

You say that SurfaceView should not be used in a ViewFlipper. How can
I implement my app if I can't use SurfaceView or GLSurfaceView? Which
type of view should I use for the ViewFlipper? Can I render the 3d
visual effects with other views than GLSurfaceView?

Or shouldn't I use a ViewFlipper at all? If not, how can I then switch
between the 2d and the 3d rendering?

On Sep 19, 7:37 pm, Dianne Hackborn hack...@android.com wrote:
 Don't use a SurfaceView in a ViewFlipper.

 Nor a ListView.

 SurfaceView is a *very* *special* view.  As it says, what it does is create
 a completely separate surface (a.k.a. window) that is associated with your
 main window.  This window is positioned behind the main window, and a hole
 punched through your main window to see the surface behind.

 By its nature, this makes the interaction between the surface of the surface
 view and the main view hierarchy limited.

 The purpose of SurfaceView is to present static things like video playback
 or a game playfield in its own surface so that it can draw outside of the
 normal view hierarchy update model (and use OpenGL drawing, different color
 spaces, etc).  It is not to give a tight integration with the rest of the
 view hierarchy.

 You should essentially think of it as an overlay, because really that is
 what it is.

 On Mon, Sep 19, 2011 at 10:29 AM, MobileVisuals 
 eyv...@astralvisuals.comwrote:



  My app uses a ViewFlipper. It is possible to flip between the views
  without problems at first.But after switching to another app and then
  switching back to the ViewFlipper app, it is not possible to flip
  between the views. One of the views is always displayed as just a
  black screen.

  I have investigated the reason for this, using the simplest possible
  SurfaceView. It is still the same problem.
  It is not a thread problem, I see that the onDraw method is called
  like it should. What is the reason for this? Doesn't the ViewFlipper
  class support SurfaceView like it should?

   I got the code for the SurfaceView from the basic tuturial:

 http://www.edu4java.com/androidgame/androidgame2.html

  and the code for the View flipper from Mark Murphys View flipper
  tutorial:

 https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1

  This is my code:
  -

  public class FlipperDemo2 extends Activity {

  ViewFlipper flipper;

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

  flipper=(ViewFlipper)findViewById(R.id.details);
  GameView lv=new GameView(this.getApplicationContext(),true);
  flipper.addView(lv,
                 new ViewGroup.LayoutParams(
                 ViewGroup.LayoutParams.FILL_PARENT,
                 ViewGroup.LayoutParams.FILL_PARENT));
  GameView lv2=new GameView(this.getApplicationContext(),false);
  flipper.addView(lv2,
                 new ViewGroup.LayoutParams(
                 ViewGroup.LayoutParams.FILL_PARENT,
                 ViewGroup.LayoutParams.FILL_PARENT));
  flipper.setFlipInterval(2000);//2000
  flipper.startFlipping();
  }
  }
  --

  public class GameView extends SurfaceView {

         private SurfaceHolder holder;
     boolean blue;

     public GameView(Context context,boolean _blue) {

           super(context);
           holder = getHolder();
           blue=_blue;
           holder.addCallback(new SurfaceHolder.Callback() {

                  @Override
                  public void surfaceDestroyed(SurfaceHolder holder) {

                  }

                  @Override
                  public void surfaceCreated(SurfaceHolder holder) {

                         Canvas c = holder.lockCanvas(null);
                         onDraw(c);
                         holder.unlockCanvasAndPost(c);

                  }

                  @Override
                  public void surfaceChanged(SurfaceHolder holder, int
  format,                           int width, int height) {
                  }    });
     }

     @Override

     protected void onDraw(Canvas canvas) {

         if(blue)
         canvas.drawColor(Color.YELLOW);
         else
                 canvas.drawColor(Color.GREEN);
     }

  }

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

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

 Note: please 

Re: [android-developers] Re: ViewFlipper class does not support SurfaceView like it should

2011-09-20 Thread Romain Guy
You can animate another view on top of a SurfaceView, you just cannot
animate the SurfaceView itself.

On Tue, Sep 20, 2011 at 12:51 AM, MobileVisuals eyv...@astralvisuals.comwrote:

 Thanks for the info, I have spent many hours investigating this issue
 and now I finally know what the problem is. My app has a standard 2d
 menu. It is possible to view different 3d visual effects from the
 menu. The 3d visual effects are rendered in a GLSurfaceView. That
 class extends SurfaceView.

 You say that SurfaceView should not be used in a ViewFlipper. How can
 I implement my app if I can't use SurfaceView or GLSurfaceView? Which
 type of view should I use for the ViewFlipper? Can I render the 3d
 visual effects with other views than GLSurfaceView?

 Or shouldn't I use a ViewFlipper at all? If not, how can I then switch
 between the 2d and the 3d rendering?

 On Sep 19, 7:37 pm, Dianne Hackborn hack...@android.com wrote:
  Don't use a SurfaceView in a ViewFlipper.
 
  Nor a ListView.
 
  SurfaceView is a *very* *special* view.  As it says, what it does is
 create
  a completely separate surface (a.k.a. window) that is associated with
 your
  main window.  This window is positioned behind the main window, and a
 hole
  punched through your main window to see the surface behind.
 
  By its nature, this makes the interaction between the surface of the
 surface
  view and the main view hierarchy limited.
 
  The purpose of SurfaceView is to present static things like video
 playback
  or a game playfield in its own surface so that it can draw outside of the
  normal view hierarchy update model (and use OpenGL drawing, different
 color
  spaces, etc).  It is not to give a tight integration with the rest of the
  view hierarchy.
 
  You should essentially think of it as an overlay, because really that is
  what it is.
 
  On Mon, Sep 19, 2011 at 10:29 AM, MobileVisuals 
 eyv...@astralvisuals.comwrote:
 
 
 
   My app uses a ViewFlipper. It is possible to flip between the views
   without problems at first.But after switching to another app and then
   switching back to the ViewFlipper app, it is not possible to flip
   between the views. One of the views is always displayed as just a
   black screen.
 
   I have investigated the reason for this, using the simplest possible
   SurfaceView. It is still the same problem.
   It is not a thread problem, I see that the onDraw method is called
   like it should. What is the reason for this? Doesn't the ViewFlipper
   class support SurfaceView like it should?
 
I got the code for the SurfaceView from the basic tuturial:
 
  http://www.edu4java.com/androidgame/androidgame2.html
 
   and the code for the View flipper from Mark Murphys View flipper
   tutorial:
 
  https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1
 
   This is my code:
   -
 
   public class FlipperDemo2 extends Activity {
 
   ViewFlipper flipper;
 
   @Override
   public void onCreate(Bundle icicle) {
   super.onCreate(icicle);
   setContentView(R.layout.main);
 
   flipper=(ViewFlipper)findViewById(R.id.details);
   GameView lv=new GameView(this.getApplicationContext(),true);
   flipper.addView(lv,
  new ViewGroup.LayoutParams(
  ViewGroup.LayoutParams.FILL_PARENT,
  ViewGroup.LayoutParams.FILL_PARENT));
   GameView lv2=new GameView(this.getApplicationContext(),false);
   flipper.addView(lv2,
  new ViewGroup.LayoutParams(
  ViewGroup.LayoutParams.FILL_PARENT,
  ViewGroup.LayoutParams.FILL_PARENT));
   flipper.setFlipInterval(2000);//2000
   flipper.startFlipping();
   }
   }
   --
 
   public class GameView extends SurfaceView {
 
  private SurfaceHolder holder;
  boolean blue;
 
  public GameView(Context context,boolean _blue) {
 
super(context);
holder = getHolder();
blue=_blue;
holder.addCallback(new SurfaceHolder.Callback() {
 
   @Override
   public void surfaceDestroyed(SurfaceHolder holder) {
 
   }
 
   @Override
   public void surfaceCreated(SurfaceHolder holder) {
 
  Canvas c = holder.lockCanvas(null);
  onDraw(c);
  holder.unlockCanvasAndPost(c);
 
   }
 
   @Override
   public void surfaceChanged(SurfaceHolder holder, int
   format,   int width, int height) {
   }});
  }
 
  @Override
 
  protected void onDraw(Canvas canvas) {
 
  if(blue)
  canvas.drawColor(Color.YELLOW);
  else
  canvas.drawColor(Color.GREEN);
  }
 
   }
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send 

Re: [android-developers] Infinite horizontal scroll

2011-09-20 Thread Benjamin LE CUN
Exactly what I needed, thanks 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

Re: [android-developers] Re: Older stuff

2011-09-20 Thread Kristopher Micinski
On Tue, Sep 20, 2011 at 1:21 AM, kypriakos demet...@ece.neu.edu wrote:

 Thanks Chris.

 I looked around including URLs at Google (http://
 android.clients.google.com/packages/)
 but these images are nowhere to be found (Cupcake or Donut). Not sure
 if I can
 build them myself eventually off the source code.

 I did look around XDA Devs but didn't see the link below so I will
 follow up
 on that. I think G1 does support 2.2 (or at least that's what people
 claim)
 so I can give it a shot but I need to get it off the ground first from
 1.1
 and into 1.5/1.6 first. And like you said, matching the various
 packages
 is the trick.

Yup, the g1 can be loaded with a 2.2 Cyanogenmod ...

Out of sheer curiosity, why are you wondering about such old devices,
1.6 devices are by these days, fairly ancient, :o).

Kris

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


[android-developers] init.rc --- synchronization

2011-09-20 Thread Michal Maruska
Hello,

I would like to invoke synchronously a command from init.rc, i.e. wait
for its termination before starting another service
 (let's say the zygote).
I see that the documented exec does not do anything.

(I also see features not documented, loglevel for example.
  So that documentation seems very unreliable. Documented  properties
init.action,  init.command  not implemented?)

Another way to act on the service-exit seems --in the
documentation-- the service-exited-name trigger. But it doesn't
seem implemented.

Then the readme.txt mentions  init.svc.name system property, but
then there is no notification on a change.
So, it seems I have to implement the synchronization myself. Maybe all
those tools mentioned would not even fit my requirement,
since zygote is explicitely (re)started on exit of other services.


Is there any such tool implemented?

Thanks

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


[android-developers] Re: init.rc --- synchronization

2011-09-20 Thread Michal Maruska
 Then the readme.txt mentions  init.svc.name system property, but
 then there is no notification on a change.

ok, watchprops  -- system/core/toolbox/watchprops.c  shows that
system-property-change notification is possible.

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


Re: [android-developers] Re: How can i close current running application in android application?

2011-09-20 Thread venugopal reddy
Thank q very much Reddy

On Tue, Sep 20, 2011 at 11:48 AM, Reddy devireddy@gmail.com wrote:

 1. Go to Settings-Applications-Manage Applications
 2. Select your application and force stop will close your application.


 On Sep 20, 9:54 am, venugopal reddy venugopal.re...@tspl.com wrote:
  Hi guys,
 
  In my emulator 4 applications are there. one is webview related and
  one is buttons related..
  First I run the webview application.. its run successfully.(open
  google and i did some work...)
  now i press home button  and open applications and run the another
  application(mean run buttons related application) its run
  successfully).
 
  Now again i came to home and open application and run the previous
  webview application.now this time its not opened( i think its already
  running background).. how can i stop privoius running applications
 
  pls help me

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




-- 
ThanksRegards
*VENU*
Technical Specialist
Thirdware Solution Ltd,Chennai

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

2011-09-20 Thread venugopal reddy
How can I check Emulator 3.0 resolution.

Pls help me

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


[android-developers] how to read the sent sms

2011-09-20 Thread GopalaKrishnan D
how to read the sent sms and display it

-- 
~* Regards*
*GopalaKrishnan D*

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

2011-09-20 Thread danaimset
You can use this code. It works perfect for me:

// URI
public static final String URI_INBOX = content://sms;
public static final String URI_SENT = content://sms/sent;


/**
 * Get all sms from database which have been sent after codetime/
code
 * @param time
 * @return
 */
public void getSms(long time)
{

Cursor c =
mContext.getContentResolver().query(Uri.parse(URI_INBOX), null,
Sms.DATE +   ' + time + ', null, null);

if (c.moveToFirst()) {
do{
   String isIncomingType = ;
   switch (Integer.parseInt(c.getString(
 c.getColumnIndex(Sms.TYPE
   {
 case 1: isIncomingType = YES;// Received
break;
 case 2: isIncomingType = NO;//Outgoing;
break;
 case 3: isIncomingType = NO;//Missed;
   }

   // number, name, date
   String number = c.getString(c.getColumnIndex(Sms.ADDRESS));
   String name = c.getString(c.getColumnIndex(Sms.PERSON));
   String body = c.getString(c.getColumnIndex(Sms.BODY));
   SimpleDateFormat dateFormat = new SimpleDateFormat(EEE MMM
dd HH:mm:ss );
   String date = dateFormat.format(new
Date(c.getInt(c.getColumnIndex(Sms.DATE;


   // etc etc etc

   } while (c.moveToNext());
}

c.close();

}

static class Sms
{
public static final String _ID = _id;
public static final String THREAD_ID = thread_id;
public static final String ADDRESS = address;
public static final String PERSON = person;
public static final String DATE = date;
public static final String PROTOCOL = protocol;
public static final String READ = read;
public static final String STATUS = status;
public static final String TYPE = type;
public static final String REPLY_PATH_PRESENT = reply_path_present;
public static final String SUBJECT = subject;
public static final String BODY = body;
public static final String SERVICE_CENTER = service_center;
public static final String LOCKED = locked;
}

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

2011-09-20 Thread Mark Murphy
If SettingsActivity inherits from PreferenceActivity, there might be
something else needed there. I seem to recall there being issues with
theming the Honeycomb PreferenceActivity, though I do not remember
what those issues might be off the top o' my head.

On Mon, Sep 19, 2011 at 11:10 PM, albnok alb...@gmail.com wrote:
 I tried this, but for some reason the theme only applies to
 LoginActivity but not SettingsActivity:

        application android:icon=@drawable/icon android:label=@string/
 app_name
                android:theme=@android:style/Theme.Holo.Light 
 android:name=Test
                activity android:name=.LoginActivity
 android:screenOrientation=portrait
                        intent-filter
                                action 
 android:name=android.intent.action.MAIN /
                                category 
 android:name=android.intent.category.LAUNCHER /
                        /intent-filter
                /activity
                activity android:name=.SettingsActivity
 android:screenOrientation=portrait android:theme=@android:style/
 Theme.Holo.Light
                        intent-filter
                                action 
 android:name=android.intent.action.VIEW /
                        /intent-filter
                /activity
        /application

 (Part before and after application tags removed.)

 On Sep 19, 6:33 pm, Mark Murphy mmur...@commonsware.com wrote:
 Theme.Holo.Light is usually applied to an activity in the manifest,
 to affect the whole activity, not an individual CheckBox in a layout.









 On Mon, Sep 19, 2011 at 12:47 AM, albnok alb...@gmail.com wrote:
  I am putting a CheckBox against a white background. It looks fine on
  pre-Honeycomb devices but on Honeycomb, it seems that the graphic has
  partial transparency and is white, so when the checkbox is unticked,
  you cannot see it.

  I tried using the Theme.Holo.Light style as follows:

  CheckBox android:text= style=@android:style/Theme.Holo.Light
  android:layout_marginLeft=5dip android:id=@+id/checkBoxWifiOnly
  android:layout_width=wrap_content
  android:layout_height=wrap_content /

  This appears to have no effect. Am I typing the syntax wrongly?

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

 Android 3.1 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




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

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

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


[android-developers] Re: Cannot connect to Samsung Galaxy 10.1

2011-09-20 Thread longuard
i have the same trouble of you

On 18 sep, 19:27, gag gagel...@adelphia.net wrote:
 Hi Everyone,

 I am trying to run and debug my application on a Samsung Galaxy 10.1
 tablet. When I try to launch it from Eclipse, I don't the Galaxy under
 the attached devices.

 I installed the USB driver. Is there anything else I am missing?

 Any help would be greatly appreciated.

 Thanks,

 Greg

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

2011-09-20 Thread Navindian
 Hi

I am creating an MAPActivity, for which i have put google
android-sdk-windows\add-ons\addon_google_apis_google_inc_8\libs\maps.jar in
the build path.
I have changed AndroidManifest.xml from 7 to uses-sdk android:minSdkVersion
=*8* /

I am getting the following Error

[2011-09-20 16:43:35 - EVSEAndroid] Installation error:
INSTALL_FAILED_MISSING_SHARED_LIBRARY

[2011-09-20 16:43:35 - EVSEAndroid] Please check logcat output for more
details.
[2011-09-20 16:43:35 - EVSEAndroid] Launch canceled!



09-20 16:42:46.197: ERROR/Zygote(32): setreuid() failed. errno: 2
09-20 16:42:54.508: ERROR/Zygote(32): setreuid() failed. errno: 17
09-20 16:42:56.697: ERROR/BatteryService(58): usbOnlinePath not found
09-20 16:42:56.697: ERROR/BatteryService(58): batteryVoltagePath not found
09-20 16:42:56.697: ERROR/BatteryService(58): batteryTemperaturePath not
found
09-20 16:42:56.717: ERROR/SurfaceFlinger(58): Couldn't open
/sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
09-20 16:43:03.887: ERROR/EventHub(58): could not get driver version for
/dev/input/mouse0, Not a typewriter
09-20 16:43:03.887: ERROR/EventHub(58): could not get driver version for
/dev/input/mice, Not a typewriter
09-20 16:43:04.148: ERROR/System(58): Failure starting core service
09-20 16:43:04.148: ERROR/System(58): java.lang.SecurityException
09-20 16:43:04.148: ERROR/System(58): at
android.os.BinderProxy.transact(Native Method)
09-20 16:43:04.148: ERROR/System(58): at
android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
09-20 16:43:04.148: ERROR/System(58): at
android.os.ServiceManager.addService(ServiceManager.java:72)
09-20 16:43:04.148: ERROR/System(58): at
com.android.server.ServerThread.run(SystemServer.java:184)
09-20 16:43:05.367: ERROR/SoundPool(58): error loading
/system/media/audio/ui/Effect_Tick.ogg
09-20 16:43:05.387: ERROR/SoundPool(58): error loading
/system/media/audio/ui/KeypressStandard.ogg
09-20 16:43:05.398: ERROR/SoundPool(58): error loading
/system/media/audio/ui/KeypressSpacebar.ogg
09-20 16:43:05.408: ERROR/SoundPool(58): error loading
/system/media/audio/ui/KeypressDelete.ogg
09-20 16:43:05.408: ERROR/SoundPool(58): error loading
/system/media/audio/ui/KeypressReturn.ogg
09-20 16:43:07.687: ERROR/ThrottleService(58): Could not open GPS
configuration file /etc/gps.conf
09-20 16:43:09.168: ERROR/logwrapper(148): executing /system/bin/tc failed:
No such file or directory
09-20 16:43:09.217: ERROR/logwrapper(149): executing /system/bin/tc failed:
No such file or directory
09-20 16:43:09.316: ERROR/logwrapper(150): executing /system/bin/tc failed:
No such file or directory
09-20 16:43:23.667: ERROR/HierarchicalStateMachine(58): TetherMaster -
unhandledMessage: msg.what=3
09-20 16:43:34.966: ERROR/PackageManager(58): Package com.ge requires
unavailable shared library com.google.android.maps; failing!

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

2011-09-20 Thread Appaholics
You need to use an emulator with the library installed on it.

On Tue, Sep 20, 2011 at 4:48 PM, Navindian navind...@gmail.com wrote:

 Hi

 I am creating an MAPActivity, for which i have put google
 android-sdk-windows\add-ons\addon_google_apis_google_inc_8\libs\maps.jar in
 the build path.
 I have changed AndroidManifest.xml from 7 to uses-sdk
 android:minSdkVersion=*8*
  /

 I am getting the following Error

 [2011-09-20 16:43:35 - EVSEAndroid] Installation error:
 INSTALL_FAILED_MISSING_SHARED_LIBRARY

 [2011-09-20 16:43:35 - EVSEAndroid] Please check logcat output for more
 details.
 [2011-09-20 16:43:35 - EVSEAndroid] Launch canceled!



 09-20 16:42:46.197: ERROR/Zygote(32): setreuid() failed. errno: 2
 09-20 16:42:54.508: ERROR/Zygote(32): setreuid() failed. errno: 17
 09-20 16:42:56.697: ERROR/BatteryService(58): usbOnlinePath not found
 09-20 16:42:56.697: ERROR/BatteryService(58): batteryVoltagePath not found
 09-20 16:42:56.697: ERROR/BatteryService(58): batteryTemperaturePath not
 found
 09-20 16:42:56.717: ERROR/SurfaceFlinger(58): Couldn't open
 /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
 09-20 16:43:03.887: ERROR/EventHub(58): could not get driver version for
 /dev/input/mouse0, Not a typewriter
 09-20 16:43:03.887: ERROR/EventHub(58): could not get driver version for
 /dev/input/mice, Not a typewriter
 09-20 16:43:04.148: ERROR/System(58): Failure starting core service
 09-20 16:43:04.148: ERROR/System(58): java.lang.SecurityException
 09-20 16:43:04.148: ERROR/System(58): at
 android.os.BinderProxy.transact(Native Method)
 09-20 16:43:04.148: ERROR/System(58): at
 android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
 09-20 16:43:04.148: ERROR/System(58): at
 android.os.ServiceManager.addService(ServiceManager.java:72)
 09-20 16:43:04.148: ERROR/System(58): at
 com.android.server.ServerThread.run(SystemServer.java:184)
 09-20 16:43:05.367: ERROR/SoundPool(58): error loading
 /system/media/audio/ui/Effect_Tick.ogg
 09-20 16:43:05.387: ERROR/SoundPool(58): error loading
 /system/media/audio/ui/KeypressStandard.ogg
 09-20 16:43:05.398: ERROR/SoundPool(58): error loading
 /system/media/audio/ui/KeypressSpacebar.ogg
 09-20 16:43:05.408: ERROR/SoundPool(58): error loading
 /system/media/audio/ui/KeypressDelete.ogg
 09-20 16:43:05.408: ERROR/SoundPool(58): error loading
 /system/media/audio/ui/KeypressReturn.ogg
 09-20 16:43:07.687: ERROR/ThrottleService(58): Could not open GPS
 configuration file /etc/gps.conf
 09-20 16:43:09.168: ERROR/logwrapper(148): executing /system/bin/tc failed:
 No such file or directory
 09-20 16:43:09.217: ERROR/logwrapper(149): executing /system/bin/tc failed:
 No such file or directory
 09-20 16:43:09.316: ERROR/logwrapper(150): executing /system/bin/tc failed:
 No such file or directory
 09-20 16:43:23.667: ERROR/HierarchicalStateMachine(58): TetherMaster -
 unhandledMessage: msg.what=3
 09-20 16:43:34.966: ERROR/PackageManager(58): Package com.ge requires
 unavailable shared library com.google.android.maps; failing!

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




-- 
--
Raghav Sood
CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
required to have complete control)
http://www.raghavsood.com/
https://market.android.com/developer?pub=Appaholics
http://www.appaholics.in/

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

2011-09-20 Thread subrat
Hi All,

I want to implement two fingers swipe gesture on android .Is it
possible?

If yes how?

Regards
Subrat

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

2011-09-20 Thread John Goche
Hello,

I have two A and B and clicking on a button in A opens B.
I pass an object from A to B using parcelable and the extras in the
intent used to open B. Now I have the following problem: given that
A is beneath B on the activity stack and will not be reopened, how
do I pass the object from B back to activity A?

Thanks for your help,

John Goche

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

2011-09-20 Thread drpickett
I usually hate it when people just reply with a snarky dope-slap
response, but in this case it is merited somewhat.  The compiler error
would be helpful in diagnosing the problem.

dp

On Sep 19, 1:58 am, swer ademk...@gmail.com wrote:
 hello friends..

 It has been almost a day and I have still working on this little code.
 All I need to do is to get the response stream from the server.

 However compiler gives an error just the beginning of the code..
 I will be appreciated if you give me a hand  on this...

 The code is below.
 Note :  I also set the INTERNET permission in the manifest file.
 Thanks in advance..

 swer

 //
 *** 
 ***

 public class AsyncTestActivity extends Activity implements
 OnClickListener {
             /** Called when the activity is first created. */
                 Button btnThread;
                 EditText txtEdit;
                 public String threadName = ;

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

                 btnThread  = (Button)findViewById(R.id.btnThread);
                 btnThread.setOnClickListener(this);

                 txtEdit = (EditText)findViewById(R.id.txtEdit);
             }

                 @Override
                 public void onClick(View v) {
                         // TODO Auto-generated method stub
                         grabURL(http://www.google.com/;);
                 }

             public void grabURL(String url) {
                 new GrabURL().execute(url);
             }

  private class GrabURL extends AsyncTaskString, Void, Void {
                 private HttpClient Client =null;
                 private String strContent;
                 private String strError = null;
                 private ProgressDialog Dialog = new
 ProgressDialog(AsyncTestActivity.this);

                 protected void onPreExecute() {
                     Dialog.setMessage(Downloading source..);
                     Dialog.show();
                 }

                 protected Void doInBackground(String... urls) {
                     try {
                           // Create client and set our specific user-agent
 string
                           HttpGet request = new HttpGet(urls[0]);
                           request.setHeader(User-Agent, Android);
                           Client = new DefaultHttpClient(httpParameters);

                           HttpResponse response =
 Client.execute(request);                    //  COMPILER GIVES
 AN ERROR AT THIS POINT  ang goes to onPostExecute(void);

                         //   ResponseHandlerString responseHandler  = new
 BasicResponseHandler();
                         //   strContent = Client.execute(request,
 responseHandler);

                             // Check if server response is valid
                           StatusLine status = response.getStatusLine();
                           if (status.getStatusCode() != 200) {
                               throw new IOException(Invalid response from
 server:  + status.toString());
                           }

                           // Pull content stream from response
                           HttpEntity entity = response.getEntity();
                           InputStream inputStream = entity.getContent();

                           ByteArrayOutputStream content = new
 ByteArrayOutputStream();

                           // Read response into a buffered stream
                           int readBytes = 0;
                           byte[] sBuffer = new byte[512];
                           while ((readBytes = inputStream.read(sBuffer)) !=
 -1) {
                               content.write(sBuffer, 0, readBytes);
                           }

                           // Return result from buffered stream
                           String dataAsString = new
 String(content.toByteArray());

                           txtEdit.setText(dataAsString);

                       } catch (IOException e) {
                                 strError = e.getLocalizedMessage();
                                 cancel(true);

                     }

                     return null;
                 }

                 protected void onPostExecute(Void unused) {
                     Dialog.dismiss();
                     if (strError != null) {
                         Toast.makeText(AsyncTestActivity.this, strError,
 Toast.LENGTH_LONG).show();
                     } else {
                         Toast.makeText(AsyncTestActivity.this, Source:  +
 strContent, Toast.LENGTH_LONG).show();
                     }
                 }

             }

         }
 //
 *** 
 ***

-- 
You received this 

[android-developers] Re: ViewFlipper class does not support SurfaceView like it should

2011-09-20 Thread MobileVisuals
GLSurfaceView extends SurfaceView. Does that mean that it is not
possible to animate GLSurfaceView with a viewflipper?

On Sep 20, 9:54 am, Romain Guy romain...@android.com wrote:
 You can animate another view on top of a SurfaceView, you just cannot
 animate the SurfaceView itself.

 On Tue, Sep 20, 2011 at 12:51 AM, MobileVisuals 
 eyv...@astralvisuals.comwrote:



  Thanks for the info, I have spent many hours investigating this issue
  and now I finally know what the problem is. My app has a standard 2d
  menu. It is possible to view different 3d visual effects from the
  menu. The 3d visual effects are rendered in a GLSurfaceView. That
  class extends SurfaceView.

  You say that SurfaceView should not be used in a ViewFlipper. How can
  I implement my app if I can't use SurfaceView or GLSurfaceView? Which
  type of view should I use for the ViewFlipper? Can I render the 3d
  visual effects with other views than GLSurfaceView?

  Or shouldn't I use a ViewFlipper at all? If not, how can I then switch
  between the 2d and the 3d rendering?

  On Sep 19, 7:37 pm, Dianne Hackborn hack...@android.com wrote:
   Don't use a SurfaceView in a ViewFlipper.

   Nor a ListView.

   SurfaceView is a *very* *special* view.  As it says, what it does is
  create
   a completely separate surface (a.k.a. window) that is associated with
  your
   main window.  This window is positioned behind the main window, and a
  hole
   punched through your main window to see the surface behind.

   By its nature, this makes the interaction between the surface of the
  surface
   view and the main view hierarchy limited.

   The purpose of SurfaceView is to present static things like video
  playback
   or a game playfield in its own surface so that it can draw outside of the
   normal view hierarchy update model (and use OpenGL drawing, different
  color
   spaces, etc).  It is not to give a tight integration with the rest of the
   view hierarchy.

   You should essentially think of it as an overlay, because really that is
   what it is.

   On Mon, Sep 19, 2011 at 10:29 AM, MobileVisuals 
  eyv...@astralvisuals.comwrote:

My app uses a ViewFlipper. It is possible to flip between the views
without problems at first.But after switching to another app and then
switching back to the ViewFlipper app, it is not possible to flip
between the views. One of the views is always displayed as just a
black screen.

I have investigated the reason for this, using the simplest possible
SurfaceView. It is still the same problem.
It is not a thread problem, I see that the onDraw method is called
like it should. What is the reason for this? Doesn't the ViewFlipper
class support SurfaceView like it should?

 I got the code for the SurfaceView from the basic tuturial:

   http://www.edu4java.com/androidgame/androidgame2.html

and the code for the View flipper from Mark Murphys View flipper
tutorial:

   https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1

This is my code:
-

public class FlipperDemo2 extends Activity {

ViewFlipper flipper;

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

flipper=(ViewFlipper)findViewById(R.id.details);
GameView lv=new GameView(this.getApplicationContext(),true);
flipper.addView(lv,
               new ViewGroup.LayoutParams(
               ViewGroup.LayoutParams.FILL_PARENT,
               ViewGroup.LayoutParams.FILL_PARENT));
GameView lv2=new GameView(this.getApplicationContext(),false);
flipper.addView(lv2,
               new ViewGroup.LayoutParams(
               ViewGroup.LayoutParams.FILL_PARENT,
               ViewGroup.LayoutParams.FILL_PARENT));
flipper.setFlipInterval(2000);//2000
flipper.startFlipping();
}
}
--

public class GameView extends SurfaceView {

       private SurfaceHolder holder;
   boolean blue;

   public GameView(Context context,boolean _blue) {

         super(context);
         holder = getHolder();
         blue=_blue;
         holder.addCallback(new SurfaceHolder.Callback() {

                @Override
                public void surfaceDestroyed(SurfaceHolder holder) {

                }

                @Override
                public void surfaceCreated(SurfaceHolder holder) {

                       Canvas c = holder.lockCanvas(null);
                       onDraw(c);
                       holder.unlockCanvasAndPost(c);

                }

                @Override
                public void surfaceChanged(SurfaceHolder holder, int
format,                           int width, int height) {
                }    });
   }

   @Override

   protected void onDraw(Canvas canvas) {

       if(blue)
       

Re: [android-developers] Re: HttpResponse problem

2011-09-20 Thread Daniel Drozdzewski
I  don't mind snotty replies to crap questions.

There are far too many posts that are not questions, or questions that
were answered on this list, or Stack Overflow, or simple google-fu for
the key terms in question gives the answer within first 3 results.

About the code below:

[...]

Client = new DefaultHttpClient(httpParameters);


... I cannot see, where httpParameters are defined?


Have a look at following example. Analyse it with reading API and see,
where the problem lies:
http://w3mentor.com/learn/java/android-development/android-http-services/example-of-http-get-request-using-httpclient-in-android/


-- 
Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Why doesn't HTC devices support Point attenuation?

2011-09-20 Thread MobileVisuals
I have implemented Point attenuation according to the Android
specification in two of my company's apps. I have found that it works
like it should on most devices, like those from Samsung. I have
implemented Point attenuation on Symbian and C++ before, so I am quite
sure that I have implemented it the right way. It is about the same
code implementation in all OpenGL.

The problem is that everything implemented with Point attenuation will
look like a blurry mess on devices from HTC and some from LG. This
happens on even the newest devices from HTC, like HTC Desire HD. Why
is it like this?

These devices should support Point attenuation according to their
specifications, but why don't they?

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

2011-09-20 Thread Mark Murphy
You probably should reconsider your approach. It sounds like you need
a central data model, accessible from multiple activities:

-- database
-- file

managed by:

-- service
-- some other singleton
-- custom Application class

Extras on Intents should be viewed much along the lines of GET
parameters on Web pages. You wouldn't talk about passing a GET
parameter back to some page in the user's history.

On Tue, Sep 20, 2011 at 7:55 AM, John Goche johngoch...@googlemail.com wrote:

 Hello,

 I have two A and B and clicking on a button in A opens B.
 I pass an object from A to B using parcelable and the extras in the
 intent used to open B. Now I have the following problem: given that
 A is beneath B on the activity stack and will not be reopened, how
 do I pass the object from B back to activity A?

 Thanks for your help,

 John Goche

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



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

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

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


[android-developers] Re: ViewFlipper class does not support SurfaceView like it should

2011-09-20 Thread Jens
That would be the gist of what both Dianne  Romain Guy said yes.

On Sep 20, 2:13 pm, MobileVisuals eyv...@astralvisuals.com wrote:
 GLSurfaceView extends SurfaceView. Does that mean that it is not
 possible to animate GLSurfaceView with a viewflipper?

 On Sep 20, 9:54 am, Romain Guy romain...@android.com wrote:

  You can animate another view on top of a SurfaceView, you just cannot
  animate the SurfaceView itself.

  On Tue, Sep 20, 2011 at 12:51 AM, MobileVisuals 
  eyv...@astralvisuals.comwrote:

   Thanks for the info, I have spent many hours investigating this issue
   and now I finally know what the problem is. My app has a standard 2d
   menu. It is possible to view different 3d visual effects from the
   menu. The 3d visual effects are rendered in a GLSurfaceView. That
   class extends SurfaceView.

   You say that SurfaceView should not be used in a ViewFlipper. How can
   I implement my app if I can't use SurfaceView or GLSurfaceView? Which
   type of view should I use for the ViewFlipper? Can I render the 3d
   visual effects with other views than GLSurfaceView?

   Or shouldn't I use a ViewFlipper at all? If not, how can I then switch
   between the 2d and the 3d rendering?

   On Sep 19, 7:37 pm, Dianne Hackborn hack...@android.com wrote:
Don't use a SurfaceView in a ViewFlipper.

Nor a ListView.

SurfaceView is a *very* *special* view.  As it says, what it does is
   create
a completely separate surface (a.k.a. window) that is associated with
   your
main window.  This window is positioned behind the main window, and a
   hole
punched through your main window to see the surface behind.

By its nature, this makes the interaction between the surface of the
   surface
view and the main view hierarchy limited.

The purpose of SurfaceView is to present static things like video
   playback
or a game playfield in its own surface so that it can draw outside of 
the
normal view hierarchy update model (and use OpenGL drawing, different
   color
spaces, etc).  It is not to give a tight integration with the rest of 
the
view hierarchy.

You should essentially think of it as an overlay, because really that is
what it is.

On Mon, Sep 19, 2011 at 10:29 AM, MobileVisuals 
   eyv...@astralvisuals.comwrote:

 My app uses a ViewFlipper. It is possible to flip between the views
 without problems at first.But after switching to another app and then
 switching back to the ViewFlipper app, it is not possible to flip
 between the views. One of the views is always displayed as just a
 black screen.

 I have investigated the reason for this, using the simplest possible
 SurfaceView. It is still the same problem.
 It is not a thread problem, I see that the onDraw method is called
 like it should. What is the reason for this? Doesn't the ViewFlipper
 class support SurfaceView like it should?

  I got the code for the SurfaceView from the basic tuturial:

http://www.edu4java.com/androidgame/androidgame2.html

 and the code for the View flipper from Mark Murphys View flipper
 tutorial:

https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1

 This is my code:
 -

 public class FlipperDemo2 extends Activity {

 ViewFlipper flipper;

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

 flipper=(ViewFlipper)findViewById(R.id.details);
 GameView lv=new GameView(this.getApplicationContext(),true);
 flipper.addView(lv,
                new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));
 GameView lv2=new GameView(this.getApplicationContext(),false);
 flipper.addView(lv2,
                new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.FILL_PARENT,
                ViewGroup.LayoutParams.FILL_PARENT));
 flipper.setFlipInterval(2000);//2000
 flipper.startFlipping();
 }
 }
 --

 public class GameView extends SurfaceView {

        private SurfaceHolder holder;
    boolean blue;

    public GameView(Context context,boolean _blue) {

          super(context);
          holder = getHolder();
          blue=_blue;
          holder.addCallback(new SurfaceHolder.Callback() {

                 @Override
                 public void surfaceDestroyed(SurfaceHolder holder) {

                 }

                 @Override
                 public void surfaceCreated(SurfaceHolder holder) {

                        Canvas c = holder.lockCanvas(null);
                        onDraw(c);
                        holder.unlockCanvasAndPost(c);

                 }

                 @Override
                 public void 

[android-developers] Re: Send message with C2DM to selected devices

2011-09-20 Thread Jens
Each device has its own registration ID so you can push messages to a
specific device.

On Sep 19, 9:24 am, Joshua Partogi joshua.part...@gmail.com wrote:
 hi there,

 I am interested to use C2DM for my application. Is it possible to send push
 messages to selected devices only? Or will it send to all devices that has
 my application?

 Thank you in advance for your help.

 --
 @jpartogi

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

2011-09-20 Thread blake
Greg,
  You really should be able to customize the appearance of your app,
for just about any kind of device.  There's good information on how to
do it here:

http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html

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

https://portabledroid.wordpress.com/2011/06/22/25/

-blake
Programming Android, FTW!
http://oreilly.com/catalog/0636920010364



On Sep 18, 7:21 pm, gag gagel...@adelphia.net wrote:
 Hi All,

 I was given the task of writing one of our apps for Android phones and
 tablets. Do you have to write separate versions of the same app, one
 for the phone and one for the tablet?

 Sorry for the question if there is an easy answer. I am under a time
 crunch.

 Thanks for any help.

 Greg

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

2011-09-20 Thread Robin Talwar
try not to get auth token everytime

better you cache it or the google server will add captcha in process and u
cant get to captcha through the code. You would have to do some python stuff
for that i am not really clear about it. Hence better u save the
authentication token

On Tue, Sep 20, 2011 at 6:33 PM, Jens dunkingbikk...@gmail.com wrote:

 Each device has its own registration ID so you can push messages to a
 specific device.

 On Sep 19, 9:24 am, Joshua Partogi joshua.part...@gmail.com wrote:
  hi there,
 
  I am interested to use C2DM for my application. Is it possible to send
 push
  messages to selected devices only? Or will it send to all devices that
 has
  my application?
 
  Thank you in advance for your help.
 
  --
  @jpartogi

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




-- 
Regards
Abhishek Talwar
9953395712

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

[android-developers] Re: What is the sorting order on Android Market?

2011-09-20 Thread sblantipodi
but who manipulate this raking and why?

On Sep 19, 6:48 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Yes, same thing with Cash Organizer.  That app is only a week old.
 I do believe the rankings are manipulated.

 On Sep 19, 12:35 pm, Peter Sinnott psinn...@gmail.com wrote:







  That isn't great but what about Inesoft Cash Organizer. No other apps
  by the dev , 1-5 installs and it is at position 8.

  On Sep 19, 1:39 am, Zsolt Vasvari zvasv...@gmail.com wrote:

   There is no sorting order as it appears that companies can buy a
   good place in the order.

   The current #1 Financial App has debuted in the #1 spot.  That would
   never happen with no reviews and no downloads for any other no name
   app from an independent developer.  But since it's an app from a well
   known player in the field, it appeared as #1 and it has stayed there.
   Curious if the playing field is even -- it certainly doesn't appear to
   be.

   On Sep 18, 7:17 pm, sblantipodi perini.dav...@dpsoftware.org wrote:

I'm always disgusted from the Google policy.
My app has more good reviews, more downloads, more active downloads
and is
far above other fart app that no one downloaded.

On Sep 18, 8:31 am, Pritam pritamsha...@gmail.com wrote:

 From what I guess that while publishing the app, you choose a
 category, and your app will appear in this category.
 Now it may be too down the list, that is something related to SEO part
 similar to search engines, and may depend on many factors other than
 ratings, like number of downloads, active downloads, total user
 reviews, etc. and all that would obviously never will be openly shared
 and will keep changing.
 Sometimes it may happen things 
 like,http://techcrunch.com/2011/09/12/googles-auto-correct-killed-the-laun...,
 though now fixed.

 On Sep 17, 9:46 pm, sblantipodi perini.dav...@dpsoftware.org wrote:

  Hi all...

  Is there someone who can help me understanding how android market 
  sort
  the apps?

  One of my financial apps has 4.5stars, it has more download than 
  other
  apps but it isn't displayed in the financial section of the market.

  Why?
  How the market sort the apps?

  Thanks.- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ViewFlipper class does not support SurfaceView like it should

2011-09-20 Thread MobileVisuals
How can I then switch between a view with 2d rendering and a view with
3d rendering?

I suppose I have to use GLSurfaceView for 3d rendering with OpenGL?

On Sep 20, 3:00 pm, Jens dunkingbikk...@gmail.com wrote:
 That would be the gist of what both Dianne  Romain Guy said yes.

 On Sep 20, 2:13 pm, MobileVisuals eyv...@astralvisuals.com wrote:

  GLSurfaceView extends SurfaceView. Does that mean that it is not
  possible to animate GLSurfaceView with a viewflipper?

  On Sep 20, 9:54 am, Romain Guy romain...@android.com wrote:

   You can animate another view on top of a SurfaceView, you just cannot
   animate the SurfaceView itself.

   On Tue, Sep 20, 2011 at 12:51 AM, MobileVisuals 
   eyv...@astralvisuals.comwrote:

Thanks for the info, I have spent many hours investigating this issue
and now I finally know what the problem is. My app has a standard 2d
menu. It is possible to view different 3d visual effects from the
menu. The 3d visual effects are rendered in a GLSurfaceView. That
class extends SurfaceView.

You say that SurfaceView should not be used in a ViewFlipper. How can
I implement my app if I can't use SurfaceView or GLSurfaceView? Which
type of view should I use for the ViewFlipper? Can I render the 3d
visual effects with other views than GLSurfaceView?

Or shouldn't I use a ViewFlipper at all? If not, how can I then switch
between the 2d and the 3d rendering?

On Sep 19, 7:37 pm, Dianne Hackborn hack...@android.com wrote:
 Don't use a SurfaceView in a ViewFlipper.

 Nor a ListView.

 SurfaceView is a *very* *special* view.  As it says, what it does is
create
 a completely separate surface (a.k.a. window) that is associated with
your
 main window.  This window is positioned behind the main window, and a
hole
 punched through your main window to see the surface behind.

 By its nature, this makes the interaction between the surface of the
surface
 view and the main view hierarchy limited.

 The purpose of SurfaceView is to present static things like video
playback
 or a game playfield in its own surface so that it can draw outside of 
 the
 normal view hierarchy update model (and use OpenGL drawing, different
color
 spaces, etc).  It is not to give a tight integration with the rest of 
 the
 view hierarchy.

 You should essentially think of it as an overlay, because really that 
 is
 what it is.

 On Mon, Sep 19, 2011 at 10:29 AM, MobileVisuals 
eyv...@astralvisuals.comwrote:

  My app uses a ViewFlipper. It is possible to flip between the views
  without problems at first.But after switching to another app and 
  then
  switching back to the ViewFlipper app, it is not possible to flip
  between the views. One of the views is always displayed as just a
  black screen.

  I have investigated the reason for this, using the simplest possible
  SurfaceView. It is still the same problem.
  It is not a thread problem, I see that the onDraw method is called
  like it should. What is the reason for this? Doesn't the ViewFlipper
  class support SurfaceView like it should?

   I got the code for the SurfaceView from the basic tuturial:

 http://www.edu4java.com/androidgame/androidgame2.html

  and the code for the View flipper from Mark Murphys View flipper
  tutorial:

 https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1

  This is my code:
  -

  public class FlipperDemo2 extends Activity {

  ViewFlipper flipper;

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

  flipper=(ViewFlipper)findViewById(R.id.details);
  GameView lv=new GameView(this.getApplicationContext(),true);
  flipper.addView(lv,
                 new ViewGroup.LayoutParams(
                 ViewGroup.LayoutParams.FILL_PARENT,
                 ViewGroup.LayoutParams.FILL_PARENT));
  GameView lv2=new GameView(this.getApplicationContext(),false);
  flipper.addView(lv2,
                 new ViewGroup.LayoutParams(
                 ViewGroup.LayoutParams.FILL_PARENT,
                 ViewGroup.LayoutParams.FILL_PARENT));
  flipper.setFlipInterval(2000);//2000
  flipper.startFlipping();
  }
  }
  --

  public class GameView extends SurfaceView {

         private SurfaceHolder holder;
     boolean blue;

     public GameView(Context context,boolean _blue) {

           super(context);
           holder = getHolder();
           blue=_blue;
           holder.addCallback(new SurfaceHolder.Callback() {

                  @Override
                  public void surfaceDestroyed(SurfaceHolder holder) {

                  }

                  @Override

[android-developers] Re: What is the sorting order on Android Market?

2011-09-20 Thread sblantipodi
Mr David R Pickett is asking me to show him momey to help me with the
ranking.
lol.





On Sep 19, 6:48 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Yes, same thing with Cash Organizer.  That app is only a week old.
 I do believe the rankings are manipulated.

 On Sep 19, 12:35 pm, Peter Sinnott psinn...@gmail.com wrote:







  That isn't great but what about Inesoft Cash Organizer. No other apps
  by the dev , 1-5 installs and it is at position 8.

  On Sep 19, 1:39 am, Zsolt Vasvari zvasv...@gmail.com wrote:

   There is no sorting order as it appears that companies can buy a
   good place in the order.

   The current #1 Financial App has debuted in the #1 spot.  That would
   never happen with no reviews and no downloads for any other no name
   app from an independent developer.  But since it's an app from a well
   known player in the field, it appeared as #1 and it has stayed there.
   Curious if the playing field is even -- it certainly doesn't appear to
   be.

   On Sep 18, 7:17 pm, sblantipodi perini.dav...@dpsoftware.org wrote:

I'm always disgusted from the Google policy.
My app has more good reviews, more downloads, more active downloads
and is
far above other fart app that no one downloaded.

On Sep 18, 8:31 am, Pritam pritamsha...@gmail.com wrote:

 From what I guess that while publishing the app, you choose a
 category, and your app will appear in this category.
 Now it may be too down the list, that is something related to SEO part
 similar to search engines, and may depend on many factors other than
 ratings, like number of downloads, active downloads, total user
 reviews, etc. and all that would obviously never will be openly shared
 and will keep changing.
 Sometimes it may happen things 
 like,http://techcrunch.com/2011/09/12/googles-auto-correct-killed-the-laun...,
 though now fixed.

 On Sep 17, 9:46 pm, sblantipodi perini.dav...@dpsoftware.org wrote:

  Hi all...

  Is there someone who can help me understanding how android market 
  sort
  the apps?

  One of my financial apps has 4.5stars, it has more download than 
  other
  apps but it isn't displayed in the financial section of the market.

  Why?
  How the market sort the apps?

  Thanks.- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -

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

2011-09-20 Thread MobileVisuals
I got the viewflipper to work, but I found that it is not possible to
use a GLSurfaceView in a viewflipper, like this thread describes:

http://groups.google.com/group/android-developers/browse_thread/thread/66e38a36c1378cfb/1b890dfece8fcb8a#1b890dfece8fcb8a

How can I then switch between 2d and 3d rendering?

On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com 
 wrote:
  I try to add 2 views to a Viewflipper, but I get

  java.lang.IllegalStateException: The specified child already has a
  parent.
  You must call removeView() on the child's parent first.

  when I try to add the view. I don't know why this happens. I try to
  remove the view from the ViewFlipper, but I still get the same
  message. How can I add a ViewFlipper to the layout? You can view my
  code and XML layout below:
  ---
  setContentView(R.layout.lunar_layout);
  mLunarView = (LunarView) findViewById(R.id.lunar);
  ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip);
  vf.addView(mLunarView, 0);

 The error should be self-explanatory. You already have R.id.lunar as a
 child of the LinearLayout.



   layout:
  --
  ?xml version=1.0 encoding=utf-8?

  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
     android:layout_width=wrap_content
     android:layout_height=wrap_content

      ViewFlipper
       android:id=@+id/flip
       android:layout_width=fill_parent
       android:layout_height=fill_parent/

     astral.effectsf.LunarView
       android:id=@+id/lunar
       android:layout_width=fill_parent
       android:layout_height=fill_parent/

  /LinearLayout

 Make the LunarView be a child element of your ViewFlipper, and get rid
 of the Java code to try adding it to the ViewFlipper, and you will be
 set.

 Here are some projects demonstrating the use of a ViewFlipper:

 https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper2

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

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

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


[android-developers] Re: What is the sorting order on Android Market?

2011-09-20 Thread Chris
His help would probably amount to keyword spamming so your app gets 
suspended.

Guys, trying to figure out this question is like trying to figure out how 
Google ranks its search engine results.  You don't want to watch people make 
sausage, do 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

Re: [android-developers] Webkit drains battery?

2011-09-20 Thread Raul Fernandes Herbster
Thanks for replay.

On Mon, Sep 19, 2011 at 9:50 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Mon, Sep 19, 2011 at 4:09 PM, Raul Herbster raulherbs...@gmail.com
 wrote:
  What I´ve noticed is that the application drains device
  battery every time the Webkit is used (one webview object is
  instantiated, for example).

 How have you determined this?


The application consists of one home screen widget and one webkit UI. In
addition, I also used the PowerTutor application to check the power
consumption.

Initially, I´ve only tested the engine + home screen widget. The application
consumption changes a lot if we open the webkit UI (app on background).



  In addition, it also impacts on memory
  (for example, if I simply launch the webkit with a sophisticated web-
  based UI, the memory consumption is about 40MB!)

 How have you determined this? Bear in mind that you can't even have
 that much RAM except on Honeycomb tablets -- all other devices, your
 heap space is going to be lower than this.


Manage Applications - Running and check the amount of memory in use. If I
open the webkit UI, the app memory consumption changes from ~8 MB to more
than 40 MB.

Regards,
--Raul


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


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

Re: [android-developers] Re: How to add a ViewFlipper to the layout?

2011-09-20 Thread Mark Murphy
Use two activities.

On Tue, Sep 20, 2011 at 9:54 AM, MobileVisuals eyv...@astralvisuals.com wrote:
 I got the viewflipper to work, but I found that it is not possible to
 use a GLSurfaceView in a viewflipper, like this thread describes:

 http://groups.google.com/group/android-developers/browse_thread/thread/66e38a36c1378cfb/1b890dfece8fcb8a#1b890dfece8fcb8a

 How can I then switch between 2d and 3d rendering?

 On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com 
 wrote:
  I try to add 2 views to a Viewflipper, but I get

  java.lang.IllegalStateException: The specified child already has a
  parent.
  You must call removeView() on the child's parent first.

  when I try to add the view. I don't know why this happens. I try to
  remove the view from the ViewFlipper, but I still get the same
  message. How can I add a ViewFlipper to the layout? You can view my
  code and XML layout below:
  ---
  setContentView(R.layout.lunar_layout);
  mLunarView = (LunarView) findViewById(R.id.lunar);
  ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip);
  vf.addView(mLunarView, 0);

 The error should be self-explanatory. You already have R.id.lunar as a
 child of the LinearLayout.



   layout:
  --
  ?xml version=1.0 encoding=utf-8?

  LinearLayout xmlns:android=http://schemas.android.com/apk/res/
  android
     android:layout_width=wrap_content
     android:layout_height=wrap_content

      ViewFlipper
       android:id=@+id/flip
       android:layout_width=fill_parent
       android:layout_height=fill_parent/

     astral.effectsf.LunarView
       android:id=@+id/lunar
       android:layout_width=fill_parent
       android:layout_height=fill_parent/

  /LinearLayout

 Make the LunarView be a child element of your ViewFlipper, and get rid
 of the Java code to try adding it to the ViewFlipper, and you will be
 set.

 Here are some projects demonstrating the use of a ViewFlipper:

 https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper2

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

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

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




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

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

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


[android-developers] Re: init.rc --- synchronization

2011-09-20 Thread Michal Maruska
On Tue, Sep 20, 2011 at 10:55 AM, Michal Maruska mmaru...@gmail.com wrote:
 Then the readme.txt mentions  init.svc.name system property, but
 then there is no notification on a change.

 ok, watchprops  -- system/core/toolbox/watchprops.c  shows that
 system-property-change notification is possible.

And I see that
   int __system_property_wait(const prop_info *pi)

in bionic/libc/bionic/system_properties.c
is a useless function -- it should take a second parameter unsigned serial to
compare the futex against. Otherwise just entering the function is
time for a race: a change con occur undetected.

time to learn Gerrit?

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

2011-09-20 Thread Francisco Figueiredo Jr.
I'm using a galaxy S with a 2.3.5 rom.

I started to think it really may be some vendor extension as I couldn't find 
anything on google. 
It is sad that the exception java throws doesn't show the file name it 
didn't find. I think that in order to do that, I would need to add a log of 
the file name being used, but I don't know yet how to replace just 
NativeDaemonConnector class. 

Do you know if there is any other flag I could turn on to get more verbose 
logging?

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] Handling Orientation Changes in AppWidgets

2011-09-20 Thread maliha
Hi,

I am using honey comb 3.2, I need to perform an update when the widget
orientation is changed. Any suggestion on how this can be handled?

Note:  There is no activity running during the orientation change

Thanks and Regards,
- Maliha.

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

2011-09-20 Thread Pratik Prajapati
Hi There,

I'm setting permission to 777 (R+W+E for all) to a script file. But after
kernel built and flashed to the system, permission does not get changed as
expected. I understand I can give permission in make file while creating
filesystem to be flashed on system. But same thing is happening for some
sysfs entries. These sysfs entries are created by drivers at boot up time. I
have also tried

on device-added-device node path
chmod 777 sys fs file name

But I can not set the mode by this method also. However on console (adb
shell) i can change the permission. I'm running on 2.1

Any idea, what could be wrong?

Regards,
Pratik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Record audio stream before it reaches speakerphone or headset. (Not a noob question.)

2011-09-20 Thread Raj
Hello all,
I googled a lot for this and went through all possible forums but I couldn't 
find any solution so I thought of giving it a last try here. Coming back to 
the point-

In my app, I am playing some sounds on click of buttons. What I want to do 
is whenever the users clicks on those buttons in any tempo it should play 
(like a piano) and also that sound stream must get stored somewhere so as to 
record the sounds that were played. The only solution I found till now is 
using

MediaRecorder.AudioSource.MIC

But, this records the stream with the surroundings sounds also (because it 
is recording the sound that comes from speakerphone. Won't work in case of 
headphones.)
So, please give me a solution for this. Thank you in advance.

__

Regards,
Rajkiran Bande.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-kernel] chmod 777 file not working with init.rc

2011-09-20 Thread Pratik Prajapati
Hi,

I'm doing below things in init.rc only.

(1)
on device-added-device node path
chmod 777 sys fs file name

(2) on boot
chmod 777 sys fs file name

But it does not work.

-- 
Regards,
Pratik Prajapati


On Tue, Sep 20, 2011 at 8:58 AM, jagan 402ja...@gmail.com wrote:

 You can't give the permissions directly on android source.
 We need to give the permissions on init.rc.
 Better to read the file from   system/core/init/readme.txt

 Regards,
 Jagan

 On Tue, Sep 20, 2011 at 9:18 PM, Pratik Prajapati 
 pratik.prajap...@gmail.com wrote:

 Hi There,

 I'm setting permission to 777 (R+W+E for all) to a script file. But after
 kernel built and flashed to the system, permission does not get changed as
 expected. I understand I can give permission in make file while creating
 filesystem to be flashed on system. But same thing is happening for some
 sysfs entries. These sysfs entries are created by drivers at boot up time. I
 have also tried

 on device-added-device node path
 chmod 777 sys fs file name

 But I can not set the mode by this method also. However on console (adb
 shell) i can change the permission. I'm running on 2.1

 Any idea, what could be wrong?

 Regards,
 Pratik


  --
 unsubscribe: android-kernel+unsubscr...@googlegroups.com
 website: http://groups.google.com/group/android-kernel


  --
 unsubscribe: android-kernel+unsubscr...@googlegroups.com
 website: http://groups.google.com/group/android-kernel

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

2011-09-20 Thread JP


On Sep 19, 9:55 pm, riz rizcs...@gmail.com wrote:
  Please let me know any library or source code available for reading


That would be AudioRecord
http://developer.android.com/reference/android/media/AudioRecord.html

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


[android-developers] Re: How to add a ViewFlipper to the layout?

2011-09-20 Thread MobileVisuals
I see, then I would have to use one SurfaceView for the first activity
and a GLSurfaceView for the other activity. I searched for information
about how to switch between 2 activities on the forum and found one of
your threads:

http://groups.google.com/group/android-developers/browse_thread/thread/c6ffe95d4909167b/fd1be2b4a1912c1a?lnk=gstq=switch+between+activities#fd1be2b4a1912c1a

You recommend using a viewflipper here, so I can not use that
approach. I found another thread

http://groups.google.com/group/android-developers/browse_thread/thread/e17375dd36d0cdc6/eb66078f6325c77c?lnk=gstq=switch+between+activities#eb66078f6325c77c

 where they used the StartActivityForResult method. How would you
recommend that I should swith between the activites without using a
ViewFlipper?

On Sep 20, 4:43 pm, Mark Murphy mmur...@commonsware.com wrote:
 Use two activities.



 On Tue, Sep 20, 2011 at 9:54 AM, MobileVisuals eyv...@astralvisuals.com 
 wrote:
  I got the viewflipper to work, but I found that it is not possible to
  use a GLSurfaceView in a viewflipper, like this thread describes:

 http://groups.google.com/group/android-developers/browse_thread/threa...

  How can I then switch between 2d and 3d rendering?

  On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com 
  wrote:
   I try to add 2 views to a Viewflipper, but I get

   java.lang.IllegalStateException: The specified child already has a
   parent.
   You must call removeView() on the child's parent first.

   when I try to add the view. I don't know why this happens. I try to
   remove the view from the ViewFlipper, but I still get the same
   message. How can I add a ViewFlipper to the layout? You can view my
   code and XML layout below:
   ---
   setContentView(R.layout.lunar_layout);
   mLunarView = (LunarView) findViewById(R.id.lunar);
   ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip);
   vf.addView(mLunarView, 0);

  The error should be self-explanatory. You already have R.id.lunar as a
  child of the LinearLayout.

    layout:
   --
   ?xml version=1.0 encoding=utf-8?

   LinearLayout xmlns:android=http://schemas.android.com/apk/res/
   android
      android:layout_width=wrap_content
      android:layout_height=wrap_content

       ViewFlipper
        android:id=@+id/flip
        android:layout_width=fill_parent
        android:layout_height=fill_parent/

      astral.effectsf.LunarView
        android:id=@+id/lunar
        android:layout_width=fill_parent
        android:layout_height=fill_parent/

   /LinearLayout

  Make the LunarView be a child element of your ViewFlipper, and get rid
  of the Java code to try adding it to the ViewFlipper, and you will be
  set.

  Here are some projects demonstrating the use of a ViewFlipper:

 https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1ht...

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

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

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

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

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

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


Re: [android-developers] App force closes when Bluetooth connection occurs

2011-09-20 Thread Steven Bruce
Hi Kris

Yes there is a bunch of stuff in the logcat outpu window. I will try
and post a copy of it on here later on. I have a feeling it maybe
something to do with the randomly generated UUID I got off the
internet. Maybe it has to be very specific type of UUID? I will
include the output from logcat in a while. I am still learning my way
around the debugger at the moment. Setting break points and stepping
through the program is about as far as I am with it.

Steve

Kristopher Micinski wrote:
 Did you check the logcat?  Is it completely silent?

 It's weird that there wouldn't be an exception thrown, but I spose
 weirder things have happened.

 Kris

 On Mon, Sep 19, 2011 at 6:04 AM, Steven Bruce stevebruc...@gmail.com wrote:
  Hi
 
  I have been following the Bluetooth guide on the Android developer
  site and have got everything working so far but now I am really stuck.
  Despite my code looking virtually identical to the one in the
  Bluetooth page it just doesn't work. Is that code wrong or something?
 
  I have my two thread, connectThread and acceptThread. The acceptThread
  successfully initialises itself and is set running up to the point
  where the serversocket waits for a connection by the other device. Its
  when the other device performs the actual connection attempt when the
  server side device force closes the application.
 
  I have stepped through the program and the problem occurs immediately
  as the connection attempt is made. Its like some internal connection
  error but there are no exceptions thrown. I am completely stumped on
  this. Been trying for a couple of weeks now and I'm getting nowhere.
  Anyone got any ideas what the problem could be?
 
  Steve
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: How to add a ViewFlipper to the layout?

2011-09-20 Thread Mark Murphy
Use startActivity(), with FLAG_ACTIVITY_REORDER_TO_FRONT, to bring an
existing activity back into the foreground (or create it if it does
not exist).

On Tue, Sep 20, 2011 at 12:32 PM, MobileVisuals
eyv...@astralvisuals.com wrote:
 I see, then I would have to use one SurfaceView for the first activity
 and a GLSurfaceView for the other activity. I searched for information
 about how to switch between 2 activities on the forum and found one of
 your threads:

 http://groups.google.com/group/android-developers/browse_thread/thread/c6ffe95d4909167b/fd1be2b4a1912c1a?lnk=gstq=switch+between+activities#fd1be2b4a1912c1a

 You recommend using a viewflipper here, so I can not use that
 approach. I found another thread

 http://groups.google.com/group/android-developers/browse_thread/thread/e17375dd36d0cdc6/eb66078f6325c77c?lnk=gstq=switch+between+activities#eb66078f6325c77c

  where they used the StartActivityForResult method. How would you
 recommend that I should swith between the activites without using a
 ViewFlipper?

 On Sep 20, 4:43 pm, Mark Murphy mmur...@commonsware.com wrote:
 Use two activities.



 On Tue, Sep 20, 2011 at 9:54 AM, MobileVisuals eyv...@astralvisuals.com 
 wrote:
  I got the viewflipper to work, but I found that it is not possible to
  use a GLSurfaceView in a viewflipper, like this thread describes:

 http://groups.google.com/group/android-developers/browse_thread/threa...

  How can I then switch between 2d and 3d rendering?

  On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com 
  wrote:
   I try to add 2 views to a Viewflipper, but I get

   java.lang.IllegalStateException: The specified child already has a
   parent.
   You must call removeView() on the child's parent first.

   when I try to add the view. I don't know why this happens. I try to
   remove the view from the ViewFlipper, but I still get the same
   message. How can I add a ViewFlipper to the layout? You can view my
   code and XML layout below:
   ---
   setContentView(R.layout.lunar_layout);
   mLunarView = (LunarView) findViewById(R.id.lunar);
   ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip);
   vf.addView(mLunarView, 0);

  The error should be self-explanatory. You already have R.id.lunar as a
  child of the LinearLayout.

    layout:
   --
   ?xml version=1.0 encoding=utf-8?

   LinearLayout xmlns:android=http://schemas.android.com/apk/res/
   android
      android:layout_width=wrap_content
      android:layout_height=wrap_content

       ViewFlipper
        android:id=@+id/flip
        android:layout_width=fill_parent
        android:layout_height=fill_parent/

      astral.effectsf.LunarView
        android:id=@+id/lunar
        android:layout_width=fill_parent
        android:layout_height=fill_parent/

   /LinearLayout

  Make the LunarView be a child element of your ViewFlipper, and get rid
  of the Java code to try adding it to the ViewFlipper, and you will be
  set.

  Here are some projects demonstrating the use of a ViewFlipper:

 https://github.com/commonsguy/cw-android/tree/master/Fancy/Flipper1ht...

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

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

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

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

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

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




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

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

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

[android-developers] Add images to Emulator Gallery

2011-09-20 Thread Rathna Kumara Premadasa
Hi all,

 I wanted to brows some images from my Android program so i want to
add some images to the Emulator gallery. I tried with adding virtual SD card
to the emulator and add images to gallery using DDMS. But it did not work
well.. Please help me...


Thanks,
-- 
*Rathna Kumara Premadasa*
Sri Lanka.

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

[android-developers] Is this a joke??

2011-09-20 Thread Steven Bruce
http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()

What is this supposed to do? Looks like Google having a laugh or
something?? :p

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


Re: [android-developers] Re: Problem with Exceptions that are thrown deep in the System of my app

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 2:47 AM, Joachim Gugenberger jgugenber...@gmail.com
 wrote:

 Can anyone please post here, that has a sensefull comment?


I thought asking what your use case was, to better understand what you're
trying to do, was a sensefull comment.

If you can't elaborate on what you're talking about, it's going to be hard
for you to get help.

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

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

Re: [android-developers] Question About Upload Application on Market

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 2:00 AM, Chirag Raval 
chirag.android.develo...@gmail.com wrote:

 should be or must be ?


Should be.

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

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

[android-developers] bluez- control psm - condition G_IO_HUP error.

2011-09-20 Thread arun_satya3
Hi,

I am writing an application to receive data from health devices an
able to success fully receive data when the device is connected for
the first time.
The device is disconnected mcl and mdl is closed properly.
When the device is connected for the second time G_IO_HUP is getting
set and am unable to get the fd from the health device.

Can anybody help me to resolve the issue.

Rgds,
Arun S.

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


[android-developers] Re: Is this a joke??

2011-09-20 Thread Steven Bruce
public static boolean isUserAMonkey()

Since: API Level 8

Returns true if the user interface is currently being messed with by
a monkey.


Steven Bruce wrote:
 http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()

 What is this supposed to do? Looks like Google having a laugh or
 something?? :p

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

2011-09-20 Thread Daniel Drozdzewski
On 20 September 2011 17:42, Steven Bruce stevebruc...@gmail.com wrote:
 http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()

 What is this supposed to do? Looks like Google having a laugh or
 something?? :p

http://developer.android.com/guide/developing/tools/monkey.html

-- 
Daniel Drozdzewski

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

2011-09-20 Thread Steven Bruce
Oh ok then. I'll let them off. lol. Thanks! :)


Daniel Drozdzewski wrote:
 On 20 September 2011 17:42, Steven Bruce stevebruc...@gmail.com wrote:
  http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()
 
  What is this supposed to do? Looks like Google having a laugh or
  something?? :p

 http://developer.android.com/guide/developing/tools/monkey.html

 --
 Daniel Drozdzewski

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

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 6:29 AM, subrat subratkumarman...@gmail.com wrote:

 I want to implement two fingers swipe gesture on android .Is it possible?


Sure (at least Google Maps does it).


 If yes how?


Detect two points of touch and a swipe gesture.

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

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

Re: [android-developers] Problem with Exceptions that are thrown deep in the System of my app

2011-09-20 Thread Miguel Morales
That's the thing.  You don't show any dialogs outside of an activity.
This is not good practice, log the trace.
If you want to be messy, you can have a singleton to which activities
register to.
Then call functions in that singleton.

On Mon, Sep 19, 2011 at 3:33 AM, JoachimG jgugenber...@gmail.com wrote:
 Hi ppl!

 Is there a way to show a error dialog deep within the system of my
 app?

 Because only an activity is able to call showdialog i have to throw
 all excetions out until i can use a try catch with showdialog in an
 activity. Is there a way to call showdialog deeper in the system of an
 application. For example in a class that is not extended by activity.

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



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

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


Re: [android-developers] Is this a joke??

2011-09-20 Thread Kostya Vasilyev

Now this on the other hand, does look to be a joke .

http://developer.android.com/reference/android/os/IBinder.html#TWEET_TRANSACTION

. or maybe not? With Google+ support coming in Ice Cream Sandwich, 
perhaps?


20.09.2011 20:50, Steven Bruce пишет:

Oh ok then. I'll let them off. lol. Thanks! :)


Daniel Drozdzewski wrote:

On 20 September 2011 17:42, Steven Brucestevebruc...@gmail.com  wrote:

http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()

What is this supposed to do? Looks like Google having a laugh or
something?? :p

http://developer.android.com/guide/developing/tools/monkey.html

--
Daniel Drozdzewski


--
Kostya Vasilyev

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


Re: [android-developers] parcelable again: passing object BACK through activity stack

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 6:55 AM, John Goche johngoch...@googlemail.comwrote:

 given that A is beneath B on the activity stack and will not be reopened


What do you mean A will not be reopened ?

You're probably looking for startActivityForResult() and onActivityResult().

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

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

[android-developers] savedInstanceState always null

2011-09-20 Thread GregAZ
savedInstanceState is always null. For some reason this just started
happening.  onSaveInstanceState is being called but here's what's
happening:

1. Launch app by pressing app icon
2. Hit home button (I've verified onSaveInstanceState is called)
3. Launch app by pressing app icon
4. Attempt to read savedInstanceState in onCreate but it's null

Example of my onSaveInstanceState:

protected void onSaveInstanceState(Bundle outState) {
// TODO Auto-generated method stub
outState.putString(uploadUrl, uploadUrl);
super.onSaveInstanceState(outState);
}


What would cause this to be null?

 public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

if (savedInstanceState != null) // always null
{
uploadUrl = savedInstanceState.getString(uploadUrl);
}
}

I just added the following override and it's never called (I have
logging in it):
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {

}

I'm just storing short term values so I don't want to use
preferences.  The problem is if a new activity opens those values are
lost and I need them when the user goes back to the original
activity.  This was working.

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

2011-09-20 Thread Kristopher Micinski
On Tue, Sep 20, 2011 at 12:34 PM, Steven Bruce stevebruc...@gmail.com wrote:
 Hi Kris

 Yes there is a bunch of stuff in the logcat outpu window. I will try
 and post a copy of it on here later on. I have a feeling it maybe
 something to do with the randomly generated UUID I got off the
 internet. Maybe it has to be very specific type of UUID? I will
 include the output from logcat in a while. I am still learning my way
 around the debugger at the moment. Setting break points and stepping
 through the program is about as far as I am with it.

 Steve


As long as the UUIDs are the same, this is fine, (i.e., it's supposed
to be randomly generated for your app...)

Kris

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


Re: [android-developers] savedInstanceState always null

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 12:11 PM, GregAZ ggur...@gmail.com wrote:

 What would cause this to be null?


The fact that your activity was not destroyed. OnSaveInstanceState is called
*in case* you get destroyed, in which case your data will be passed to the
new Activity when it is created. Otherwise, if your activity was not
destroyed, there's not much need to restore state, is there?

Review the activity lifecycle:
http://developer.android.com/reference/android/app/Activity.html
Because of this, you should use the
onPause()http://developer.android.com/reference/android/app/Activity.html#onPause()
method
to write any persistent data (such as user edits) to storage. In addition,
the method 
onSaveInstanceState(Bundle)http://developer.android.com/reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)
is
called before placing the activity in such a background state, allowing you
to save away any dynamic instance state in your activity into the given
Bundle, to be later received in
onCreate(Bundle)http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)
 *if the activity needs to be re-created*.

Emphasis mine. Keyword if.

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

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

[android-developers] Re: savedInstanceState always null

2011-09-20 Thread GregAZ
I think I misunderstood when onRestoreInstanceState is called so
ignore that part.  But the problem still remains, the bundle is always
null even though it is saved.  I have logging showing me
onSaveInstanceState is called.

On Sep 20, 12:11 pm, GregAZ ggur...@gmail.com wrote:
 savedInstanceState is always null. For some reason this just started
 happening.  onSaveInstanceState is being called but here's what's
 happening:

 1. Launch app by pressing app icon
 2. Hit home button (I've verified onSaveInstanceState is called)
 3. Launch app by pressing app icon
 4. Attempt to read savedInstanceState in onCreate but it's null

 Example of my onSaveInstanceState:

         protected void onSaveInstanceState(Bundle outState) {
                 // TODO Auto-generated method stub
         outState.putString(uploadUrl, uploadUrl);
         super.onSaveInstanceState(outState);
         }

 What would cause this to be null?

  public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         if (savedInstanceState != null) // always null
         {
                 uploadUrl = savedInstanceState.getString(uploadUrl);

 }
 }

 I just added the following override and it's never called (I have
 logging in it):
 @Override
 protected void onRestoreInstanceState(Bundle savedInstanceState) {

 }

 I'm just storing short term values so I don't want to use
 preferences.  The problem is if a new activity opens those values are
 lost and I need them when the user goes back to the original
 activity.  This was working.

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

2011-09-20 Thread GregAZ
I'm finally getting some where.  I need to read up on the life cycle
cuz I'm getting myself screwed up.

Here's what's happening:

Debug mode:
1. Tap app icon to open app, onCreate is called
2. Hit home button, state is saved
3. Tap app icon to open app, it resumes, onCreate is not called

In debug mode I'm happy, works great.

Now I export the signed and zip aligned app and repeat these steps:
1. Tap app icon to open app, onCreate is called
2. Hit home button, state is saved
3. Tap app icon to open app, onCreate is called again

#3 is calling onCreate again.  If instead of doing step 3 I hold home
down and switch to the app it just resumes, onCreate isn't called
again.

I thought I had instance problems but it seems my problem is onCreate
is called when it shouldn't be which is starting my app all over
again.  Bundle is null, my variables are reset, etc.


On Sep 20, 12:21 pm, GregAZ ggur...@gmail.com wrote:
 I think I misunderstood when onRestoreInstanceState is called so
 ignore that part.  But the problem still remains, the bundle is always
 null even though it is saved.  I have logging showing me
 onSaveInstanceState is called.

 On Sep 20, 12:11 pm, GregAZ ggur...@gmail.com wrote:







  savedInstanceState is always null. For some reason this just started
  happening.  onSaveInstanceState is being called but here's what's
  happening:

  1. Launch app by pressing app icon
  2. Hit home button (I've verified onSaveInstanceState is called)
  3. Launch app by pressing app icon
  4. Attempt to read savedInstanceState in onCreate but it's null

  Example of my onSaveInstanceState:

          protected void onSaveInstanceState(Bundle outState) {
                  // TODO Auto-generated method stub
          outState.putString(uploadUrl, uploadUrl);
          super.onSaveInstanceState(outState);
          }

  What would cause this to be null?

   public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);

          if (savedInstanceState != null) // always null
          {
                  uploadUrl = savedInstanceState.getString(uploadUrl);

  }
  }

  I just added the following override and it's never called (I have
  logging in it):
  @Override
  protected void onRestoreInstanceState(Bundle savedInstanceState) {

  }

  I'm just storing short term values so I don't want to use
  preferences.  The problem is if a new activity opens those values are
  lost and I need them when the user goes back to the original
  activity.  This was working.

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

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 12:21 PM, GregAZ ggur...@gmail.com wrote:

 But the problem still remains, the bundle is always null even though it is
 saved.


Then a new instance of the Activity is being created. You can verify this by
printing out the value of the Activity object itself in onSaveInstanceState
and onCreate.

Have you changed anything your manifest or launch flags with how you launch
this Activity in particular?
How does your Activity flow from the first instance to the next instance?

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

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

Re: [android-developers] Re: savedInstanceState always null

2011-09-20 Thread TreKing
On Tue, Sep 20, 2011 at 12:38 PM, GregAZ ggur...@gmail.com wrote:

 #3 is calling onCreate again.  If instead of doing step 3 I hold home
 down and switch to the app it just resumes, onCreate isn't called
 again.


Weirdballs. I'd do a full clean / rebuild, delete your shortcut (if that's
what you're using) and reboot your device for shits and giggles.

Odd things happen in software development ...

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

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

[android-developers] Re: savedInstanceState always null

2011-09-20 Thread GregAZ
The only thing I changed in the manifest was the versionCode and
versionName.  I had made a copy of the project, the renamed it (using
Android tools through Eclipse) and discovered this problem. So I
exported the original project, signed it, zip aligned it, put it on my
phone and it too was doing it.  This is very odd because I just put an
update out for it about a month ago and it was fine.  I hadn't touched
it since.

This is the only activity in the app.

On Sep 20, 12:38 pm, TreKing treking...@gmail.com wrote:
 On Tue, Sep 20, 2011 at 12:21 PM, GregAZ ggur...@gmail.com wrote:
  But the problem still remains, the bundle is always null even though it is
  saved.

 Then a new instance of the Activity is being created. You can verify this by
 printing out the value of the Activity object itself in onSaveInstanceState
 and onCreate.

 Have you changed anything your manifest or launch flags with how you launch
 this Activity in particular?
 How does your Activity flow from the first instance to the next instance?

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

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


Re: [android-developers] Problem with Exceptions that are thrown deep in the System of my app

2011-09-20 Thread Kristopher Micinski
To be pretty honest, if you're throwing dialogs up from systems code,
you might be having a design issue to begin with.  No user wants to
see tons of dialogs saying download failed, or could not connect to
service,  etc... I think this is a key point that a lot of people
miss in architecting their systems.  Sure, for small apps, dialogs
works, but for large systems it's just a bad usability experience.  If
you're deep in the system, then you're probably not in UI anyway,
right?  So you're probably through a service, or something like this,
where you can send back errors to the binder, and they can handle this
appropriately.  For example, if your main UI thread schedules some
delayed activity that is then performed in the background, instead of
throwing up a dialog or toast or something like that, perhaps you
should simply note this so that whenever the user returns to the UI
thread, they will see that their download failed, etc...

Designing for erroneous behavior is a pain, because you almost never
see it used, but still have to do a lot of work for it anyway...

kris

On Mon, Sep 19, 2011 at 6:33 AM, JoachimG jgugenber...@gmail.com wrote:
 Hi ppl!

 Is there a way to show a error dialog deep within the system of my
 app?

 Because only an activity is able to call showdialog i have to throw
 all excetions out until i can use a try catch with showdialog in an
 activity. Is there a way to call showdialog deeper in the system of an
 application. For example in a class that is not extended by activity.

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

2011-09-20 Thread Streets Of Boston
I assume that your activities have the default launch-mode. I.e. when 
started, they will be newly created.

Press app-icon: Activity is started and onCreate is called.
Press Home-button long time: Your task, that contains your activity, is 
brought to the foreground. If your process was still running, nothing really 
happens (onStart, onResume are called, though).

Your 'saveInstanceState' in the onCreate is set to a non-null value if your 
activity has been created again due to a process re-creation, e.g. after 
your process had been killed for some reason (e.g. low memory). You can 
mimic this by starting your app, going to your activity, then bring another 
app in front of it (e.g. when a phone call comes in or by long-clicking home 
and selecting another app), then kill your process, then hit the 
back-button/key. Now you will go back to your app, your activity. But since 
your app's process was killed, your app and its activities need to be 
re-created. The 'saveInstanceState' won't be null (if you saved it in the 
onSaveInstanceState earlier).

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

2011-09-20 Thread MobileVisuals
also notice the methods isUserAGangbangingCriminalMindedGangsta()
and isUserAWigga()

in the Hood class in the Thug package.

On Sep 20, 6:55 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Now this on the other hand, does look to be a joke .

 http://developer.android.com/reference/android/os/IBinder.html#TWEET_...

 . or maybe not? With Google+ support coming in Ice Cream Sandwich,
 perhaps?

 20.09.2011 20:50, Steven Bruce пишет:

  Oh ok then. I'll let them off. lol. Thanks! :)

  Daniel Drozdzewski wrote:
  On 20 September 2011 17:42, Steven Brucestevebruc...@gmail.com  wrote:
 http://developer.android.com/reference/android/app/ActivityManager.ht...()

  What is this supposed to do? Looks like Google having a laugh or
  something?? :p
 http://developer.android.com/guide/developing/tools/monkey.html

  --
  Daniel Drozdzewski

 --
 Kostya Vasilyev

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


[android-developers] Renderscript APIs specification

2011-09-20 Thread Sandy
The method rsgDrawQuadTexCoords (...) takes in 20 params. I could not
find any detailed API docs on what each parameter for this method
represents. Anyone know of a link to API docs for all the renderscript
APIs and what each argument means in these methods?

Thanks,
Sandy

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

2011-09-20 Thread SagarJ
Hello,
I am looking to leverage an existing automated test framework and a
number of existing tests written in native code for that framework for
android. The framework extensively uses fork() call to parallelize
processes and tests. Production android code will not be using fork().
I am looking to ascertain that fork() will continue to work in the
foreseeable future. Do you guys have any Idea about this?

Thanks a lot

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


[android-developers] process fork() support

2011-09-20 Thread SagarJ
Hello,
I am looking to leverage an existing automated test framework and a
number of existing tests written in native code for that framework for
android. The framework extensively uses fork() call to parallelize
processes and tests. Production android code will not be using fork().
I am looking to ascertain that fork() will continue to work in the
foreseeable future. Do you guys have any Idea about this?

Thanks a lot

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


[android-developers] Re: maths in android

2011-09-20 Thread leigh8347
Hi,

I have had a look through it and im still really confused. Please can
you shed any light on it or know of any tutorials

mant thanks

On Sep 20, 2:50 am, Nick Risaro nris...@gmail.com wrote:
 Read 
 thishttp://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html(or a
 newer version) and try to implement the formula. If you have any problem
 come back.
 On Sep 19, 2011 9:42 PM, leigh8347 leigh8...@aol.com wrote:



  I am currently working on an app that takes 4 user input values and
  puts them through the following equation and gives an answer. The only
  thing is that it wont work.

  the equation is as follows.

  answer = max { round ( (value1 / 10.9375)+(value2 / 9.2105)+(value3 /
  3.889)-(value4 / 12.5) ) ,0 }

  so far i have the following

  package com.android.app;

  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;

  public class Equation extends Activity {

  Button submit;
  EditText val1,val2,val3,val4r;
  TextView answer;

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

  /* First Tab Content */
  setContentView(R.layout.equation);

  val1 = (EditText) findViewById(R.id.value1);
  val2 = (EditText) findViewById(R.id.value2);
  val3 = (EditText) findViewById(R.id.value3);
  val4 = (EditText) findViewById(R.id.value4);
  submit = (Button) findViewById(R.id.submit);
  answer = (TextView) findViewById(R.id.answer);
  submit.setOnClickListener(new clicker());
  }
  class clicker implements Button.OnClickListener
  {

  public void onClick(View v)
  {
  String a,b,c,d;
  Integer Int;
  a = val1.getText().toString();
  b = val2.getText().toString();
  c = val3.getText().toString();
  d = val4.getText().toString();
  Int = max { round ( (a / 10.9375)+(b / 9.2105)+(c / 3.889)-
  (d / 12.5) ) ,0 }

  points.setText(Int.toString());
  }
  }
  }

  so... thats what i have, can you 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

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

2011-09-20 Thread Nick Risaro
Check the methods on the Math class. Something like Math.round(value1 /
10.9375) and so on.

On Tue, Sep 20, 2011 at 4:32 PM, leigh8347 leigh8...@aol.com wrote:

 Hi,

 I have had a look through it and im still really confused. Please can
 you shed any light on it or know of any tutorials

 mant thanks

 On Sep 20, 2:50 am, Nick Risaro nris...@gmail.com wrote:
  Read thishttp://
 download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html(orhttp://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html%28ora
  newer version) and try to implement the formula. If you have any problem
  come back.
  On Sep 19, 2011 9:42 PM, leigh8347 leigh8...@aol.com wrote:
 
 
 
   I am currently working on an app that takes 4 user input values and
   puts them through the following equation and gives an answer. The only
   thing is that it wont work.
 
   the equation is as follows.
 
   answer = max { round ( (value1 / 10.9375)+(value2 / 9.2105)+(value3 /
   3.889)-(value4 / 12.5) ) ,0 }
 
   so far i have the following
 
   package com.android.app;
 
   import android.app.Activity;
   import android.os.Bundle;
   import android.view.View;
   import android.widget.Button;
   import android.widget.EditText;
   import android.widget.TextView;
 
   public class Equation extends Activity {
 
   Button submit;
   EditText val1,val2,val3,val4r;
   TextView answer;
 
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
 
   /* First Tab Content */
   setContentView(R.layout.equation);
 
   val1 = (EditText) findViewById(R.id.value1);
   val2 = (EditText) findViewById(R.id.value2);
   val3 = (EditText) findViewById(R.id.value3);
   val4 = (EditText) findViewById(R.id.value4);
   submit = (Button) findViewById(R.id.submit);
   answer = (TextView) findViewById(R.id.answer);
   submit.setOnClickListener(new clicker());
   }
   class clicker implements Button.OnClickListener
   {
 
   public void onClick(View v)
   {
   String a,b,c,d;
   Integer Int;
   a = val1.getText().toString();
   b = val2.getText().toString();
   c = val3.getText().toString();
   d = val4.getText().toString();
   Int = max { round ( (a / 10.9375)+(b / 9.2105)+(c / 3.889)-
   (d / 12.5) ) ,0 }
 
   points.setText(Int.toString());
   }
   }
   }
 
   so... thats what i have, can you 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

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

2011-09-20 Thread String
Don't forget the ever-popular WTF:
http://developer.android.com/reference/android/util/Log.html#wtf(java.lang.String,
 
java.lang.Throwable)

Seriously, it's been stated before that the platform team inserts one joke 
routine - a real routine, but with a funny name - into every major SDK 
release. Which means there must be several more...

String

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

2011-09-20 Thread Selmen Arous
Is there a working method to emulate MediaRecorder on Emulator with own
webcam and microphone ?
and is it possible to stream video captured from MediaRecorder directly to
internet ?
Thanks

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

[android-developers] Re: What can block my ProgtessDialog

2011-09-20 Thread letlite
Something is blocking the UI thread. Try ddms.

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

2011-09-20 Thread Robert Macaulay
I have an app that very rarely throws this error or one like it.

java.lang.OutOfMemoryError: array size too large(Heap Size=3395KB,
Allocated=3065KB, Bitmap Size=0KB) -- look at that small heap
or
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
(from the stacktrace on this, it seemed to be on initial view layout.
Again, very rare)

I do have some icons allocated(none are leaked), and when I run the
app, the heap shown by DDMS never seems to grow very big(2-3 megs
total). I even did a dumpsys meminfo and checked the native memory
allocations. Nothing large or alarming. I've also never experienced
the OOM myself in any sort of testing on various phones and the
emulator. I saw the Google+ app crash once the same way on app launch
on my Nexus S(I peeked at it's stack traces), so at least I'm in good
company.

It seems like there wasn't enough RAM at the time for the app
allocation, and the foreground app died w/ an OOM instead of a
background app being shutdown to free RAM. Has anyone else seen this?

Robert

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ListFragment items not refreshed in view, but db, and adapter are updated.

2011-09-20 Thread Bourke Floyd IV
I figured out this issue, which led me to a new problem, but the issue
was that

getItem on the FragmentStatePagerAdapter wasn't the current item, but
was used to generate new fragments. so I was attempting to update the
wrong fragment, not the current fragment.


On Sep 18, 2:05 pm, Bourke Floyd IV chb...@gmail.com wrote:
 I just moved to Fragments a few weeks ago and I've enjoyed allot of
 neat benefits like the PageView for my sorting filters on my main
 listfragment.

 For some reason on my ListFragment when I restartLoader to requery
 the new data in the Cursor (which is the correct data) and I call
 swapCursor on my CursorAdapter with the new data in onLoadFinished,
 but for some reason i need to leave the activity or swipe to a new
 page in the pageview (sometimes at least 2 pages away) and then return
 to see the new updates in the list (like a checked item, or removed
 items).

 when i swipe to the next page using the pageview it's the same
 listfragement (with a different sort) the data is correct.

 before I used fragements I was using the cursoradapter and just called
 requery as needed. now I have the same cursoradapter, but i also use a
 Loader to create and swapCursor on the adapter.

 some example of the listfragment code

 public void restartLoader()
     {
         getLoaderManager().restartLoader(0, null, this);
     }

     //Instantiate and return a new Loader for the given ID.
         @Override
         public LoaderCursor onCreateLoader(int id, Bundle args) {
                 return new GooTasksLoader(mActivity, this);
         }

         // Called when a previously created loader has finished its load.
         @Override
         public void onLoadFinished(LoaderCursor loader, Cursor data) {
                 // Swap the new cursor in.  (The framework will take care of 
 closing
 the
             // old cursor once we return.)
             mAdapter.swapCursor(data);
         }

         //Called when a previously created loader is being reset, thus making
 its data unavailable.
         @Override
         public void onLoaderReset(LoaderCursor loader) {
                 // This is called when the last Cursor provided to 
 onLoadFinished()
             // above is about to be closed.  We need to make sure we are no
             // longer using it.
             mAdapter.swapCursor(null);
         }

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

2011-09-20 Thread Vladimir Svydenko
I think this data produces mobile operator server. And this server
return call-duration and current balance after each outgoing call .
Maybe It's right?

I can't find any solution, but after each call value of call duration
will be stored in db. We can get it by CallLog.Calls.DURATION
How this value populate field in db?

On Sep 18, 4:20 pm, Vladimir Svydenko vov...@gmail.com wrote:
 Hi, guys

 Now I write one app and have some problem -
 I need to show real-time outgoing call duration. But I do not know
 when I should start timer.
 I must start when get answer from other side.
 I tried TelephonyManager.EXTRA_STATE_OFFHOOK -- but it's state is when
 I press call-button..
 OFFHOOK is the state when call is placed.
 So we should be notified when the call is received.
 How can we get that?

 Can You help me? When I should start count outgoing time?

 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] Is this a joke??

2011-09-20 Thread Lew Bloch
https://memegen.googleplex.com/906

Daniel Drozdzewski wrote:

 Steven Bruce wrote:
  
 http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey()
 
  What is this supposed to do? Looks like Google having a laugh or
  something?? :p

 

 http://developer.android.com/guide/developing/tools/monkey.html

-- 
Lew

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

2011-09-20 Thread John Goche
Perhaps I can use the Serializable interface and simply serialize

On Tue, Sep 20, 2011 at 2:33 PM, Mark Murphy mmur...@commonsware.comwrote:

You probably should reconsider your approach. It sounds like you need
 a central data model, accessible from multiple activities:

 -- database
 -- file


 managed by:

 -- service
 -- some other singleton
 -- custom Application class


I think I'm gonna go for serialization and write the serialized object to a
database in one row of text.
That's the quick and dirty way of doing things I guess.

Also, I'm done with Parcelable since I need to pass data back and forth.
I've already reverted to
passing a parameter in a global variable: it's the quickest and easiest way.

Regards,

John Goche

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: License Check fails for 5-10% of legit users

2011-09-20 Thread Howard M. Harte
I used Flurry, and compared active installs with figures with those
from Market.  In addition, about 50% of active users were in China,
where my app was not available.

At that time, I had about 10K legitimate users and over 200K active
users according to Flurry.

The proportion of legitimate to pirate users did not change measurably
during the six months or so that I was using LVL.

-Howard

On Sep 19, 8:48 pm, GJTorikian gjtorik...@gmail.com wrote:
 In LicenseValidator.verify() I had to add two more exception clauses:

 catch (Base64DecoderException e) {
                                 Log.e(TAG, Could not Base64-decode 
 signature.);
                                 
 handleApplicationError(ApplicationErrorCode.DECODER_EXCEPTION);
                                 return;
                         } catch (NullPointerException e) {
                                 Log.e(TAG, Got NPE!);
                                 
 handleApplicationError(ApplicationErrorCode.NPE_ERROR);
                                 return;
                         }

 That NPE is hit more often than not. Furthermore, there is some code
 somewhere to increase the timeout of the check. I've forgotten where
 this is, however...

 Howard, how do you track piracy metrics? I'd be interested in
 integrating that in my app and see if it's worth it to keep LVL
 around, too.

 On Sep 19, 7:04 pm, Howard M. Harte hhar...@gmail.com wrote:



  I put some code into my app to allow LVL failure up to five times
  before declaring the app unlicensed.  In addition, once licensed, I
  only checked again once a month.

  Even still, I had complaints, and pirated copies of my app found their
  way to warez sites.

  Like all anti-piracy schemes I've seen so far, LVL was more effective
  in annoying legitimate users than thwarting piracy.  IMO, this sort of
  thing should be built into the platform, without developers or users
  having to worry about it.

  Recently, I removed LVL from my app, as I did not see a noticeable
  increase in sales for the time I was using LVL.  Only one of my apps
  is popular enough to be pirated, and according to the analytics that I
  used to have in my app, more than 95% of the users were using a
  pirated copy.  Unfortunately, it seems very difficult for a developer
  to convert pirates into a revenue stream.  I've also removed the
  analytics now, over privacy concerns.

  Just my observations, having had an app in the Market since early
  2009.

  -Howard

  On Sep 16, 12:45 pm, Kenny Wyland speci...@gmail.com wrote:

   This is really starting to become an issue. I'm getting bad reviews
   and my word of mouth recommendations for my apps are stopping because
   the Google Licensing service is repeatedly denying users the first
   time they start the app. I get emails from users regularly and I need
   to find a solution. I'm using a ServerManagedPolicy, I'm essentially
   using the example code from the dev website.

   Does anyone have an example of a policy which handles some local
   caching and such?

   Kenny

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

2011-09-20 Thread John Goche
Hello,

I am having a slight problem with my approach. When a row is highlighted
orange and
I click on it the orange highlighting goes away. But I want it to stay as I
want taps to

1. highlight the row on the first tap
2. take to a second screen on the second tap

Is this possible?

Thanks,

John Goche

On Mon, Sep 19, 2011 at 6:32 PM, John Goche johngoch...@googlemail.comwrote:


 On Mon, Sep 19, 2011 at 5:32 PM, Streets Of Boston 
 flyingdutc...@gmail.com wrote:

 The solution you have may work, but it's not the best... keyboard/dpad
 navigation of your list won't work well.

 My question is:
 What about  R.layout.alarmgroups_item. Could you show the
 alarmgroups_item.xml contents? Maybe one of the items in there is clickable
 and/or focusable.


 Well, here is all I have in the file at the moment. Just a bunch of text
 views. The idea is that the user can click them
 to highlight them and then push a button to take the user to another
 screen. How can I improve things
 then if that is not the best solution?

 Thanks for your help,

 John Goche
 SimpleAdapter adapter = new SimpleAdapter(this, maps,
 R.layout.alarmgroups_item, from, to) {
   @Override
   public View getView(int position, View convertView, ViewGroup parent)
 {
 View view = super.getView(position, convertView, parent);
 // view.setOnClickListener(
 AlarmGroupsActivity.this);
 view.setOnClickListener(new OnClickListener() {

   public void onClick(View arg0) {
 Toast.makeText(getApplicationContext(), clicked,
 Toast.LENGTH_SHORT).show();
   }
 });
 return view;

   }
 };

 listView.setAdapter(adapter);


 ?xml version=1.0 encoding=utf-8?
 LinearLayout
   xmlns:android=http://schemas.android.com/apk/res/android;
   android:orientation=vertical
   android:layout_width=fill_parent
   android:layout_height=fill_parent
   LinearLayout
 android:layout_width=match_parent
 android:layout_height=wrap_content
 TextView
   android:id=@+id/one
   android:layout_height=wrap_content
   android:layout_width=200dp
 /TextView
 TextView
   android:id=@+id/two
   android:layout_weight=1
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:inputType=time
 /TextView
   /LinearLayout
   LinearLayout
 android:layout_width=match_parent
 android:layout_height=wrap_content
 TextView
   android:id=@+id/three
   android:layout_height=wrap_content
   android:layout_width=200dp
 /TextView
 TextView
   android:id=@+id/four
   android:layout_weight=1
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:inputType=time
 /TextView
   /LinearLayout
   TextView
 android:id=@+id/five
 android:layout_height=wrap_content
 android:layout_width=match_parent
   /TextView
 /LinearLayout


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

[android-developers] Re: Is this a joke??

2011-09-20 Thread b0b
if(isUserAOneStarRatingIdiot()) {
  ((Object)null).toString();
}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Multipart Messages - Is there an example how to get them work now. (Uploading to a web API)

2011-09-20 Thread Al Sutton


I think there is another way to approach this which cuts out the need for 
the libraries, but you'll need to get the AOSP source.


Once you've checked out the source from frameworks_base you can re-use an 
implementation available internally in Android from;


frameworks/base/core/java/com/android/internal/http/multipart


The instructions on how to use it are in the header comments of 
MultipartEntity.java


Given the problems with kernel.org you can pick up the source code from the 
**unofficial** github mirror at 
https://github.com/android/platform_frameworks_base as a quick workaround to 
the kernel.org issues.


Al.


P.S. Don't forget to keep to the licensing terms :).

-- 

T: @alsutton W: www.funkyandroid.com


The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.

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

  1   2   >