[android-developers] Re: Video with MediaRecorder

2009-08-20 Thread greatinnovus

Hi,
  Any suggestions please...

On Aug 19, 4:06 pm, greatinnovus stevej.in...@gmail.com wrote:
 Hi All,

      Im tryingvideocapturewith device and ( recorder.prepare();
 causes error and closes my application.) Can any one suggest me where
 im going wrong with this code.

 public class VideoCapture1 extends Activity {

         private MediaRecorder recorder;
         private SurfaceHolder holder;
         private String filePath = /sdcard/test1.3gpp;

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

     private void startVideoCapture(){
            try {
                    SurfaceView sv = 
 (SurfaceView)findViewById(R.id.surfaceview);
                    holder = sv.getHolder();
                holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
                    recorder = new MediaRecorder();
                    recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
                    recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
                    /*
                    
 recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
                    
 recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
                    
 recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
                    */
                    
 recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
                    
 recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
                    recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
                    recorder.setOutputFile(filePath);
                    this.setRequestedOrientation
 (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                    recorder.setPreviewDisplay(holder.getSurface());
                   // recorder.setVideoSize(100, 100);
            }
            catch (Exception e1) {
                    e1.printStackTrace();
            }

            try {
            recorder.prepare();
        } catch (IllegalStateException e) {
                Log.i(this.getClass().toString(),e.getMessage());
        } catch (IOException e) {
                Log.i(this.getClass().toString(),e.getMessage());
        }
        recorder.start();
    }

     public void destroy(){

     }

 }

 08-19 16:21:25.763: WARN/SurfaceFlinger(62): timeout expired
 mFreezeDisplay=1, mFreezeCount=1
 08-19 16:21:26.472: INFO/DEBUG(4410): *** *** *** *** *** *** *** ***
 *** *** *** *** *** *** *** ***
 08-19 16:21:26.472: INFO/DEBUG(4410): Build fingerprint:
 'htc_asia_india/htc_magic/sapphire/sapphire:1.5/2.16.720.2/38755:user/
 release-keys'
 08-19 16:21:26.472: INFO/DEBUG(4410): pid: , tid:   
 com.greatinnovus.VideoCapture1 
 08-19 16:21:26.472: INFO/DEBUG(4410): signal 11 (SIGSEGV), fault addr
 0018
 08-19 16:21:26.472: INFO/DEBUG(4410):  r0 ef40  r1 ece8  r2
 41097b28  r3 
 08-19 16:21:26.472: INFO/DEBUG(4410):  r4 437a9688  r5 ab308358  r6
 a9c8  r7 bebee488
 08-19 16:21:26.472: INFO/DEBUG(4410):  r8 bebee4a8  r9 41049ce0  10
 41e3e344  fp 1070
 08-19 16:21:26.472: INFO/DEBUG(4410):  ip ad083e50  sp bebee480  lr
 ad03dcf5  pc ab305408  cpsr 8030
 08-19 16:21:26.572: INFO/DEBUG(4410):          #00  pc 5408  /
 system/lib/libmedia_jni.so
 08-19 16:21:26.572: INFO/DEBUG(4410):          #01  pc e3b4  /
 system/lib/libdvm.so
 08-19 16:21:26.582: INFO/DEBUG(4410):          #02  pc 00040a8a  /
 system/lib/libdvm.so
 08-19 16:21:26.582: INFO/DEBUG(4410):          #03  pc 00029430  /
 system/lib/libdvm.so
 08-19 16:21:26.592: INFO/DEBUG(4410):          #04  pc 00017610  /
 system/lib/libdvm.so
 08-19 16:21:26.592: INFO/DEBUG(4410):          #05  pc 00052268  /
 system/lib/libdvm.so
 08-19 16:21:26.592: INFO/DEBUG(4410):          #06  pc 000596ee  /
 system/lib/libdvm.so
 08-19 16:21:26.602: INFO/DEBUG(4410):          #07  pc 00013118  /
 system/lib/libdvm.so
 08-19 16:21:26.602: INFO/DEBUG(4410):          #08  pc 00017b1c  /
 system/lib/libdvm.so
 08-19 16:21:26.602: INFO/DEBUG(4410):          #09  pc 00017560  /
 system/lib/libdvm.so
 08-19 16:21:26.613: INFO/DEBUG(4410):          #10  pc 000520ec  /
 system/lib/libdvm.so
 08-19 16:21:26.613: INFO/DEBUG(4410):          #11  pc 0003f0f8  /
 system/lib/libdvm.so
 08-19 16:21:26.613: INFO/DEBUG(4410):          #12  pc 00029600  /
 system/lib/libandroid_runtime.so
 08-19 16:21:26.613: INFO/DEBUG(4410):          #13  pc 0002a0fe  /
 system/lib/libandroid_runtime.so
 08-19 16:21:26.613: INFO/DEBUG(4410):          #14  pc 8bf2  /
 system/bin/app_process
 08-19 16:21:26.622: INFO/DEBUG(4410):          #15  pc 0001fd22  /
 system/lib/libc.so
 08-19 16:21:26.632: INFO/DEBUG(4410):          #16  pc bcb2  /
 system/lib/libc.so
 08-19 16:21:26.632: INFO/DEBUG(4410):          #17  pc b000157e  /
 

[android-developers] Re: Scrollable area like in Robo Defense game(both horizontal and vertical)

2009-08-20 Thread Markus Junginger

On Aug 20, 2:26 am, Dan Sherman impact...@gmail.com wrote:
 I would imagine that robo defence is doing custom scrolling within their
 application, and not relying on a UI component for that piece.

They must use there own custom UI component because it's not supported
by Android 1.5. Most games won't scroll any child views but will
implement a single game View and handle scrolling just for this
view. At least that's how I do it.

Nevertheless, what I was looking for is view something else. To
clarify my requirements a little more: there is just a fixed size View
which is larger than the screen and you need to scroll that and its
child views in both directions. I hope someone shares his/her
solution.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Get default email account and compose a message?

2009-08-20 Thread Atif Gulzar
I am looking for some anchors how to get default Email account and compose a
new message. I will appreciate any help. Thanks


--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ

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

2009-08-20 Thread tstanly

thanks for reply,

so how can I do for change thread's control to change my UI?

thanks!

On 8月20日, 下午1時03分, star double doublestar...@gmail.com wrote:
 My god, you must change your UI in main thread  but not your new thread , it
 is  android's rule .

 2009/8/20 tstanly tsai.sta...@gmail.com





  hi all,

  I write a thread, and do show() after thread complete,
  but I always get the error msg bellow,
  and this show() function is ok, because I put it on other location of
  program,
  and it works fine.

  plz help me!
  thanks!

  error msg===
  E/AndroidRuntime(  746): Uncaught handler: thread Thread-8 exiting due
  to uncaug
  ht exception
  E/AndroidRuntime(  746): android.view.ViewRoot
  $CalledFromWrongThreadException: O
  nly the original thread that created a view hierarchy can touch its
  views.

  code===
  new Thread()
  {
  public void run()
   {
  try{
 } /* end of try */
  catch (Exception e)
   {
   Log.d(tsai_error1,e.getMessage());
   } /* end of catch */
  finally
   {
   mProgressDialog2.dismiss();

   } /* end of finally */
   }/* end of run */
  }.start();

  show();- 隱藏被引用文字 -

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



[android-developers] programatically detect foreground application/ screen?

2009-08-20 Thread Chris Stratton

Is there any way for a backfround task to programmatically detect or
recognize by learned id which application or screen (different
package) is showing?

I don't really want to resort to analizing a screenshot...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Recorded sound file not getting listed in Music menu

2009-08-20 Thread kk_Kiran

Thx for your reply Marco.
While recording the audio I need to specify output file path. So I
have already added the title and path for the recorded file. That file
is being created with correct name and correct path in sdcard. The
only problem is emulator is not able to scan the file and thus that
file is not getting listed in music menu until emulator is closed and
relaunched.


On Aug 20, 12:15 am, Marco Nelissen marc...@android.com wrote:
 If you create a media file, it is your responsibility to add it to the
 database with a proper title, artist, album, etc.

 On Wed, Aug 19, 2009 at 8:23 AM,kk_Kiransimplyurki...@gmail.com wrote:

  Hi friends,

  I have created an basic sound recorder application using MediaRecorder
  class. It has 3 buttons i.e.

  1.Record : Start recording
  2.Stop : Stop recording
  3.Play  : Play recorded file ( 3gp format)

  I can record any number of files using this. Each files gets name as
  audio1,audio2 ..etc.

  The problem is after recording the file I can play it using play
  button. But if I exit my application I am not able to see that file
  listed in music menu in emulator. But at the same time when i browse
  my sdcard using eclipse I can see the recorded audio file. ( I have
  aleady mounted sdcard image and can see other sdcard content in
  emulator)

  Now if I close the emulator and relaunch it I can see that file in
  emulator music menu. Now suppose that file name is audio1.3gp. If I
  record a sound using my app it will record it using name audio1.3gp on
  same location. This time if I goto music menu I can see audio1.3gp
  file with latest recorded audio.

  Can anybody help me on why this is happening?

  Thanks in advance and sorry for long description :).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Architecture dilema

2009-08-20 Thread loctarar

Hello!

This may sound a little silly. Let's say I want to build a game with a
menu, an options screen, a form screen (for the user to insert some
data) and the game screen. The usual approach would be to have an
activity for each case (correct me if I'm wrong). What if I do another
thing... and code four views for each case and swap them using
setContentView() in the same activity? Suppose that I'll override the
onSaveInstanceState() to save the state of the views in all the four
cases.

What is the disadvantage in this approach besides having a huge
activity that I'm sure it gets closed every time the system is low in
memory?

I haven't tested it yet, but I didn't find anything in the docs that
could stop this approach to work. The reasons for avoiding the usual
implementation is that I need to convert an application from J2ME and
having multiple activities raises some difficulties in the porting
process.

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: HVGA T-Mobile G1/G2 vs. iPhone

2009-08-20 Thread Dianne Hackborn
Current Android phones have 16 bit displays, though that is just a hardware
detail, and not related to Android itself.

I am pretty sure iPhones also have 16 bit displays, though the new 3GS may
have a 24 bit display.  (Actually often they will claim an 18 bit
display...  which almost always means that the display itself is 18 bit, but
the frame buffer is still 16 bit, and they wire the low bit of green to the
extra low bit of red and blue in the display.)

On Wed, Aug 19, 2009 at 10:31 PM, phil phil.pellouch...@gmail.com wrote:


 From what I can gather it appears that both the T-Mobile G1and the
 iPhone have HVGA - 320x480 displays.

 However, one very important difference is that the T-Mobile phones
 only support 64k colors, while the iPhones support 16M colors.

 Can someone confirm that?

 tia.
 



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

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

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



[android-developers] Re: How to find information about BatteryManager and the way BroadcastReceiver works?

2009-08-20 Thread DaminouU

So there is no way to learn which constants are available? (except
finding some codes on the Internet...) I am quite disappointed ;-)

Thanks for your answer,

D.


On Aug 19, 6:40 pm, Mark Murphy mmur...@commonsware.com wrote:
 DaminouU wrote:
  Hi,

  I was wondering how to use the BatteryManager's constants when I find
  this link :

 http://twisty.googlecode.com/svn-history/r26/trunk/twisty/src/com/goo...

  There you can find a method called monitorBatteryState.
  In this one I saw those lines :
  int rawlevel = intent.getIntExtra(level, -1);
  int scale = intent.getIntExtra(scale, -1);
  int status = intent.getIntExtra(status, -1);
  int health = intent.getIntExtra(health, -1);
  ...

  I am a newbie on Android so I read Intent and BroadcastReceiver to
  understand what it is and where I can find a list with that data
  (level, status, ...) but I didn't find anything.

 They are undocumented, unfortunately. On the other hand, if you simply
 dump all of the extras out of one of those Intents, you will find that
 most are self-explanatory, or tie into constants defined on
 BatteryManager. Note that level is in terms of scale (e.g., if
 scale is 100, level will be 0-100 indicating an integer percentage
 of battery life remaining).

  I think I understand that those values are modified by the battery
  and that my broadcastReceiver gets these changes. Is it correct?

 Correct.

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

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



[android-developers] how can change controll to main thread from new other thread?

2009-08-20 Thread tstanly

hi all,

I was define a new thread for a task,
but when task is complete, I must to refresh my listview,
however I will get the error for just can use main thread to change
view,


so, any idea for it??

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



[android-developers] Re: How to change /sdcard to be not a read-only file system

2009-08-20 Thread vanquisher sinner

Even I tried with -sdcard option,
but adb push still does not work saying that it is a read only file system.

On Wed, Aug 19, 2009 at 5:13 PM, Jack Hajack...@t-mobile.com wrote:

 If you do a adb shell and cd /sdcard, do you see any files in /
 sdcard?

 --
 Jack Ha
 Open Source Development Center
 ・T・ ・ ・Mobile・ stick together

 The views, opinions and statements in this email are those of
 the author solely in their individual capacity, and do not
 necessarily represent those of T-Mobile USA, Inc.


 On Aug 19, 5:07 pm, n179911 n179...@gmail.com wrote:
 Yes, i did start my emulator with -sdcard with the file I created by

 $ mksdcard 256M sd256m.img
 $ put images in the img file

 but when i launch the emulator with '-sdcard', can then click
 'Gallery', it shows 'No Media found'.

 On Wed, Aug 19, 2009 at 4:14 PM, Jack Hajack...@t-mobile.com wrote:

  It seems like the sdcard is not available. Did you specify the -sdcard
  when you run the emulator? Or did you enter the SDCard data when you
  created the AVD?

  --
  Jack Ha
  Open Source Development Center
  ・T・ ・ ・Mobile・ stick together

  The views, opinions and statements in this email are those of
  the author solely in their individual capacity, and do not
  necessarily represent those of T-Mobile USA, Inc.

  On Aug 19, 3:28 pm, n179911 n179...@gmail.com wrote:
  Hi,

  I am trying to copy an image to the emulator sd card by:

  $ adb push ~/Desktop/bullet_ball_glass_red.png
  /sdcard/bullet_ball_glass_red.png

  But I get an error saying:
  failed to copy '/Users/n179911/Desktop/bullet_ball_glass_red.png' to
  '/sdcard/bullet_ball_glass_red.png': Read-only file system

  So I tried to go to adb shell to manual change the /sdcard to non
  read-only, but it still wont let me.
  $ adb shell
  # su
  # chmod 777 /sdcard
  Unable to chmod /sdcard: Read-only file system
  #


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Create a wav file and stock this into a data storage with Content Providers

2009-08-20 Thread Dany BREARD

What kind of permission I have to implement into
AndroidManifest.xml ???

here my sample xml:

***  AndroidManifest.xml
**

 uses-permission
   android:name=android.permission.INTERNET
   android:name=android.permission.SUBSCRIBED_FEEDS_WRITE
   android:name=android.permission.SUBSCRIBED_FEEDS_READ
  /uses-permission



When I launch mu java code:

*  Java code


 byte[] decoded = Base64.decode( tabMsg[0].getMsgBase64() );

ContentValues values = new ContentValues();
values.put(Media.DISPLAY_NAME, Voicemail);
values.put(Media.CONTENT_TYPE, Audio/wav);
values.put(Media._ID, 1);

Uri uri = getContentResolver().insert(Media.INTERNAL_CONTENT_URI,
values);

**

getContentResolver() have en exception error :

08-20 08:05:15.787: WARN/dalvikvm(1475): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-20 08:05:15.797: ERROR/AndroidRuntime(1475): Uncaught handler:
thread main exiting due to uncaught exception
08-20 08:05:16.076: ERROR/AndroidRuntime(1475):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.dany.android.socketinterface/
com.dany.android.socketinterface.InterfaceGraphiqueVVM}:
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.dany.android.socketinterface/
com.dany.android.socketinterface.TabVoicemail}:
java.lang.NullPointerException
08-20 08:05:16.076: ERROR/AndroidRuntime(1475): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)


Did I forget something or an other permission ???

Dany

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

2009-08-20 Thread Saurav Mukherjee
use a Handler object...

Handler uiHandler=new Handler();

then inside ur funcion:
uiHandler.post(new Runnable(){
void run(){
here u can change components in the ui thread.
}
});

On Thu, Aug 20, 2009 at 1:12 PM, tstanly tsai.sta...@gmail.com wrote:


 hi all,

 I was define a new thread for a task,
 but when task is complete, I must to refresh my listview,
 however I will get the error for just can use main thread to change
 view,


 so, any idea for it??

 thanks!!
 


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



[android-developers] Re: Create a wav file and stock this into a data storage with Content Providers

2009-08-20 Thread Dany BREARD

I also try to add more and more permission but nothing run my
getContentResolver()


**
 uses-permission
   android:name=android.permission.INTERNET
   android:name=android.permission.SUBSCRIBED_FEEDS_WRITE
   android:name=android.permission.SUBSCRIBED_FEEDS_READ
   android:name=android.permission.WRITE_OWNER_DATA
   android:name=android.permission.WRITE_SETTINGS
/uses-permission

**

Help me to find the true permission, 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] ActivityGroup: get reference of the LocalActivityManager

2009-08-20 Thread Ludwig Heinz

hey guys,

i have a tab with an activitygroup as the intent of tab1.

my code of the activity(group):

public class TabActivityGroup extends ActivityGroup{

  protected static LocalActivityManager mLocalActivityManager;

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

replaceContentView(new Intent(this, dosomething.class));
  }

  public void replaceContentView(Intent newIntent) {

View view = getLocalActivityManager().startActivity(id,
newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
.getDecorView();

this.setContentView(view);
  }
}

my task:

i do something in the dosomething.class which is loaded by default
in the ActivityGroup an after a click on a button, the activity inside
the tab1 should change to dosomethingselse.class.

this is of course the wrong way to start the activity inside the tab1
('cause it overlay the tabactivity completly):
//Intent i = new Intent(this, dosomethingselse.class);
//startActivity(i);

so how can i get the reference of the LocalActivityManager inside
the dosomething.class to start the other acitivty
dosomethingselse.class from an method? or is there any way, how to
handle this better?

many thanks in advance!

best regards,
ludwig
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] odd issues with port 80

2009-08-20 Thread Holden Karau

I'm trying to do some raw socket stuff with port 80, but things seem
to be behaving oddly in the emulator. I get similar issues using the
connectbot application. I can connect to things on port 25 just fine,
but it can't seem to connect to anything on port 80. Has anyone else
had this experience and or know any work arounds?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Horizontal Scrolling with fling gesture - ebook reader

2009-08-20 Thread Nivek

I've implemented this on a picture slideshow app that I will publish
soon.

The principle is to use a GestureDetector which is set as the manager
of touch events of your Activity. Your activity can then implement an
OnGestureListener to react to specific gestures.

Here is some code extracted from my app :

import android.view.GestureDetector.OnGestureListener;


private class SlideShow implements OnGestureListener {

private GestureDetector mGestureScanner;

@Override
protected void onCreate(Bundle savedInstanceState) {
// [...]
mGestureScanner = new GestureDetector(this);
// [...]
}

@Override
public boolean onTouchEvent(MotionEvent me) {
return mGestureScanner.onTouchEvent(me);
}

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float
velocityX,
float velocityY) {
if (velocityX  0) {
goForward();
return true;
} else if (velocityX  0) {
goBack();
return true;
}
   return false;
}

}

For the sliding effect, I have used a ViewFlipper and 3 ImageViews.

I defined in the apps resources 4 animations :
Going forward :
- translation from center to left : make the current page go away
(out)
- translation from right to center : make the next page come (in)
Going backward
- translation from center to right : make the current page go away
(out)
- translation from left to center : make the previous page come (in)

Depending on the direction of the fling, I set both in and out
animations of the ViewFlipper to the corresponding couple of forward
or backward animations.

I use 3 ImageViews so that my previous and next page can be preloaded
before the user decides to fling, otherwise the time between fling and
animation can be quite long if the next/previous view is long to
initialise.

Once the animation is finished, I rotate the role of each view and
preload the new next or previous image in the view that is now 2 pages
away from the current.

I hope this helps.

Nivek

On 20 août, 07:59, Grahamdroid dcgrah...@gmail.com wrote:
 So my application has a large amount of textual data. Up until this
 point I've been using forward and back buttons to navigate from
 section to section. I was impressed with the horizontal scrolling of
 the Ebook reader from Alkido that is available on the store which uses
 a horizontal fling gesture to flip the pages. Does anyone have any
 experience doing something like this? I've done it a number of ways,
 but none seem to be very smooth or efficient. 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] Unable to start service intent service not found

2009-08-20 Thread michael sunil

Hi ,

I am getting following message when i try to launch
service.Also is there any specific path on file system where we need
to place the .apk file which contains my serivce component only.

Regards
Sunil

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

2009-08-20 Thread tstanly

thank you for your suggestion,

it works!!

On 8月20日, 下午4時35分, Saurav Mukherjee to.saurav.mukher...@gmail.com
wrote:
 use a Handler object...

 Handler uiHandler=new Handler();

 then inside ur funcion:
 uiHandler.post(new Runnable(){
 void run(){
 here u can change components in the ui thread.



 }
 });
 On Thu, Aug 20, 2009 at 1:12 PM, tstanly tsai.sta...@gmail.com wrote:

  hi all,

  I was define a new thread for a task,
  but when task is complete, I must to refresh my listview,
  however I will get the error for just can use main thread to change
  view,

  so, any idea for it??

  thanks!!- 隱藏被引用文字 -

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



[android-developers] Re: Create a wav file and stock this into a data storage with Content Providers

2009-08-20 Thread Dany BREARD

I try to catch error with

 ContentValues values = new ContentValues();
values.put(Media.DISPLAY_NAME, Voicemail);
  //  values.put(Media.MIME_TYPE, Audio/wav);
values.put(Media.CONTENT_TYPE, Audio/wav);
values.put(Media._ID, 1);
values.put(Media.DATA, decoded);

try{
ContentResolver cr = getContentResolver();
}
catch(Exception e)
{
 Log.v(TAG, ERROR Exception:  + e);
}

and i receice:

 08-20 09:20:43.868: VERBOSE/(3568): ERROR Exception:
java.lang.NullPointerException

Why ??

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Create a wav file and stock this into a data storage with Content Providers

2009-08-20 Thread Dany BREARD

Same with that

***
  uses-permission
   android:name=android.permission.INTERNET
/uses-permission

uses-permission
   android:name=android.permission.SUBSCRIBED_FEEDS_WRITE
/uses-permission

uses-permission
   android:name=android.permission.SUBSCRIBED_FEEDS_READ
/uses-permission

uses-permission
   android:name=android.permission.WRITE_OWNER_DATA
/uses-permission

uses-permission
   android:name=android.permission.WRITE_SETTINGS
/uses-permission


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

2009-08-20 Thread Leon Zhang
Thanks!
I tried to put a transparent layout onto the top and make it cover the full
screen.OnTouchEvent of this layout had been overrided and it actually
catched all OnTouch event;

but the problem is that some Views under this layout can not catch OnKeyDown
after OnTouchEvent happend onto the top layout. It looks that though
OnTouchevent is consumed by the top view but Focus still changed?

My doubt is that all OnTouchevents are consumed by the toplayout , why some
Views under this layout looks still be effected by this OnTouchevent? should
framework do some elsejob to process this Touch Event?

Thanks!

On Thu, Aug 20, 2009 at 1:19 PM, Dianne Hackborn hack...@android.comwrote:

 Well put a transparent full-size view on top of the rest of your hierarchy
 and have it consume all the events.


 On Wed, Aug 19, 2009 at 6:44 PM, Leon Zhang linuxzh...@gmail.com wrote:

 Thanks!
 In fact, I have tried overriding OnTouch(), and I tried two cases to
 overriding OnTouch():
 1 OnTouch(){
return false;
 }
 In this case, OnTouch event will be passed to the next  view in Viewgroup.
 It is not I want.
 2 OnTouch(){
return ture;
 }
 In this case, OnTouch event will not be passed to other view. But it will
 cause this iew's OnKeyDown() not called even key pressed. I think it is
 caused by Focus changed.
 Because there are many views in my application and app will manage all
 focus by it's own way . It means when TouchEvent happens, the Focus will be
 distored. App has to revert the Focus to the previous state before
 TouchEvent happens.

 For my application, it is special and all operation should be done by Key
 not by Touch.

 So I have to ask for Group to find the way to avoid any OnTouch event.

 ZL


 On Thu, Aug 20, 2009 at 1:26 AM, Yusuf Saib (T-Mobile USA) 
 yusuf.s...@t-mobile.com wrote:


 Have you tried overriding OnTouch()? Another way may be to embed the
 aphephobic view in another view that overrides OnTouch rather than
 passing it down to its child.


 http://2.bp.blogspot.com/_jFEYq3Edff8/SFr1srC_VSI/AnU/oucw8hzS8BA/s400/FarSideNoTouch%2B001(2).jpghttp://2.bp.blogspot.com/_jFEYq3Edff8/SFr1srC_VSI/AnU/oucw8hzS8BA/s400/FarSideNoTouch%2B001%282%29.jpg

 Yusuf Saib
 Android
 ·T· · ·Mobile· stick together
 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.




 On Aug 19, 2:40 am, Zhangli linuxzh...@gmail.com wrote:
  Hi, all:
 
  I am trying to use setClickable(false) + setLongClickable(false) +
  setFocusableInTouchMode(false) to disable Touch Event for every
  views but failed. When mouse clicks, OnTouchEvent() of some view will
  still be called.
  What I want is only to disable Touch event because my application need
  not Touch and Touch event will disturb the running of app. Is there
  any way to disable Touch ?
 
  Thank you !
  ZL




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

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



 


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



[android-developers] Re: how can change controll to main thread from new other thread?

2009-08-20 Thread tstanly

thank for reply...

but does handler can use with progressdialog??

thanks!

On 8月20日, 下午4時35分, Saurav Mukherjee to.saurav.mukher...@gmail.com
wrote:
 use a Handler object...

 Handler uiHandler=new Handler();

 then inside ur funcion:
 uiHandler.post(new Runnable(){
 void run(){
 here u can change components in the ui thread.



 }
 });
 On Thu, Aug 20, 2009 at 1:12 PM, tstanly tsai.sta...@gmail.com wrote:

  hi all,

  I was define a new thread for a task,
  but when task is complete, I must to refresh my listview,
  however I will get the error for just can use main thread to change
  view,

  so, any idea for it??

  thanks!!- 隱藏被引用文字 -

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



[android-developers] Re: update for syncML (client) and android

2009-08-20 Thread Tdj



On Aug 19, 5:22 pm, Tdj david.c...@gmail.com wrote:

     where can I donwload this version ?

OK. I 'svn' the last version (0.2.1) and compile it. The calendar
support is included. I'm going to test it.

David.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Create a wav file and stock this into a data storage with Content Providers

2009-08-20 Thread Dany BREARD

Same with that

***
  uses-permission
   android:name=android.permission.INTERNET
/uses-permission

uses-permission
   android:name=android.permission.SUBSCRIBED_FEEDS_WRITE
/uses-permission

uses-permission
   android:name=android.permission.SUBSCRIBED_FEEDS_READ
/uses-permission

uses-permission
   android:name=android.permission.WRITE_OWNER_DATA
/uses-permission

uses-permission
   android:name=android.permission.WRITE_SETTINGS
/uses-permission


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

2009-08-20 Thread Mark Murphy

Loki117 wrote:
 Can someone shed some light on why a inline webview into which I pass
 a URL is now opening a browser session for the URL instead of
 populating the in app webView? It works on the emulator perfectly but
 a physical device shows the browser.

It behaves the same in both the emulator and devices. Links in WebView
will open a browser activity, unless you implement a WebViewClient and
implement shouldOverrideUrlLoading() to tell it to do something else.

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

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



[android-developers] What happens when more activities 'listen' to the same intent?

2009-08-20 Thread Jiri

Intents can start activity's, what happens if two or more activities 
listen to the same intent, i.e. the both have an intenfilter defined 
with the same android:name?

How is the decisive process being performed?

Jiri

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

2009-08-20 Thread Wouter

Hey,

I want to make something like this:

http://bto.cnet.com/i/bto/20081212/Loopt_270x675.jpg

And specially the list of images at the bottom of the screen. How have
they made this? Is it a listview with only images and text or another
method?

Thank you for helping me!

Wouter

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

2009-08-20 Thread Bo

So am I~

On Aug 19, 10:28 pm, an0 an0...@gmail.com wrote:
 I'm concerned with this, too.
 It is almost end of August, but there is no entry to submit yet.
 Did I miss something???

 On Aug 11, 11:08 am, Khurram Samad khurram.sa...@gmail.com wrote:

  Any update as whats going on ?

  On Aug 10, 8:44 pm, manoj manojkumar.m...@gmail.com wrote:

   Thanks for your reply.

   On Aug 10, 4:37 pm, Mark Murphy mmur...@commonsware.com wrote:

manoj wrote:
 Hi friends,

 I developed an application forandroid. I would like to submit the
 same to ADC2 (AndroidDeveloperChallenge2).

 I didnt find any source to submit the apps.

 Can any one please suggest me the sites to submit the apps?

They have not announced the process for this yet.

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

   Android1.5 Programming 
   Books:http://commonsware.com/books.html-Hidequoted 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: Sharing data between activities

2009-08-20 Thread Elias

Hi,

data size is 960987 bytes, logcat:

V/ImageCaptureCallback( 8863): onpicturetaken...@43678fb0 length =
960987

I'll try to increase heap size next, thx.

olli

On Aug 15, 8:24 am, powerbyte powerb...@gmail.com wrote:
 Hello Olli,

 what is the size of byte[]data?
 may be problem with the heap size. In logcat output, is something like
 grow heap? if yes, try with increasing heap size.

 pb

 On Aug 14, 2:22 pm, Elias elias.va...@googlemail.com wrote:

  I have tried to share betweeb two simpleactivities:

  On parent activity, I'll start ImageCapture Activity:

                     IntentcameraIntent = newIntent();
                      cameraIntent.setClass(this, ImageCapture.class);
                      cameraIntent.putExtra(cameraData, null); //not sure 
  why
  this is here?
                      startActivityForResult(cameraIntent, 1);

      @Override
      protected void onActivityResult(int requestCode, int resultCode,
 Intentdata) {
          CharSequence text = onActivityResult requestCode  +
  requestCode +  resultCode  + resultCode + data +data;
          int duration = Toast.LENGTH_LONG;
          Toast toast = Toast.makeText(this, text, duration);
          toast.show();
      }

  And on camera Activity (I have inner class which implements
  PictureCallback):

        �...@override
          public void onPictureTaken(byte[]data, Camera camera) {
              try {
                 IntentresultIntent = newIntent();
                  resultIntent.putExtra(cameraData,data);
                  setResult(Activity.RESULT_OK,resultIntent);
                  finish();
              } catch (Exception ex) {
                  setResult(Activity.RESULT_CANCELED);
                  finish();
              }
          }

  It seems that onActivityResult method is never called, what am I
  missing here? Camera activity is closed and first activity is shown
  again but onActivityResult is not called.
  It works perfectly fine (onActivityResult is called and toast is
  displayed) if do following on cameraintent:

  @Override
          public void onPictureTaken(byte[]data, Camera camera) {
              try {
                  //IntentresultIntent = newIntent();
                  //resultIntent.putExtra(cameraData,data);
                  setResult(Activity.RESULT_OK);
                  finish();
              } catch (Exception ex) {
                  setResult(Activity.RESULT_CANCELED);
                  finish();
              }

  With code above Activity.RESULT_OK (-1) is returned to
  onActivityResult method.
  I'm testing with HTC Hero.

  Cheers
  Olli

  On 7 elo, 17:48, elpix1 elp...@gmail.com wrote:

   Another way to sharedatabetweenactivitiesin the same process
   is to use the Application class:

  http://developer.android.com/reference/android/app/Application.html

   You have to specify the name of your Application class in the
   manifest and the framework will create only an instance of this
   class, which will live while the application process is running.

   In any activity, you can get the reference for your application
   instance using:

   Application a = getApplication();

   On Jul 22, 10:49 am, Per Sandström pg.sandst...@gmail.com wrote:

So far I have been using SharedPreferences to sharedatabetween
   activities. But I would very much like to find a better way. I would
simply like both Activity1 and Activity2 to share Object1. Activity1
will create Object1 and then start Activity2. What is the smartest way
to give Activity2 a pointer to Object1?

To summarize:Activitiesdon't have constructors! How do I senddata
to them from their parent activity???

Regards,
Per Sandström- 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 can change controll to main thread from new other thread?

2009-08-20 Thread Saurav Mukherjee
yes...
but a better way to use handler for progress dialogbox is with messages like
this:

Handler h=new Handler(){

@Override
void handleMessage(Message msg){
}
};

send message for each progress update...

2009/8/20 tstanly tsai.sta...@gmail.com


 thank for reply...

 but does handler can use with progressdialog??

 thanks!

 On 8月20日, 下午4時35分, Saurav Mukherjee to.saurav.mukher...@gmail.com
 wrote:
  use a Handler object...
 
  Handler uiHandler=new Handler();
 
  then inside ur funcion:
  uiHandler.post(new Runnable(){
  void run(){
  here u can change components in the ui thread.
 
 
 
  }
  });
  On Thu, Aug 20, 2009 at 1:12 PM, tstanly tsai.sta...@gmail.com wrote:
 
   hi all,
 
   I was define a new thread for a task,
   but when task is complete, I must to refresh my listview,
   however I will get the error for just can use main thread to change
   view,
 
   so, any idea for it??
 
   thanks!!- 隱藏被引用文字 -
 
  - 顯示被引用文字 -
 


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



[android-developers] How to get JUnitReports via android.test.InstrumentationTestRunner

2009-08-20 Thread Binesy

Hi

I am trying to get my unit test output in XML format so I can plug it
into a Hudson build server.  From my research I should be using
JUnitReports, but how can I get these via the
android.test.InstrumentationTestRunner?

Many Thanks

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

2009-08-20 Thread pawan shukla
MY FRIEND PLEASE CONTACT MY MOBILE NO. 9431794258

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

2009-08-20 Thread pawan shukla
DEAR FRIEND PLEASE CONTACT MY MOBILE 9431794258

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



[android-developers] what is .config file to download from web server?

2009-08-20 Thread zeeshan

Hi Dear,

i need to download some files from web server and i just got to know
that i should have a config file on server which defines all the files
url.

wondering if anybody have sample of this download.config file?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 does glGetString(GL10.GL_EXTENSIONS) return?

2009-08-20 Thread pawan shukla
DEAR FRIEND PLEASE CONTACT MY MOBILE 9431794258

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

2009-08-20 Thread pawan shukla
DEAR FRIEND PLEASE CONTACT MY MOBILE 9431794258

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

2009-08-20 Thread Andrei

Thanks Steve.
I fixed the bug.
Please uninstall old app and install fresh one

On Aug 19, 6:51 pm, Steve steveoliv...@gmail.com wrote:
 no luck, it only gives me the option to download to the sd card, and
 when I pick that, it bombs out, here's the log dump --

 I/ActivityManager(   61): Displayed activity
 com.andreig.droidoc/.JavaAPIActivity: 27788 ms
 I/installd(   39): free_cache(7838100) avail 4800512
 D/        (13758): unable to unlink '/data/data/com.andreig.droidoc/
 shared_prefs/my_preferences.xml.bak': No such file or directory
 (errno=2)
 E/SqliteUtil(13758): java.io.FileNotFoundException: /data/.droidoc.db
 E/Database(13758): sqlite3_open_v2(/data/.droidoc.db, handle, 1,
 NULL) failed
 D/AndroidRuntime(13758): Shutting down VM
 W/dalvikvm(13758): threadid=3: thread exiting with uncaught exception
 (group=0x4000fe70)
 E/AndroidRuntime(13758): Uncaught handler: thread main exiting due to
 uncaught exception
 I/ActivityManager(   61): Process com.android.voicedialer (pid 13716)
 has died.
 E/AndroidRuntime(13758): java.lang.NullPointerException
 E/AndroidRuntime(13758): at com.andreig.droidoc.SqliteUtil.get_packages
 (SqliteUtil.java:118)
 E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
 $1.onPostExecute(JavaAPIActivity.java:182)
 E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
 $1.onPostExecute(JavaAPIActivity.java:179)
 E/AndroidRuntime(13758): at android.os.AsyncTask.finish(AsyncTask.java:
 416)
 E/AndroidRuntime(13758): at android.os.AsyncTask.access$300
 (AsyncTask.java:127)
 E/AndroidRuntime(13758): at android.os.AsyncTask
 $InternalHandler.handleMessage(AsyncTask.java:428)
 E/AndroidRuntime(13758): at android.os.Handler.dispatchMessage
 (Handler.java:99)
 E/AndroidRuntime(13758): at android.os.Looper.loop(Looper.java:123)
 E/AndroidRuntime(13758): at android.app.ActivityThread.main
 (ActivityThread.java:3948)
 E/AndroidRuntime(13758): at java.lang.reflect.Method.invokeNative
 (Native Method)
 E/AndroidRuntime(13758): at java.lang.reflect.Method.invoke
 (Method.java:521)
 E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:782)
 E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit.main
 (ZygoteInit.java:540)
 E/AndroidRuntime(13758): at dalvik.system.NativeStart.main(Native
 Method)

 On Aug 18, 8:07 pm,Andreigml...@gmail.com wrote:



  I made it searchable now
  App renamed to DroiDoc, so search for DroiDoc in Market
  The size is 3.7Mb if you install db to sdcard
  Please send me email if you find bug
  Thanks

  On Aug 14, 2:34 pm,Andreigml...@gmail.com wrote:

   I wrote my first Hello World App for Android:AndroidAPI

   It should be useful for Android developers

   Actually it provides full Android Java API on your Android phone and
   does not require connection

   Search forAndroidAPIin Market
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 use apache commons in my android application

2009-08-20 Thread Mark Murphy

hap 497 wrote:
 But android sdk does come with apache commons

No, it doesn't:

http://developer.android.com/reference/packages.html

Moreover, there is no such thing as apache commons as a single JAR.
There are dozens of Apache Commons projects, each with their own JAR(s):

http://commons.apache.org/

Android contains many bits of Apache code -- most of the java/javax
classes come from Apache Harmony, and Android has most of Apache
HttpClient. Neither of those are part of Apache Commons.

If you want some JAR out of the vast set of Apache Commons projects, you
are welcome to try it: put it in libs/, tell Eclipse about it, and hope
it works.

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

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



[android-developers] Re: unsubscribe

2009-08-20 Thread Disconnect

Reading is hard.

On Wed, Aug 19, 2009 at 11:41 PM, Dan Shermanimpact...@gmail.com wrote:
 I'd recommend trying the instructions included at the bottom of each of
 these emails...

 To unsubscribe from this group, send email to
 android-developers-unsubscr...@googlegroups.com


 On Wed, Aug 19, 2009 at 11:38 PM, Kent Loobey k...@uoregon.edu wrote:

 On Wednesday 19 August 2009 20:07:55 FrogPad wrote:
  What does it take to be taken off of this group?  I have tried to
  unsubscribe for a week.  Any insights would be greatly appreciated.

 To unsubscribe from this group, send email to
 android-developers-unsubscr...@googlegroups.com


  Thank you
 




 


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



[android-developers] Re: MapActivity in android 1.5

2009-08-20 Thread Honest

Hello jacik ha Thanks for your reply. I read that example and did
according to it. But yet my eclipse is giving error in extending
MapsActivity. The following is my manifiest file code. So can some one
tell me i am using android 1.5 SDK then also why i am not able to use
MapsActivity.


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

/application
uses-sdk android:minSdkVersion=3 /

uses-permission android:name=android.permission.INTERNET/uses-
permission
/manifest



On Aug 19, 8:22 pm, Jack Ha jack...@t-mobile.com wrote:
 I would recommend to take a look at the HelloMapView tutorial:

 http://developer.android.com/guide/tutorials/views/hello-mapview.html

 --
 Jack Ha
 Open Source Development Center
 ・T・ ・ ・Mobile・ stick together

 The views, opinions and statements in this email are those of
 the author solely in their individual capacity, and do not
 necessarily represent those of T-Mobile USA, Inc.

 On Aug 19, 4:10 am, Honest honestsucc...@gmail.com wrote:



  I could not find MapActity in my android 1.5.

  On Aug 19, 12:11 pm, tstanly tsai.sta...@gmail.com wrote:

   if you want to put color on the mapview,
   you must use the overlay class
   search for overlay in the map API

   On 8月19日, 下午2時16分, Honest honestsucc...@gmail.com wrote:

Hello,

I want to display my two point on maps. I saw many example but they
are using MapActivity when i used MapActivity in my sdk which is 1.5.
it seems it is not available in it. So is it true that it is not
available in 1.5 API. So is there any other alternative for it. can i
do it using the following code sniiipt. I can do it for one code
snippt but i do not know how can i display two point.

String uriString = geo: + lat
                + , + longi;
            Intent intent = new Intent
(android.content.Intent.ACTION_VIEW,
                Uri.parse(uriString));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how can i MapView my map before attach to window

2009-08-20 Thread Adem KARAKOLLU
When mapView  attacthed to window, i have to wait loading of mapView.
I want to load my mapView before attach to window (while being invisible).
Is there any idea?

-- 
ADEM KARAKOLLU

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

2009-08-20 Thread Mark Murphy

michael sunil wrote:
 Hi ,
 
 I am getting following message when i try to launch
 service.Also is there any specific path on file system where we need
 to place the .apk file which contains my serivce component only.

1. You need to install the APK file that contains your service component

2. Your service component's manifest entry needs to have an intent
filter, probably with a custom action

3. Your service client, in its own APK, needs to build an Intent that
will match with the service's intent filter

At this point, AIDL should be usable between the client and service, via
a call to bindService() on the client side and an appropriate
implementation of onBind() on the service side.

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

Android Training in Germany, 18-22 January 2010: http://bignerdranch.com

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



[android-developers] unable to download youtube video's in android

2009-08-20 Thread Harishkumar V
Hi,

I am using youtube downloader to download videos.

Suddenly, from today, its not downloading,

it reports,

D/YTDownload(  740): Got content - parsing...
D/YTDownload(  740): Exception in finding ID: java.lang.Exception: Could not
find download URL or title.

Also, i noticed, in  m.youtube.com new site, the option to choose from
Browser or Youtube is not shown.

Only, i have to select old site or goto desktop version, only then it shows.

Is there any way to download youtube videos or youtube player is available.

I am totally struck with the things.
Any help would be useful.

Thanks and Regards,
HarishKumar.V

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Create a wav file and stock this into a data storage with Content Providers

2009-08-20 Thread Dany BREARD

I have an exception error here

08-20 09:20:43.868: VERBOSE/(3568): ERROR Exception:
java.lang.NullPointerException

with:

try{
ContentResolver cr = getContentResolver();
}
catch(Exception e)
{
 Log.v(TAG, ERROR Exception:  + e);
}

but i implement lot of permission like here:


  uses-permission
   android:name=android.permission.INTERNET
/uses-permission

uses-permission
   android:name=android.permission.SUBSCRIBED_FEEDS_WRITE
/uses-permission

uses-permission
   android:name=android.permission.SUBSCRIBED_FEEDS_READ
/uses-permission

uses-permission
   android:name=android.permission.WRITE_OWNER_DATA
/uses-permission

uses-permission
   android:name=android.permission.WRITE_SETTINGS
/uses-permission


Did I forget something ???

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

2009-08-20 Thread Michael Leung
I can't find it.

On Thu, Aug 20, 2009 at 8:49 PM, Andrei gml...@gmail.com wrote:


 Thanks Steve.
 I fixed the bug.
 Please uninstall old app and install fresh one

 On Aug 19, 6:51 pm, Steve steveoliv...@gmail.com wrote:
  no luck, it only gives me the option to download to the sd card, and
  when I pick that, it bombs out, here's the log dump --
 
  I/ActivityManager(   61): Displayed activity
  com.andreig.droidoc/.JavaAPIActivity: 27788 ms
  I/installd(   39): free_cache(7838100) avail 4800512
  D/(13758): unable to unlink '/data/data/com.andreig.droidoc/
  shared_prefs/my_preferences.xml.bak': No such file or directory
  (errno=2)
  E/SqliteUtil(13758): java.io.FileNotFoundException: /data/.droidoc.db
  E/Database(13758): sqlite3_open_v2(/data/.droidoc.db, handle, 1,
  NULL) failed
  D/AndroidRuntime(13758): Shutting down VM
  W/dalvikvm(13758): threadid=3: thread exiting with uncaught exception
  (group=0x4000fe70)
  E/AndroidRuntime(13758): Uncaught handler: thread main exiting due to
  uncaught exception
  I/ActivityManager(   61): Process com.android.voicedialer (pid 13716)
  has died.
  E/AndroidRuntime(13758): java.lang.NullPointerException
  E/AndroidRuntime(13758): at com.andreig.droidoc.SqliteUtil.get_packages
  (SqliteUtil.java:118)
  E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
  $1.onPostExecute(JavaAPIActivity.java:182)
  E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
  $1.onPostExecute(JavaAPIActivity.java:179)
  E/AndroidRuntime(13758): at android.os.AsyncTask.finish(AsyncTask.java:
  416)
  E/AndroidRuntime(13758): at android.os.AsyncTask.access$300
  (AsyncTask.java:127)
  E/AndroidRuntime(13758): at android.os.AsyncTask
  $InternalHandler.handleMessage(AsyncTask.java:428)
  E/AndroidRuntime(13758): at android.os.Handler.dispatchMessage
  (Handler.java:99)
  E/AndroidRuntime(13758): at android.os.Looper.loop(Looper.java:123)
  E/AndroidRuntime(13758): at android.app.ActivityThread.main
  (ActivityThread.java:3948)
  E/AndroidRuntime(13758): at java.lang.reflect.Method.invokeNative
  (Native Method)
  E/AndroidRuntime(13758): at java.lang.reflect.Method.invoke
  (Method.java:521)
  E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:782)
  E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit.main
  (ZygoteInit.java:540)
  E/AndroidRuntime(13758): at dalvik.system.NativeStart.main(Native
  Method)
 
  On Aug 18, 8:07 pm,Andreigml...@gmail.com wrote:
 
 
 
   I made it searchable now
   App renamed to DroiDoc, so search for DroiDoc in Market
   The size is 3.7Mb if you install db to sdcard
   Please send me email if you find bug
   Thanks
 
   On Aug 14, 2:34 pm,Andreigml...@gmail.com wrote:
 
I wrote my first Hello World App for Android:AndroidAPI
 
It should be useful for Android developers
 
Actually it provides full Android Java API on your Android phone and
does not require connection
 
Search forAndroidAPIin Market
 



-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

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

2009-08-20 Thread Don

I was suffering the exact problem and finally found 'the' cause.
In onCreate(Bundle arg0) I was calling super.onCreate(arg0) after the
setContentView(R.layout.location_select_on_map_view) !

Once I corrected it the MapView was displayed correctly :-)

E.g.
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
setContentView(R.layout.location_select_on_map_view);
}

Regards,
Don



On Jul 10, 12:16 pm, Victor Lin borns...@gmail.com wrote:
 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
       package=com.ez2learn.android.powergrid
       android:versionName=1.0 android:versionCode=4
     application android:icon=@drawable/icon android:label=@string/
 app_name android:description=@string/app_description
         activity android:name=.PowerGrid
                   android:label=@string/app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity
     uses-library android:name=com.google.android.maps/uses-
 library
 /application
     uses-sdk android:minSdkVersion=3 /

 uses-permission android:name=android.permission.INTERNET/uses-
 permission
 /manifest

 On 7月10日, 下午6時20分, Mark Murphy mmur...@commonsware.com wrote:

  Victor Lin wrote:
   Hi,

   I am building a application that use MapView.

   This is the map.xml file I create in layout folder:

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

       com.google.android.maps.MapView
           android:id=@+id/MapView
           android:layout_width=fill_parent
           android:layout_height=fill_parent
           android:clickable=true
           android:apiKey=**
       /

   /RelativeLayout

   And I set it as content view in onCreate:

   setContentView(R.layout.map);

   Then once I start up the program, I got a exception:

   android.view.InflateException: Binary XML file line #8: Error
   inflating class java.lang.reflect.Constructor

   I do add uses library in manifest. It seems there is nothing wrong
   in xml file. What am I doing wrong? How to fix it?

  Could you post your manifest?

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

  Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Activity Lifecycle Cause Memory Leaking

2009-08-20 Thread brian.schimmel

I experienced similar problems. Depending on how you navigate back to
your Activity, Android does not know that it should reuse the existing
instance and creates a new one. You can fix this easily with the
activities launch mode, which you set in the AndroidManifest.xml.
Setting it to singleInstance will ensure that there is only ever one
instance. Depending on your app this might have other disadvantages,
so you should check this part of the documentation:
http://developer.android.com/guide/topics/fundamentals.html#acttask

On 7 Aug., 07:23, efan e...@efansoftware.com wrote:
 Tested on both 1.5-R2 and R3, same result.

 On Aug 6, 10:22 pm, efan e...@efansoftware.com wrote:

 http://developer.android.com/reference/android/app/Activity.html

  The Activity Lifecycle could have implementation and or design bug:
  One case is to initialize a big image in onCreate(), try to reuse the
  image during the whole lifecycle, and then recycle the image in
  onDestroy().
  Test showed that onCreate() is called every time one navigate away
  from the activity and back again, but onDestroy() is not called at
  all. This behavour causes memory leaking for the big image (size
  960*1920). After 6+ times away and back to activity, the system runs
  out of memory and has tokillthe process.

  One workaround is to initialize the big image in onResume() and
  recycle in onPause(), but that's not so good reuse.

  Could it be better to change the process (as shown in the diagram) a
  little bit such as:
  Call onDestroy() first when a process is killed?


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

2009-08-20 Thread brian.schimmel

I think this will just work fine:

android.os.Process.killProcess(android.os.Process.myPid());

As far as I know, it kills the current DalvikVM right on the spot, so
be careful.

On 10 Aug., 20:49, jhoffman keshis...@gmail.com wrote:
 It really depends on the structure of your app, but one trick you
 might employ is to launch your various activities with
 startActivityForResult(intent, ID);
 and then override onActivityResult to watch for a return value from
 the activity you launched. You can then make decisions about whether
 you should call finish() in the original activity, or whether the user
 just wanted to go back to that original activity without closing the
 entire app.

 Again, without knowing the structure of your app or more details, I
 can't be sure that this is actually going to be helpful to you. If it
 isn't though, feel free to post some specifics! :)

 On Aug 10, 2:36 am, Blackmarket pascal.se...@gmail.com wrote:

  Hi,

  i want to add anexitbutton to the menu, but didn't see an easy way
  to close anapplicationor acces all activities of anapplicationand
  finish them. Is there an easy approach avaible?

  Regards, Pascal


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

2009-08-20 Thread Abhinav

Hello I can not find the post I posted yesterday? No help is available
also!!

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



[android-developers] play sound so receiver can listen it

2009-08-20 Thread Honest

Hello,

My application is getting notification for incoming call and playing
sound so the caller can listen it but some how  the caller is not able
to listen it. Can some one tell me any work around or any thing which
seems feasible ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: AppWidgetHost - what is the hostId for?

2009-08-20 Thread Flying Coder

Thanks Jeff!

On Aug 18, 8:38 pm, Jeff Sharkey jshar...@android.com wrote:
 The hostId is a number of your choosing that should be internally
 unique to your app (that is, you don't need to worry about collisions
 with other apps on the system).  It's designed for cases where you
 want two unique AppWidgetHosts inside of the same application, so the
 system can optimize and only send updates to actively listening hosts.

 j





 On Tue, Aug 18, 2009 at 10:48 AM, Flying Coderav8r.st...@gmail.com wrote:

  Hi there,
     I'm developing my own appwidget hoster and am curious about the
  hostId used in the constructor:

  AppWidgetHost(Context context, int hostId)

  The docs don't say anything about it.  Can anyone tell me what its
  used for, and what values are legal?

  Thanks for the help,
  Steve

  P.s. Sorry if this is a duplicate post -- I posted this question
  earlier, but now I can't find it(!)

 --
 Jeff Sharkey
 jshar...@android.com- 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] space between component

2009-08-20 Thread Honest

I am putting one spinner and one button using following code. Can some
one tell me how can i put some space between it ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: space between component

2009-08-20 Thread Honest

The following is my java file code as i am adding controls in java
file so please take a look at it and let me know..

Country.setAdapter(adapter);
layout.addView(Country);
Button okBtn=new Button(this);
okBtn.setText(Ok);
layout.addView(okBtn);

On Aug 20, 5:30 pm, Honest honestsucc...@gmail.com wrote:
 I am putting one spinner and one button using following code. Can some
 one tell me how can i put some space between it ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Loading default preferences on startup

2009-08-20 Thread Eurig Jones

Here I am, answering my own questions again!

PreferenceManager.setDefaultValues(... readAgain=false)

Running that from a launcher activity would do the job

On Aug 20, 11:24 pm, Eurig Jones eurigjo...@gmail.com wrote:
 I want to load default preferences on app startup (before the user
 hits my preferences screen). Is there a way to do this using possibly
 xml and the manifest?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to disable auto-rotation feature

2009-08-20 Thread Harishkumar V
Hi,

I have a apk file, where i dont have the source for it.

When i run the apk, it automatically rotates the screen,

/WindowManager(  879): Setting rotation to 1, animFlags=0
I/WindowManager(  879): Config changed: { scale=1.0 imsi=0/0 locale=en_US
touch=1 key=2/1/2 nav=3 orien=1 }

then after closing the application or coming out from the application,

I/WindowManager(  879): Setting rotation to 0, animFlags=0
I/WindowManager(  879): Config changed: { scale=1.0 imsi=0/0 locale=en_US
touch=1 key=2/1/2 nav=3 orien=2 }

how to disable the rotation.

Thanks and Regards,
HarishKumar.V

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

2009-08-20 Thread Eurig Jones

I want to load default preferences on app startup (before the user
hits my preferences screen). Is there a way to do this using possibly
xml and the manifest?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: space between component

2009-08-20 Thread Mark Murphy

Honest wrote:
 The following is my java file code as i am adding controls in java
 file so please take a look at it and let me know..
 
 Country.setAdapter(adapter);
   layout.addView(Country);
   Button okBtn=new Button(this);
   okBtn.setText(Ok);
   layout.addView(okBtn);
 
 On Aug 20, 5:30 pm, Honest honestsucc...@gmail.com wrote:
 I am putting one spinner and one button using following code. Can some
 one tell me how can i put some space between it ?

You could use padding or margins to add space between your widgets.

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

_Android Programming Tutorials_ Version 1.0 In Print!

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

2009-08-20 Thread Dmitry.Skiba

You can also use full screen non-transparent dialogs. They look like
activities, but are simpler to handle. For example for Settings
screen of a game I would (and in fact, do) go with dialogs.


Dmitry

On 20 авг, 13:40, loctarar andrei.bu...@gmail.com wrote:
 Hello!

 This may sound a little silly. Let's say I want to build a game with a
 menu, an options screen, a form screen (for the user to insert some
 data) and the game screen. The usual approach would be to have an
 activity for each case (correct me if I'm wrong). What if I do another
 thing... and code four views for each case and swap them using
 setContentView() in the same activity? Suppose that I'll override the
 onSaveInstanceState() to save the state of the views in all the four
 cases.

 What is the disadvantage in this approach besides having a huge
 activity that I'm sure it gets closed every time the system is low in
 memory?

 I haven't tested it yet, but I didn't find anything in the docs that
 could stop this approach to work. The reasons for avoiding the usual
 implementation is that I need to convert an application from J2ME and
 having multiple activities raises some difficulties in the porting
 process.

 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: Bad OpenGL Emulation?

2009-08-20 Thread Dmitry.Skiba

Hmm, it works for me, both with textured quad (VBO and not) and with
draw_texture extension.


Dmitry

On 20 авг, 10:58, Robert Green rbgrn@gmail.com wrote:
 What's everyone's experience with this?

 I'm developing a new game and have been having inconsistencies between
 the device and emulator.  The biggest one for me right now is that the
 elements I draw with an orthographic projection work correctly on the
 device, but are 1/2 the size on the emulator.  I've checked and
 rechecked the code 100 times and I'm positive I've done it right but
 am confused as to why I'm seeing that result.

 I suppose I could go forward doing ALL testing on a device - and I may
 have to, seeing that the emulator's frame rate is horribly slow - but
 I was hoping that I could do some of the work on it at least.

 Do you guys do all your opengl on a G1 or do you actually try to use
 the emulator for any of it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Bad OpenGL Emulation?

2009-08-20 Thread Dmitry.Skiba

No, sorry, draw_texture is not working in emulator (and I didn't
checked why or how to avoid it).


Dmitry

On 20 авг, 21:37, Dmitry.Skiba dmitry.sk...@gmail.com wrote:
 Hmm, it works for me, both with textured quad (VBO and not) and with
 draw_texture extension.

 Dmitry

 On 20 авг, 10:58, Robert Green rbgrn@gmail.com wrote:

  What's everyone's experience with this?

  I'm developing a new game and have been having inconsistencies between
  the device and emulator.  The biggest one for me right now is that the
  elements I draw with an orthographic projection work correctly on the
  device, but are 1/2 the size on the emulator.  I've checked and
  rechecked the code 100 times and I'm positive I've done it right but
  am confused as to why I'm seeing that result.

  I suppose I could go forward doing ALL testing on a device - and I may
  have to, seeing that the emulator's frame rate is horribly slow - but
  I was hoping that I could do some of the work on it at least.

  Do you guys do all your opengl on a G1 or do you actually try to use
  the emulator for any of it?


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



[android-developers] How can I find my GPS location with GPS sensor

2009-08-20 Thread DaminouU

Hi,

I am currently working with a HTC G1 and I am trying to retrieve my
GPS position. But I can not understand very well the documentation. I
wrote those lines, but they didn't work.

LocationManager mgr = (LocationManager) this.getSystemService
(Context.LOCATION_SERVICE);
GPSSensor gps = new GPSSensor(mgr);
String provider = ;
provider = mgr.getBestProvider(new Criteria(), true);
try {
Location loc = mgr.getLastKnownLocation(provider);
tv.append( Location:  + loc.toString() +  
\n);
}
catch(Exception e) {
tv.append(provider == null);
}


[tv is a TextView object]
It already write provider == null so I guess that
mgr.getBestProvider(new Criteria(), true); returns null.

Could you explain to me what I need to do?
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: AndroidAPI App

2009-08-20 Thread Steve Oliver
That did the trick!  thanks.  That's a nice fix to get the db onto the sd
card.  The search is really fast.  This is nice!

On Thu, Aug 20, 2009 at 3:49 AM, Andrei gml...@gmail.com wrote:


 Thanks Steve.
 I fixed the bug.
 Please uninstall old app and install fresh one

 On Aug 19, 6:51 pm, Steve steveoliv...@gmail.com wrote:
  no luck, it only gives me the option to download to the sd card, and
  when I pick that, it bombs out, here's the log dump --
 
  I/ActivityManager(   61): Displayed activity
  com.andreig.droidoc/.JavaAPIActivity: 27788 ms
  I/installd(   39): free_cache(7838100) avail 4800512
  D/(13758): unable to unlink '/data/data/com.andreig.droidoc/
  shared_prefs/my_preferences.xml.bak': No such file or directory
  (errno=2)
  E/SqliteUtil(13758): java.io.FileNotFoundException: /data/.droidoc.db
  E/Database(13758): sqlite3_open_v2(/data/.droidoc.db, handle, 1,
  NULL) failed
  D/AndroidRuntime(13758): Shutting down VM
  W/dalvikvm(13758): threadid=3: thread exiting with uncaught exception
  (group=0x4000fe70)
  E/AndroidRuntime(13758): Uncaught handler: thread main exiting due to
  uncaught exception
  I/ActivityManager(   61): Process com.android.voicedialer (pid 13716)
  has died.
  E/AndroidRuntime(13758): java.lang.NullPointerException
  E/AndroidRuntime(13758): at com.andreig.droidoc.SqliteUtil.get_packages
  (SqliteUtil.java:118)
  E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
  $1.onPostExecute(JavaAPIActivity.java:182)
  E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
  $1.onPostExecute(JavaAPIActivity.java:179)
  E/AndroidRuntime(13758): at android.os.AsyncTask.finish(AsyncTask.java:
  416)
  E/AndroidRuntime(13758): at android.os.AsyncTask.access$300
  (AsyncTask.java:127)
  E/AndroidRuntime(13758): at android.os.AsyncTask
  $InternalHandler.handleMessage(AsyncTask.java:428)
  E/AndroidRuntime(13758): at android.os.Handler.dispatchMessage
  (Handler.java:99)
  E/AndroidRuntime(13758): at android.os.Looper.loop(Looper.java:123)
  E/AndroidRuntime(13758): at android.app.ActivityThread.main
  (ActivityThread.java:3948)
  E/AndroidRuntime(13758): at java.lang.reflect.Method.invokeNative
  (Native Method)
  E/AndroidRuntime(13758): at java.lang.reflect.Method.invoke
  (Method.java:521)
  E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit
  $MethodAndArgsCaller.run(ZygoteInit.java:782)
  E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit.main
  (ZygoteInit.java:540)
  E/AndroidRuntime(13758): at dalvik.system.NativeStart.main(Native
  Method)
 
  On Aug 18, 8:07 pm,Andreigml...@gmail.com wrote:
 
 
 
   I made it searchable now
   App renamed to DroiDoc, so search for DroiDoc in Market
   The size is 3.7Mb if you install db to sdcard
   Please send me email if you find bug
   Thanks
 
   On Aug 14, 2:34 pm,Andreigml...@gmail.com wrote:
 
I wrote my first Hello World App for Android:AndroidAPI
 
It should be useful for Android developers
 
Actually it provides full Android Java API on your Android phone and
does not require connection
 
Search forAndroidAPIin Market
 


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

2009-08-20 Thread Hong

I'm seeing the same out of memory problem.
It's consistent on my G1 in a few tries.

Basically I used the built-in intent to get the photo on my sdcard,
and set it as the app's background:
Drawable d = Drawable.createFromPath(filename);
mainBg.setBackgroundDrawable(d);

The filename is what passed back from the photo picker in onActivityResult().

Doing this a few times will cause out of memory exception,
reproducible 100% of the time.
If the VM is to *eventually* free up the bitmap object memory, I
suspect it's not doing its job well.

I will give the recyle() a try now, and see if there's any improvement.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

Hi,

I want to find the screen coordinates (X,Y) where a point represented
by a latitude/longitude value would appear on the screen if you
pointed your phone at it (much in the same way as Wikitude does).

Here is my code from my onSensorChanged() method:

public void onSensorChanged(SensorEvent event) {
Sensor sensor = event.sensor;
int type = sensor.getType();

switch (type) {
case Sensor.TYPE_MAGNETIC_FIELD:
mags = event.values.clone();
isReady = true;
break;
case Sensor.TYPE_ACCELEROMETER:
accels = event.values.clone();
break;
case Sensor.TYPE_ORIENTATION:
orients = event.values.clone();
break;
}

if (mags != null  accels != null  isReady) {
isReady = false;

SensorManager.getRotationMatrix(R, I, accels, mags);
SensorManager.remapCoordinateSystem(R,
SensorManager.AXIS_X, SensorManager.AXIS_Z, outR);
SensorManager.getOrientation(outR, values);

azimuth = convert.radToDeg(values[0]);
pitch= convert.radToDeg(values[1]);
roll = convert.radToDeg(values[2]);

}
}

I convert the points I wish to project from their lat/lon spherical
coordinates to Cartesian coordinates and perform a perspective
projection using the roll, pitch and azimuth values returned by the
sensor, however, I can never seem to get accurate screen coordinates
of the points.

The matrices for roll, pitch and azimuth I use are:

// pan
double[][] azimuthMat = {
{Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
{Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
{0, 0, 1},
};
// tilt
double[][] pitchMat = {
{Math.cos(pitchValue), 0, Math.sin(pitchValue)},
{0, 1, 0},
{-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
};
// roll
double[][] rollMat = {
{1, 0, 0},
{0, Math.cos(rollValue), -Math.sin(rollValue)},
{0, Math.sin(rollValue), Math.cos(rollValue)},
};

I also perform the necessary translation of the projection cener and
the point to project e.g:

// Translate the point
subtract(pointToProject, projectionCenter);
... where 'pointToProject' and 'projectionCenter' are double arrays
holding the Cartesian coordinates of each location (i.e. camera lat/
lon and the point to project lat/lon)

I realise this is quite a complicated question to ask and I haven't
provided all my projection code etc, however if someone feels they can
help me out and may know how to achieve what i'm after - i'll post the
whole code.

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: ListView onListItemClick to Create a Context Menu?

2009-08-20 Thread Nivek

If you use a ListActivity, try calling getListView().showContextMenu()
in your onListItemClick() implementation.

Nivek

On 20 août, 16:49, Mark Hansen stonedon...@gmail.com wrote:
 This maybe against the way the Android team wants this to work, but if
 not I can't seem to come up with a way to do this.

 Basically I have a list view that I want to create a ContextMenu when
 onListItemClick received.  So when the user clicks on a list item I
 want them to choose the action from a ContextMenu.

 Anyone have an example of how to do this, I can get it to work with no
 problems with a long press, but my users are missing the menu and just
 thinking the ListView does nothing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: easiest way to set an ImageButton background to be transparent

2009-08-20 Thread Streets Of Boston

Thanks, i did not know about the @null.

On Aug 19, 8:47 pm, Dianne Hackborn hack...@android.com wrote:
 You should be able to just set the color directly as
 android:background=#.  But @null is the most efficient.

 On Wed, Aug 19, 2009 at 2:49 PM, Streets Of Boston
 flyingdutc...@gmail.comwrote:







  Set the background-color to a transparent color (i.e. its alpha-
  component is 0).

  I'm not sure about the syntax, it may be totally incorrect, but you'll
  get the idea :-) :
  in colors.xml
  color name=transparent#/color

  and in your layout-xml, set the background to transparent:
  android:background=@color/transparet

  On Aug 19, 4:49 pm, phil phil.pellouch...@gmail.com wrote:
   i want to be able to specify an android:src, but I want
   android:background= - complaints that string types are not allowed
   when compiling.

   I basically want a button without any background (but that *does* have
   a 'src').

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

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- 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: out of memory error getWallpaper

2009-08-20 Thread Hong

Here's the crash log file in case you are interested:

08-20 10:08:00.700: INFO/ActivityManager(18682): Displayed activity
com.android.camera/.ImageGallery2: 1137 ms
08-20 10:08:01.220: VERBOSE/ImageGallery2(20461): /ImageBlockManager.onPause
08-20 10:08:01.280: DEBUG/Main(20546): /sdcard/dcim/Camera/2009-07-27
19.18.31.jpg
08-20 10:08:01.300: ERROR/dalvikvm-heap(20546): 6291456-byte external
allocation too large for this process.
08-20 10:08:01.300: ERROR/(20546): VM won't let us allocate 6291456 bytes
08-20 10:08:01.300: DEBUG/AndroidRuntime(20546): Shutting down VM
08-20 10:08:01.300: WARN/dalvikvm(20546): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-20 10:08:01.300: ERROR/AndroidRuntime(20546): Uncaught handler:
thread main exiting due to uncaught exception
08-20 10:08:01.310: ERROR/AndroidRuntime(20546):
java.lang.OutOfMemoryError: bitmap size exceeds VM budget

The picture is something I took with G1 camera, nothing special.

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

2009-08-20 Thread Hong

@Nivek

THANK YOU the recycle() call works GREAT!
((BitmapDrawable)d).getBitmap().recycle();

I went through 10~15 photos w/o crashing!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Looking for sample of video capture with preview

2009-08-20 Thread sreeram

Hi,

Can anyone share or point me to working example of video capture
with preview?

Thanks

Sreeram

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



[android-developers] Re: how to disable auto-rotation feature

2009-08-20 Thread Mark Murphy

Harishkumar V wrote:
 I have a apk file, where i dont have the source for it.
 
 When i run the apk, it automatically rotates the screen,
 
 /WindowManager(  879): Setting rotation to 1, animFlags=0
 I/WindowManager(  879): Config changed: { scale=1.0 imsi=0/0
 locale=en_US touch=1 key=2/1/2 nav=3 orien=1 }
 
 then after closing the application or coming out from the application,
 
 I/WindowManager(  879): Setting rotation to 0, animFlags=0
 I/WindowManager(  879): Config changed: { scale=1.0 imsi=0/0
 locale=en_US touch=1 key=2/1/2 nav=3 orien=2 }
 
 how to disable the rotation.

Step #1: Get the source for the APK. If you can't do that, you cannot
modify the APK's behavior.

Step #2: Modify the manifest to add android:screenOrientation attributes
to each activity element for which you wish to change the rotation rules:

http://developer.android.com/guide/topics/manifest/activity-element.html

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

_Android Programming Tutorials_ Version 1.0 In Print!

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

2009-08-20 Thread Nivek

It's a good idea, a few things could make it a real good tool :
- links to inherited fields and methods
- a direct display of inherited classes and implemented interfaces
- links to classes or methods which are given in reference in class/
methods/fields descriptions

Thanks for the app !

Nivek

On 20 août, 15:44, Steve Oliver steveoliv...@gmail.com wrote:
 That did the trick!  thanks.  That's a nice fix to get the db onto the sd
 card.  The search is really fast.  This is nice!

 On Thu, Aug 20, 2009 at 3:49 AM, Andrei gml...@gmail.com wrote:

  Thanks Steve.
  I fixed the bug.
  Please uninstall old app and install fresh one

  On Aug 19, 6:51 pm, Steve steveoliv...@gmail.com wrote:
   no luck, it only gives me the option to download to the sd card, and
   when I pick that, it bombs out, here's the log dump --

   I/ActivityManager(   61): Displayed activity
   com.andreig.droidoc/.JavaAPIActivity: 27788 ms
   I/installd(   39): free_cache(7838100) avail 4800512
   D/        (13758): unable to unlink '/data/data/com.andreig.droidoc/
   shared_prefs/my_preferences.xml.bak': No such file or directory
   (errno=2)
   E/SqliteUtil(13758): java.io.FileNotFoundException: /data/.droidoc.db
   E/Database(13758): sqlite3_open_v2(/data/.droidoc.db, handle, 1,
   NULL) failed
   D/AndroidRuntime(13758): Shutting down VM
   W/dalvikvm(13758): threadid=3: thread exiting with uncaught exception
   (group=0x4000fe70)
   E/AndroidRuntime(13758): Uncaught handler: thread main exiting due to
   uncaught exception
   I/ActivityManager(   61): Process com.android.voicedialer (pid 13716)
   has died.
   E/AndroidRuntime(13758): java.lang.NullPointerException
   E/AndroidRuntime(13758): at com.andreig.droidoc.SqliteUtil.get_packages
   (SqliteUtil.java:118)
   E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
   $1.onPostExecute(JavaAPIActivity.java:182)
   E/AndroidRuntime(13758): at com.andreig.droidoc.JavaAPIActivity
   $1.onPostExecute(JavaAPIActivity.java:179)
   E/AndroidRuntime(13758): at android.os.AsyncTask.finish(AsyncTask.java:
   416)
   E/AndroidRuntime(13758): at android.os.AsyncTask.access$300
   (AsyncTask.java:127)
   E/AndroidRuntime(13758): at android.os.AsyncTask
   $InternalHandler.handleMessage(AsyncTask.java:428)
   E/AndroidRuntime(13758): at android.os.Handler.dispatchMessage
   (Handler.java:99)
   E/AndroidRuntime(13758): at android.os.Looper.loop(Looper.java:123)
   E/AndroidRuntime(13758): at android.app.ActivityThread.main
   (ActivityThread.java:3948)
   E/AndroidRuntime(13758): at java.lang.reflect.Method.invokeNative
   (Native Method)
   E/AndroidRuntime(13758): at java.lang.reflect.Method.invoke
   (Method.java:521)
   E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit
   $MethodAndArgsCaller.run(ZygoteInit.java:782)
   E/AndroidRuntime(13758): at com.android.internal.os.ZygoteInit.main
   (ZygoteInit.java:540)
   E/AndroidRuntime(13758): at dalvik.system.NativeStart.main(Native
   Method)

   On Aug 18, 8:07 pm,Andreigml...@gmail.com wrote:

I made it searchable now
App renamed to DroiDoc, so search for DroiDoc in Market
The size is 3.7Mb if you install db to sdcard
Please send me email if you find bug
Thanks

On Aug 14, 2:34 pm,Andreigml...@gmail.com wrote:

 I wrote my first Hello World App for Android:AndroidAPI

 It should be useful for Android developers

 Actually it provides full Android Java API on your Android phone and
 does not require connection

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



[android-developers] How can I find my GPS location with GPS sensor

2009-08-20 Thread DaminouU

Hi,

I am currently working with a HTC G1 and I am trying to retrieve my
GPS position. But I can not understand very well the documentation. I
wrote those lines, but they didn't work.

LocationManager mgr = (LocationManager) this.getSystemService
(Context.LOCATION_SERVICE);
GPSSensor gps = new GPSSensor(mgr);
String provider = ;
provider = mgr.getBestProvider(new Criteria(), true);
try {
Location loc = mgr.getLastKnownLocation(provider);
tv.append( Location:  + loc.toString() +  
\n);
}
catch(Exception e) {
tv.append(provider == null);
}


[tv is a TextView object]
It already write provider == null so I guess that
mgr.getBestProvider(new Criteria(), true); returns null.

Could you explain to me what I need to do?
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: Looking for sample of video capture with preview

2009-08-20 Thread Jack Ha

Check out the following link:

   http://www.anddev.org/viewtopic.php?p=24723#24723

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.


On Aug 20, 7:30 am, sreeram sdu...@gmail.com wrote:
 Hi,

 Can anyone share or point me to working example of video capture
 with preview?

 Thanks

 Sreeram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Play audio over an active phone call, so other end can hear it

2009-08-20 Thread tcp

jsdf -

Did you find an answer to this question somewhere?

It is related to one of my own which is, can I write my own phone app?

It would seem odd if there was no _possible_ programmatic interface to
the audio streams (which would also preclude what I'm trying to do)
because, even if the audio codecs are on the CPU (which I believe is
the case in G1/ADP-land) somehow those data need to get to/from
speakers/mics which are programmatically accessible.

I'm poking around in com.android.internal.telephony for my stuff and
will be trying some tests in the coming week or so.  I'll post
anything of interest here.

All comments are welcome.

Thanks,
- tcp


On Aug 8, 7:45 am, jsdf jasons...@gmail.com wrote:
 Marco,
 Just to clarify,
 The sticking points could be:
 1.) hardware design doesn't support it
 2.) framework software that integrates Android onto specific phones
 doesn't allow it
 3.) Android doesn't support it

 I definitely see #3 as true.  Does your comment below indicate #1, #2,
 or both #1 and #2 are true?
 Thanks for the help,
 jsdf

 On Aug 7, 1:24 pm, Marco Nelissen marc...@android.com wrote:

  The hardware doesn't support it. The closest you can get is by playing
  it over the speaker at full volume, so the microphone will pick it up.

  On Fri, Aug 7, 2009 at 9:26 AM,jsdfjasons...@gmail.com wrote:

   Hi everyone,

   Is it possible to playaudioover an activephonecall, so the other
   end can hear it?

   For example:
   A and B are talking on thephone.
   A presses a button that pullsaudiofrom a resource and plays it over
   thephonecallto B.

   If so, what libraries should I look into?

   If not, is this something that could become accessible on rooted
   phones? (Of course, only other rooted phones would be able to use the
   application then...)

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



[android-developers] custom progress bar

2009-08-20 Thread phil

i want to draw a custom progress, and I googled around and came up
with this --

in res/drawable, I have the following xml

?xml version=1.0 encoding=UTF-8?
layer-list xmlns:android=http://schemas.android.com/apk/res/
android
 item android:id=@+android:id/background
   android:drawable=@drawable/progress_background/
 item android:id=@+android:id/SecondaryProgress
   android:drawable=@drawable/progress_background/
 item android:id=@+android:id/progress
   android:drawable=@drawable/progress/
/layer-list

then to use it, in my main xml, I have --

ProgressBar android:id=@+id/ProgressBar
 style=?android:attr/progressBarStyleHorizontal
 android:progressDrawable=@drawable/progress_bar
 android:layout_width=fill_parent
 android:secondaryProgress=100
 android:progress=50
 android:max=100
 android:layout_height=wrap_content/

My question is, what should progress_background.png and
progress.png look like in terms of dimensions?

Do they need to have the same height?  Same width?  How does it draw
the progress at an arbitrary percentage?

tia.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ParseException: At line 1, column 0: not well-formed (invalid token)

2009-08-20 Thread zeeshan

Hi Dear,

i am totally lost in this error:

org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column
0: not well-formed (invalid token)

i have spent the whole day trying to figure out why i am getting this
error but not seems to have any luck

here is the faulty code android doesn't like

Xml.parse(is, Xml.findEncodingByName(UTF-8), handler);



as far as i know, nothing wrong in the xml below in my sdcard.

?xml version=1.0 encoding=utf-8?
download
 file id=page1/
 file id=page2/
 file id=page3/
/download




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



[android-developers] Re: ListView onListItemClick to Create a Context Menu?

2009-08-20 Thread stonedonkey

Actually I needed to use the view to launch it.. so this worked fine..
thanks for the tip!


protected void onListItemClick(ListView l, View v, int position, long
id) {
super.onListItemClick(l, v, position, id);
v.showContextMenu();
}

On Aug 20, 11:01 am, Nivek kevin.gau...@gmail.com wrote:
 If you use a ListActivity, try calling getListView().showContextMenu()
 in your onListItemClick() implementation.

 Nivek

 On 20 août, 16:49, Mark Hansen stonedon...@gmail.com wrote:

  This maybe against the way the Android team wants this to work, but if
  not I can't seem to come up with a way to do this.

  Basically I have a list view that I want to create a ContextMenu when
  onListItemClick received.  So when the user clicks on a list item I
  want them to choose the action from a ContextMenu.

  Anyone have an example of how to do this, I can get it to work with no
  problems with a long press, but my users are missing the menu and just
  thinking the ListView does nothing.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread Peli

 however, I can never seem to get accurate screen coordinates
 of the points.

Could you specify what exactly your problem is?
Does it not work *at all*, or does it work basically, but points are
off by a few degrees? Or does it only work in one orientation of the
device (like in landscape mode), and fails in other orientations?

Peli
www.openintents.org
http://code.google.com/p/openintents/wiki/SensorSimulator

On Aug 20, 4:55 pm, mscwd01 mscw...@gmail.com wrote:
 Hi,

 I want to find the screen coordinates (X,Y) where a point represented
 by a latitude/longitude value would appear on the screen if you
 pointed your phone at it (much in the same way as Wikitude does).

 Here is my code from my onSensorChanged() method:

 public void onSensorChanged(SensorEvent event) {
         Sensor sensor = event.sensor;
         int type = sensor.getType();

         switch (type) {
                 case Sensor.TYPE_MAGNETIC_FIELD:
                         mags = event.values.clone();
                         isReady = true;
                     break;
                 case Sensor.TYPE_ACCELEROMETER:
                     accels = event.values.clone();
                     break;
                 case Sensor.TYPE_ORIENTATION:
                     orients = event.values.clone();
                     break;
             }

             if (mags != null  accels != null  isReady) {
                 isReady = false;

                     SensorManager.getRotationMatrix(R, I, accels, mags);
                     SensorManager.remapCoordinateSystem(R,
 SensorManager.AXIS_X, SensorManager.AXIS_Z, outR);
                     SensorManager.getOrientation(outR, values);

                     azimuth = convert.radToDeg(values[0]);
                     pitch= convert.radToDeg(values[1]);
                     roll = convert.radToDeg(values[2]);

             }

 }

 I convert the points I wish to project from their lat/lon spherical
 coordinates to Cartesian coordinates and perform a perspective
 projection using the roll, pitch and azimuth values returned by the
 sensor, however, I can never seem to get accurate screen coordinates
 of the points.

 The matrices for roll, pitch and azimuth I use are:

 // pan
 double[][] azimuthMat = {
                 {Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
                 {Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
                 {0, 0, 1},};

 // tilt
 double[][] pitchMat = {
                 {Math.cos(pitchValue), 0, Math.sin(pitchValue)},
                 {0, 1, 0},
                 {-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
         };
 // roll
 double[][] rollMat = {
                 {1, 0, 0},
                 {0, Math.cos(rollValue), -Math.sin(rollValue)},
                 {0, Math.sin(rollValue), Math.cos(rollValue)},
         };

 I also perform the necessary translation of the projection cener and
 the point to project e.g:

 // Translate the point
 subtract(pointToProject, projectionCenter);
 ... where 'pointToProject' and 'projectionCenter' are double arrays
 holding the Cartesian coordinates of each location (i.e. camera lat/
 lon and the point to project lat/lon)

 I realise this is quite a complicated question to ask and I haven't
 provided all my projection code etc, however if someone feels they can
 help me out and may know how to achieve what i'm after - i'll post the
 whole code.

 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: Select a specific InputMethod by program

2009-08-20 Thread tansaku

I found a way:

InputMethodManager inputManager = (InputMethodManager) getSystemService
(this.INPUT_METHOD_SERVICE);
ListInputMethodInfo inputMethodInfoList = inputManager
.getEnabledInputMethodList();
for (InputMethodInfo i : inputMethodInfoList) {
Log.d(INPUT-DEBUG, i.getServiceName());
Log.d(INPUT-DEBUG, i.getPackageName());
Log.d(INPUT-DEBUG, i.getSettingsActivity());
}
On Aug 14, 10:30 am, tansaku tans...@gmail.com wrote:
 Is there any way to get a list of keyboards available?

 Many thanks in advance
 CHEERS SAM

 On Jul 13, 7:09 am, Dianne Hackborn hack...@android.com wrote:

  If you just want a custom keyboard, you can use the same keyboard class to
  implement a keyboard within your app.  Currently that is the only thing that
  is really supported.

  On Mon, Jul 13, 2009 at 10:00 AM, condor 25apr1...@gmail.com wrote:

   Hi Dannie thanks for the answer.

   If is not possible to change the IME by program how can I extend the
   standard one to mange number in a custom way?

   Actually, I need a keyboard that show only the 10 digits and the + -
   * / operators for a view that contains multiple EditText where the
   user can only input numbers.

   Regards

   On 13 juil, 18:12, Dianne Hackborn hack...@android.com wrote:
Sorry, the application can't change the global IME.

On Mon, Jul 13, 2009 at 5:41 AM, condor 25apr1...@gmail.com wrote:

 I compiled the example SoftKeyboard in the SDK successfully, but to
 use it, user has to select it as default IME or select it by the
 context menu.
 How to select it by program and use it in an EditText?

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

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

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

  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see and
  answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: media player exception

2009-08-20 Thread riz

when I try to create media Player through Create(Context,Resource_ID)
(rest of the codr remain same)it played the audio of the video file
but still no video . ..my project is stuck . I need to know how to
play video file from resource folder. .

On Aug 20, 8:41 am, riz rizcs...@gmail.com wrote:
 Hi Venky,
 No I have not file the bug yet ,if you want to file the bug then
 please go ahead. most important thing for me right now is how to play
 a resource video file in android ?
 please suggest me alternate solution . I m stuck here ,looking for a
 solution ...please help me .

 Thanks
 Riz

 On Aug 19, 4:39 pm, Venky sgve...@gmail.com wrote:



  Hi Riz

  Did you get a chance to file the bug for crash. This is not specific
  to file I believe. I get the same crash with a different .3gp file
  when prepare is called after create.

  Regds,
  Venky

  On Aug 19, 3:14 pm, riz rizcs...@gmail.com wrote:

   I m trying to play mp4 
   moviehttp://www.mp4mail.com/docs/files/disney_128v_16a.mp4
   .mediaplayer.start() method is onprepaidEventListener() , but still no
   success. please help me

   I m using this code

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

   try {

   /*
 * TODO: Set the path variable to a local media
   file path.
 */
setContentView(R.layout.mediaplayer_2);
   mPreview = (SurfaceView) findViewById(R.id.surface);
   holder = mPreview.getHolder();

   // Create a new media player and set the listeners
   mMediaPlayer = new MediaPlayer() ;

   AssetFileDescriptor afd = getResources().openRawResourceFd
   (R.raw.disney);
mMediaPlayer.setDataSource(afd.getFileDescriptor(),
   afd.getStartOffset(), afd.getLength());
mMediaPlayer.setDisplay(holder);

//   mMediaPlayer.prepare();
   mMediaPlayer.setOnBufferingUpdateListener(this);
   mMediaPlayer.setOnCompletionListener(this);
   mMediaPlayer.setOnPreparedListener(this);
   
   mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);

   } catch (Exception e) {

   Log.e(TAG, error:  + e.getMessage(), e);
   }

   }

   public void onBufferingUpdate(MediaPlayer arg0, int percent) {
   Log.d(TAG, onBufferingUpdate percent: + percent);

   }

   public void onCompletion(MediaPlayer arg0) {
   Log.d(TAG, onCompletion called);

   }

   public void onPrepared(MediaPlayer mediaplayer) {
   try  {
   Log.d(TAG, onPrepared called);
   mVideoWidth = mMediaPlayer.getVideoWidth();
   mVideoHeight = mMediaPlayer.getVideoHeight();
   Log.d(TAG, VideoWidth :+mVideoWidth);
   Log.d(TAG, VideoHeight :+mVideoHeight);
   if (mVideoWidth != 0  mVideoHeight != 0) {
   holder.setFixedSize(mVideoWidth, mVideoHeight);
 mMediaPlayer.start();
   Log.d(TAG, Player Started );
   }
   }
   catch(Exception e) {
   Log.d(TAG, Exception Trace.. +e.getMessage());

   }

   }

   here is the stack trace

   I/ActivityManager(  568): Starting activity: Intent { flags=0x1000
   comp={Hel
   lo.Android/Hello.Android.HellAndroid} }
   D/AndroidRuntime(  712): Shutting down VM
   D/dalvikvm(  712): DestroyJavaVM waiting for non-daemon threads to
   exit
   D/dalvikvm(  712): DestroyJavaVM shutting VM down
   D/dalvikvm(  712): HeapWorker thread shutting down
   D/dalvikvm(  712): HeapWorker thread has shut down
   D/jdwp(  712): JDWP shutting down net...
   D/dalvikvm(  712): VM cleaning up
   I/ActivityManager(  568): Start proc Hello.Android for activity
   Hello.Android/.H
   ellAndroid: pid=718 uid=10019 gids={3003}
   D/dalvikvm(  712): LinearAlloc 0x0 used 637060 of 4194304 (15%)
   I/jdwp(  653): received file descriptor 30 from ADB
   I/jdwp(  662): received file descriptor 25 from ADB
   I/jdwp(  681): received file descriptor 27 from ADB
   I/jdwp(  718): received file descriptor 13 from ADB
   I/ActivityManager(  568): Displayed activity
   Hello.Android/.HellAndroid: 1542 ms

   D/dalvikvm(  633): GC freed 2853 objects / 162352 bytes in 132ms
   D/dalvikvm(  653): GC freed 2852 objects / 175536 bytes in 142ms
   D/dalvikvm(  662): GC freed 1248 objects / 79664 bytes in 117ms
   D/dalvikvm(  611): GC freed 2128 objects / 114400 bytes in 115ms

   On Aug 19, 2:03 pm, 李亮亮 leeco...@hotmail.com wrote:

Hi,

Maybe you didn't post all your code, But I didn't find 
mMediaPlayer.start();

You'd better try some more STANDARD format first like MP4.

Best Regards
LiangLiang Li

 Date: Wed, 19 Aug 2009 01:44:19 -0700
 Subject: [android-developers] Re: media player exception
 

[android-developers] Re: Network connection from my development machine to the emulator - How To?

2009-08-20 Thread Roman ( T-Mobile USA)

Your service won't be reachable using the loopback address from a
client on your desktop. Get familiar with port  forwarding/
redirecting.

http://developer.android.com/guide/developing/tools/emulator.html#portredirection

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Aug 20, 8:02 am, kenpark patrick.seiff...@gmx.net wrote:
 Hi.

 I'm running some service on my android emulator. On android I bound it
 to 127.0.0.1:6100.

 How can I access the service from my development machine? Do I have to
 redirect?

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



[android-developers] ListView onListItemClick to Create a Context Menu?

2009-08-20 Thread Mark Hansen

This maybe against the way the Android team wants this to work, but if
not I can't seem to come up with a way to do this.

Basically I have a list view that I want to create a ContextMenu when
onListItemClick received.  So when the user clicks on a list item I
want them to choose the action from a ContextMenu.

Anyone have an example of how to do this, I can get it to work with no
problems with a long press, but my users are missing the menu and just
thinking the ListView does nothing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Associate app to open email attachments

2009-08-20 Thread brian.schimmel

As kevin.gaudin pointed out in reply to my bug report, it worked for
me because VCard is in the list of allowed Mime Types because it fits
text/*. So there is still no solution for application/*.

On 20 Aug., 17:42, brian.schimmel brian.schim...@googlemail.com
wrote:
 This is very stange... I experienced the same problems that you for
 some days, and now after comlaining and submitting a bug, it suddently
 works without any changes to my code. In my case, I setup a
 IntentFilter for some Mime Types, and opened an attached VCF-File in
 the Email App with the Open Button. It starts my activity in this
 way:

 Starting activity: Intent { action=android.intent.action.VIEW
 data=content://com.android.email.attachmentprovider/f70bd905-0a85-4355-
 a56f-a41ef6e20100.db/222/RAW flags=0x1 comp={com.companyname/
 com.companyname.ActivityName} }

 So everything is fine with the Email app. Even the Mime type is
 somehow getting through (that is, I think so, because how else would
 Android know to delegate this Intent to my app?)

 But I still experience the same problems with the Gmail App. It
 supplies a Preview button and a click starts a download but yields
 The attachment could not ne fetched because this type of file cannot
 be displayed on the phone. Maybe I need to adjust my IntentFilter to
 handle the file:// protocol, I'll try that and report about it.

 On 20 Aug., 17:28, brian.schimmel brian.schim...@googlemail.com
 wrote:

  This is very annoying, so I just submitted a bug/issue 
  athttp://code.google.com/p/android/issues/detail?id=3611

  You can go there and star the issue to get notified on updates.

  I also looked into the source of theEmailapp. It's completely
  incredible how many layers of indirection are involved after clicking
  on the download button (which will not even be visible if the media
  type is not supported) or the preview button. It finally ends up in
  com.android.email.activity.MessageView.Listener.loadAttachmentFinished
  (Account, Message, Part, Object) and if this is NOT a download, then
  this code will be executed (at least I think so, I currently can't
  debug it):

                      Uri uri = AttachmentProvider.getAttachmentUri(
                              mAccount,
                              attachment.part.getAttachmentId());
                      Intent intent = new Intent(Intent.ACTION_VIEW);
                      intent.setData(uri);
                      intent.addFlags
  (Intent.FLAG_GRANT_READ_URI_PERMISSION);
                      startActivity(intent);

  As you can see, there is no intent.setType(), so any IntentFilter that
  filters by type will not receive this intent.

  On 16 Aug., 08:20, Nivek kevin.gau...@gmail.com wrote:

   Any idea about how to get the real name of the attached file ?

   Nivek

   On 10 juil, 19:13, Alexey Krasnoriadtsev ale...@agilefusion.com
   wrote:

You are correct that you should use contentResolver.openInputStream
(uri), to get the data fromgmailattachments.

DefaultEmailapp, is very dumb and is hardcoded to only open audio
and imageattachments.
(disclaimer, that was the case 6 month ago, the last time i looked at
it).

On Jul 8, 10:16 am, Mirko Nasato mirko.nas...@gmail.com wrote:

 Hi all,

 I've written an app that can handle the VIEW action for a given
 mimeType, say application/foo. By adding the following to
 AndroidManifest.xml the Browser automatically uses my app to open
 downloads of that type:

   intent-filter
      action android:name=android.intent.action.VIEW/
      category android:name=android.intent.category.DEFAULT/
      data android:mimeType=application/foo/
   /intent-filter

 TheGMailapp also tries to use my app to Previewattachmentsof that
 type, but it's passing a URI with scheme gmail-ls:// rather than a
 file:// URI. I guess I need to use a ContentProvider to get the
 attachment data, I haven't looked into that yet.

 But the real mystery is theEmailapp... there just doesn't seem any
 way to make it open theattachments.

 Any pointers? Openingattachmentsis a very common requirement of
 course, and I would expect the Android platform to encourage
 developers to write apps to handle more mime types. Instead I couldn't
 find any answers:

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

 Thanks

 Mirko


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Upgrading from SDK 1.1 to 1.5 - map API key not valid?

2009-08-20 Thread olko

It seems there are no errors:

I/System.out( 6814): waiting for debugger to settle...

I/System.out( 6814): debugger has settled (1426)

I/ActivityManager(   57): Starting activity: Intent { comp=
{atm.locator.nl/atm.locator.nl.Tos} }

I/CheckinService(   57): From server: Intent
{ action=android.server.checkin.FOTA_CANCEL }

D/( 6814): unable to unlink '/data/data/atm.locator.nl/
shared_prefs/preferences.xml.bak': No such file or directory (errno=2)

I/ActivityManager(   57): Starting activity: Intent { comp=
{atm.locator.nl/atm.locator.nl.AtmList} }

D/SensorManager( 6814): found sensor: AK8976A 3-axis Accelerometer,
handle=0

D/SensorManager( 6814): found sensor: AK8976A 3-axis Magnetic field
sensor, handle=1

D/SensorManager( 6814): found sensor: AK8976A Orientation sensor,
handle=2

D/SensorManager( 6814): found sensor: AK8976A Temperature sensor,
handle=3

D/LocationManager( 6814): Constructor: service =
android.location.ilocationmanager$stub$pr...@4319d0d8

D/LocationManager( 6814): getAllProviders

D/Sensors (   57): sensors=0005, real=0005

D/GpsLocationProvider(   57): setMinTime 6

I/ActivityManager(   57): Displayed activity atm.locator.nl/.AtmList:
2081 ms

D/GpsLocationProvider(   57): TTFF: 2195

I/NotificationService(   57): enqueueToast pkg=atm.locator.nl
callback=android.app.itransientnotification$stub$pr...@4318
duration=0

D/InetAddress(   57): www.google.com: 209.85.229.104 (family 2, proto
6)

D/InetAddress(   57): www.google.com: 209.85.229.103 (family 2, proto
6)

D/InetAddress(   57): www.google.com: 209.85.229.147 (family 2, proto
6)

D/InetAddress(   57): www.google.com: 209.85.229.106 (family 2, proto
6)

D/InetAddress(   57): www.google.com: 209.85.229.99 (family 2, proto
6)

D/InetAddress(   57): www.google.com: 209.85.229.105 (family 2, proto
6)

D/dalvikvm( 6814): GC freed 3444 objects / 234736 bytes in 150ms

D/InetAddress( 6814): maps.ing.nl: 87.233.69.9 (family 2, proto 6)

E/atm.locator.nl.locationserv...@431b3748( 6814): java.io.IOException:
Unable to parse response from server

D/LocationMasfClient(   57): getAddressFromProtoBuf(): Ignore feature
9,48-56

D/LocationMasfClient(   57): getAddressFromProtoBuf(): Ignore feature
6,Afferden

I/ActivityManager(   57): Starting activity: Intent { comp=
{atm.locator.nl/atm.locator.nl.AtmMap} (has extras) }

D/Sensors (   57): sensors=0001, real=0001

D/dalvikvm( 6814): GC freed 7963 objects / 442352 bytes in 151ms

D/LocationManager( 6814): removeUpdates: listener =
atm.locator.nl.atmmap$mymylocationover...@431ab600

D/GpsLocationProvider(   57): setMinTime 0

I/Maps.MyLocationOverlay( 6814): Request updates from gps

I/MapActivity( 6814): Handling network change notification:CONNECTED

E/MapActivity( 6814): Couldn't get connection factory client

D/dalvikvm( 6814): GC freed 5349 objects / 277864 bytes in 162ms

I/ActivityManager(   57): Displayed activity atm.locator.nl/.AtmMap:
9287 ms

I/Maps.MyLocationOverlay( 6814): Running deferred on first fix:
atm.locator.nl.atmma...@4321b550

W/ActivityManager(   57): Launch timeout has expired, giving up wake
lock!

D/dalvikvm( 6814): GC freed 8435 objects / 590008 bytes in 222ms

W/ActivityManager(   57): Activity idle timeout for HistoryRecord
{432e23a0 {atm.locator.nl/atm.locator.nl.AtmMap}}

D/InetAddress( 6814): www.google.com: 209.85.229.104 (family 2, proto
6)

D/InetAddress( 6814): www.google.com: 209.85.229.103 (family 2, proto
6)

D/InetAddress( 6814): www.google.com: 209.85.229.147 (family 2, proto
6)

D/InetAddress( 6814): www.google.com: 209.85.229.106 (family 2, proto
6)

D/InetAddress( 6814): www.google.com: 209.85.229.99 (family 2, proto
6)

D/InetAddress( 6814): www.google.com: 209.85.229.105 (family 2, proto
6)

D/dalvikvm( 6529): GC freed 816 objects / 53800 bytes in 297ms

D/dalvikvm( 6814): GC freed 8410 objects / 498792 bytes in 173ms

D/dalvikvm(  124): GC freed 1224 objects / 70592 bytes in 447ms

D/dalvikvm( 6814): GC freed 8983 objects / 499128 bytes in 168ms

D/dalvikvm(  146): GC freed 29 objects / 1040 bytes in 282ms

D/dalvikvm( 6814): GC freed 9083 objects / 552856 bytes in 183ms

D/LocationMasfClient(   57): getAddressFromProtoBuf(): Ignore feature
9,48-56

D/LocationMasfClient(   57): getAddressFromProtoBuf(): Ignore feature
6,Afferden

D/dalvikvm( 6814): GC freed 9000 objects / 523760 bytes in 232ms

D/dalvikvm( 6814): GC freed 9410 objects / 520808 bytes in 179ms

D/Sensors (   57): sensors=, real=

D/AKMD(   39): Compass CLOSE

W/LocationManagerService(   57): acquireWakeLock(): Unable to get WiFi
lock

D/SurfaceFlinger(   57): About to give-up screen, flinger = 0x16a550

D/LocationManager( 6814): removeUpdates: listener =
atm.locator.nl.atmmap$mymylocationover...@431ab600

D/GpsLocationProvider(   57): setMinTime 6

W/ActivityManager(   57): Activity pause timeout for HistoryRecord
{432e23a0 {atm.locator.nl/atm.locator.nl.AtmMap}}

D/GpsLocationProvider(   57): TTFF: 78798

D/dalvikvm( 

[android-developers] Re: Architecture dilema

2009-08-20 Thread Yusuf Saib (T-Mobile USA)

Generally speaking, using views instead of activities saves memory but
requires more development time. I recommend you first make three
activities and a menu, and then optimize for memory/speed/etc as
needed.


Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Aug 20, 7:30 am, Dmitry.Skiba dmitry.sk...@gmail.com wrote:
 You can also use full screen non-transparent dialogs. They look like
 activities, but are simpler to handle. For example for Settings
 screen of a game I would (and in fact, do) go with dialogs.

 Dmitry

 On 20 авг, 13:40, loctarar andrei.bu...@gmail.com wrote:



  Hello!

  This may sound a little silly. Let's say I want to build a game with a
  menu, an options screen, a form screen (for the user to insert some
  data) and the game screen. The usual approach would be to have an
  activity for each case (correct me if I'm wrong). What if I do another
  thing... and code four views for each case and swap them using
  setContentView() in the same activity? Suppose that I'll override the
  onSaveInstanceState() to save the state of the views in all the four
  cases.

  What is the disadvantage in this approach besides having a huge
  activity that I'm sure it gets closed every time the system is low in
  memory?

  I haven't tested it yet, but I didn't find anything in the docs that
  could stop this approach to work. The reasons for avoiding the usual
  implementation is that I need to convert an application from J2ME and
  having multiple activities raises some difficulties in the porting
  process.

  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] TextView and not common characters?

2009-08-20 Thread twan

Good afternoon,

I've got a little problem with encoding and displaying a not common
characters. The following word comes from a html page which i
download:

Br#xFC;no

Shows as followed in my browser:

Brüno

I use unescapeHtml ( 
http://commons.apache.org/lang/api/org/apache/commons/lang/StringEscapeUtils.html
) to convert the #xFC; character into something meaning full.

But when i try to display the result on a widget for example a
TextView it shows like:

Br?no

(where the ? is a image of a question mark)

I suspect i'm missing one step. Can anyone give me a helping hand?

Kind regards,
Twan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

The main problem is when I use the values returned by the sensor
manager as is i.e. not modifying them in any way, the points are no
where near where they should be. For example, say the point I wish to
project is due north of my current location and at the same elevation.
I shouldn't need to tilt (pitch) the phone up or down and when I hold
the phone in the direction of north it should appear somewhere near
the center of the phone screen. However, this is not the case, in
reality for the point to appear on the center of the screen I need to
do something like tilt the phone at the ground and orient it in a
easterly direction for example.

I have made a nasty fix which means I subtract 90 from the roll or add
45 degrees to the pitch etc. However while this now projects the point
on the center of the screen it ruins the projections of any other
points (as I have fundamentally altered the sensor values). In my
current implementation a point north of me may work but any points to
the south do not work.

My problem is probably something to do with the coordinates of the
phone differing from my projected coordinates, but making the two
work together is causing me some serious headaches.

I can send you my projection code if it helps, I have really exhausted
all ideas to solve my issue!

Thanks for the reply

On Aug 20, 5:15 pm, Peli peli0...@googlemail.com wrote:
  however, I can never seem to get accurate screen coordinates
  of the points.

 Could you specify what exactly your problem is?
 Does it not work *at all*, or does it work basically, but points are
 off by a few degrees? Or does it only work in one orientation of the
 device (like in landscape mode), and fails in other orientations?

 Peliwww.openintents.orghttp://code.google.com/p/openintents/wiki/SensorSimulator

 On Aug 20, 4:55 pm, mscwd01 mscw...@gmail.com wrote:

  Hi,

  I want to find the screen coordinates (X,Y) where a point represented
  by a latitude/longitude value would appear on the screen if you
  pointed your phone at it (much in the same way as Wikitude does).

  Here is my code from my onSensorChanged() method:

  public void onSensorChanged(SensorEvent event) {
          Sensor sensor = event.sensor;
          int type = sensor.getType();

          switch (type) {
                  case Sensor.TYPE_MAGNETIC_FIELD:
                          mags = event.values.clone();
                          isReady = true;
                      break;
                  case Sensor.TYPE_ACCELEROMETER:
                      accels = event.values.clone();
                      break;
                  case Sensor.TYPE_ORIENTATION:
                      orients = event.values.clone();
                      break;
              }

              if (mags != null  accels != null  isReady) {
                  isReady = false;

                      SensorManager.getRotationMatrix(R, I, accels, mags);
                      SensorManager.remapCoordinateSystem(R,
  SensorManager.AXIS_X, SensorManager.AXIS_Z, outR);
                      SensorManager.getOrientation(outR, values);

                      azimuth = convert.radToDeg(values[0]);
                      pitch= convert.radToDeg(values[1]);
                      roll = convert.radToDeg(values[2]);

              }

  }

  I convert the points I wish to project from their lat/lon spherical
  coordinates to Cartesian coordinates and perform a perspective
  projection using the roll, pitch and azimuth values returned by the
  sensor, however, I can never seem to get accurate screen coordinates
  of the points.

  The matrices for roll, pitch and azimuth I use are:

  // pan
  double[][] azimuthMat = {
                  {Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
                  {Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
                  {0, 0, 1},};

  // tilt
  double[][] pitchMat = {
                  {Math.cos(pitchValue), 0, Math.sin(pitchValue)},
                  {0, 1, 0},
                  {-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
          };
  // roll
  double[][] rollMat = {
                  {1, 0, 0},
                  {0, Math.cos(rollValue), -Math.sin(rollValue)},
                  {0, Math.sin(rollValue), Math.cos(rollValue)},
          };

  I also perform the necessary translation of the projection cener and
  the point to project e.g:

  // Translate the point
  subtract(pointToProject, projectionCenter);
  ... where 'pointToProject' and 'projectionCenter' are double arrays
  holding the Cartesian coordinates of each location (i.e. camera lat/
  lon and the point to project lat/lon)

  I realise this is quite a complicated question to ask and I haven't
  provided all my projection code etc, however if someone feels they can
  help me out and may know how to achieve what i'm after - i'll post the
  whole code.

  Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups 

[android-developers] Re: Using sensors and orientation - lat/lon point to screen coordinates

2009-08-20 Thread mscwd01

I should add I am holding the phone horizontally (as you would when
taking a photo).

As such I modify the sensor values like:

SensorManager.getRotationMatrix(R, I, accels, mags);
SensorManager.remapCoordinateSystem(R,SensorManager.AXIS_X,
SensorManager.AXIS_Z, outR);
SensorManager.getOrientation(outR, values);

I'm assuming thats the correct way to do it.

On Aug 20, 6:00 pm, mscwd01 mscw...@gmail.com wrote:
 The main problem is when I use the values returned by the sensor
 manager as is i.e. not modifying them in any way, the points are no
 where near where they should be. For example, say the point I wish to
 project is due north of my current location and at the same elevation.
 I shouldn't need to tilt (pitch) the phone up or down and when I hold
 the phone in the direction of north it should appear somewhere near
 the center of the phone screen. However, this is not the case, in
 reality for the point to appear on the center of the screen I need to
 do something like tilt the phone at the ground and orient it in a
 easterly direction for example.

 I have made a nasty fix which means I subtract 90 from the roll or add
 45 degrees to the pitch etc. However while this now projects the point
 on the center of the screen it ruins the projections of any other
 points (as I have fundamentally altered the sensor values). In my
 current implementation a point north of me may work but any points to
 the south do not work.

 My problem is probably something to do with the coordinates of the
 phone differing from my projected coordinates, but making the two
 work together is causing me some serious headaches.

 I can send you my projection code if it helps, I have really exhausted
 all ideas to solve my issue!

 Thanks for the reply

 On Aug 20, 5:15 pm, Peli peli0...@googlemail.com wrote:

   however, I can never seem to get accurate screen coordinates
   of the points.

  Could you specify what exactly your problem is?
  Does it not work *at all*, or does it work basically, but points are
  off by a few degrees? Or does it only work in one orientation of the
  device (like in landscape mode), and fails in other orientations?

  Peliwww.openintents.orghttp://code.google.com/p/openintents/wiki/SensorSi...

  On Aug 20, 4:55 pm, mscwd01 mscw...@gmail.com wrote:

   Hi,

   I want to find the screen coordinates (X,Y) where a point represented
   by a latitude/longitude value would appear on the screen if you
   pointed your phone at it (much in the same way as Wikitude does).

   Here is my code from my onSensorChanged() method:

   public void onSensorChanged(SensorEvent event) {
           Sensor sensor = event.sensor;
           int type = sensor.getType();

           switch (type) {
                   case Sensor.TYPE_MAGNETIC_FIELD:
                           mags = event.values.clone();
                           isReady = true;
                       break;
                   case Sensor.TYPE_ACCELEROMETER:
                       accels = event.values.clone();
                       break;
                   case Sensor.TYPE_ORIENTATION:
                       orients = event.values.clone();
                       break;
               }

               if (mags != null  accels != null  isReady) {
                   isReady = false;

                       SensorManager.getRotationMatrix(R, I, accels, mags);
                       SensorManager.remapCoordinateSystem(R,
   SensorManager.AXIS_X, SensorManager.AXIS_Z, outR);
                       SensorManager.getOrientation(outR, values);

                       azimuth = convert.radToDeg(values[0]);
                       pitch= convert.radToDeg(values[1]);
                       roll = convert.radToDeg(values[2]);

               }

   }

   I convert the points I wish to project from their lat/lon spherical
   coordinates to Cartesian coordinates and perform a perspective
   projection using the roll, pitch and azimuth values returned by the
   sensor, however, I can never seem to get accurate screen coordinates
   of the points.

   The matrices for roll, pitch and azimuth I use are:

   // pan
   double[][] azimuthMat = {
                   {Math.cos(azimuthValue), -Math.sin(azimuthValue), 0},
                   {Math.sin(azimuthValue), Math.cos(azimuthValue), 0},
                   {0, 0, 1},};

   // tilt
   double[][] pitchMat = {
                   {Math.cos(pitchValue), 0, Math.sin(pitchValue)},
                   {0, 1, 0},
                   {-Math.sin(pitchValue), 0, Math.cos(pitchValue)},
           };
   // roll
   double[][] rollMat = {
                   {1, 0, 0},
                   {0, Math.cos(rollValue), -Math.sin(rollValue)},
                   {0, Math.sin(rollValue), Math.cos(rollValue)},
           };

   I also perform the necessary translation of the projection cener and
   the point to project e.g:

   // Translate the point
   subtract(pointToProject, projectionCenter);
   ... where 'pointToProject' and 'projectionCenter' 

[android-developers] Re: HVGA T-Mobile G1/G2 vs. iPhone

2009-08-20 Thread Marco Nelissen

Where did you get your information about the iphone displays? Apple
doesn't publish color depth specs for those, while other sites that
have analyzed the hardware show it has an 18-bit display (so 256K
colors).



On Wed, Aug 19, 2009 at 10:31 PM, philphil.pellouch...@gmail.com wrote:

 From what I can gather it appears that both the T-Mobile G1and the
 iPhone have HVGA - 320x480 displays.

 However, one very important difference is that the T-Mobile phones
 only support 64k colors, while the iPhones support 16M colors.

 Can someone confirm that?

 tia.
 


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

2009-08-20 Thread brian.schimmel

This is very annoying, so I just submitted a bug/issue at
http://code.google.com/p/android/issues/detail?id=3611

You can go there and star the issue to get notified on updates.

I also looked into the source of the Email app. It's completely
incredible how many layers of indirection are involved after clicking
on the download button (which will not even be visible if the media
type is not supported) or the preview button. It finally ends up in
com.android.email.activity.MessageView.Listener.loadAttachmentFinished
(Account, Message, Part, Object) and if this is NOT a download, then
this code will be executed (at least I think so, I currently can't
debug it):

Uri uri = AttachmentProvider.getAttachmentUri(
mAccount,
attachment.part.getAttachmentId());
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
intent.addFlags
(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(intent);

As you can see, there is no intent.setType(), so any IntentFilter that
filters by type will not receive this intent.



On 16 Aug., 08:20, Nivek kevin.gau...@gmail.com wrote:
 Any idea about how to get the real name of the attached file ?

 Nivek

 On 10 juil, 19:13, Alexey Krasnoriadtsev ale...@agilefusion.com
 wrote:

  You are correct that you should use contentResolver.openInputStream
  (uri), to get the data fromgmailattachments.

  DefaultEmailapp, is very dumb and is hardcoded to only open audio
  and imageattachments.
  (disclaimer, that was the case 6 month ago, the last time i looked at
  it).

  On Jul 8, 10:16 am, Mirko Nasato mirko.nas...@gmail.com wrote:

   Hi all,

   I've written an app that can handle the VIEW action for a given
   mimeType, say application/foo. By adding the following to
   AndroidManifest.xml the Browser automatically uses my app to open
   downloads of that type:

     intent-filter
        action android:name=android.intent.action.VIEW/
        category android:name=android.intent.category.DEFAULT/
        data android:mimeType=application/foo/
     /intent-filter

   TheGMailapp also tries to use my app to Previewattachmentsof that
   type, but it's passing a URI with scheme gmail-ls:// rather than a
   file:// URI. I guess I need to use a ContentProvider to get the
   attachment data, I haven't looked into that yet.

   But the real mystery is theEmailapp... there just doesn't seem any
   way to make it open theattachments.

   Any pointers? Openingattachmentsis a very common requirement of
   course, and I would expect the Android platform to encourage
   developers to write apps to handle more mime types. Instead I couldn't
   find any answers:

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

   Thanks

   Mirko


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

2009-08-20 Thread brian.schimmel

This is very stange... I experienced the same problems that you for
some days, and now after comlaining and submitting a bug, it suddently
works without any changes to my code. In my case, I setup a
IntentFilter for some Mime Types, and opened an attached VCF-File in
the Email App with the Open Button. It starts my activity in this
way:

Starting activity: Intent { action=android.intent.action.VIEW
data=content://com.android.email.attachmentprovider/f70bd905-0a85-4355-
a56f-a41ef6e20100.db/222/RAW flags=0x1 comp={com.companyname/
com.companyname.ActivityName} }

So everything is fine with the Email app. Even the Mime type is
somehow getting through (that is, I think so, because how else would
Android know to delegate this Intent to my app?)

But I still experience the same problems with the Gmail App. It
supplies a Preview button and a click starts a download but yields
The attachment could not ne fetched because this type of file cannot
be displayed on the phone. Maybe I need to adjust my IntentFilter to
handle the file:// protocol, I'll try that and report about it.


On 20 Aug., 17:28, brian.schimmel brian.schim...@googlemail.com
wrote:
 This is very annoying, so I just submitted a bug/issue 
 athttp://code.google.com/p/android/issues/detail?id=3611

 You can go there and star the issue to get notified on updates.

 I also looked into the source of theEmailapp. It's completely
 incredible how many layers of indirection are involved after clicking
 on the download button (which will not even be visible if the media
 type is not supported) or the preview button. It finally ends up in
 com.android.email.activity.MessageView.Listener.loadAttachmentFinished
 (Account, Message, Part, Object) and if this is NOT a download, then
 this code will be executed (at least I think so, I currently can't
 debug it):

                     Uri uri = AttachmentProvider.getAttachmentUri(
                             mAccount,
                             attachment.part.getAttachmentId());
                     Intent intent = new Intent(Intent.ACTION_VIEW);
                     intent.setData(uri);
                     intent.addFlags
 (Intent.FLAG_GRANT_READ_URI_PERMISSION);
                     startActivity(intent);

 As you can see, there is no intent.setType(), so any IntentFilter that
 filters by type will not receive this intent.

 On 16 Aug., 08:20, Nivek kevin.gau...@gmail.com wrote:

  Any idea about how to get the real name of the attached file ?

  Nivek

  On 10 juil, 19:13, Alexey Krasnoriadtsev ale...@agilefusion.com
  wrote:

   You are correct that you should use contentResolver.openInputStream
   (uri), to get the data fromgmailattachments.

   DefaultEmailapp, is very dumb and is hardcoded to only open audio
   and imageattachments.
   (disclaimer, that was the case 6 month ago, the last time i looked at
   it).

   On Jul 8, 10:16 am, Mirko Nasato mirko.nas...@gmail.com wrote:

Hi all,

I've written an app that can handle the VIEW action for a given
mimeType, say application/foo. By adding the following to
AndroidManifest.xml the Browser automatically uses my app to open
downloads of that type:

  intent-filter
     action android:name=android.intent.action.VIEW/
     category android:name=android.intent.category.DEFAULT/
     data android:mimeType=application/foo/
  /intent-filter

TheGMailapp also tries to use my app to Previewattachmentsof that
type, but it's passing a URI with scheme gmail-ls:// rather than a
file:// URI. I guess I need to use a ContentProvider to get the
attachment data, I haven't looked into that yet.

But the real mystery is theEmailapp... there just doesn't seem any
way to make it open theattachments.

Any pointers? Openingattachmentsis a very common requirement of
course, and I would expect the Android platform to encourage
developers to write apps to handle more mime types. Instead I couldn't
find any answers:

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

Thanks

Mirko


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Network connection from my development machine to the emulator - How To?

2009-08-20 Thread kenpark

Thanks.
I realized that and therefore changed it to 10.0.2.15:6100 and also
did some redirecting (redir add tcp:6100:6100).

But still I have trouble accessing it.
Regards

On 20 Aug., 18:07, Roman ( T-Mobile USA) roman.baumgaert...@t-
mobile.com wrote:
 Your service won't be reachable using the loopback address from a
 client on your desktop. Get familiar with port  forwarding/
 redirecting.

 http://developer.android.com/guide/developing/tools/emulator.html#por...

 --
 Roman Baumgaertner
 Sr. SW Engineer-OSDC
 ·T· · ·Mobile· stick together
 The views, opinions and statements in this email are those of the
 author solely in their individual capacity, and do not necessarily
 represent those of T-Mobile USA, Inc.

 On Aug 20, 8:02 am, kenpark patrick.seiff...@gmx.net wrote:

  Hi.

  I'm running some service on my android emulator. On android I bound it
  to 127.0.0.1:6100.

  How can I access the service from my development machine? Do I have to
  redirect?

  Regards,
  Kenpark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] possible bug in android browser when accessing site with htaccess/htpasswd?

2009-08-20 Thread g1slacker

I have decided to set up my personal, private webserver and to serve
myself files that I do not need to have on my sdcard, yet which I'd
still like to be accessible through my G1 - mainly media files
(ringtones, notifications, some Note Everything backup notes and a
few .apk in case my sdcard dies on me), nothing major really.

Due to privacy issues, I decided to password protect the folder that
had my files in, so I turned to .htaccess + .htpasswd, as I would not
want anyone but me to have access to those files.

And here comes the interesting part:

Android's browser does ask me for the username/password as soon as I
attempt to access that folder through my site, which I can enter and
it'll take me to the folder's content; however, as soon as I try to
download any of those residing files, it labels them as Unknown
and the download appears to be corrupt (filesizes do not match).

This has been tested on 3G/Edge AND Wifi.

Now to assure you that apache and its configuration (httpd.conf) is
not the culprit, my systems at home can all access the files just
fine. And to further analyze the problem, I decided to download Opera
Mini (free off the market) and after going through the same process,
it actually allows me to access my password protected folder AS well
as download the files correctly.

It appears to me that the problem may be a minor bug in android's
browser, but please correct me if I'm wrong.

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



[android-developers] Re: large database file

2009-08-20 Thread rahul meshram
If the size is too large as you mentioned, then its better to keep such file
in SD card, because the other applications may be using the data/data
location for storing application related data into a file system or in to
sqlite data base.

On Fri, Aug 14, 2009 at 7:35 PM, Andrei gml...@gmail.com wrote:


 Is it a problem that i put 17 Mb database to /data/data or should i
 put it to /sdcard?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 use OverlayItem's fields (Title and snippet)?

2009-08-20 Thread kuester2000

Hi,

you can do with it whatever you want. one example would be to
overwrite the OnTap() method of your ItemizedOverlay with:

@Override
protected boolean onTap(int i) {
Toast.makeText(ActivityMap.this,items.get(i).getTitle
(),Toast.LENGTH_SHORT).show();
return(true);
}

On Aug 3, 10:56 am, Tom thomas.coz...@gmail.com wrote:
 Hi,

 I would like to how to useOverlayItem'sfields (Title and snippet)
 'cause they are never displayed on the map?

 Best regards
 Tom

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



[android-developers] Regarding Android supported OpenGL version

2009-08-20 Thread sankara rao majji
Hi Guys,

Can i know currently what vesion of OpenGL is used in Android. I have
applications which uses OpenGL 1.4 and OpenGL ES 1.1 to be built on android.


Thanks in advance !
Sankara Rao

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

2009-08-20 Thread Gabor

Hi All,

Finally, the emma code coverage measurement is working for me (for a
custom project). So here are the steps what you need to make it work
(I have tested it, with Java 1.5 on Ubuntu 8.04):

mkdir android-src
cd android-src
repo init -u git://android.git.kernel.org/platform/manifest.git -b
cupcake
repo sync

# Add emma.jar to the system/core/rootdir/init.rc
sed 's/\/system\/framework\/core.jar:\/system\/framework\/ext.jar:/\/
system\/framework\/core.jar:\/system\/framework\/ext.jar:\/system\/
framework\/emma.jar:/' system/core/rootdir/init.rc  system/core/
rootdir/init.rc.tmp
mv system/core/rootdir/init.rc.tmp system/core/rootdir/init.rc

# Rebuild the boot image
make bootimage

# To build the full system image
make -j4

# Set the PATH:
export PATH=${PATH}:/_path_/android-src/out/host/linux-x86/bin/

# Build the emma jar itself
make emma

# Setting the environment and additional bash commands. (like
m,mm,mmm, choosecombo etc) Notice the space after the dot!
. build/envsetup.sh

# Set EMMA_INSTRUMENTATION to true
export EMMA_INSTRUMENT=true

# Copy your project to development/samples/_projectname_ or
somewhere..:)
# Based on the ApiDemo create an Android.mk file for the project
directory and the project test directory
# The LOCAL_INSTRUMENTATION_FOR value in test dir Android.mk has to be
equal with the LOCAL_PACKAGE_NAME defined in the Android.mk in the
main project dir.
# Compile the Application would like to instrument
mmm development/samples/_projectname_

# Set the ANDROID_PRODUCT_OUT directory for the emulator to know the
image location
export ANDROID_PRODUCT_OUT=/_path_/android-src/out/target/product/
generic

# Start an emulator with a simulated sdcard:
emulator -sdcard path to sdcard

# Remount the drive - it is needed to have a writable drive. without
that sync wont work
adb remount

# Synchronize the local content with the emulator
adb sync

adb shell
# create directory: mkdir /etc/coverageresult

# Executing tests
adb shell am instrument -w -e coverage true -e coverageFile /etc/
coverageresult/coverage.ec hu.agsoftware.sample.tests/
android.test.InstrumentationTestRunner

# Dump a runtime coverage data file:
adb pull /etc/coverageresult/coverage.ec coverage.ec

# Generate a coverage report
java -cp external/emma/lib/emma.jar emma report -r html -in
coverage.ec -sp development/samples/_projectname_/src -in out/target/
common/obj/APPS/_projectname_intermediates/coverage.em

I hope it helps.

Gabor

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



[android-developers] Does OpenGL implementation support GL_AMD_compressed_* extensions?

2009-08-20 Thread ogi.andr...@gmail.com

Does anyone had successfully used ATI compressed textures? I've tried
GL_ATC_RGB_AMD, GL_ATC_RGBA_EXPLICIT_ALPHA_AMD and
GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD with no success. According to
libagl's source these formats are dropped with GL_INVALID_ENUM, but I
may miss something. Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: why glReadPixels return Alpha always -1

2009-08-20 Thread Steven Levis

BaoXu,

There is a conversion that needs to be made when calling glReadPixels
().  OpenGL uses unsigned bytes, and Java uses signed bytes.  To
convert, cast the byte to an int.  If the value is negative, then add
256.

In your particular example, a returned alpha value of -1, cast to an
int, +256, results in a value of 255.  This is full alpha.

Cheers,

Steve

On Aug 2, 8:35 pm, BaoXu Jiang baoxu.ji...@gmail.com wrote:
 Hi,

 it is always return -1 when call Android opengl es apiglReadPixels(),
 it is a bug of Android?

 Thanks,

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



  1   2   >