Re: [android-developers] Problems with new ADT (14) library building

2011-10-24 Thread Marco Alexander Schmitz
Hi, I had the same problem with a library project. In fact I got a dalvic
error 1 so that the toolchain couldnt work so that no R.java was created...

My solution was to add thos line to the .classpath of the library project:



Hope this helps.

Greetings,
Marco
Am 25.10.2011 06:13 schrieb "Jeremy Statz" :

> I have a large set of support classes contained in a library that's
> shared between about 40 projects, and since updating to the newest ADT
> (14) I'm having major problems with any classes involving UI.
>
> In particular these do things like create a color picker when you tap
> on a preference item, or display a dialog with a slider, etc.  The
> code hasn't changed and continues to compile without errors, but when
> I actually run it it seems like none of the UI identifiers are valid.
> I'll get a crash due to a null pointer.
>
> I'm hoping and praying the new .jar file approach hasn't ruined this
> feature, because I have a ton of library work related to this sort of
> thing that's avoiding a massive amount of code duplication.  :(
>
> As an example:
>
> LinearLayout layout =
> (LinearLayout)inflator.inflate( R.layout.preferencecolor_layout,
> null );
>
> TextView main = (TextView)layout.findViewById( R.id.label_main );
> main.setText( getTitle() ); // crash here due to main being invalid
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: Suspended Account - Please Help - Red Alert

2011-10-24 Thread Raghav Sood
BTW, shouting out on this list isn't going to help you out very much. The
people you mentioned aren't on the market team. The market team is a rare
species which has only recently started to make contact with us mere
mortals.

Thanks

On Tue, Oct 25, 2011 at 6:10 AM, Zsolt Vasvari  wrote:

> So you are saying you have hundreds of "apps" that are probably just a
> WebView displaying the content of somebody else's blog.  And you got
> your account suspended for doing that.
>
> I have one word for that:
>
> HORAY
>
>
>
> On Oct 25, 8:18 am, burton miller  wrote:
> > My developer account has been suspended.
> >
> > I create apps for blogs and news sites, and Google took down a handful
> > of them for trademark issues last month.  I am happy to resolve any
> > conflicts or problems, but I can't get in touch with anyone!
> >
> > I have over half a million customers - and a legitimate business
> > model!
> >
> > Please - someone help us.  Dianne, Guy, anybody.  We are willing to
> > change apps, remove them, whatever.  6 or 7 apps out of hundreds were
> > removed.
> >
> > There is no number to call - nobody to talk to.  We replied to the
> > email - and we haven't heard back.  Every hour we are shut down is
> > killing us.
> >
> > We have been building this customer base for six days a week for THREE
> > YEARS.
> >
> > Please help!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Raghav Sood
http://www.androidactivist.org/ - Author
http://www.appaholics.in/ - Founder

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Check whether media player is playing media or not

2011-10-24 Thread Sunil Mishra
Thanks Robert and Mark, the suggestion given by Robert is working
fine!!

On Oct 25, 10:36 am, Mark Murphy  wrote:
> On Tue, Oct 25, 2011 at 1:27 AM, Sunil Mishra  wrote:
> > I want to check whether inbuilt media player is active and playing
> > media or not. Any sample code for that?
>
> First, this is a list for development with the Android SDK.
> MediaPlayer is a class in the Android SDK. Referring to other things
> as "media player" will just confuse those trying to help you.
>
> Second, there is no single "inbuilt media player", to use your
> terminology. There are hundreds of Android devices. There will be many
> "inbuilt media player" applications as a result.
>
> You are welcome to try isMusicActive() on AudioManager, as was
> suggested previously, though I have no idea if that really works.
>
> Beyond that, AFAIK, the expectation is that your applications should
> be using the audio-focus capabilities of AudioManager to interact
> smoothly with other apps that may be playing audio.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

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


[android-developers] Re: Android Emulator internet connectivity Problem

2011-10-24 Thread Andriod Beginer

Hello manish

Just Remove your DNS Server IP  from LAN Settings.

Internet works Automatically on your Emulator


On Oct 21, 11:01 am, manish sandhan  wrote:
> I m new in android...
> I m not able to connect my android emulator to internet neither from my app
> nor from the android browser.
> I have tried adding "  android:name="android.permission.INTERNET" />" in xml..but still in did not
> help..
> I have added hardware like GPS and Modem from the android sdk manager...
> Still it did not work pls help...
>
> pls help...
> --
>
> Thanks & Regards
> Manish Sandhan
> Cell 
> No.--+91-9421572024begin_of_the_skype_highlighting+91-9421572024  

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


Re: [android-developers] Re: Check whether media player is playing media or not

2011-10-24 Thread Mark Murphy
On Tue, Oct 25, 2011 at 1:27 AM, Sunil Mishra  wrote:
> I want to check whether inbuilt media player is active and playing
> media or not. Any sample code for that?

First, this is a list for development with the Android SDK.
MediaPlayer is a class in the Android SDK. Referring to other things
as "media player" will just confuse those trying to help you.

Second, there is no single "inbuilt media player", to use your
terminology. There are hundreds of Android devices. There will be many
"inbuilt media player" applications as a result.

You are welcome to try isMusicActive() on AudioManager, as was
suggested previously, though I have no idea if that really works.

Beyond that, AFAIK, the expectation is that your applications should
be using the audio-focus capabilities of AudioManager to interact
smoothly with other apps that may be playing audio.

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

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

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


[android-developers] Re: onCallStateChanged(int state, String number)

2011-10-24 Thread Sunil Mishra
Hi, i think for idle it will not give any phone number, just imagine
how can u get phone no on a idle phone?

For the off-hook mode you can catch the phone number into a variable
when phone call state changes to  phone ringing and then try working
with the phone no.

On Oct 24, 6:52 pm, ch  wrote:
> Hi Sunil,
>
> As far as i know the onCallStateChanged callback is called when a
> phone call state is changed (ringing,offhook and idle).
> On the callback is called for ringing, the phone number is provided
> for offhook and idle, the phone number is empty.
>
> Andrei
>
> On Oct 24, 4:24 pm, Sunil Mishra  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > can you describe about "other 2 cases" and what you mean by that?
>
> > On Oct 24, 5:38 pm, ch  wrote:
>
> > > Hi,
>
> > > I observed an undocumented behavior of the method
> > > PhoneStateListener.onCallStateChanged(int state, String
> > > incomingNumber).
>
> > > When the method is called on a new ringing call the incommingNumber is
> > > provided, but in the other 2 cases the number is missing!!
>
> > > My question is: Is this the default behavior (and the issue is in
> > > documentation) or is a bug in my platform?
>
> > > Test was made on Nexus One upgrade 2.3.6.
>
> > > Tanks for your time!
>
> > > Regards Andrei.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Check whether media player is playing media or not

2011-10-24 Thread Sunil Mishra
But doing so, will it create a new media player instance or it will be
able to fetch the current ongoing session?

I want to check whether inbuilt media player is active and playing
media or not. Any sample code for that?

On Oct 24, 8:42 pm, Studio LFP  wrote:
> You can't use MediaPlayer.isPlaying() as a static method as it is an
> instanced method. You can have the MediaPlayer instance you create/use be in
> a static variable and work with it from there.
>
> Steven
> Studio LFPhttp://www.studio-lfp.com
>
>
>
>
>
>
>
> On Monday, October 24, 2011 9:38:39 AM UTC-5, Sunil Mishra wrote:
>
> > Can i use MediaPlayer as a static object?
>
> > On Oct 24, 6:57 pm, Jeremy Dagorn  wrote:
> > > Hi,
>
> > >http://developer.android.com/reference/android/media/MediaPlayer.html...
>
> > > MediaPlayer.isPlaying()?
>
> > > On Oct 24, 9:23 am, Sunil Mishra  wrote:
>
> > > > Hi,
>
> > > > Is there any api through which we can figure out whether media player
> > > > is currently playing any media or not?

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

2011-10-24 Thread Stefan Alder
We need to set the orientation of our app to reverse landscape.
Unfortunately, this is only supported in api 9+, so as suggested by a
Google engineer below, we need to set the orientation programmatically
based on android.os.Build.

1) We've tried doing this in onCreate, but it prevents the activity
transitions from showing.Is there a way to set the orientation
programmatically so that the transitions are still shown?

2) Is there someway of having a conditional in the manifest, such that
screenOrientation defaults to 'reverseLandscape' if supported,
otherwise 'landscape'?

3). It seems reverse landscape can be reached if screenOrientation is
set to 'unsepcified' (even less than api level 9), but then portrait
orientations are allowed as well.  Is there someway to prevent the
portrait orientations (in < api level 9 too)?

Thanks



-- Forwarded message --
From: Stefan Alder 
Date: Sat, Oct 22, 2011 at 11:55 AM
Subject: Re: [android-developers] Landscape Right (reverseLandscape)
prior to API level 9
To: android-developers@googlegroups.com


Dianne,
You mentioned checking the android.os.BUILD and setting the
orientation to reverse landscape only if it meet or exceeds api level
9.  I assume I would do this in onCreate.  If I do do this, there are
no animations to a new Activity (the slide in), only animations when
ending the new activity.   How can I correct this?

FYI, I'm testing on a Nexus One with 2.3.6
Thanks
S



On Wed, Sep 28, 2011 at 12:10 PM, Stefan Alder  wrote:
> I found this thread, which seems related, but the result is a blank
> screen.  Does anyone know if this should still work? and will it apply
> to all children views?
>
> http://groups.google.com/group/android-developers/browse_thread/thread/b4edcc487c1f28d7
>
>        private static class FlipLayout extends FrameLayout {
>                private Matrix mForward = new Matrix();
>                private Matrix mReverse = new Matrix();
>                private float[] mTemp = new float[2];
>
>
>                public FlipLayout(Context context) {
>                        super(context);
>                        mForward.postRotate(180);
>                        mForward.invert(mReverse);
>                }
>
>                @Override
>                protected void dispatchDraw(Canvas canvas) {
>                        canvas.save();
>                        canvas.setMatrix(mForward);
>                        super.dispatchDraw(canvas);
>                        canvas.restore();
>                }
>
>                //@Override
>                public boolean dispatchTouchEvent(MotionEvent event) {
>                        final float[] temp = mTemp;
>                        temp[0] = event.getX();
>                        temp[1] = event.getY();
>
>                        mReverse.mapPoints(temp);
>
>                        event.setLocation(temp[0], temp[1]);
>                        return super.dispatchTouchEvent(event);
>                }
>        }
>
>
> On Wed, Sep 28, 2011 at 2:05 AM, Stefan Alder  wrote:
>> Still looking for a solution to this.  Do I need to set the
>> screenOrientation to 'landscape' in the manifest and then rotate all
>> layouts by 180 degrees?  What's the best way to do this?
>> Thanks
>>
>>
>> On Tue, Sep 27, 2011 at 3:54 PM, Stefan Alder  wrote:
>>> Dianne,
>>> Thanks for the response.  My question is how can I achieve the same
>>> effect when running prior to API level 9.
>>>
>>> On Tue, Sep 27, 2011 at 3:49 PM, Dianne Hackborn  
>>> wrote:
 You'll need to check the API level at android.os.Build, and only set your
 activity to this value when running on API 9 or later.

 On Tue, Sep 27, 2011 at 3:45 PM, Stefan Alder  wrote:
>
> I trying to ensure that my app and all of its activities are locked to
> landscape right (reverse landscape) (where the device button and mic
> located to the left of the screen).    I see you can set the
> screnOrientation in the manifest to 'reverseLandscape', but this only
> works for API level 9.
>
> What is the best way to achieve this down to API level 6 or 7 such
> that it will work on all Android devices (portrait and landscape
> default)?
>
> If you can point me to any example where this is done, I'd really
> appreciate 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



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

[android-developers] Types of mobile application

2011-10-24 Thread Manikandan M
Hi All,

I am new android development i want to know what are the different
ways to create mobile applications.

1. Native App
2. Using jquery mobile to create web app
3. Using webview

is webview and jquery mobile are same and any other types we can
create mobile app.


Thanks
Manikandan

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

2011-10-24 Thread venugopal reddy
Hi friends,

How to create Google map application and run , is their any
specification...

Can i run Google map application direct in our emulator?


Please help me

Is it possible give me step by step by procedure

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


[android-developers] Problems with new ADT (14) library building

2011-10-24 Thread Jeremy Statz
I have a large set of support classes contained in a library that's
shared between about 40 projects, and since updating to the newest ADT
(14) I'm having major problems with any classes involving UI.

In particular these do things like create a color picker when you tap
on a preference item, or display a dialog with a slider, etc.  The
code hasn't changed and continues to compile without errors, but when
I actually run it it seems like none of the UI identifiers are valid.
I'll get a crash due to a null pointer.

I'm hoping and praying the new .jar file approach hasn't ruined this
feature, because I have a ton of library work related to this sort of
thing that's avoiding a massive amount of code duplication.  :(

As an example:

LinearLayout layout =
(LinearLayout)inflator.inflate( R.layout.preferencecolor_layout,
null );

TextView main = (TextView)layout.findViewById( R.id.label_main );
main.setText( getTitle() ); // crash here due to main being invalid

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


Re: [android-developers] SMS is auto-replied in a loop.

2011-10-24 Thread Isaac Wesley
If I have got your question right, for your app to app method. You can store
the first time value or I'd as a shared prefrences. In your second device.
So if your second device gets a new or different I'd. You can stop the
receive in device 2. (P.S you can set an auto incremental is for this)
On Oct 21, 2011 5:01 PM, "ntt broken"  wrote:
>
> Hi,
>
> i wrote a simple android app that is auto reply.
> i want this to happen only once:
> device #1 -> send sms -> device#2
> device#1 <- auto reply text <- device#2
>
> the problem is that instead of answering with SMS only once, there's a
loop that never ends of replying SMS to the device that sent the first
message.
>
> how can i handle it or tell it to stop after once?
> is there an event i need to keep my mind on? a code i need to add that
close this thing? a flag or attribute i need to change?
>
> in the activity i only show hello world text.
> i have another file with BroadcastReceiver that gets the incoming SMS:
> public class SMSReceiver extends BroadcastReceiver
> and my relevant code is in the OnReceive() method:
> SmsManager sms = SmsManager.getDefault();
> sms.sendTextMessage(sender, null, answer, null, null);
>
> Br0k3n.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: WallpaperService.Engine.onOffsetsChanged() gone in ICS?

2011-10-24 Thread Jeremy Statz
I've made a lot of live wallpapers, and this honestly made me break
out into a cold sweat.  Please tell me this isn't broken.  It'll
basically wreck the personalization category.  :/

On Oct 24, 10:42 pm, Darren K  wrote:
> To clarify...Duarte's presentation, not Rubin.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: WallpaperService.Engine.onOffsetsChanged() gone in ICS?

2011-10-24 Thread Darren K
To clarify...Duarte's presentation, not Rubin.

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

[android-developers] Android 3.2 and the emulator

2011-10-24 Thread Zsolt Vasvari
How can I "reserve" the bottom button bar's space using the emulator?

In other words, on 3.2+ (or 3.1?), a 1280x800 screen is reported as
having display metrics of 1280x752 or 1232x800 depending on the
orienation, but I don't seem to be able to do this with the emulator,
or at least I cannot find an option for the height of the button bar.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Will getFilesDir().getAbsolutePath() ever change?

2011-10-24 Thread RLScott


On Oct 24, 9:09 pm, Dianne Hackborn  wrote:
> Is this being saved in persistent storage somewhere?

Yes.  Strings are saved using

prefs =
 
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
 ed = prefs.edit();
 ed.putString(currentFolderKEY, relativeCurrentFolder);
 ed.commit();

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Will getFilesDir().getAbsolutePath() ever change?

2011-10-24 Thread RLScott


On Oct 24, 9:09 pm, Dianne Hackborn  wrote:
> Is this being saved in persistent storage somewhere?

Yes.  Strings are saved using

prefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
ed = prefs.edit();
ed.putString(currentFolderKEY, currentFolder);
ed.commit();

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


Re: [android-developers] Selecting picasa photos in gallery

2011-10-24 Thread Mark Andrachek, Jr.
I'm running into something very similar trying to get thumbnails.
I use this to get select the image from the gallery:

Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
intent.putExtra("return-data", true);
startActivityForResult(Intent.createChooser(intent,"Complete action 
using"),PICK_FROM_GALLERY);

Then in the result:

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (resultCode != Activity.RESULT_OK)
  return;

   Uri contentUri = Uri.parse(data.getDataString());
   List parts = contentUri.getPathSegments();
   long id = Long.parseLong(parts.get(parts.size() - 1));
   Bitmap bitmap = MediaStore.Images.Thumbnails.getThumbnail(
  getActivity().getContentResolver(), 
  id, 
  MediaStore.Images.Thumbnails.MINI_KIND, 
  null
   );

}

If I log data.getDataString(), I get: 
content://com.android.gallery3d.provider/picasa/item/SOMEBIGNUMBER

And I get an exception thrown:
E/MiniThumbFile(26253): Got exception when reading magic, id = 
SOMEBIGNUMBER, disk full or mount read-only? class 
java.lang.IllegalArgumentException

Local images work fine, and have a different url:
content://media/external/images/media/115

I'm guessing SOMEBIGNUMBER is the PICASA_ID. How to get the thumbnail and/or 
image out of that, without falling back to accessing the picasa api's and 
having to have access to user account info... I wish I knew.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 make an alphabetic scroll bar like that in contacts

2011-10-24 Thread Zsolt Vasvari
Just be careful with AlphabetIndexer.  It's probably OK for "toy"
apps, or at least those that are not localized, but if localization
issues come into play, it becomes much more complicated.  Look at
ContactsProvider.  There is even an Android specific SQLite extension
called GET_PHONEBOOK_INDEX which takes care of this.

On Oct 25, 12:22 am, Mark Murphy  wrote:
> http://stackoverflow.com/questions/5122749/create-easy-alphabetical-s...
>
> On Mon, Oct 24, 2011 at 2:44 AM, Abhishek Mukherjee
>
>  wrote:
> > I am new to android developement and have only started to learn the
> > basics. I have been asked to make an alphabetic scroll bar like that
> > in the contacts (or like that in iphone). Can anyone tell me how to
> > approach and perhaps explain it with an example?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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


[android-developers] Re: Invoking Android app from external application

2011-10-24 Thread gjs
Hi,

Yes it is possible.

Regards

On Oct 24, 9:16 pm, mohan kumar  wrote:
> Hi All,
>
> Is it possible to communicate android application [running in AVD /
> Actual Device] from external application like .NET / Java
> application ?
>
> best regards,
> Mohan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Impossible to Create & Write to or Read From Files in the SD Card

2011-10-24 Thread gjs
Hi,

As the doc says - 'This method is not generally useful'

public boolean createNewFile ()

Since: API Level 1
Creates a new, empty file on the file system according to the path
information stored in this file. This method returns true if it
creates a file, false if the file already existed. Note that it
returns false even if the file is not a file (because it's a
directory, say).
This method is not generally useful. For creating temporary files, use
createTempFile(String, String) instead. For reading/writing files, use
FileInputStream, FileOutputStream, or RandomAccessFile, all of which
can create files.
Note that this method does not throw IOException if the file already
exists, even if it's not a regular file. Callers should always check
the return value, and may additionally want to call isFile().
Returns

true if the file has been created, false if it already exists.
Throws

IOException if it's not possible to create the file.

Regards


On Oct 24, 8:12 am, melis  wrote:
> Thanks for all replies! Before reading the commands i went for a walk
> for 5 minutes. When i turned back tried this code snippet,it worked. I
> wanted to share for who will have the same problem with me.
> But i realized createNewFile() function is useless. It creates the
> file even if i use or not. Is there a key point of this function?
>
> File path = Environment.getExternalStorageDirectory();
> File myFile = new File (path,"file1.txt");
> FileWriter writer;
> try {
>                         writer = new FileWriter(textFile);
>                         BufferedWriter out = new BufferedWriter(writer);
>                         out.write("hey");
>                         out.close(); }
> or
> File myFile  = new File("/sdcard/file1.txt");
> myFile.createNewFile();
> try {
>                         FileOutputStream fos = new FileOutputStream(myFile);
>                         OutputStreamWriter out = new OutputStreamWriter(fos);
>                         out.close();
>                         fos.close();}
>
> But i realized createNewFile() function is useless. It creates the
> file even if i use or not. Is there a key point of this function?

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


Re: [android-developers] Re: Will getFilesDir().getAbsolutePath() ever change?

2011-10-24 Thread Dianne Hackborn
Is this being saved in persistent storage somewhere?

On Mon, Oct 24, 2011 at 6:12 PM, RLScott  wrote:

> OK, here is what I propose doing now.  I would just like to know if it
> is robust or advisable:
>
> I have a string named "root" that is initialized by my main activity
> as:
>
> root=getFilesDir().getAbsolutePath();
>
> And I have a string called "currentFolder" that holds the current
> directory.  It is initially equal to root, but it can change if the
> user changes to a subdirectory.
>
> When I want to access a document file I use:
>
> File f = new File(currentFolder, simpleFileName);
>
> To change the current folder I use:
>
>  currentFolder = dirFile.getParent();  //..to navigate up the folder
> tree, or
>  currentFolder = dirFile.getPath();//..to navigate down the
> folder tree.
>
> where dirFile is a file representing a directory.
>
> Now for the "risky" part:  I propose to save "relativeCurrentFolder"
> defined as:
>
> relativeCurrentFolder = currentFolder.substring(root.length());
>
> This works based on the assumption that root should always be a prefix
> of currentFolder.  Then when the app initializes, I can reconstruct
> currentFolder as:
>
> currentFolder = root + relativeCurrentFolder;
>
> That way, if the platform does change in a way that changes root, then
> currentFolder will always be properly reconstituted when the app
> starts up again.  Does this seem risky or robust?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Getting GlobalTime App to run.

2011-10-24 Thread TropicMintDeveloper
Thank you for the answer, this makes sense now.

On Oct 22, 12:40 pm, joebowbeer  wrote:
> AndroidGlobalTime was the subject of an early android-developers blog
> entry, where it was described as "a 3D world clock developed by an
> engineer at Google and may serve as an illustrative example of how to
> use the OpenGL ES APIs in your Android applications."
>
> http://android-developers.blogspot.com/2008/05/androidglobaltime.htmlhttp://code.google.com/p/apps-for-android/
>
> It is also the object of my first bug report, when it failed to build
> in SDK 1.0:
>
> http://code.google.com/p/apps-for-android/issues/detail?id=18
>
> I believe that you may find a workaround in the comments added to this
> report. (Issue tracking in action!)
>
> --Joe
>
> On Oct 21, 12:58 pm, String  wrote:
>
>
>
>
>
>
>
> > On Friday, October 21, 2011 7:33:28 PM UTC+1, Mark Murphy (a Commons Guy)
> > wrote:
>
> > What is this "GlobalTime App"? It looks like maybe it was from 2007,
>
> > > before we had an Android SDK, or something.
>
> > That's about right. It was a very VERY early code example, never widely
> > distributed even at the time. And even at the time it was a challenge to get
> > it to build; good luck doing so with the current SDK.
>
> > String

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


[android-developers] Re: Will getFilesDir().getAbsolutePath() ever change?

2011-10-24 Thread RLScott
OK, here is what I propose doing now.  I would just like to know if it
is robust or advisable:

I have a string named "root" that is initialized by my main activity
as:

root=getFilesDir().getAbsolutePath();

And I have a string called "currentFolder" that holds the current
directory.  It is initially equal to root, but it can change if the
user changes to a subdirectory.

When I want to access a document file I use:

File f = new File(currentFolder, simpleFileName);

To change the current folder I use:

  currentFolder = dirFile.getParent();  //..to navigate up the folder
tree, or
  currentFolder = dirFile.getPath();//..to navigate down the
folder tree.

where dirFile is a file representing a directory.

Now for the "risky" part:  I propose to save "relativeCurrentFolder"
defined as:

relativeCurrentFolder = currentFolder.substring(root.length());

This works based on the assumption that root should always be a prefix
of currentFolder.  Then when the app initializes, I can reconstruct
currentFolder as:

currentFolder = root + relativeCurrentFolder;

That way, if the platform does change in a way that changes root, then
currentFolder will always be properly reconstituted when the app
starts up again.  Does this seem risky or robust?

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


Re: [android-developers] Re: how to get a sqlite file into a XOOM 3.2.1

2011-10-24 Thread TreKing
On Mon, Oct 24, 2011 at 4:57 PM, Igor Nesralla Ribeiro
wrote:

> I had a situation...i’m create a app for tablets and I using a XOOM
> (3.2.1)to test ! My app uses a sqlite file and I saved him into a  path
> “/data/data/packagename/databases/file.sqlite” when I go to this path to
> search and copy sqlite file into my computer I not found ….what are happened
> ?


App data files are private - you can't just browse to their location willy
nilly. If you want to do that, put the data on the SD card.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] The current state of C2DM

2011-10-24 Thread Chris Stewart
It's been quite awhile since I last looked into C2DM and at that time I
remember a lot of developers were not recommending it for various reasons,
although I don't remember those reasons today.  I'm very much in need of
push notification support for an app I'm building, so I've started looking
into C2DM again.  I'm curious if the general attitude toward it has changed
with the developers here and if anyone has trench-level battle stories
they'd care to share.

--
Chris Stewart
http://chriswstewart.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: Suspended Account - Please Help - Red Alert

2011-10-24 Thread Zsolt Vasvari
So you are saying you have hundreds of "apps" that are probably just a
WebView displaying the content of somebody else's blog.  And you got
your account suspended for doing that.

I have one word for that:

HORAY



On Oct 25, 8:18 am, burton miller  wrote:
> My developer account has been suspended.
>
> I create apps for blogs and news sites, and Google took down a handful
> of them for trademark issues last month.  I am happy to resolve any
> conflicts or problems, but I can't get in touch with anyone!
>
> I have over half a million customers - and a legitimate business
> model!
>
> Please - someone help us.  Dianne, Guy, anybody.  We are willing to
> change apps, remove them, whatever.  6 or 7 apps out of hundreds were
> removed.
>
> There is no number to call - nobody to talk to.  We replied to the
> email - and we haven't heard back.  Every hour we are shut down is
> killing us.
>
> We have been building this customer base for six days a week for THREE
> YEARS.
>
> Please help!

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


[android-developers] Re: No luck with new ICS CalenderContract

2011-10-24 Thread Zsolt Vasvari
I would have expected to work, also.

It's kind of frustrating that the first time we are goig to be able
"put out fires", is when the general public will get hold of the first
ICS device.  The emulator is all but useless.

On Oct 25, 12:25 am, Mark Murphy  wrote:
> I haven't had a chance to yet, and probably won't for a few weeks.
> Since the Calendar app is in the emulator, I would have expected that
> content provider to work. It's possible that it is an emulator bug --
> without hardware as a point of reference, it is difficult to tell.
>
>
>
>
>
> On Mon, Oct 24, 2011 at 10:19 AM, Zsolt Vasvari  wrote:
> > Nobody tried this new API yet?
>
> > On Oct 24, 2:57 pm, Zsolt Vasvari  wrote:
> >> I am trying to convert my Calendar code to the new ICS APIs.
>
> >> For starters, I am trying the simplest possible operation -- reading
> >> the list of Calendars.
>
> >> I am using the following code:
>
> >> context.getContentResolver().query(CalendarContract.CONTENT_URI,
> >> CALENDARS_PROJECTION, CALENDARS_WHERE, null,
> >> CalendarContract.Calendars.DEFAULT_SORT_ORDER)
>
> >> but I am getting an unknown URL exception on the ICS emulator, both
> >> Standard and Google API images:
>
> >> E/ACRA    (  746): Caused by: java.lang.IllegalArgumentException:
> >> Unknown URL content://com.android.calendar
> >> E/ACRA    (  746):      at
> >> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> >> 165)
> >> E/ACRA    (  746):      at
> >> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> >> 135)
> >> E/ACRA    (  746):      at
> >> android.content.ContentProviderProxy.query(ContentProviderNative.java:
> >> 358)
> >> E/ACRA    (  746):      at
> >> android.content.ContentResolver.query(ContentResolver.java:304)
>
> >> Is this supposed to work on the emulator?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!- 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] Suspended Account - Please Help - Red Alert

2011-10-24 Thread burton miller
My developer account has been suspended.

I create apps for blogs and news sites, and Google took down a handful
of them for trademark issues last month.  I am happy to resolve any
conflicts or problems, but I can't get in touch with anyone!

I have over half a million customers - and a legitimate business
model!

Please - someone help us.  Dianne, Guy, anybody.  We are willing to
change apps, remove them, whatever.  6 or 7 apps out of hundreds were
removed.

There is no number to call - nobody to talk to.  We replied to the
email - and we haven't heard back.  Every hour we are shut down is
killing us.

We have been building this customer base for six days a week for THREE
YEARS.

Please help!

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


Re: [android-developers] Need Help with ScrollView

2011-10-24 Thread Kostya Vasilyev
You can use layout_weight on the scroll view, or...

...you can change your top level layout to Relative and position its
children with layout_above, layout_below, layout_alignParentBottom, etc.

--
Kostya Vasilyev
25.10.2011 2:54 пользователь "Mark Phillips" 
написал:

> I have the following layout:
>
> LinearLayout - vertical
>   TableLayout
>   ScrollView
>   TableLayout
>   LinearLayout
>
> When I fill the TableLayout in the ScrollView with rows, it pushes the
> bottom LinearLayout off the screen. How do I get these three layouts to work
> together so all three appear on the screen, and I can scroll the center
> layout to see all of the table? I only want 6 rows of the table to be
> visible. It all fits with room to spare if I only have 6 rows in the table.
>
> I can make it work if I do this:
>
> LinearLayout - vertical
>   TableLayout
>   LinearLayout - android:layout_height="360dp"
>  ScrollView
>  TableLayout
>   LinearLayout
>
> Is this the "right" way to handle this problem - specifying a specific
> height? Since devices have different screen sizes, do I need some sort of
> code to get the screen size and compute this value at the start of the
> program? Is there a more "android" way of accomplishing what I want?
>
> Thanks!
>
> Mark
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: Role of the Compatibility Library?

2011-10-24 Thread ashughes
Hmm, on my Ubuntu, Eclipse Indigo, ADT 14 setup it's still called
"Android Compatibility package" in the Android SDK Manager (with rev4
installed). Also, right clicking on a project -> Android Tools shows
"Add Compatibility Library...", and the jar itself is stored under
extras/android/compatibility/ (although it's called android-support-
v#.jar).

On Oct 24, 4:20 pm, Xavier Ducrohet  wrote:
> It's now called the support library in the SDK manager (at least after
> you upgrade to rev4)
>
>
>
>
>
>
>
>
>
> On Mon, Oct 24, 2011 at 4:05 PM, ashughes  wrote:
> > Thanks Dianne for the explanation. I forgot that that was the reason
> > ActionBarSherlock is a library project and not a jar (the resource
> > problem).
>
> > FYI, it's still called the "Android Compatibility package" in the
> > Android SDK Manager. I understand your reasoning for it being called
> > the "support library" however.
>
> > On Oct 24, 2:32 pm, Dianne Hackborn  wrote:
> >> On Mon, Oct 24, 2011 at 1:40 PM, ashughes  wrote:
> >> > There is now an ActionBarCompat sample code demo (
> >> >http://developer.android.com/resources/samples/ActionBarCompat/index).
> >> > Is there a reason the ActionBar not been added to the ACL? Are there any
> >> > plans to add it to the ACL?
>
> >> No, nothing like this will appear in the support library any time soon.  An
> >> ActionBar implementation requires significant resources to go with it
> >> (drawables, layouts, attributes, etc), and at this point it is not feasible
> >> to package that kind of stuff up into a jar.
>
> >> Even if we make it possible to have resources in a har -- and that is
> >> something that may happen in the not so long term -- you wouldn't want to 
> >> do
> >> this with the support lib unless you also had a tool to strip all of that
> >> stuff out for apps that aren't using it...  and *that* is a big enough
> >> amount of work that it probably isn't worth doing any time soon.
>
> >> Oh and btw, as far as I am concerned it is totally wrong to call this the
> >> "compatibility library."  The library is called the "support library,"
> >> because that is what it actually use -- various useful support classes.
> >>  There is a fair amount there that helps with using newer platform APIs
> >> while still being able to run on older platform versions, but there is a 
> >> lot
> >> of other stuff there as well.  In particular, ViewPager.
>
> >> --
> >> 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
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.http://developer.android.com|http://tools.android.com
>
> Please do not send me questions directly. Thanks!

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


Re: [android-developers] Re: Role of the Compatibility Library?

2011-10-24 Thread Xavier Ducrohet
It's now called the support library in the SDK manager (at least after
you upgrade to rev4)

On Mon, Oct 24, 2011 at 4:05 PM, ashughes  wrote:
> Thanks Dianne for the explanation. I forgot that that was the reason
> ActionBarSherlock is a library project and not a jar (the resource
> problem).
>
> FYI, it's still called the "Android Compatibility package" in the
> Android SDK Manager. I understand your reasoning for it being called
> the "support library" however.
>
> On Oct 24, 2:32 pm, Dianne Hackborn  wrote:
>> On Mon, Oct 24, 2011 at 1:40 PM, ashughes  wrote:
>> > There is now an ActionBarCompat sample code demo (
>> >http://developer.android.com/resources/samples/ActionBarCompat/index).
>> > Is there a reason the ActionBar not been added to the ACL? Are there any
>> > plans to add it to the ACL?
>>
>> No, nothing like this will appear in the support library any time soon.  An
>> ActionBar implementation requires significant resources to go with it
>> (drawables, layouts, attributes, etc), and at this point it is not feasible
>> to package that kind of stuff up into a jar.
>>
>> Even if we make it possible to have resources in a har -- and that is
>> something that may happen in the not so long term -- you wouldn't want to do
>> this with the support lib unless you also had a tool to strip all of that
>> stuff out for apps that aren't using it...  and *that* is a big enough
>> amount of work that it probably isn't worth doing any time soon.
>>
>> Oh and btw, as far as I am concerned it is totally wrong to call this the
>> "compatibility library."  The library is called the "support library,"
>> because that is what it actually use -- various useful support classes.
>>  There is a fair amount there that helps with using newer platform APIs
>> while still being able to run on older platform versions, but there is a lot
>> of other stuff there as well.  In particular, ViewPager.
>>
>> --
>> 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
>



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

Please do not send me questions directly. Thanks!

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


[android-developers] Re: Role of the Compatibility Library?

2011-10-24 Thread ashughes
Thanks Dianne for the explanation. I forgot that that was the reason
ActionBarSherlock is a library project and not a jar (the resource
problem).

FYI, it's still called the "Android Compatibility package" in the
Android SDK Manager. I understand your reasoning for it being called
the "support library" however.

On Oct 24, 2:32 pm, Dianne Hackborn  wrote:
> On Mon, Oct 24, 2011 at 1:40 PM, ashughes  wrote:
> > There is now an ActionBarCompat sample code demo (
> >http://developer.android.com/resources/samples/ActionBarCompat/index).
> > Is there a reason the ActionBar not been added to the ACL? Are there any
> > plans to add it to the ACL?
>
> No, nothing like this will appear in the support library any time soon.  An
> ActionBar implementation requires significant resources to go with it
> (drawables, layouts, attributes, etc), and at this point it is not feasible
> to package that kind of stuff up into a jar.
>
> Even if we make it possible to have resources in a har -- and that is
> something that may happen in the not so long term -- you wouldn't want to do
> this with the support lib unless you also had a tool to strip all of that
> stuff out for apps that aren't using it...  and *that* is a big enough
> amount of work that it probably isn't worth doing any time soon.
>
> Oh and btw, as far as I am concerned it is totally wrong to call this the
> "compatibility library."  The library is called the "support library,"
> because that is what it actually use -- various useful support classes.
>  There is a fair amount there that helps with using newer platform APIs
> while still being able to run on older platform versions, but there is a lot
> of other stuff there as well.  In particular, ViewPager.
>
> --
> 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: Scenario where initLoader() does not call onLoadFinished()

2011-10-24 Thread aleksej
I can't see this was fixed in rev.4, actually. But workaround using
android:configChanges suggested by Mark did the job pretty well for
me.

On Oct 24, 11:46 pm, kaciula  wrote:
> The new revision (rev. 4) of android support package fixes these issues.

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


Re: [android-developers] Re: ROM

2011-10-24 Thread Kristopher Micinski
This group isn't intended for custom rom building.  If you would like
to do that, please have a look at:

source.android.org

There are a few videos you can find on how to build a custom version
of the source (building the source by hand isn't too bad, and is a
good exercise for those looking to get an overview of how the build
process works and how the system fits together)..  It isn't too bad,
and after that, you have to dig in the docs of the android tree to get
the configuration options that you want for your individual device,
and whatever software you want to preinstall, etc...

Kris

On Mon, Oct 24, 2011 at 6:52 PM, Jerrick Davis  wrote:
> you are welcolm raju but anyone please help i need answers
>
> On Oct 24, 8:49 am, RAJU V  wrote:
>> thank u for information
>>
>> ~~RAJU~~
>> ~~www.itdoall.co.cc~~
>>
>>
>>
>> On Mon, Oct 24, 2011 at 8:18 PM, Jerrick Davis  wrote:
>> > if anyone would like to help email me at lamabo...@gmail.com
>>
>> > On Oct 24, 8:18 am, Jerrick Davis  wrote:
>> > > how do i create a custom ROM of android 4 for the sprint HTC Hero
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en- 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

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


[android-developers] Need Help with ScrollView

2011-10-24 Thread Mark Phillips
I have the following layout:

LinearLayout - vertical
  TableLayout
  ScrollView
  TableLayout
  LinearLayout

When I fill the TableLayout in the ScrollView with rows, it pushes the
bottom LinearLayout off the screen. How do I get these three layouts to work
together so all three appear on the screen, and I can scroll the center
layout to see all of the table? I only want 6 rows of the table to be
visible. It all fits with room to spare if I only have 6 rows in the table.

I can make it work if I do this:

LinearLayout - vertical
  TableLayout
  LinearLayout - android:layout_height="360dp"
 ScrollView
 TableLayout
  LinearLayout

Is this the "right" way to handle this problem - specifying a specific
height? Since devices have different screen sizes, do I need some sort of
code to get the screen size and compute this value at the start of the
program? Is there a more "android" way of accomplishing what I want?

Thanks!

Mark

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

2011-10-24 Thread Jerrick Davis
you are welcolm raju but anyone please help i need answers

On Oct 24, 8:49 am, RAJU V  wrote:
> thank u for information
>
> ~~RAJU~~
> ~~www.itdoall.co.cc~~
>
>
>
> On Mon, Oct 24, 2011 at 8:18 PM, Jerrick Davis  wrote:
> > if anyone would like to help email me at lamabo...@gmail.com
>
> > On Oct 24, 8:18 am, Jerrick Davis  wrote:
> > > how do i create a custom ROM of android 4 for the sprint HTC Hero
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- 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


Re: [android-developers] Re: speech recording

2011-10-24 Thread Asım Turgut SOMUNCUOĞLU
hi  jeremy,
my code is ;
import java.io.IOException;

import android.app.Activity;
import android.media.MediaRecorder;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;


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

final MediaRecorder MRX = new MediaRecorder();
MRX.setAudioSource(MediaRecorder.AudioSource.MIC);
MRX.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
MRX.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
MRX.setOutputFile("C:/Users/PC/Desktop/android/sesdeneme");
try {
MRX.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


Button kaydet= (Button) findViewById(R.id.button1);
kaydet.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub


MRX.start();



}
});
Button dur= (Button) findViewById(R.id.button2);
dur.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub


MRX.stop();
MRX.release();

}
});


}
}


manifest.xml file;


http://schemas.android.com/apk/res/android";
package="Uygulamalarim.Sesdeneme"
android:versionCode="1"
android:versionName="1.0">


















thank u for interesting

2011/10/24 Jeremy Dagorn 

> Hi,
>
> Could you give some code and raised error(s)?
>
> Jeremy
>
> On Oct 21, 8:36 pm, ktuluceng  wrote:
> > how to make speech recording application for android please help me my
> > cod is true but ı dont understand application has stopped  erorr :S
> >
> > ı folllow this linkhttp://
> www.brighthub.com/mobile/google-android/articles/40737.aspx
> > and apply my application but take a error please help me !!!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: how to get a sqlite file into a XOOM 3.2.1

2011-10-24 Thread Igor Nesralla Ribeiro
Hi,

 

I had a situation...i'm create a app for tablets and I using a XOOM
(3.2.1)to test ! My app uses a sqlite file and I saved him into a  path
"/data/data/packagename/databases/file.sqlite" when I go to this path to
search and copy sqlite file into my computer I not found ..what are happened
?! My XOOM is not "rooted".and I cant find it in any location..i'm try to
used a Eclipse File Explorer to search but no success ..  

 

Well..sorry for my English !!! thanks in advance !!

 

igor

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

Re: [android-developers] Re: When my app force closes, does it also close the associated service?

2011-10-24 Thread Ricardo Amaral
I said "when", hypothetically speaking. Not necessarily meaning it's already 
crashing. I was just wondering about the behavior, in case it does really 
crash.

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

[android-developers] New updates tools with Ant build R14 gives Duplicate files at the same path inside the APK.

2011-10-24 Thread Joachim
Since the update to the R14 my ant builds have stopped working even
after updating the projects.

I get the following error

-package:
[apkbuilder] Creating App1-debug-unaligned.apk and signing it with a
debug key...
[apkbuilder] Found duplicate file for APK: com/test/spinner/lib/
DS_recipe_email.html
[apkbuilder] Origin 1: /Users/usersa/Documents/workspace/MyLibrary/bin/
classes.jar
[apkbuilder] Origin 2: /Users/usersa/Documents/workspace/MyLibrary/bin/
classes.jar

This seems odd as it seems to be saying that I have a duplicate file
in the same file twice.

Here's the general setup.

App1 as a Library of MyLibrary.

MyLibrary does use the FacebookSDK library although in the past I
would just have App1 use MyLIbrary and Facebook SDK for the ant build.

Any thoughts would be great,

Thanks,




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


Re: [android-developers] Will getFilesDir().getAbsolutePath() ever change?

2011-10-24 Thread Dianne Hackborn
There are definitely going to be situations where this path is different
from the particular constant you see today on your device.  Whether this
path could change on you after a platform update where your app's data is
still left intact...  I doubt that would happen, and if it did we'd probably
have to do something about existing apps for compatibility.

On Mon, Oct 24, 2011 at 12:43 PM, RLScott  wrote:

> My app manages a set of data files organized into folders.  Of course
> they are all under the app's root folder of:
>
>   getFilesDir().getAbsolutePath()
>
> As part of my saving of the application state in onPause, I need to
> save the current directory.  Because of the way I navigate up and down
> the folder tree, the most convenient form for me to store the current
> directory is as an absolute path.  I could do that, but I have a
> concern.  What if the user upgrades his Android OS after my app has
> saved the current folder info?  Is it possible that some future
> version of Android will use a different app path for my documents?  If
> so, that would invalidate my saved current directory, and the next
> time the user tries to open my app after that Android upgrade, it will
> probably crash with an improperly formed full path name.  I don't care
> what the absolute path is to my app's documents.  I just don't want it
> changing behind my back.  Is that something I need to worry about?  Or
> must I find a way to save the relative folder name rather than the
> absolute?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Re: Role of the Compatibility Library?

2011-10-24 Thread Dianne Hackborn
On Mon, Oct 24, 2011 at 1:40 PM, ashughes  wrote:

> There is now an ActionBarCompat sample code demo (
> http://developer.android.com/resources/samples/ActionBarCompat/index.html).
> Is there a reason the ActionBar not been added to the ACL? Are there any
> plans to add it to the ACL?


No, nothing like this will appear in the support library any time soon.  An
ActionBar implementation requires significant resources to go with it
(drawables, layouts, attributes, etc), and at this point it is not feasible
to package that kind of stuff up into a jar.

Even if we make it possible to have resources in a har -- and that is
something that may happen in the not so long term -- you wouldn't want to do
this with the support lib unless you also had a tool to strip all of that
stuff out for apps that aren't using it...  and *that* is a big enough
amount of work that it probably isn't worth doing any time soon.

Oh and btw, as far as I am concerned it is totally wrong to call this the
"compatibility library."  The library is called the "support library,"
because that is what it actually use -- various useful support classes.
 There is a fair amount there that helps with using newer platform APIs
while still being able to run on older platform versions, but there is a lot
of other stuff there as well.  In particular, ViewPager.

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

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

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

Re: [android-developers] Re: Role of the Compatibility Library?

2011-10-24 Thread Dianne Hackborn
On Tue, Jul 19, 2011 at 12:40 PM, Ecthelion  wrote:

> +1 for ActionBar support in the compat library. ActionBarSherlock is
> certainly nice, but for those who - like me - don't use Eclipse it is
> not so good that it requires using a library project instead of a jar
> library.
>

Anything we provide with the platform is also going to require use as a
library project instead of a jar, because a widget like this also requires
various resources which you can't put in a plain jar.

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

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

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

Re: [android-developers] Re: When my app force closes, does it also close the associated service?

2011-10-24 Thread Dianne Hackborn
Er your subject line on this thread is "when my app force closes..."  Force
close == crash.

Anyway, what will happen at that point depends on what previously happened.

If you crash once, the service will be restarted.

If you continue to crash, the system will eventually decide that your app is
broken and not restart its services anymore.  Exactly when it decides this
is an undefined policy of the platform, based on how frequently this is
happening.

On Mon, Oct 24, 2011 at 1:15 PM, Ricardo Amaral wrote:

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



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

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

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

[android-developers] Re: SDK 4, if I select WXGA resolution, emulator doesn't start.

2011-10-24 Thread sblantipodi
bumping the question.

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


Re: [android-developers] Re: Role of the Compatibility Library?

2011-10-24 Thread ashughes
There is now an ActionBarCompat sample code demo (
http://developer.android.com/resources/samples/ActionBarCompat/index.html). 
Is there a reason the ActionBar not been added to the ACL? Are there any 
plans to add it to the ACL?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When my app force closes, does it also close the associated service?

2011-10-24 Thread Ricardo Amaral
The app is not crashing, I never said it was...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: When my app force closes, does it also close the associated service?

2011-10-24 Thread Ricardo Amaral
I will look into that, thanks :)

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

Re: [android-developers] Re: Bitmap issues - failing silently, not OOM

2011-10-24 Thread Kumar Bibek
 } catch (Exception e) {
> Exception xcp = e;
> xcp = null;
> }catch(Error e){
> Error xcp = e;
> xcp = null;
> }
> return null;

Try logging the exceptions here. It should give you some kinds of hints.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Tue, Oct 25, 2011 at 1:36 AM, mjmeyer  wrote:

> I have seen something similar when using the unbuffered variants of
> stream readers when getting from urls.
>
> Youre using a BufferedInputStream which might have the same effect. I
> successfully use the following to get images into bitmaps and was
> having similar problem until it was changed to use BufferedReader so
> you might try refactoring a bit and see if it helps.
>
> BufferedReader in = null;
> HttpClient client = new DefaultHttpClient();
> HttpGet request = new HttpGet(url);
> HttpResponse response = client.execute(request);
> in = new BufferedReader (new
> InputStreamReader(response.getEntity().getContent()));
> return BitmapFactory.decodeStream(instream, null, decodeOptions);
>
> On Oct 21, 1:49 pm, ryanm  wrote:
> > I have a simple function to get an image file from a remote server and
> > return it as a bitmap, here:
> >
> > public static Bitmap getRemoteImage(final URL aURL) {
> > try {
> >
> > final URLConnection conn = aURL.openConnection();
> > conn.connect();
> >
> > InputStream is = conn.getInputStream();
> > BufferedInputStream bis = new BufferedInputStream(is,
> > (512*1024));
> >
> > ByteArrayBuffer baf = new ByteArrayBuffer(50);
> > int current = 0;
> > while ((current = bis.read()) != -1) {
> > baf.append((byte)current);
> > }
> > byte[] imageData = baf.toByteArray();
> > Bitmap bm = BitmapFactory.decodeByteArray(imageData, 0,
> > imageData.length);
> >
> > bis.close();
> > is.close();
> >
> > // Just to give me a break point after everything else in
> the
> > function is done
> > Bitmap b = bm;
> >
> > return b;
> > } catch (Exception e) {
> > Exception xcp = e;
> > xcp = null;
> > }catch(Error e){
> > Error xcp = e;
> > xcp = null;
> > }
> > return null;
> > }
> >
> > Everything in this function executes exactly as you would expect, the
> > byte array is full with the right amount of data, the decodeByteArray
> > method returns a Bitmap, both close functions work, and then instead
> > of returning the bitmap, it simply bails out of the try block and
> > returns null.
> >
> > No errors, no warnings, nothing. I've had the issues with OOM errors
> > before and this is not throwing one. LogCat is not showing an
> > allocation error as you would expect if it were a memory issue. The
> > bitmap that is returned has properties that I can see, but not the
> > correct ones. The bitmap object ("bm") looks like this:
> >
> > bm  Bitmap  (id=830063098568)
> > mDensity160
> > mHeight -1
> > mIsMutable  false
> > mNativeBitmap   1348080
> > mNinePatchChunk null
> > mRecycled   false
> > mSrcNamenull
> > mWidth  -1
> >
> > The byte array has a length of 73462, so I know it got the image. The
> > image is a png, but I've tried several different formats. If I could
> > get an error I would at least know what to fix, but it simply skips
> > the return statement inside the try block and returns null every
> > time.
> >
> > Anyone have any insight?
> >
> > ryanm
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Google Map : Replacing zoom buttom to a customize button and giving control to them

2011-10-24 Thread MANISH RAJ
Thank you TreKing   for your answer. I got it !


Regards,
manish


Manish Kumar
Computer Science and Engineering (2008-2012)
Govt. Model Engineering College
Cochin-21
+919287301035
manishrajja...@gmail.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: Bitmap issues - failing silently, not OOM

2011-10-24 Thread mjmeyer
I have seen something similar when using the unbuffered variants of
stream readers when getting from urls.

Youre using a BufferedInputStream which might have the same effect. I
successfully use the following to get images into bitmaps and was
having similar problem until it was changed to use BufferedReader so
you might try refactoring a bit and see if it helps.

BufferedReader in = null;
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet(url);
HttpResponse response = client.execute(request);
in = new BufferedReader (new
InputStreamReader(response.getEntity().getContent()));
return BitmapFactory.decodeStream(instream, null, decodeOptions);

On Oct 21, 1:49 pm, ryanm  wrote:
> I have a simple function to get an image file from a remote server and
> return it as a bitmap, here:
>
>     public static Bitmap getRemoteImage(final URL aURL) {
>         try {
>
>             final URLConnection conn = aURL.openConnection();
>             conn.connect();
>
>                 InputStream is = conn.getInputStream();
>                 BufferedInputStream bis = new BufferedInputStream(is,
> (512*1024));
>
>                 ByteArrayBuffer baf = new ByteArrayBuffer(50);
>                 int current = 0;
>                 while ((current = bis.read()) != -1) {
>                     baf.append((byte)current);
>                 }
>                 byte[] imageData = baf.toByteArray();
>                 Bitmap bm = BitmapFactory.decodeByteArray(imageData, 0,
> imageData.length);
>
>                 bis.close();
>                 is.close();
>
>                 // Just to give me a break point after everything else in the
> function is done
>                 Bitmap b = bm;
>
>                 return b;
>         } catch (Exception e) {
>                 Exception xcp = e;
>                 xcp = null;
>         }catch(Error e){
>                 Error xcp = e;
>                 xcp = null;
>         }
>         return null;
>     }
>
> Everything in this function executes exactly as you would expect, the
> byte array is full with the right amount of data, the decodeByteArray
> method returns a Bitmap, both close functions work, and then instead
> of returning the bitmap, it simply bails out of the try block and
> returns null.
>
> No errors, no warnings, nothing. I've had the issues with OOM errors
> before and this is not throwing one. LogCat is not showing an
> allocation error as you would expect if it were a memory issue. The
> bitmap that is returned has properties that I can see, but not the
> correct ones. The bitmap object ("bm") looks like this:
>
> bm      Bitmap  (id=830063098568)
>         mDensity        160
>         mHeight -1
>         mIsMutable      false
>         mNativeBitmap   1348080
>         mNinePatchChunk null
>         mRecycled       false
>         mSrcName        null
>         mWidth  -1
>
> The byte array has a length of 73462, so I know it got the image. The
> image is a png, but I've tried several different formats. If I could
> get an error I would at least know what to fix, but it simply skips
> the return statement inside the try block and returns null every
> time.
>
> Anyone have any insight?
>
> ryanm

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


[android-developers] Will getFilesDir().getAbsolutePath() ever change?

2011-10-24 Thread RLScott
My app manages a set of data files organized into folders.  Of course
they are all under the app's root folder of:

   getFilesDir().getAbsolutePath()

As part of my saving of the application state in onPause, I need to
save the current directory.  Because of the way I navigate up and down
the folder tree, the most convenient form for me to store the current
directory is as an absolute path.  I could do that, but I have a
concern.  What if the user upgrades his Android OS after my app has
saved the current folder info?  Is it possible that some future
version of Android will use a different app path for my documents?  If
so, that would invalidate my saved current directory, and the next
time the user tries to open my app after that Android upgrade, it will
probably crash with an improperly formed full path name.  I don't care
what the absolute path is to my app's documents.  I just don't want it
changing behind my back.  Is that something I need to worry about?  Or
must I find a way to save the relative folder name rather than the
absolute?

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


Re: [android-developers] Re: Text on VideoView

2011-10-24 Thread Sambhav
Thanks Mark. Relative layout worked :)

On Tue, Oct 25, 2011 at 12:13 AM, Mark Murphy wrote:

> On Mon, Oct 24, 2011 at 2:27 PM, Sambhav  wrote:
> > The current way I am doing is have Video View and TextView widgets side
> by
> > side.
> > I came across Canvas API with drawText function. exploring how it can be
> > used to overlay text of video view.
>
> Just put the VideoView and the TextView in a RelativeLayout -- if the
> TextView is later in the XML file, it will appear to float over the
> VideoView.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Android - dynamic web image - GUI

2011-10-24 Thread Tomas
Thanks,

look interesting.

So does it mean that I need to handle image dimensions by myself
depending on the device density? And also that I can't have the image
with/height predefined in layout xml so GUI tool will correctly
display the layout?

Regards.

On Oct 25, 3:29 am, Peter Liu  wrote:
> Try androidquery.com library look for image loading and aspect ratio.
>
> On Oct 24, 7:31 am, Tomas  wrote:
>
>
>
>
>
>
>
> > Hi there,
>
> > I am struggling how to define the image in my relative layout which
> > will differ in size for different densities (but I am going to load
> > this image from the web so I guess I can't use those dpi folders in my
> > app for this).
>
> > I am developing an app which displays information about the book
> > including its cover - I am going to load the image of the same
> > dimensions accross multiple densities and I would like to just "scale"
> > within my app so small densities would see scaled image on 120*80 px
> > and large densities can have 500*200px image and so on.
>
> > I'm using com.github.droidfu.widgets.WebImageView for loading images
> > but I am open to use anything else which will help to accomplish this.
> > I've tried to manually check what resolution is current device and
> > then set width/height on imageview but the issue is that
> > com.github.droidfu.widgets.WebImageView doest support that and I do
> > not want to reimplement all the image load/caching/progress image by
> > myself again.
>
> > It would be also great if I could define the dimension in the xml
> > (I've tried to use  tag and had three different xml files
> > with different dimension in my res folders but unfortuantelly the GUI
> > designer in eclipse doesn't read with/height from included elements so
> > I basically get non-visible image in it until I redefine width/height
> > directly in the layout I am including the element into).
>
> > I would be really thankful for anything which push me in the right
> > direction.
>
> > Cheers!

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


Re: [android-developers] Re: Text on VideoView

2011-10-24 Thread Mark Murphy
On Mon, Oct 24, 2011 at 2:27 PM, Sambhav  wrote:
> The current way I am doing is have Video View and TextView widgets side by
> side.
> I came across Canvas API with drawText function. exploring how it can be
> used to overlay text of video view.

Just put the VideoView and the TextView in a RelativeLayout -- if the
TextView is later in the XML file, it will appear to float over the
VideoView.

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

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

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


[android-developers] Re: about layout sizes

2011-10-24 Thread Studio LFP
I think when you assign it programmatically it defaults to standard pixels.

You would need to get the DisplayMetrics and multiply your pixels by the 
DisplayMetrics.density to get the same thing as dip/dp in the XML.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 1:29:22 PM UTC-5, hecto...@yahoo.com wrote:
>
> hi guys, 
>
> I am finding out that a layout (or button) size is different when 
> doing the definition as folows: 
>
> ((RelativeLayout) 
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).setVisibility(VISIBLE); 
> ((RelativeLayout) 
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).getLayoutParams().width=100;
>  
>
> ((RelativeLayout) 
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).getLayoutParams().height=90;
>  
>
> ((RelativeLayout) 
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).requestLayout(); 
> etc  
>
> than when defining the xml resource: 
>
> 
>  xmlns:android="http://schemas.android.com/apk/res/android"; 
> android:layout_centerInParent="true" 
> android:layout_width="100dip" 
> android:layout_height="90dip" 
> android:textSize="14dip" 
> android:gravity="clip_vertical"> 
>
>  xmlns:android="http://schemas.android.com/apk/res/android"; 
> android:layout_centerHorizontal="true" 
> android:layout_centerVertical="true" 
> android:layout_width="70dip" 
> android:layout_height="60dip" 
> android:textSize="14dip" 
> android:gravity="clip_vertical"> 
>
>  android:layout_centerInParent="true" 
> android:layout_width="65dip" 
> android:layout_height="55dip" 
> android:textStyle="bold|italic" 
> android:textSize="14dip" 
> android:textColor="#" 
> /> 
>  
>   
>
>
>
> I mean, the screen looks with different sizes for each situation, and 
> i am looking for same sizes in both cases. 
>
> I wonder in isn related with another parameter, like density or so 
> on ...

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

Re: [android-developers] about layout sizes

2011-10-24 Thread Mark Murphy
Use Hierarchy View to see what values may be different.

On Mon, Oct 24, 2011 at 2:29 PM, hectordu...@yahoo.com
 wrote:
> hi guys,
>
> I am finding out that a layout (or button) size is different when
> doing the definition as folows:
>
>                ((RelativeLayout)
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).setVisibility(VISIBLE);
>                ((RelativeLayout)
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).getLayoutParams().width=100;
>                ((RelativeLayout)
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).getLayoutParams().height=90;
>                ((RelativeLayout)
> (app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).requestLayout();
>                etc 
>
> than when defining the xml resource:
>
>   
>                            
> xmlns:android="http://schemas.android.com/apk/res/android";
>                        android:layout_centerInParent="true"
>                android:layout_width="100dip"
>                android:layout_height="90dip"
>                                android:textSize="14dip"
>                android:gravity="clip_vertical">
>
>                                                
> xmlns:android="http://schemas.android.com/apk/res/android";
>                                android:layout_centerHorizontal="true"
>                                android:layout_centerVertical="true"
>                        android:layout_width="70dip"
>                        android:layout_height="60dip"
>                                android:textSize="14dip"
>                        android:gravity="clip_vertical">
>
>                                                                        android:layout_centerInParent="true"
>                                        android:layout_width="65dip"
>                                        android:layout_height="55dip"
>                                        android:textStyle="bold|italic"
>                                android:textSize="14dip"
>                                android:textColor="#"
>                        />
>                        
>            
>
>
>
> I mean, the screen looks with different sizes for each situation, and
> i am looking for same sizes in both cases.
>
> I wonder in isn related with another parameter, like density or so
> on ...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] Re: Google Maps do Android

2011-10-24 Thread Ali Chousein
The following links could be interesting for you:

http://developer.android.com/guide/topics/location/index.html
http://code.google.com/android/add-ons/google-apis/
http://code.google.com/android/add-ons/google-apis/mapkey.html

-
Ali Chousein
Weather-Buddy
http://weatherbuddy.blogspot.com/ | http://twitter.com/weather_buddy
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com/
https://marketplace.cisco.com/apphq/store/products/994


On Oct 24, 8:19 pm, Ray da Costa  wrote:
> Sorry
>
> Greetings ...
>
> Person does anyone know if my application could go to google maps
> application that is installed on my machine for it to generate a coordinated
> wheel, or show this route on the map ..
>

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


[android-developers] about layout sizes

2011-10-24 Thread hectordu...@yahoo.com
hi guys,

I am finding out that a layout (or button) size is different when
doing the definition as folows:

((RelativeLayout)
(app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).setVisibility(VISIBLE);
((RelativeLayout)
(app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).getLayoutParams().width=100;
((RelativeLayout)
(app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).getLayoutParams().height=90;
((RelativeLayout)
(app.main_gui.get(RoulleteGlobals.WHEEL_1_3_IDX))).requestLayout();
etc 

than when defining the xml resource:

   
http://schemas.android.com/apk/res/android";
android:layout_centerInParent="true"
android:layout_width="100dip"
android:layout_height="90dip"
android:textSize="14dip"
android:gravity="clip_vertical">

http://schemas.android.com/apk/res/android";
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="70dip"
android:layout_height="60dip"
android:textSize="14dip"
android:gravity="clip_vertical">







I mean, the screen looks with different sizes for each situation, and
i am looking for same sizes in both cases.

I wonder in isn related with another parameter, like density or so
on ...

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


[android-developers] image (slide)show without images sliding, just changing

2011-10-24 Thread André
I'm trying to make an image slideshow for android. What I want for it
is a play and pause button, restart button and a previous image
button. And a seek bar for changing the speed the image change.
At the moment I have the file names of the images stored in a database
and the images on the sd-card. Then, for each image have some text in
the database that I want to load in to a textview at the same time as
the image change.

This is what I've done which almost works. It starts to play but stops
after one or two picture. And the buttons above doesn't work including
the seekbar.
I know this might not be the most sophisticated code but if you know
how to solve my problems or have suggestions of how to make it better,
I'd be greatfull.

private ImageView image = null;
private TextView title = null;
private SeekBar speed = null;
private Button play = null, done = null, restart = null, previous =
null;
private Cursor cursor = null;
private DBase db = null;
private int theSpeed = 900;
private boolean isPlaying = false;
private CountDownTimer show;
private int i = 0, frames = 0;

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

image = (ImageView) findViewById(R.id.imageView11);
title = (TextView) findViewById(R.id.textView11);
speed = (SeekBar) findViewById(R.id.seekBar11);
play = (Button) findViewById(R.id.button21);
done = (Button) findViewById(R.id.button22);
restart = (Button) findViewById(R.id.button23);
previous = (Button) findViewById(R.id.button24);

speed.setOnSeekBarChangeListener(this);
play.setOnClickListener(this);
done.setOnClickListener(this);
restart.setOnClickListener(this);
previous.setOnClickListener(this);

db = new DBase(this);
db.open();

SharedPreferences prefs = getPreferences(MODE_PRIVATE);

cursor = db.getAll();
startManagingCursor(cursor);
frames = cursor.getCount();
if (frames != 0) {
cursor.moveToFirst();
if 
(cursor.getString(cursor.getColumnIndexOrThrow(DBase._photo)) !=
null){

setImage(cursor.getString(cursor.getColumnIndexOrThrow(DBase._photo)));

setTitle(cursor.getString(cursor.getColumnIndexOrThrow(DBase._date)),cursor.getString(cursor.getColumnIndexOrThrow(DBase._text)));
if (cursor.moveToNext()) theShow(theSpeed);
isPlaying = true;
}
}
}



private void setImage(String photo) {
try {
String path = "/sdcard/App/";
FileInputStream fis = new FileInputStream(path + photo);
Bitmap bitmap = BitmapFactory.decodeStream(fis);
image.setImageBitmap(bitmap);
} catch (Exception e) {

}
}

private void theShow(int speed) {
show = new CountDownTimer(speed, 1000) {
public void onTick(long millisUntilFinished) { }
public void onFinish() {
if 
(cursor.getString(cursor.getColumnIndexOrThrow(DBase._photo)) !
= null){

setImage(cursor.getString(cursor.getColumnIndexOrThrow(DBase._photo)));

setTitle(cursor.getString(cursor.getColumnIndexOrThrow(DBase._date)),cursor.getString(cursor.getColumnIndexOrThrow(DBase._text)));
isPlaying = true;

play.setText(getText(R.string.pause).toString());
if (i <= frames) {
i++;
show.start();
}
}
}
}.start();
}

@Override
public void onClick(View arg0) {
switch (arg0.getId()) {
case R.id.button21:
//PLAY/PAUSE Button
if (isPlaying) {
show.cancel();
isPlaying = false;
play.setText(getText(R.string.play).toString());
} else {
theShow(theSpeed);
isPlaying = true;

play.setText(getText(R.string.pause).toString());
}
show.cancel();
break;
case R.id.button22:
//EXIT Button
this.finish();
  

Re: [android-developers] Re: Text on VideoView

2011-10-24 Thread Sambhav
The current way I am doing is have Video View and TextView widgets side by
side.
I came across Canvas API with drawText function. exploring how it can be
used to overlay text of video view.



On Mon, Oct 24, 2011 at 2:42 PM, Zsolt Vasvari  wrote:

> I assume you have tried it and having some kinf of problem?
>
> On Oct 24, 4:29 pm, Sambhav  wrote:
> > Hi,
> >
> > Is it possible to overlay text on VideoView ?
> >
> > Regards,
> > Sambhav
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Google Maps do Android

2011-10-24 Thread Ray da Costa
Sorry

Greetings ...

Person does anyone know if my application could go to google maps
application that is installed on my machine for it to generate a coordinated
wheel, or show this route on the map ..

2011/10/24 TreKing 

> You should post in English ... like the quote in your signature ...
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Ray da Costa
"The best way to predict the future is to invent it."
Alan Kay

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

2011-10-24 Thread Priyank
anyone?

On Oct 20, 4:16 pm, Priyank  wrote:
> Hi,
>
> I was trying to set data roaming on my phone programmatically.
> But when I try to do it using the setRoaming method available in the
> ServiceState class, I dont see the change take place on my phone.
>
> I am doing something like this:
> ServiceState serviceState = new ServiceState();
> serviceState.setRoaming(true);
>
> Kindly let me know if I am missing something here.
>
> Thanks.
> Priyank

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


Re: [android-developers] android bluetooth send string other device (like j2me,iphone,balcberry ...etc)

2011-10-24 Thread TreKing
On Mon, Oct 24, 2011 at 5:21 AM, pankaj sharma wrote:

> Hi,
>i m newbie in android devlopment. and i am tryning to connect and
> send string continous other devices with bluetooth.
>
>
>  pls help me  .
>
>  thnks


http://catb.org/~esr/faqs/smart-questions.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: No luck with new ICS CalenderContract

2011-10-24 Thread Mark Murphy
I haven't had a chance to yet, and probably won't for a few weeks.
Since the Calendar app is in the emulator, I would have expected that
content provider to work. It's possible that it is an emulator bug --
without hardware as a point of reference, it is difficult to tell.

On Mon, Oct 24, 2011 at 10:19 AM, Zsolt Vasvari  wrote:
> Nobody tried this new API yet?
>
> On Oct 24, 2:57 pm, Zsolt Vasvari  wrote:
>> I am trying to convert my Calendar code to the new ICS APIs.
>>
>> For starters, I am trying the simplest possible operation -- reading
>> the list of Calendars.
>>
>> I am using the following code:
>>
>> context.getContentResolver().query(CalendarContract.CONTENT_URI,
>> CALENDARS_PROJECTION, CALENDARS_WHERE, null,
>> CalendarContract.Calendars.DEFAULT_SORT_ORDER)
>>
>> but I am getting an unknown URL exception on the ICS emulator, both
>> Standard and Google API images:
>>
>> E/ACRA    (  746): Caused by: java.lang.IllegalArgumentException:
>> Unknown URL content://com.android.calendar
>> E/ACRA    (  746):      at
>> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
>> 165)
>> E/ACRA    (  746):      at
>> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
>> 135)
>> E/ACRA    (  746):      at
>> android.content.ContentProviderProxy.query(ContentProviderNative.java:
>> 358)
>> E/ACRA    (  746):      at
>> android.content.ContentResolver.query(ContentResolver.java:304)
>>
>> Is this supposed to work on the emulator?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


Re: [android-developers] Google Map : Replacing zoom buttom to a customize button and giving control to them

2011-10-24 Thread TreKing
On Sun, Oct 23, 2011 at 8:19 AM, manish  wrote:

> I am
> able to putting the button at bottom of the map but unable to give
> zoom control to them. Please give me some suggestion regarding this
> problem.
>

RTM: http://developer.android.com/reference/android/widget/ZoomControls.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Alternative Camera Interfaces

2011-10-24 Thread sandeep kumar
can u tell what exactly u want to do?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Check whether media player is playing media or not

2011-10-24 Thread Robert Nekic
What about the AudioManager's isMusicActive?

http://developer.android.com/reference/android/media/AudioManager.html#isMusicActive()





On Oct 24, 11:42 am, Studio LFP  wrote:
> You can't use MediaPlayer.isPlaying() as a static method as it is an
> instanced method. You can have the MediaPlayer instance you create/use be in
> a static variable and work with it from there.
>
> Steven
> Studio LFPhttp://www.studio-lfp.com
>
>
>
>
>
>
>
> On Monday, October 24, 2011 9:38:39 AM UTC-5, Sunil Mishra wrote:
>
> > Can i use MediaPlayer as a static object?
>
> > On Oct 24, 6:57 pm, Jeremy Dagorn  wrote:
> > > Hi,
>
> > >http://developer.android.com/reference/android/media/MediaPlayer.html...
>
> > > MediaPlayer.isPlaying()?
>
> > > On Oct 24, 9:23 am, Sunil Mishra  wrote:
>
> > > > Hi,
>
> > > > Is there any api through which we can figure out whether media player
> > > > is currently playing any media or not?

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


Re: [android-developers] How to make an alphabetic scroll bar like that in contacts

2011-10-24 Thread Mark Murphy
http://stackoverflow.com/questions/5122749/create-easy-alphabetical-scrolling-in-listview

On Mon, Oct 24, 2011 at 2:44 AM, Abhishek Mukherjee
 wrote:
> I am new to android developement and have only started to learn the
> basics. I have been asked to make an alphabetic scroll bar like that
> in the contacts (or like that in iphone). Can anyone tell me how to
> approach and perhaps explain it with an example?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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


[android-developers] Re: Network related

2011-10-24 Thread Studio LFP
Try this out. I don't recommend using this as is. You'll want to register a 
receiver for this intent while your app is being used and then unregister it 
when you are done. This is just so you can see how it works.

public class TestService extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
if( intent.getAction().equals( 
"android.net.conn.CONNECTIVITY_CHANGE" ) )
{
Log.i( "TestService", "android.net.conn.CONNECTIVITY_CHANGE" );
NetworkInfo niCommon = intent.getParcelableExtra( 
ConnectivityManager.EXTRA_NETWORK_INFO );

if( niCommon != null )
{
Log.i( "TestService", "Network Type: " + 
niCommon.getTypeName() );
Log.i( "TestService", "Network Type: " + 
niCommon.getDetailedState().toString() );
}
}
}
}

And I believe you need this in your manifest:









See how that works out for you as a test.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 1:01:56 AM UTC-5, sourabh wrote:
>
> I have a TextView, what I want is whenever my Network comes 
> online/offline.It should get reflected to TextView.
> How Can I do this.
>  
> Please suggest.
> Thanks,
> Sourabh
>

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

Re: [android-developers] Play two videos simultaneously

2011-10-24 Thread Mark Murphy
On Sun, Oct 23, 2011 at 7:33 AM, kacho  wrote:
> So is it possible to play two videos at the same time?

AFAIK, no. I was under the impression that you cannot have two
SurfaceViews in the same activity..

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

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

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


Re: [android-developers] Regarding system font size change system wide

2011-10-24 Thread Mark Murphy
On Mon, Oct 24, 2011 at 1:03 AM, alhad  wrote:
>     I have a requirement where i need to provide an option for the
> customer to change font size "Small, Medium and Large". When user
> chooses an option out of these 3, i want to change the system font as
> per the selection system wide.
>
> Is there any way to do that?

No, sorry.

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

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

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


Re: [android-developers] Maximum number of activities in a project...

2011-10-24 Thread Mark Murphy
On Sat, Oct 22, 2011 at 5:23 AM, Silju MC  wrote:
> I want to create a project with number of activities (Activity). Is
> there any limit?

There is no hard limit.

> If i move foreword any memory issue will be there?

You can run out of memory. This is not strictly tied to the number of
activities you have, any more than running out of memory is tied to
the number of strings you have.

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

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

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


[android-developers] Re: HTC and LG haven't implemented Android in the right way

2011-10-24 Thread Nightwolf
That's odd.
Anyway I've just resent you email.

The point sprites project works OK on HTC G1 (Android 1.6).

On 24 окт, 11:25, MobileVisuals  wrote:
> No, I didn't get the sample project, but it would be interested to see
> it, so could you send it again? Have you tested it on HTC devices?
>
> I don't get any black squares around the particles with my Quad
> approach either.
>
> On Oct 22, 12:59 pm, Nightwolf  wrote:
>
>
>
> > Did you get a sample project I sent you earlier? It uses point sprites
> > and has no black squares around particles.
>
> > On 21 ÏËÔ, 15:20, MobileVisuals  wrote:
>
> > > I solved this problem now for the morphed animation. I used a TreSet
> > > for the sorting. I made a Quad class and and added the quads to the
> > > treeset for each draw. The TreeSet šthen sorts them in an automatic
> > > way.
>
> > > It's not as fast as with real Point sprites and size attenuation, but
> > > the speed is OK. This really took a long time to fix. I am still going
> > > to write to the HTC support, just to let them know that they haven't
> > > implemented Android in the right way.
>
> > > On Oct 14, 10:39šam, MobileVisuals  wrote:
>
> > > > The morphed positions for the stars are calculated from some
> > > > precalculated 3d arrays, one 3d array for each single galaxy shape,
> > > > like below.
> > > > positionsM1 and positionsM2 are the two 3d arrays, which get morphed
> > > > for this frame. The result is the new morphedPositions array, which is
> > > > drawn later. I can't find any frame-to-frame coherency here. I am
> > > > considering to start with another 3d animation instead, which doesn't
> > > > use morphing, because I don't have a clue how to make an effective and
> > > > fast sorting algorithm for this:
>
> > > > for (int i = 0; i < morphedPositions.length; i++) {
> > > > š š š š š š š š š š š š morphedPositions[i] = (morphcount * 
> > > > positionsM1[i]) * mlInv
> > > > š š š š š š š š š š š š š š š š š š š š + ((morphLength - morphcount) * 
> > > > positionsM2[i]) * mlInv;
> > > > š š š š š š š š }
>
> > > > On Oct 14, 10:17šam, Latimerius  wrote:
>
> > > > > On Wed, Oct 12, 2011 at 7:09 PM, MobileVisuals 
> > > > >  wrote:
> > > > > > Thanks a lot for the info! The problem is that the positions for the
> > > > > > stars change for each new frame. This happens because the positions
> > > > > > are morphed.Wouldn't it be very slow to sort all the positions
> > > > > > according to their z-value for every frame?
>
> > > > > I'd take a close look at my positions morphing algorithm. šHow does
> > > > > the z-order change frame-to-frame? šI doubt it can change randomly,
> > > > > there will be some kind of frame-to-frame coherency - perhaps just a
> > > > > bunch of fix-ups are needed from the previous frame? šI'd try to take
> > > > > advantage of that, it should reduce your problem from a general full
> > > > > sorting one to something possibly way smaller.
>
> > > > > > Wouldn't I have to make one drawElements call for each quad if I 
> > > > > > sorted them?
>
> > > > > Not necessarily. šTry keeping vertex positions data in system memory
> > > > > (i.e. in normal Java objects). šBefore rendering each frame you
> > > > > recompute positions, reshuffle the data to restore back-to-front order
> > > > > and make a single VBO out of that. šYou could check glBufferSubData()
> > > > > and similar to avoid transferring all of the data over the bus into
> > > > > VRAM each frame. šYou can then issue a single glDrawElements() to
> > > > > render the whole thing.
>
> > > > > How exactly to do that depends on your particular algorithm but it
> > > > > should be possible.
>
> > > > > > I assume that would be a lot slower than one drawElements call for 
> > > > > > all of the quads,
> > > > > > as it is now.
>
> > > > > I understand your worries, they are well grounded. šTrying to do a
> > > > > more complex thing will usually mean your performance takes a hit.
> > > > > However, I found out in a surprising amount of cases that a thing I
> > > > > would have expected to be prohibitively slow performed very well. GPUs
> > > > > are complex beasts, they can parallelise, hide latencies and all kinds
> > > > > of stuff. šYou never know until you try.
>
> > > > > And, above all, remember that you can hardly make your renders look
> > > > > right if you use translucency with depth-buffering but don't sort
> > > > > back-to-front. šSo my strategy would be implement the sorting to make
> > > > > stuff look right, then look into how to restore plausible performance
> > > > > if needed.

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


Re: [android-developers] Re: Handling asynchronous events and blocking

2011-10-24 Thread Studio LFP
Nice, I'll have to play with that too.  I never ran into any exceptions 
because I use touches very little in the game I am playing around with.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 7:16:47 AM UTC-5, TreKing wrote:
>
> On Mon, Oct 24, 2011 at 1:20 AM, Peter Webb  wrote:
>
>> This must be a very common problem, and I would expect a simple standard 
>> solution. As I mentioned, on other platforms I have used a guaranteed atomic 
>> process (file creation)as a semaphore for synchronisation, but I doubt that 
>> is the recommended solution for Android ...
>>
>
>
> http://developer.android.com/reference/java/util/concurrent/package-summary.html
>
>
> -
> TreKing  - Chicago 
> transit tracking app for Android-powered devices
>
>

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

[android-developers] Re: Data values not populating in the gridview on screen orientation using onConfigurationChanged

2011-10-24 Thread Studio LFP
Are you repopulating the information into the new layout you are switching 
to?

Regardless of if you use configChanges or not, you need to repopulate your 
view. This is automatically invoked without configChanges since your app 
interface is removed and remade (calling onCreate again for you). If you are 
using configChanges, you will need to repopulate your views if you change it 
on one of the onConfigurationChanged events.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 7:58:52 AM UTC-5, Shajahan wrote:
>
> In the onCreate() method of an activity 
> --> done all the initialization part and also invoked the server using the 
> HTTP connection, to get the images
> --> am using the onConfigurationChanged() of an activity to get the handle 
> of the Screen Orientation
> --> but when it is rotated from horizontal to Vertical (vice-versa) new xml 
> for landscape view getting reflected but the not values in the gridview
>
>

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

2011-10-24 Thread Peter Webb
ConcurrentLinkedQueue. Exactly what I want. Thankyou.

On Oct 24, 11:16 pm, TreKing  wrote:
> On Mon, Oct 24, 2011 at 1:20 AM, Peter Webb  wrote:
> > This must be a very common problem, and I would expect a simple standard
> > solution. As I mentioned, on other platforms I have used a guaranteed atomic
> > process (file creation)as a semaphore for synchronisation, but I doubt that
> > is the recommended solution for Android ...
>
> http://developer.android.com/reference/java/util/concurrent/package-s...
>
> ---­--
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Check whether media player is playing media or not

2011-10-24 Thread Studio LFP
You can't use MediaPlayer.isPlaying() as a static method as it is an 
instanced method. You can have the MediaPlayer instance you create/use be in 
a static variable and work with it from there.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 9:38:39 AM UTC-5, Sunil Mishra wrote:
>
> Can i use MediaPlayer as a static object? 
>
> On Oct 24, 6:57 pm, Jeremy Dagorn  wrote: 
> > Hi, 
> > 
> > http://developer.android.com/reference/android/media/MediaPlayer.html... 
>
> > 
> > MediaPlayer.isPlaying()? 
> > 
> > On Oct 24, 9:23 am, Sunil Mishra  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Hi, 
> > 
> > > Is there any api through which we can figure out whether media player 
> > > is currently playing any media or not?

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

Re: [android-developers] Network related

2011-10-24 Thread Kristopher Micinski
No, I don't have code lying around for that.

What you would do is create a callback for the ConnectivityManager
that would send a message to your UI thread (or perhaps fire an intent
at it?) to tell it to change the value of the TextView. You can read
up on Messengers, but the point is that you will have some non UI
thread (at least, iirc, I suppose it is possible that this callback
runs in the UI thread, in which case you're in luck, but I can't
remember) that will need to tell the UI thread to change the value of
the textview.. You can find examples of using ConnectivityManager on
google (I found them :-), and you can read about Messenger and the
related in the documentation..

Kris

On Mon, Oct 24, 2011 at 8:13 AM, sourabh sahu  wrote:
> Can you please provide me little bit of Code for that.
>
> Thanks,
> Souerabh
>
> On Mon, Oct 24, 2011 at 5:14 PM, Kristopher Micinski
>  wrote:
>>
>> I don't think you thought about how to implement this using the way I
>> described.
>>
>> Instead of having a thread sitting in the background, why not register
>> a callback with the system that, whenever the connectivity changes,
>> performs an appropriate action?  For example, whenever the
>> connectivity changes, it will call your handler and you can change the
>> text in the textview.
>>
>> A thread just sounds like a nasty way to implement this since there is
>> already a way to do this..  However if you really want to look at
>> ConnectivityManager more, it has an isConnectedOrConnecting() method..
>>
>> Kris
>>
>> On Mon, Oct 24, 2011 at 3:08 AM, sourabh sahu 
>> wrote:
>> > Thanks, but this thing I figured.main issue is ,there is a need of
>> > Thread
>> > kind of stuff which loops around whenever network comes online or
>> > offline.
>> > It should automatically reflect it to view.
>> >
>> > On Mon, Oct 24, 2011 at 11:47 AM, Kristopher Micinski
>> >  wrote:
>> >>
>> >> Sounds like the first thing you need to be able to do is to be able to
>> >> detect when the network comes online and offline right?
>> >>
>> >>
>> >> http://developer.android.com/reference/android/net/ConnectivityManager.html
>> >>
>> >> On Mon, Oct 24, 2011 at 2:01 AM, sourabh sahu 
>> >> wrote:
>> >> > I have a TextView, what I want is whenever my Network comes
>> >> > online/offline.It should get reflected to TextView.
>> >> > How Can I do this.
>> >> >
>> >> > Please suggest.
>> >> > Thanks,
>> >> > Sourabh
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "Android Developers" group.
>> >> > To post to this group, send email to
>> >> > android-developers@googlegroups.com
>> >> > To unsubscribe from this group, send email to
>> >> > android-developers+unsubscr...@googlegroups.com
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-developers?hl=en
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Android Developers" group.
>> >> To post to this group, send email to
>> >> android-developers@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> android-developers+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/android-developers?hl=en
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Storing database of information?

2011-10-24 Thread Studio LFP
Have you considered just making the application come without data and then 
pull the data from a server?  It would be much easier on you to not have to 
republish the application every time you wanted to change some of that data.

The basic steps would be something like this:

1. Publish app without data
2. App checks for the last time it got data against the last update on the 
server
3. Download updated data if needed

You could have it check in the background each time the user used the 
application and notify them that they needed an update or use C2DM for push 
notifications.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 8:32:48 AM UTC-5, Todilo wrote:
>
> Hi, sorry for a bad subject name, just couldn't name it in a good way. 
> I have an application which is basicly like a wiki which presents 
> information and images. This information will change frequently (and 
> images) as well so I was wondering the best way to set it up. It 
> basically is a list of units and their statistics for a game. Since 
> unit information and statistics will change after each patch I need to 
> send that information out with an updated version of the app. What is 
> a good way of storing this information? Can I have a database which I 
> recreate upon every update(user will not change the data himself) or 
> is it better to just have .txt/xml files describing unit information? 
>
> Ideas? Been away from android programming for some time.

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

Re: [android-developers] Re: alarm type application: alarm manager not waking up application

2011-10-24 Thread Studio LFP
Have you considered using a MediaPlayer instead of just a straight Ringtone 
object? You can pass the URI of the Ringtone to the MediaPlayer and have 
better functionality.

I use the MediaPlayer and create a MediaPlayer.OnCompletionListener to watch 
for the end of the playing. This doesn't always fire, so I also use a 
postDelayed to make sure I check for the end also. You can use 
MediaPlayer.getDuration() and use it to set the time for your postDelayed.

Here are some of the APIs I make use of:

http://developer.android.com/reference/android/media/MediaPlayer.html
http://developer.android.com/reference/android/media/MediaPlayer.OnCompletionListener.html
http://developer.android.com/reference/android/media/MediaPlayer.html#getDuration%28%29

It's worth upgrading to a more full featured audio player if you want better 
control.

*Note:* I've experienced times where the audio just stops playing without 
posting back a callback like 
MediaPlayer.OnCompletionListener,
 
MediaPlayer.OnErrorListeneror
 
MediaPlayer.OnInfoListener.
 
Not sure if it was a hardware thing, but I tried everything and there would 
be times where I'd not get any notification of it stopping. Because of that 
fact, I do recommend the postDelayed with the duration (plus a slight time 
padding) of the audio to finish any clean-up after the audio.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 24, 2011 7:48:07 AM UTC-5, John Goche wrote:
>
>
> On Mon, Oct 24, 2011 at 1:57 AM, John Goche wrote:
>
>>
>> Well, here is what I am doing now: I acquire a wakelock inside the 
>> broadcast receiver
>> and release it from my activity. The only problem I have is that the 
>> play() method is
>> asynchronous. I would like to be notified when the sound stops playing via 
>> a callback
>> but I see no method for doing so here:
>>
>>
>> http://developer.android.com/reference/android/media/Ringtone.html#play%28%29
>>
>> I wonder whether there is a way to detect this without having to poll 
>> calling isPlaying()
>> every second or so.
>>
>
> Well, here is the solution to turning off the wakelock when the sound stops 
> playing:
>
> Regards,
>
> John Goche
>
> this.ringtone = RingtoneManager.getRingtone(this, uri);
>
> if (this.ringtone != null)
>
>   this.ringtone.play();
>
> // check every five minutes if ringtone is done
> // and release wake lock when done playing alarm sound
> 
> final int checkInterval = 5000;
>
> final Runnable runnable = new Runnable() {
>
>   public void run() {
> 
> System.out.println("I'm running!!!");
> 
> System.out.println(!AlarmExpiredActivity.this.ringtone.isPlaying());
> System.out.println("OK.");
> 
> if (AlarmExpiredActivity.this.ringtone != null && 
> !AlarmExpiredActivity.this.ringtone.isPlaying())
>
>   WakeLockManager.putWakeLock();
>   
> else
>   
>   AlarmExpiredActivity.this.view.postDelayed(this, checkInterval);
>
>   }
>
> };
>
> this.view.postDelayed(runnable, checkInterval);
>
>
>

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

Re: [android-developers] Access to voice/microphone during call

2011-10-24 Thread Mark Murphy
On Mon, Oct 24, 2011 at 3:02 AM, Danny S.  wrote:
> I am searching for a possibility to access the voice during a call -
> no recording: I want to change the spoken text live. Is this possible
> at all?

No, sorry.

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

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

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


[android-developers] Re: 3D Engine

2011-10-24 Thread bdk
hi, check out http://unity3d.com/unity/publishing/android.html

--
Mathieu

On Oct 24, 12:26 pm, muizz  wrote:
> Assalam o aliukum.
> I am a student of BS-Computer Science.
> I want to make 3D android game on poultry form.
> I want to discuss that what is the best tool for 3D graphics handling
> and what is the suitable 3D engine in Android?
> 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


Re: [android-developers] Re: ROM

2011-10-24 Thread RAJU V
thank u for information




~~RAJU~~
~~www.itdoall.co.cc~~


On Mon, Oct 24, 2011 at 8:18 PM, Jerrick Davis  wrote:

> if anyone would like to help email me at lamabo...@gmail.com
>
> On Oct 24, 8:18 am, Jerrick Davis  wrote:
> > how do i create a custom ROM of android 4 for the sprint HTC Hero
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: ROM

2011-10-24 Thread Jerrick Davis
if anyone would like to help email me at lamabo...@gmail.com

On Oct 24, 8:18 am, Jerrick Davis  wrote:
> how do i create a custom ROM of android 4 for the sprint HTC Hero

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Check whether media player is playing media or not

2011-10-24 Thread Sunil Mishra
Can i use MediaPlayer as a static object?

On Oct 24, 6:57 pm, Jeremy Dagorn  wrote:
> Hi,
>
> http://developer.android.com/reference/android/media/MediaPlayer.html...
>
> MediaPlayer.isPlaying()?
>
> On Oct 24, 9:23 am, Sunil Mishra  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Is there any api through which we can figure out whether media player
> > is currently playing any media or not?

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


[android-developers] Re: Android - dynamic web image - GUI

2011-10-24 Thread Peter Liu
Try androidquery.com library look for image loading and aspect ratio.

On Oct 24, 7:31 am, Tomas  wrote:
> Hi there,
>
> I am struggling how to define the image in my relative layout which
> will differ in size for different densities (but I am going to load

> this image from the web so I guess I can't use those dpi folders in my
> app for this).
>
> I am developing an app which displays information about the book
> including its cover - I am going to load the image of the same
> dimensions accross multiple densities and I would like to just "scale"
> within my app so small densities would see scaled image on 120*80 px
> and large densities can have 500*200px image and so on.
>
> I'm using com.github.droidfu.widgets.WebImageView for loading images
> but I am open to use anything else which will help to accomplish this.
> I've tried to manually check what resolution is current device and
> then set width/height on imageview but the issue is that
> com.github.droidfu.widgets.WebImageView doest support that and I do
> not want to reimplement all the image load/caching/progress image by
> myself again.
>
> It would be also great if I could define the dimension in the xml
> (I've tried to use  tag and had three different xml files
> with different dimension in my res folders but unfortuantelly the GUI
> designer in eclipse doesn't read with/height from included elements so
> I basically get non-visible image in it until I redefine width/height
> directly in the layout I am including the element into).
>
> I would be really thankful for anything which push me in the right
> direction.
>
> Cheers!

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


[android-developers] help me

2011-10-24 Thread RAJU V
how to run c,c++ program in terminal...






~~RAJU~~
~~www.itdoall.co.cc~~

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

2011-10-24 Thread Zsolt Vasvari
Nobody tried this new API yet?

On Oct 24, 2:57 pm, Zsolt Vasvari  wrote:
> I am trying to convert my Calendar code to the new ICS APIs.
>
> For starters, I am trying the simplest possible operation -- reading
> the list of Calendars.
>
> I am using the following code:
>
> context.getContentResolver().query(CalendarContract.CONTENT_URI,
> CALENDARS_PROJECTION, CALENDARS_WHERE, null,
> CalendarContract.Calendars.DEFAULT_SORT_ORDER)
>
> but I am getting an unknown URL exception on the ICS emulator, both
> Standard and Google API images:
>
> E/ACRA    (  746): Caused by: java.lang.IllegalArgumentException:
> Unknown URL content://com.android.calendar
> E/ACRA    (  746):      at
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> 165)
> E/ACRA    (  746):      at
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> 135)
> E/ACRA    (  746):      at
> android.content.ContentProviderProxy.query(ContentProviderNative.java:
> 358)
> E/ACRA    (  746):      at
> android.content.ContentResolver.query(ContentResolver.java:304)
>
> Is this supposed to work on the emulator?

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


[android-developers] ROM

2011-10-24 Thread Jerrick Davis
how do i create a custom ROM of android 4 for the sprint HTC Hero

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


Re: [android-developers] Eclipse crashes when open layout designer

2011-10-24 Thread Tor Norbye
When the VM itself crashes that's a Java bug -- it looks like you're
running Java 1.5.0_06 -- you might want to update to a newer version
(such as Java 1.6.0_29).

-- Tor

On Mon, Oct 24, 2011 at 4:15 AM, ya3qoob  wrote:
> I have a problem with eclipse, Whenever i try to open layout graphical
> designer while developing a project on android 2.2 or 1.6 platform,
> the eclipse crashes and exits immediately.
>
> This problem happens also when using any other platform version while
> setting the UI version in the layout graphical designer ( which is
> specified by a drop down list in the upper right corner of the
> designer) to 2.2 or 1.6
>
> I found these logs in the log file:
> #
> # An unexpected error has been detected by HotSpot Virtual Machine:
> #
> #  EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x6d2c2203, pid=3844,
> tid=2224
> #
> # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
> # Problematic frame:
> # C  [fontmanager.dll+0x12203]
> #
>
>
>
> Does any one have any idea about this
> 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
>

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

2011-10-24 Thread Jeremy Dagorn
Hi,

Could you give some code and raised error(s)?

Jeremy

On Oct 21, 8:36 pm, ktuluceng  wrote:
> how to make speech recording application for android please help me my
> cod is true but ı dont understand application has stopped  erorr :S
>
> ı folllow this 
> linkhttp://www.brighthub.com/mobile/google-android/articles/40737.aspx
> and apply my application but take a error please help me !!!

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


[android-developers] Re: Check whether media player is playing media or not

2011-10-24 Thread Jeremy Dagorn
Hi,

http://developer.android.com/reference/android/media/MediaPlayer.html#isPlaying%28%29

MediaPlayer.isPlaying()?

On Oct 24, 9:23 am, Sunil Mishra  wrote:
> Hi,
>
> Is there any api through which we can figure out whether media player
> is currently playing any media or not?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: onCallStateChanged(int state, String number)

2011-10-24 Thread ch
Hi Sunil,

As far as i know the onCallStateChanged callback is called when a
phone call state is changed (ringing,offhook and idle).
On the callback is called for ringing, the phone number is provided
for offhook and idle, the phone number is empty.

Andrei


On Oct 24, 4:24 pm, Sunil Mishra  wrote:
> Hi,
>
> can you describe about "other 2 cases" and what you mean by that?
>
> On Oct 24, 5:38 pm, ch  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I observed an undocumented behavior of the method
> > PhoneStateListener.onCallStateChanged(int state, String
> > incomingNumber).
>
> > When the method is called on a new ringing call the incommingNumber is
> > provided, but in the other 2 cases the number is missing!!
>
> > My question is: Is this the default behavior (and the issue is in
> > documentation) or is a bug in my platform?
>
> > Test was made on Nexus One upgrade 2.3.6.
>
> > Tanks for your time!
>
> > Regards Andrei.

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


[android-developers] Storing database of information?

2011-10-24 Thread Todilo
Hi, sorry for a bad subject name, just couldn't name it in a good way.
I have an application which is basicly like a wiki which presents
information and images. This information will change frequently (and
images) as well so I was wondering the best way to set it up. It
basically is a list of units and their statistics for a game. Since
unit information and statistics will change after each patch I need to
send that information out with an updated version of the app. What is
a good way of storing this information? Can I have a database which I
recreate upon every update(user will not change the data himself) or
is it better to just have .txt/xml files describing unit information?

Ideas? Been away from android programming for some time.

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

2011-10-24 Thread Streets Of Boston
I found this out the hard way too a while ago :)
I worked around it by just having the first AsyncTask class reference being 
handled on the main UI thread. If you do that, all other instances of 
AsyncTask in your app can be created from any thread.

E.g. in your Application object's *onCreate *you could just call *(new 
MyDummyAsyncTask()).execute()*. Then you can create AsyncTasks on any thread 
you'd like.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: onCallStateChanged(int state, String number)

2011-10-24 Thread Sunil Mishra
Hi,

can you describe about "other 2 cases" and what you mean by that?

On Oct 24, 5:38 pm, ch  wrote:
> Hi,
>
> I observed an undocumented behavior of the method
> PhoneStateListener.onCallStateChanged(int state, String
> incomingNumber).
>
> When the method is called on a new ringing call the incommingNumber is
> provided, but in the other 2 cases the number is missing!!
>
> My question is: Is this the default behavior (and the issue is in
> documentation) or is a bug in my platform?
>
> Test was made on Nexus One upgrade 2.3.6.
>
> Tanks for your time!
>
> Regards Andrei.

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


[android-developers] Check whether media player is playing media or not

2011-10-24 Thread Sunil Mishra
Hi,

Is there any api through which we can figure out whether media player
is currently playing any media or not?

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


Re: [android-developers] Hello Grid View Tutorial

2011-10-24 Thread TreKing
On Sun, Oct 23, 2011 at 12:11 AM, Hopette  wrote:

> For some reason, my code debugs, but I get this error at runtime: "The
> application HelloGridView (process com.example.hellogridview) has
> stopped unexpectedly. Please try again.
>

Your application threw an exception. Use your debugger and LogCat to track
it down, then fix it.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

  1   2   >