Re: [android-developers] google map marker

2011-07-22 Thread Raghav Sood
You can use the google maps overlay class to draw on the map.

Hiding the google logo is not permitted. Read the terms and conditions.
On Fri, Jul 22, 2011 at 11:11 AM, arun kumar hariarun2...@gmail.com wrote:

 Hello all,
 I am working in google map application. In that application i want to
 show two different markers like for eg if i point out australia using
 one own custom marker and england using another marker. how can we do
 that? then i have another doubt in google map displayed in android
 emulator. its show google text in left bottom how can i hide that
 google text? please help me


 Thanks in advance
 ARUN KUMAR

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

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

2011-07-22 Thread saurabh kulkarni


On Jul 21, 11:22 pm, saurabh kulkarni funwit.saur...@gmail.com
wrote:
 Hi
 I have date(TEXT) column in db.I want to display dates in ascending
 order(i.e. group by date).but according to current date.

Sorry (order by)

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


[android-developers] Re: Listview oddity with imageview

2011-07-22 Thread Simon Platten
Has anyone else encountered this problem?

On Thu, Jul 21, 2011 at 7:54 PM, Simon Platten simonaplat...@googlemail.com
 wrote:

 I have a listview with each item defined as:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=fill_parent

  android:layout_height=?android:attr/listPreferredItemHeight
  android:padding=10dp
 LinearLayout android:id=@+id/llHeader
   android:background=@color/blue
   android:orientation=vertical
   android:layout_alignParentTop=true
   android:layout_width=fill_parent
   android:layout_height=fill_parent 
 CheckBox android:id=@+id/chkUse
  android:text=File-name
   android:textColor=@color/yellow
   android:textStyle=bold
  android:layout_width=fill_parent
  android:layout_height=wrap_content
   android:layout_gravity=left /
 /LinearLayout
 ImageView android:id=@+id/ivthumbNail
   android:src=@drawable/placeholder
   android:layout_centerHorizontal=true
   android:layout_below=@+id/llHeader
   android:layout_width=fill_parent
   android:layout_height=fill_parent /
 ImageButton android:id=@+id/btnCCW
  android:src=@drawable/ccw_rotate_btn
 android:layout_alignLeft=@+id/llHeader
android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 ImageButton android:id=@+id/btnCW
  android:src=@drawable/cw_rotate_btn
 android:layout_alignRight=@+id/llHeader
 android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 /RelativeLayout


 This gives a title / checkbox, under this is an imageview with a button
 either side of it.  With the buttons I can rotate the image clockwise or
 counter clockwise by 90 degrees, the routine that performs the rotation and
 scaling of the images:

 public Bitmap scaleAndRotateImage(boolean blnShow) {
 try{
 BitmapFactory.Options bfo = new BitmapFactory.Options();
 bfo.inSampleSize = 4;
 Bitmap bmpData = BitmapFactory.decodeFile(m_strFilename,
 bfo);

 if ( m_intOriginalWidth == 0  m_intOriginalHeight == 0 ) {
 m_intOriginalWidth = bmpData.getWidth();
 m_intOriginalHeight = bmpData.getHeight();
 int intScaledWidth = clsWallpaper.m_intScrWidth;
 float fltAspectRatio = (float)bmpData.getHeight() /
 (float)bmpData.getWidth();
 int intScaledHeight = (int)((float)intScaledWidth *
 fltAspectRatio);
 m_fltScaleWidth = ((float)intScaledWidth) /
 ((float)m_intOriginalWidth);
 m_fltScaleHeight = ((float)intScaledHeight) /
 ((float)m_intOriginalHeight);
 }
 // Apply the scale to the matrix
 Matrix mtx = new Matrix();
 mtx.postScale(m_fltScaleWidth, m_fltScaleHeight);
 // Apply the rotation angle to the matrix
 mtx.postRotate(m_intTotalAngle);
 // Get the scaled and maybe rotated version of the bitmap
 Bitmap bmpScaled = Bitmap.createBitmap(bmpData,
 0, 0,
 m_intOriginalWidth,
 m_intOriginalHeight,
 mtx, true);
 if ( blnShow == true  bmpScaled != null ) {
 m_drwThumbnail = new BitmapDrawable(bmpScaled);
 Activity a = (Activity)m_ivThumbnail.getContext();
 a.runOnUiThread(updateThumbnail);
 }
 return bmpScaled;
 } catch( Exception ex ) {
 Log.e( TAG, rotateThumbnail, ex );
 }
 return null;
 }

 The strange this is when the image is rotated the scaled version is smaller
 than it is supposed to be, if I scroll the listview so the item goes out of
 view then scroll it back into view the item comes back with the image of the
 correct size.  Is they're anything I can do about this?
 --
 Regards,
 Sy




-- 
Regards,
Sy

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

[android-developers] Re: HELP: Connecting to SQL Server using JDBC

2011-07-22 Thread Boozel
HI
 
Thanks for the reply. I'll give that a try on monday when i have access to 
the SQL server and post my results, thanks for the suggestion.

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

[android-developers] Re: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-22 Thread Chris Stratton
On Thursday, July 21, 2011 1:26:54 AM UTC-4, Animesh Sinha wrote:

 The issue is that I need to call the service methods as soon as it is 
 connected. 
 So, Is there any way by which I can execute the functions of service 
 JUST AFTER binding is complete ? 

 It takes around 10-20ms for binding, I tried to make use 
 Thread.sleep(30); but it delayed the service from being connected by 
 the same sleep duration, therefore not solving the problem. 


The problem is that android requires you to write event driven code here.  
It can't deliver a new event until you return from the current event.  If 
you sleep, you just delay the return, and thus the new event delivery which 
can only occur after that.

You are going to have to do a lot of re-thinking of how to architect this 
whole process as a chain of events.  Yes, it's painful, but you'll get 
better at that kind of re-shuffling with time.

 

 On Jul 20, 6:33 pm, Mark Murphy mmu...@commonsware.com wrote: 
  On Tue, Jul 19, 2011 at 12:21 PM, animeshsi anime...@gmail.com wrote: 
   Is there some way by which I can make sure that the service binding is 
   complete before any access is made to functions provided by the 
   service ? 
  
  Don't try using the Binder until onServiceConnected() is called. 
 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] Request to Google's Android SDK team

2011-07-22 Thread Jimen Ching
Hello to the Android SDK team at Google,

I don't know if anyone in the Android SDK team is listening, but I have a 
request.  I know you guys are working on the emulator's speed in the 
Honeycomb SDK.  I was wondering if it is possible to release a VirtualBox 
version of the Honeycomb emulator to run on MacOS X.  The Qemu emulator of 
Honeycomb is simply not usable on a decent development machine.  Decent 
meaning; dual core, 2.8GHz, 4Gig RAM.  This should be sufficient to develop 
an application for a desktop, so it should be sufficient to develop for a 
tablet.  Yet, it is unusable to test my application on the latest SDK's 
emulator.

I've built the AOSP emulator for VirtualBox, and it is able to bootup.  But 
it lacks mouse and Ethernet support, so it is not usable as a testing tool. 
 The Honeycomb emulator should have support for a mouse already, and 
Ethernet support shouldn't be too difficult to add.  Thus, there shouldn't 
be any reason to prevent a VirtualBox version of the Honeycomb emulator. 
 So, Android SDK team, please consider releasing something else to hold us 
over until a usable Qemu solution is ready.  I think it is very insidious to 
force Android app developers to use Qemu in its current state.

So I beg you.  Give us something for the time being, please.

--jc

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

2011-07-22 Thread albnok
I don't know how Services work, but with IntentService you can send an
intent that says hey I'm launching the IntentService from an
Activity! and catch it in onHandleIntent or onStartCommand.


On Jul 19, 2:19 am, elDoudou the.edouard.merc...@gmail.com wrote:
 Thank you Diane.

 I may have a problem with my design, but if I'm wrong, I'd be
 delighted to be well guided.

 I would like my application to initialize a certain way when it is
 started with an Activity (for instance, I want to set up some caching
 stuff), whereas when launched via a Service, I do not need it to be
 initialized that way. The solution that I have found so far is to
 override the Application.onCreate() method, so as to be notified
 every time the application process starts, and quick-initialize some
 stuff.

 I have declared two android:processes because I thought that it
 might be possible to distinguish the cause of the application process
 start, but if you say that it is not possible to determine the
 android:process responsible for the start of the process, how can I
 solve my problem, please?

 Do you have in mind another design pattern which enables the
 application to be notified at startup, whatever Activity,
 BroadcastReceiver, Service causes its process to start so as to
 initialize some stuff, and to distinguish a specific Service where no
 initialization is supposed to be run, please?

 I would be very grateful to the person who is able to unblock me. And
 please, do not tell me that I have a design problem eventually ;)

 Regards,
 Édouard

 On 14 juil, 20:05, Dianne Hackborn hack...@android.com wrote:







  Sorry, there is no way to know.  Processes are basically anonymous
  containers in which to run code.  If you are needing to distinguish them,
  you have a problem in your design.

  On Tue, Jul 12, 2011 at 1:43 AM, elDoudou 
  the.edouard.merc...@gmail.comwrote:

   Hello Doug and thank you.

   The process id does not indicate the Android declared process in the
   AndroidManifest.xml file, unfortunately. What I need to know is the
   android:process which causes the process to start. If I declare a
   service in the manifest with a specific process name (tag
   android:process), how do I know at runtime when this specific
   service process causes the Application::onCreate() method to be
   invoked, please?

   Thank you for your time and support. Regards,
   Édouard

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

2011-07-22 Thread gjs
http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html

On Jul 22, 2:40 pm, Dianne Hackborn hack...@android.com wrote:
 Having a drawable-small indicates a more fundamental problem with what you
 are doing.  Why are you doing such a thing?  What is the configuration of
 this device?  You really need to provide more detail of exactly what you are
 doing and the problematic behavior you are seeing.









 On Thu, Jul 21, 2011 at 9:54 AM, Alex alexdavisspec...@gmail.com wrote:
  Hey, I have recently come across a situation where drawable-hdpi
  resources on a small-screen, hdpi device look terrible. I would like
  to force smallscreen devices to use mdpi resources.

  Copying (or resizing) all the pertinent drawables from /drawable-mdpi
  to /drawable-small causes too much APK size inflation to justify, and
  it would be *another* item in the resource maintenance hassle.

  My first idea was to create xml reference files in /drawable-small
  that reference the drawable-mdpi resources, but i dont know how to
  hard-link to a specific resolution's (in this case mdpi) drawable
  via the @drawable/ syntax.

  Whats my way out?

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

 --
 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: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-22 Thread gjs
Hi,

You can just start the service via an intent and also pass details
about the function(s) you want executed, but you won't get anything
returned from the function(s) invoked in the service being sent back
to the activity directly, you will have to use the usual interfaces
otherwise.

Regards

On Jul 22, 4:54 pm, Chris Stratton cs07...@gmail.com wrote:
 On Thursday, July 21, 2011 1:26:54 AM UTC-4, Animesh Sinha wrote:
  The issue is that I need to call the service methods as soon as it is
  connected.
  So, Is there any way by which I can execute the functions of service
  JUST AFTER binding is complete ?

  It takes around 10-20ms for binding, I tried to make use
  Thread.sleep(30); but it delayed the service from being connected by
  the same sleep duration, therefore not solving the problem.

 The problem is that android requires you to write event driven code here.  
 It can't deliver a new event until you return from the current event.  If
 you sleep, you just delay the return, and thus the new event delivery which
 can only occur after that.

 You are going to have to do a lot of re-thinking of how to architect this
 whole process as a chain of events.  Yes, it's painful, but you'll get
 better at that kind of re-shuffling with time.







  On Jul 20, 6:33 pm, Mark Murphy mmu...@commonsware.com wrote:
   On Tue, Jul 19, 2011 at 12:21 PM, animeshsi anime...@gmail.com wrote:
Is there some way by which I can make sure that the service binding is
complete before any access is made to functions provided by the
service ?

   Don't try using the Binder until onServiceConnected() is called.
  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: Data Transmission

2011-07-22 Thread gjs
http://developer.android.com/search.html#q=json or xmlt=0

On Jul 22, 1:51 pm, Sivaprakash sivaprakashshanmu...@gmail.com
wrote:
 Hi

 What is the best way to transfer the data between client (mobile) and the
 server ? XML or Json  ?
 Can I do any data structuring in client end ?

 --
 - Prakash.

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

2011-07-22 Thread gjs
yes  yes

On Jul 22, 2:02 pm, Matthew Powers mtpow...@gmail.com wrote:
 Has anyone noticed the the apparent whitespace that gets inserted at the
 beginning of an audio recording?  Also has anyone seen the MediaRecorder
 cutting off the beginning of a recording in Android 2.3.4?

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

2011-07-22 Thread wasabee18
Hi all,

I am handling some sensitive information like password in my app. I am
wondering how secure it is to pass password as a parameter to intent.
For instance, when I monitor the device with adb.exe, I can see some
parameters of the intent sent before the intent is resolved by the OS.
How easy is it to monitor/spy/dump the intent resolution process and
its parameters from:
- a third party app (say malware) installed on the phone
- from a PC connected to the phone (using similar tool as adb)

Thanks in advance.
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] Android webview not preview you tube vedios

2011-07-22 Thread H@ri
Hi,

I am loading the data in a webview. Some times data contain you tube
videos. At that time it does not preview the you tube video. Any
solution please let me know. Its urgent...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-07-22 Thread gjs
Hi,

I was sort of hoping it might also be applicable to supporting
different apk's for different languages/internationalization/
localization but perhaps that is just too many permutations to split
the filtering.

It will be interesting how the alternate markets handle these changes
as well, plus making it a bit more complicated when side loading to
unsupported/unintended target devices ?

Regards

On Jul 22, 12:55 pm, Mark Carter mjc1...@googlemail.com wrote:
 Awesome, thanks very much to the Android Market team:

 http://android-developers.blogspot.com/2011/07/multiple-apk-support-i...

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


Ang.: [android-developers] Re: How many minutes (hours?) does the LVL hang on Checking license

2011-07-22 Thread jan . skarvall
Hi Jim

Are you showing all license related code that you have in your app above?
If that is the case, I recommend that you read through the chapters in 
http://developer.android.com/guide/publishing/licensing.html once again.

Jan

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

2011-07-22 Thread gjs
Hi,

Get the telco's/oem's to include it their system images.

Regards

On Jul 22, 5:51 am, Paul pgbo...@gmail.com wrote:
 Here's my list of the top ways I can think of to market your Android
 app. If you have any suggestions to add please leave them in the
 comments or email me at p...@bowen.fm. I've tried to order the list in
 terms of risk vs effort vs reward to order in terms of which strategy
 will have the most effect in getting more people to use your app.
 1. Make it free(mium): So this isn't a way to promote your app but
 it's a marketing strategy. Making your app free will ensure that every
 one of the rest of the suggestions below is more effective by 10x or
 more, releasing a paid app, especially on Android, will only bring you
 pain. If you want some reasons why you should make your app freemium
 go here:

 2. App stores: Submitting your app to several app stores is an easy
 free way to ensure you're more visible. The first stop should be
 Google Market. You could leave it at at but it's free to submit to
 Getjar and Amazon Android Market place so you might as well. Google
 Market + Amazon take a revenue share of the money you make from either
 selling your app or from any in app purchases (IAP) that are made
 through their billing solutions which is the trade-off for exposure.
 Getjar only accepts free apps and allows you to implement your own
 billing solutions if you use IAP. App stores are effectively risk free
 as a revenue share is given to the app store owner.

             2.1 On market presence: you’d be surprised at the install
 rate at which apps are installed / clicked through etc based on their
 icon. It’s CRUCIAL, and it’s free for you to optimise. Trial a couple
 and see what works best. App name is also REALLY important. Make it
 easy to find, both in the app store but using Google. I know so many
 companies who’ve used an obscure name, or hyphenated name, and
 suffered from it.

             2.2 Begging app store curators: This section is all about
 getting free promotion and putting your product in front of the people
 who curate the editorial sections of an app store is a great way to
 get yourself some free exposure. Find out who looks after the
 editorial sections of Google, Amazon, Getjar in your country, email
 them and tell them why your app offers such good value to the end
 user.

 Providers include: Google Android Market, Getjar, Amazon Appstore for
 Android

 3. Mobile Affiliate networks: When reducing risk mobile affiliate
 networks are another good way to buy traffic for your application,
 they're middlemen who bring together publishers / affiliates (normally
 application developers or mobile website owners) who want to monetise
 their traffic and advertisers who want an audience for their traffic
 through technology. Affiliate networks revenue model is normally on an
 override of 30% of the revenue you pay out to an affiliate, so if you
 had a $1 app and gave $0.50 commission to an affiliate for providing
 that sale, then you'd pay $0.15 commission to the affiliate network.
 The same can work with IAP for free apps. The issue here is volume,
 there are very few affiliate networks that can provide any sort of
 scalability with this model because of the poor conversions from the
 traffic they monetise and there are normally set up fees.

 Providers include: Mobpartner, Commission Junction, Tradedoubler,
 Linkshare, Offermobi, Sponsormob, Moolah Media, Mobilclix

 4. Pay per install providers: When you pay per install for an
 application you're normally paying for the user to download and open
 an application.  If the application is paid for, and you're paying
 less for the install than you are to the provider then you're ROI
 positive. This isn't normally the case though and there are only
 scalable options for Pay Per Install when you have a free app and are
 making money on an in app transaction.

 Providers include: Getjar, Everbadge, Appbrain

 5. Incentivised Pay per install:   The end user who downloads your app
 still has to install your app but they got some sort of incentive for
 doing so (normally virtual currency in a game they were playing). In
 terms of volume this is the single biggest paid source of installs on
 Android but the fact that the incentivised installs are further up the
 conversion path means quality can suffer.

 Providers include: Tapjoy (disclaimer, I work for them), Flurry, mdotm

 6. Incentivised Pay per action / acquisition: still using the
 incentivised model but incentivising the user to engage with an app
 rather than just download and open it.

 Providers include: At the moment Tapjoy are they only company to offer
 this.

 7. Social SDK's: are mobile social network for gamers. This allows
 gamers to discover new apps through what their friends are doing and
 what's popular.

 Providers include: Openfeint, Scoreloop, Papaya, HeyZap

 8. Adnetworks: Although adnetworks have massive scale, the metric an
 adnetwork will normally 

[android-developers] 9 patch png

2011-07-22 Thread b_t
Hi,

I would like use a 9 patch png in an ImageView. It sounds easy but
doesn't work for me.
If I set the popup.9.png drawable as the source then the whole image
is stretched, not works as I excepted.

ImageView android:layout_width=fill_parent
android:layout_height=fill_parent android:src=@drawable/popup/

If I set this drawable as background then it works well.

But setting as background is not good for me because I would like to
set alpha value too
which is for source only not background.

This link says too that you should set as background:

http://stackoverflow.com/questions/5242880/android-9-patch-graphic-doesnt-scale-in-image-view

Can somebody tell me why doesn't it work?

Thanks,
Tamás

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


Re: [android-developers] 9 patch png

2011-07-22 Thread Raghav Sood
Did you adjust the areas to be stretched properly?

On Fri, Jul 22, 2011 at 1:49 PM, b_t bartata...@gmail.com wrote:

 Hi,

 I would like use a 9 patch png in an ImageView. It sounds easy but
 doesn't work for me.
 If I set the popup.9.png drawable as the source then the whole image
 is stretched, not works as I excepted.

 ImageView android:layout_width=fill_parent
 android:layout_height=fill_parent android:src=@drawable/popup/

 If I set this drawable as background then it works well.

 But setting as background is not good for me because I would like to
 set alpha value too
 which is for source only not background.

 This link says too that you should set as background:


 http://stackoverflow.com/questions/5242880/android-9-patch-graphic-doesnt-scale-in-image-view

 Can somebody tell me why doesn't it work?

 Thanks,
 Tamás

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




-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Raghav+Sood

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

2011-07-22 Thread gjs
Is there space characters in the file name ? if yes remove. Also if
using Eclipse try 'refresh' option in navigator/package explorer for
the project so the new file is recognised.

On Jul 22, 2:59 am, Vishal vishaldab...@gmail.com wrote:
 I amreating an application for android in which I need to import a
 picture into the program. Whever i try to just drag the pic into my
 drawables folder, an error shows up: Unparsed Aapt Error, Check
 Console...

 The image is a .png. I have already tried cleaning the project... The
 error still persists?

 Are there any suggestions inorder to fix this error.
 Thank You in advance

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


[android-developers] Re: 9 patch png

2011-07-22 Thread b_t
Hi,

I think yes because it works well if I set as background.

https://picasaweb.google.com/109616049711402953088/2011Julius22?authkey=Gv1sRgCK2eofOr_vCHkwE

Here is the pictures: the nine patch png, the result with background/
setAlpha, the result with src/setAlpha.

Stretching is ok in only one picture and alpha is ok in the other
picture.

Tamás

On júl. 22, 10:23, Raghav Sood raghavs...@gmail.com wrote:
 Did you adjust the areas to be stretched properly?









 On Fri, Jul 22, 2011 at 1:49 PM, b_t bartata...@gmail.com wrote:
  Hi,

  I would like use a 9 patch png in an ImageView. It sounds easy but
  doesn't work for me.
  If I set the popup.9.png drawable as the source then the whole image
  is stretched, not works as I excepted.

  ImageView android:layout_width=fill_parent
  android:layout_height=fill_parent android:src=@drawable/popup/

  If I set this drawable as background then it works well.

  But setting as background is not good for me because I would like to
  set alpha value too
  which is for source only not background.

  This link says too that you should set as background:

 http://stackoverflow.com/questions/5242880/android-9-patch-graphic-do...

  Can somebody tell me why doesn't it work?

  Thanks,
  Tamás

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

 --
 Raghav 
 Soodhttp://www.raghavsood.com/http://wiki.androidappcheck.com/http://www.telstop.tel/https://market.android.com/developer?pub=Raghav+Sood

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


[android-developers] Re: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-22 Thread Animesh Sinha
Thanks Chris for replying.

You are right in saying that android requires developers to write an
event-driven code and that effort needs to be put for designing the
whole chain of events.

But for the following case as shown below, I don't think one can get
rid of the NullPointerException thrown in onClick() method of
MyServiceClient; Unless instead of storing Service Interface globally,
one stores it locally.

---
CODE SNIPPET (UPDATED)
---
//class MyServiceClient in separate file - Used for accessing the
service via a wrapper class
class MyServiceClient extends Activity
{
 //store a reference to service interface
 private ISomeServiceInterface mService = null; //
reference stored globally here

 public void onCreate(Bundle savedInstanceState)
 {
//some lines
ServiceWrapperClass svc = new
ServiceWrapperClass(getApplicationContext());
//access the service
mService = svc.getService()//the
getService() method returns null
//Integer someValue = mService.someFunc(1,
2); //Moved the line into onClick() method

//using a button's onClick event to call some function on the
service
Button btn = (Button)findViewById(R.id.someBtn);
btn.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
Integer someValue = 
mService.someFunc(1, 2); //
NullPointerException still thrown here as mService was null
}
 });
}

}

//class ServiceWrapperClass in separate file - Used for binding to
service and providing the service instance to client
class ServiceWrapperClass
{
private static ISomeServiceInterface myService;

//constructor
public ServiceWrapperClass(Context context) {
//create intent to connect to service
Intent serviceIntent = new Intent(some.uri);
context.bindService(serviceIntent,
progressBarServiceConn,
Context.BIND_AUTO_CREATE);
//access the service
Integer someValue = myService.someFunc(1,
2); // NullPointerException here - How to make sure
service should be running before any function is called on the
service ?
}

private ServiceConnection progressBarServiceConn = new
ServiceConnection(){
@Override
public void onServiceConnected(ComponentName name,
IBinder service)
{
myService =
 
ISomeServiceInterface.Stub.asInterface(service);
}
@Override
public void onServiceDisconnected(ComponentName name)
{
myService = null;
}
};
public ISomeServiceInterface getService()
{
return myService;
}
}

On Jul 22, 11:54 am, Chris Stratton cs07...@gmail.com wrote:
 On Thursday, July 21, 2011 1:26:54 AM UTC-4, Animesh Sinha wrote:
  The issue is that I need to call the service methods as soon as it is
  connected.
  So, Is there any way by which I can execute the functions of service
  JUST AFTER binding is complete ?

  It takes around 10-20ms for binding, I tried to make use
  Thread.sleep(30); but it delayed the service from being connected by
  the same sleep duration, therefore not solving the problem.

 The problem is that android requires you to write event driven code here.  
 It can't deliver a new event until you return from the current event.  If
 you sleep, you just delay the return, and thus the new event delivery which
 can only occur after that.

 You are going to have to do a lot of re-thinking of how to architect this
 whole process as a chain of events.  Yes, it's painful, but you'll get
 better at that kind of re-shuffling with time.







  On Jul 20, 6:33 pm, Mark Murphy mmu...@commonsware.com wrote:
   On Tue, Jul 19, 2011 at 12:21 PM, animeshsi anime...@gmail.com wrote:
Is there some way by which I can make sure that the service binding is
complete before any access is made to functions provided by the
service ?

   Don't try using the Binder until onServiceConnected() is called.
  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: SQLite + Android

2011-07-22 Thread Ali Chousein
Google for android sqlite tutorial. There are lots of examples.

BTW, I would humbly suggest to create the DB and the tables
programmatically within your application. Otherwise, if I want to
install your application on my device, do you expect me to create the
required database manually? Noone would do that.

--
Ali Chousein
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com/
Cisco Android marketplace (Chosen for Cisco Cius)
https://marketplace.cisco.com/apphq/products/510


On Jul 21, 11:28 pm, Tiago Oliveira krip...@sapo.pt wrote:
 I created a base of data in SQLite Administrator and enter the data.
 And now I wonder how I can use that database in my Android application.

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

2011-07-22 Thread Guian
but I'm not adding  twice the same fragment in one fragment
transaction.


here is what happens :


1) launch app
= call to  onTabSelected = add my fragment with this piece of
code:

if(!fragmentsToAdd.isAdded())
ft.add( R.id.parent, fragmentsToAdd, myFragment);


2) pressing the Back button
= we are leaving the app (I guess in 'pause' state)

3) launching my app again
= new call to onTabSelected
= myfragment.isAdded()  return false  whereas I already added it
once.
( because mActivity = null  in myfragment and I don't understand why)


= IllegalStateException: Fragment already added


why des mActivity is null a this step ?  is the fragment automaticly
destroyed or removed  when pausing/stoping the app ?





On 22 juil, 02:44, Dianne Hackborn hack...@android.com wrote:
 Committing a fragment is asynchronous; isAdded() doesn't return true until
 the transaction is committed.









 On Thu, Jul 21, 2011 at 9:33 AM, Gab gabriel.del...@gmail.com wrote:
  I have a same problem, my fragment lost the reference of activity
  after pause/resume...
  I don't understand the fragment's lifecycle.

  On 19 juil, 15:10, Guian guiandou...@gmail.com wrote:
   well well ...

   here is the fix I used :

   on the creation of my fragment I add a test in fragment.getActivity()
   is null ...

   if(testFragment == null || testFragment.getActivity()==null)
           testFragment = (TestFragment) TestFragment.instantiate(context,
   com.mypackage.test.MyFragment);

   and I recreate a previously build fragment which I think isn't very
   optimised ...

   any comment/advise on this is welcome.

   On 19 juil, 14:31, Guian guiandou...@gmail.com wrote:

here is the source code forisAdded:

    /**
     * Return true if the fragment is currently added to its activity.
     */
    final public booleanisAdded() {
        return mActivity != null  mAdded;
    }

indeed ... mActivity is null...

I guess I have to recreate this fragment from scratch since I've lost
its activity owner ?
what cause this reference on mActivity being lost ?
if its the onPause = onResume,  what's the point of having a onPause
onResume methods to implement in Fragment, if we have to recreate it
anyway ?

On 19 juil, 12:23, Guian guiandou...@gmail.com wrote:

 I've seen thatisAdded() can return false even if the field 'mAdded'
 in the Fragment is true ?
 (seen in the 'Variables' view in eclipse )

 does anybody know why ?

 On 19 juil, 11:46, Guian guiandou...@gmail.com wrote:

  I can't understand how this piece of code :

  if(!fragmentsToAdd.isAdded())
          ft.add( R.id.parent, fragmentsToAdd, myFragment);

  can lead to this exeption :

  FATAL EXCEPTION: main
  java.lang.IllegalStateException: Fragment already added:
  TestFragment{40856358 #0 id=0x7f060024 myFragment}
  at android.app.BackStackRecord.doAddOp(BackStackRecord.java:322)
  at android.app.BackStackRecord.add(BackStackRecord.java:316)
  at com.mypackage.test.MyActivity.onTabSelected(MyActivity.java:164)

  does the  isAdded()  function works fine ?

  ( used with android 3.1, it happens when leaving the app in pause
  state, then resume it and change Tab from the action bar. )

  any cu

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

2011-07-22 Thread b_t
Hi,

I have found the solution. If set scaleType=fitXY then it works.
If I don't set then it doesn't work.

On júl. 22, 10:37, b_t bartata...@gmail.com wrote:
 Hi,

 I think yes because it works well if I set as background.

 https://picasaweb.google.com/109616049711402953088/2011Julius22?authk...

 Here is the pictures: the nine patch png, the result with background/
 setAlpha, the result with src/setAlpha.

 Stretching is ok in only one picture and alpha is ok in the other
 picture.

 Tamás

 On júl. 22, 10:23, Raghav Sood raghavs...@gmail.com wrote:







  Did you adjust the areas to be stretched properly?

  On Fri, Jul 22, 2011 at 1:49 PM, b_t bartata...@gmail.com wrote:
   Hi,

   I would like use a 9 patch png in an ImageView. It sounds easy but
   doesn't work for me.
   If I set the popup.9.png drawable as the source then the whole image
   is stretched, not works as I excepted.

   ImageView android:layout_width=fill_parent
   android:layout_height=fill_parent android:src=@drawable/popup/

   If I set this drawable as background then it works well.

   But setting as background is not good for me because I would like to
   set alpha value too
   which is for source only not background.

   This link says too that you should set as background:

  http://stackoverflow.com/questions/5242880/android-9-patch-graphic-do...

   Can somebody tell me why doesn't it work?

   Thanks,
   Tamás

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

  --
  Raghav 
  Soodhttp://www.raghavsood.com/http://wiki.androidappcheck.com/http://www

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

2011-07-22 Thread Ali Chousein
Develop a REST interface at your server side. Then in your Android
application you can use HTTP GET/POST to communicate with your server.
Server side development is outside the scope of this platform though.
For this you may try investigating some frameworks like Django (there
are other frameworks as well, I don't recall all the names now).

--
Ali Chousein
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com/
Cisco Android marketplace (Chosen for Cisco Cius)
https://marketplace.cisco.com/apphq/products/510


On Jul 21, 5:03 pm, Mobile Pocket Apps robert.h...@gmail.com wrote:
 Hello, I have started learning Android app development and I am trying
 to learn how to query and insert data to/from my Android app to a
 MySQL database.  So far I have been reading about creating a web
 service, but I haven't had too much luck finding information on the
 implementation within the Android application.  It would be greatly
 appreciated if anyone knows of a good tutorial or book that explains
 how to work with MySQL databases.

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

2011-07-22 Thread arun kumar
anyone please send sample code for more than two markers in google maps.



On 7/22/11, Raghav Sood raghavs...@gmail.com wrote:
 You can use the google maps overlay class to draw on the map.

 Hiding the google logo is not permitted. Read the terms and conditions.
 On Fri, Jul 22, 2011 at 11:11 AM, arun kumar hariarun2...@gmail.com wrote:

 Hello all,
 I am working in google map application. In that application i want to
 show two different markers like for eg if i point out australia using
 one own custom marker and england using another marker. how can we do
 that? then i have another doubt in google map displayed in android
 emulator. its show google text in left bottom how can i hide that
 google text? please help me


 Thanks in advance
 ARUN KUMAR

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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.raghavsood.com/
 http://wiki.androidappcheck.com/
 http://www.telstop.tel/
 https://market.android.com/developer?pub=Raghav+Sood

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: building android2.3.4 with bluez 4.94 - readline.h problems

2011-07-22 Thread arun_satya3
Hi,

I have integrated Bluez 4.91 on Gingerbread(Samsung). But to use
health profile, we are on our own (Writing .mk files and configuring
android). I too am doing the same thing.

Rgds,
Arun S.

On Jul 21, 3:15 pm, N.F.S. nfs...@gmail.com wrote:
 Hi,

 Does Arun S. updatebluezon android 2.3.4?
 I have to use HDP which only is supported in newerbluez.
 Any suggestion?

 Thanks a lot!

 Best regards,
 Lihan

 On Jun 16, 11:51 pm, arun_satya3 arun.sat...@gmail.com wrote:







  Hi,

  I was able to solve it by adding -I directive in android.mk file.

  Regards,
  Arun S.

  On Jun 15, 4:21 pm, arun_satya3 arun.sat...@gmail.com wrote:

   Hi,

   I am building android 2.3.4 withbluez4.94 for samsung nexus S mobile
   device.
   I have added / changed the android.mk files where ever required. Now I
   am getting the following error

   external/bluetooth/bluez/attrib/interactive.c:32:31: error: readline/
   readline.h: No such file or directory
   external/bluetooth/bluez/attrib/interactive.c:33:30: error: readline/
   history.h: No such file or directory

   I have installed necessary libraries.

   Can anyone help me in resolving the errors.

   Thanks a lot.

   Warm Regards,
   Arun S.

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


[android-developers] List of all class names from android.widget package dynamically

2011-07-22 Thread kums
Hi ,

I want to show the list of all class names from the android.widget
package dynamically?

Is there any method is available to read from package name to class
names?

Please help me on this?

Thanks,
Kums

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

2011-07-22 Thread kaushik p
Hi all ,

Is there any way to get data back from the child activity to the parent
activity ??
For example if

1)  Activity1callsActivity2
2) now when the activity2  is finished  i want some data back from it .

Please help me find the solution
-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.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

Re: [android-developers] Intent Data

2011-07-22 Thread Rocky
u can use bundle or when u call activity2 , call with
startActivityForResult, and use the appropriate method.



On Fri, Jul 22, 2011 at 4:02 PM, kaushik p kaushiks...@gmail.com wrote:

 Hi all ,

 Is there any way to get data back from the child activity to the parent
 activity ??
 For example if

 1)  Activity1callsActivity2
 2) now when the activity2  is finished  i want some data back from it .

 Please help me find the solution
 --
 ThanksRegards
 Kaushik Pendurthi

 http://kaushikpendurthi.blogspot.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




-- 
Thanks  Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030274295
(R) +919886336619

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

2011-07-22 Thread William Ferguson
Its really all about the feedback (or lack of it).
Sooner or later the lack of feedback will result in a lack of reports
by developers.

I would have thought that it would be worth Google's time to add a
mechanism to the internal register so that the issues copied from the
external register ares updated with public comments/status. Otherwise
the free crowd sourcing that is currently occurring will evaporate.

William


On Jul 22, 7:26 am, Peter Sinnott psinn...@gmail.com wrote:
 On Jul 21, 7:28 pm, Mark Murphy mmur...@commonsware.com wrote:

  On Thu, Jul 21, 2011 at 2:20 PM, Peter Eastman peter.east...@gmail.com 
  wrote:
   Does anyone who works on the OS actually read bug reports?

  Yes. However, b.android.com is not the issue tracker of record -- an
  internal one is. Hence, I am sure that there are some issues that are
  being addressed but b.android.com has not been updated. And I am sure
  there are plenty of issues that are largely being ignored, for
  whatever reason.

 Seems a little silly to have 2 different bug trackers.
 Giving the impression that the public tracker is ignored defeats the
 point of having one.

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


Re: [android-developers] Intent Data

2011-07-22 Thread kaushik p
I am trying to do the same(
http://stackoverflow.com/questions/4850404/how-to-get-result-of-child-activities-in-a-parent-tab-activity)
but i am not getting it can you please give an example

On Fri, Jul 22, 2011 at 4:12 PM, Rocky rkjhaw1...@gmail.com wrote:

 u can use bundle or when u call activity2 , call with
 startActivityForResult, and use the appropriate method.



 On Fri, Jul 22, 2011 at 4:02 PM, kaushik p kaushiks...@gmail.com wrote:

 Hi all ,

 Is there any way to get data back from the child activity to the parent
 activity ??
 For example if

 1)  Activity1callsActivity2
 2) now when the activity2  is finished  i want some data back from it .

 Please help me find the solution
 --
 ThanksRegards
 Kaushik Pendurthi

 http://kaushikpendurthi.blogspot.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




 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030274295
 (R) +919886336619

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




-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.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: Noob: Automatic moving background

2011-07-22 Thread cellurl
you might watch the 30min video on udemy.
I too forget how to import samples successfully,
so I made videos.
http://www.udemy.com/write-and-publish-an-app-for-your-android-smartphone/



On Jul 21, 8:56 pm, TreKing treking...@gmail.com wrote:
 On Thu, Jul 21, 2011 at 10:51 AM, Luke Taylor websto...@gmail.com wrote:
  I was wondering if it were possible (which I'm sure is) to
  state in my program, that I want my background to move automatic from
  top to bottum, as if you were scrolling.

 I'd look into animations - particularly Translations.

  One last question, how do I import sample projects?

 I can't seem to get it right.



 What does can't seem to get it right mean?

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

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


Re: [android-developers] Re: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 4:35 AM, Animesh Sinha animeshs...@gmail.com wrote:
 You are right in saying that android requires developers to write an
 event-driven code and that effort needs to be put for designing the
 whole chain of events.

 But for the following case as shown below, I don't think one can get
 rid of the NullPointerException thrown in onClick() method of
 MyServiceClient; Unless instead of storing Service Interface globally,
 one stores it locally.

Developers disable UI widgets until they can be used.

Hence, developers would have R.id.someBtn disabled until
onServiceConnected() is called, at which point they would enable that
widget and thereby allow the user to request actions that involve the
service.

-- 
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] Intent Data

2011-07-22 Thread Rocky
see the http://alltechsolution.wordpress.com/page/2/
SavedInstance : onSaveInstanceState :
onRestoreInstanceStatehttp://alltechsolution.wordpress.com/2011/04/13/savedinstance-onsaveinstancestate-onrestoreinstancestate/
http://alltechsolution.wordpress.com/2011/03/25/passing-bundles-around-activities/



On Fri, Jul 22, 2011 at 4:15 PM, kaushik p kaushiks...@gmail.com wrote:

 I am trying to do the same(
 http://stackoverflow.com/questions/4850404/how-to-get-result-of-child-activities-in-a-parent-tab-activity)
 but i am not getting it can you please give an example


 On Fri, Jul 22, 2011 at 4:12 PM, Rocky rkjhaw1...@gmail.com wrote:

 u can use bundle or when u call activity2 , call with
 startActivityForResult, and use the appropriate method.



 On Fri, Jul 22, 2011 at 4:02 PM, kaushik p kaushiks...@gmail.com wrote:

 Hi all ,

 Is there any way to get data back from the child activity to the parent
 activity ??
 For example if

 1)  Activity1callsActivity2
 2) now when the activity2  is finished  i want some data back from it .

 Please help me find the solution
 --
 ThanksRegards
 Kaushik Pendurthi

 http://kaushikpendurthi.blogspot.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




 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030274295
 (R) +919886336619

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




 --
 ThanksRegards
 Kaushik Pendurthi

 http://kaushikpendurthi.blogspot.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




-- 
Thanks  Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030274295
(R) +919886336619

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

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 4:02 AM, wasabee18 wasabe...@gmail.com wrote:
 I am handling some sensitive information like password in my app. I am
 wondering how secure it is to pass password as a parameter to intent.
 For instance, when I monitor the device with adb.exe, I can see some
 parameters of the intent sent before the intent is resolved by the OS.
 How easy is it to monitor/spy/dump the intent resolution process and
 its parameters from:
 - a third party app (say malware) installed on the phone
 - from a PC connected to the phone (using similar tool as adb)

http://commonsware.com/blog/2011/06/30/warning-activity-intent-extras-public.html

-- 
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] List of all class names from android.widget package dynamically

2011-07-22 Thread Mark Murphy
http://stackoverflow.com/questions/176527/how-can-i-enumerate-all-classes-in-a-package-and-add-them-to-a-list

(or http://goo.gl/nyPWf if that URL is too long)

On Fri, Jul 22, 2011 at 6:38 AM, kums kums1...@gmail.com wrote:
 Hi ,

 I want to show the list of all class names from the android.widget
 package dynamically?

 Is there any method is available to read from package name to class
 names?

 Please help me on this?

 Thanks,
 Kums

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Re: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-07-22 Thread Marcin Orlowski
On 22 July 2011 10:11, gjs garyjamessi...@gmail.com wrote:

I was sort of hoping it might also be applicable to supporting
 different apk's for different languages/internationalization/
 localization but perhaps that is just too many permutations to split
 the filtering.


Assets usually takes much more space than your translation files, so IMHO
users won't really benefit from such split based on languages.

Wish ADT helps with split-build though.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

[android-developers] Re: Option to unlock the boot loader for Sony Ericsson Android Gingerbread phones now available.

2011-07-22 Thread Carl
Mills, Ryan A,

Thanks for posting, no news at the moment but we hear you. We're still
investigating this. As soon as we have any news, we will publish it on
Developer World,  http://www.sonyericsson.com/developer

Regards
Carl Johansson
Sony Ericsson Developer World

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

2011-07-22 Thread rishabh agrawal
I am beginner in Soap  web service  nothing no how i access web
service using wsdl for client request response.Please suggest me where
i can start.

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

2011-07-22 Thread Amit Dixit
Hi,

Currently I am using Honeycomb device which I would like to control it from
desktop machine. Is there any way I can do it ?

Best Regards,


-- 
Amit Dixit

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

2011-07-22 Thread arun kumar
how to make background image as nine patch...can u guide 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

Re: [android-developers] Re: Facebook Integration issue

2011-07-22 Thread gaurav gupta
HI,
i also use EasyFacebookConnectSDK.i am not clear about this problem.
i have to simple post my status using android.
Previously i have FaceBook's 1.3 version, i update it , now i have FaceBook
1.6.
In FB 1.3 this code is working fine, but in FB 1.6 its not working and its
open native Facebook application.
i have to just post Status as i do in FB 1.3.
Suggest me..
its my code .
Please help me its urgent
Thanks in advance.

package com.greatapp;

import java.io.IOException;
import java.net.MalformedURLException;

import com.facebook.android.DialogError;
import com.facebook.android.Facebook;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

public class MyGreatActivity extends Activity implements DialogListener{
/** Called when the activity is first created. */
Facebook facebook;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
System.out.println(facebook started);
  fblogin();
   }
public void fblogin()
{
facebook = new Facebook(12205826798);
try {
facebook.logout(getApplicationContext());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
facebook.authorize(MyGreatActivity.this, new String[] {
publish_stream,
read_stream, offline_access }, this);
}

public void onComplete(Bundle values) {
if (values.isEmpty()) {
return;
}

if (!values.containsKey(post_id)) {
try {
Bundle parameters = new Bundle();
parameters
.putString(message, is Listening to   + facebook
ragga);// the

facebook.dialog(this, stream.publish, parameters, this);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
showToast(Authentication with Facebook failed!);
finish();

}
public void onError(DialogError e) {
// TODO Auto-generated method stub
showToast(Authentication with Facebook failed!);
finish();

}
public void onCancel() {
// TODO Auto-generated method stub
showToast(Authentication with Facebook failed!);
finish();

}
private void showToast(String message){
Toast.makeText(getApplicationContext(), message,
Toast.LENGTH_SHORT).show();
}
}





On Sat, Jul 16, 2011 at 4:56 PM, shanmugam nathan 
shanmugam.andr...@gmail.com wrote:

 Hey gaurav,

 Why don't u try with EasyFacebookConnectSDK  its quite simpler for
 beginners.
 But u can find some errors in LogCat but just ignore those coz ur
 final target ll be achieved.


 Thanks,
 Shanmugam

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Fred Niggle
Thanks for your reply.

I guess my initial question can therefore be reduced to: How can an
activity know when a service has performed a task?

On 21/07/2011, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Jul 21, 2011 at 6:33 PM, Fred Niggle fred.nig...@googlemail.com
 wrote:
 What I am writing is a meds reminder app, which has the option of
 letting a career know if the app is not acknowledged and responded to.

 The idea is that when the alarm event fires it triggered a sound
 (alert) to be played (notify user to take meds), and if the alert is
 not cancelled inside of a given time, then an sms is sent to inform
 the carer.

 I have most of the code nicely nailed down, except spawning a screen
 or alert dialogue which has the Cancel button on it, and it is with
 this matter that I seek help.

 As you note in your reply, it is how to Bind the code from the
 .alarmservice to trigger the alert dialogue or screen in which I am
 lacking understanding and would hugely appreciate assistance.

 You don't Bind the code from the .alarmservice to trigger the alert
 dialogue or screen. You just start an activity or raise a
 Notification from the service. If you wish to start an activity, use
 startActivity() like you would anywhere else.

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

 _Android Programming Tutorials_ Version 3.5 Available!

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

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

2011-07-22 Thread Tech Guy
I am not sure about how you want to control. But with LG-P990 there
comes LG On Screen phone, where you can operate your phone connecting
to computer.
Except call and camera.
Hope this helps.

- TechGuy

On Jul 22, 5:19 pm, Amit Dixit amit1...@gmail.com wrote:
 Hi,

 Currently I am using Honeycomb device which I would like to control it from
 desktop machine. Is there any way I can do it ?

 Best Regards,

 --
 Amit Dixit

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


[android-developers] How to get hotmail on LGP-990 or Android mobile

2011-07-22 Thread Tech Guy
Actually LG-P990 provides built in email application where you can specify
hotmail account but your account should be of domain @live.com only. You
cant add other hotmail accounts!

Read More at   Hints Library http://hintslibrary.blogspot.com/ :
http://hintslibrary.blogspot.com/2011/07/how-to-get-hotmail-on-lgp-990-or.html

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

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 9:05 AM, Fred Niggle fred.nig...@googlemail.com wrote:
 Thanks for your reply.

 I guess my initial question can therefore be reduced to: How can an
 activity know when a service has performed a task?

You have no activity. That's the point.

Most medication dosing is on a 24-hour basis -- you take the
pills/drops/leeches once per day. The odds of your activity existing
at the point in time the 24-hour alarm goes off are negligible. Even
if the user had been visiting your application relatively recently,
Android terminates processes to free up RAM as it goes along. You must
not assume that you have an activity.

Hence, when the alarm goes off, if you want to pop up an activity, you
need to start one with startActivity(). If you are concerned about
there then possibly being *two* instances of your activity, add
FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_SINGLE_TOP to the Intent you
use with startActivity(). If you do have an existing instance of this
activity, it will come to the foreground and be called with
onNewIntent(); otherwise, a new instance will be created as normal.

I recommend that you also give the user an option for a Notification
instead of popping up an 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] Re: Facebook Integration issue

2011-07-22 Thread gaurav gupta
Hi Shanmugam,
thanks 4 reply. i work for that too.
its working fine when in my phone Facebook For Android 1.3 is used.
but when i upgrade my Facebook For Android to 1.5 or 1.6 , its not working.
this issue is related to Facebook updation.
Please look at this issue.
if u find any link or anything regarding this, let me know
Thanks



On Sat, Jul 16, 2011 at 4:56 PM, shanmugam nathan 
shanmugam.andr...@gmail.com wrote:

 Hey gaurav,

 Why don't u try with EasyFacebookConnectSDK  its quite simpler for
 beginners.
 But u can find some errors in LogCat but just ignore those coz ur
 final target ll be achieved.


 Thanks,
 Shanmugam

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Fred Niggle
Thanks for your reply.

I found the information about setting flags with startActivity() to be
extremely useful.

However my original question remains unanswered: How can an activity
know when a service has performed a task?

Regards,
Fred

On 22/07/2011, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Jul 22, 2011 at 9:05 AM, Fred Niggle fred.nig...@googlemail.com
 wrote:
 Thanks for your reply.

 I guess my initial question can therefore be reduced to: How can an
 activity know when a service has performed a task?

 You have no activity. That's the point.

 Most medication dosing is on a 24-hour basis -- you take the
 pills/drops/leeches once per day. The odds of your activity existing
 at the point in time the 24-hour alarm goes off are negligible. Even
 if the user had been visiting your application relatively recently,
 Android terminates processes to free up RAM as it goes along. You must
 not assume that you have an activity.

 Hence, when the alarm goes off, if you want to pop up an activity, you
 need to start one with startActivity(). If you are concerned about
 there then possibly being *two* instances of your activity, add
 FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_SINGLE_TOP to the Intent you
 use with startActivity(). If you do have an existing instance of this
 activity, it will come to the foreground and be called with
 onNewIntent(); otherwise, a new instance will be created as normal.

 I recommend that you also give the user an option for a Notification
 instead of popping up an 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

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

2011-07-22 Thread lbendlin
Sooner or later you will have to test against a real device anyhow. it might 
be a financial burden but it is inevitable.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get a service to either return a string or start a function in main activity?

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 10:24 AM, Fred Niggle
fred.nig...@googlemail.com wrote:
 However my original question remains unanswered: How can an activity
 know when a service has performed a task?

Use a broadcast Intent.

-- 
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] How to access Web Service using WSDL,Soap.

2011-07-22 Thread TreKing
On Fri, Jul 22, 2011 at 7:17 AM, rishabh agrawal
android.rish...@gmail.comwrote:

 I am beginner in Soap  web service  nothing no how i access web service
 using wsdl for client request response.
 Please suggest me where i can start.


Try a Google search. Or a group or forum that is even remotely related to
what you're talking about - this ain't it.

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

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

[android-developers] Re: 9 patch png

2011-07-22 Thread b_t
How do you mean? Simple call setBackgroundResource on View with a 9-
patch image.

On júl. 22, 14:34, arun kumar arun.kata...@gmail.com wrote:
 how to make background image as nine patch...can u guide 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


Re: [android-developers] Re: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-07-22 Thread Mark Carter
One thing I don't understand...

In advanced mode, why is there a reactivate button next to old
versions that can never be reactivated (because they have a lower
version code than the active APK)?

On 22 July 2011 19:19, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 22 July 2011 10:11, gjs garyjamessi...@gmail.com wrote:

 I was sort of hoping it might also be applicable to supporting
 different apk's for different languages/internationalization/
 localization but perhaps that is just too many permutations to split
 the filtering.

 Assets usually takes much more space than your translation files, so IMHO
 users won't really benefit from such split based on languages.

 Wish ADT helps with split-build though.

 Regards,
 Marcin Orlowski

 Tray Agenda - keep you daily schedule handy...
 Date In Tray - current date at glance...
 WebnetMobile on Facebook and Twitter

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

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

2011-07-22 Thread lbendlin
for a few markers here and there you don't need overlays. Just add the image 
views directly.

mMapView.addView(mImageView, geoLP);

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

2011-07-22 Thread lbendlin
well, there are many ways of doing it. The big boys prepare the database 
structure (and some sample data) in the APK and then copy it to the 
documents folder on first use. They also handle db structure updates during 
version changes.

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

2011-07-22 Thread Sanchiski
Hi everyone.

Is there a way to detect if an outgoing call was performed by Google
Voice? in other words, how is it possible to differentiate when a call
is done by key\touchpad or via voice?

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: Optimizing TableLayout

2011-07-22 Thread lbendlin
Doesn't sound like you are re-using list cells.

http://blog.falafel.com/blogs/10-07-08/Reusing_list_items_in_Android_and_iOS_-_a_comparison.aspx

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

2011-07-22 Thread JCC
Ok thanks, I fixed the data problem but still with the flip issue that
it calls the GPS again. =( any suggestion would be much appreciated.

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

2011-07-22 Thread bob
Anyone know if the MediaPlayer object supports the .caf format?

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] Detect Google Voice

2011-07-22 Thread saman norallahy
why

On Fri, Jul 22, 2011 at 7:36 PM, Sanchiski sanchi...@gmail.com wrote:

 Hi everyone.

 Is there a way to detect if an outgoing call was performed by Google
 Voice? in other words, how is it possible to differentiate when a call
 is done by key\touchpad or via voice?

 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

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

2011-07-22 Thread dk1942

You have to root to mount the mico sdhc . 
After you root the xoom get the sdmount app to 
mount the micro sdhc . 
The dir will be/mnt/external1. I've done this on my xoom and it work 
just fine.




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

2011-07-22 Thread Ps By The Way
Developing an SMS app for Android and hit a road block where we are
unable to get MMS (picture attachments) sent on the Verizon and Sprint
networks.

We have isolated the issue to be associated with the APN for each
network, however this info is stored on the phone and is not provided
by the application. Any ideas?


Thank you for posting my question.


- Adam
Android Developers Group

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

2011-07-22 Thread Sanchiski
i am improving my call confirm program, and I need to find a way to
allow calls done through google voice without any popup.

On Jul 22, 6:22 pm, saman norallahy samannorall...@gmail.com wrote:
 why







 On Fri, Jul 22, 2011 at 7:36 PM, Sanchiski sanchi...@gmail.com wrote:
  Hi everyone.

  Is there a way to detect if an outgoing call was performed by Google
  Voice? in other words, how is it possible to differentiate when a call
  is done by key\touchpad or via voice?

  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

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

2011-07-22 Thread Abhishek Akhani
Hi

I am not satisfied with the guidance of unit testing in 
developers.android.com...

Can anyone provide me the link of any test project (for a whole android 
application) which covers all the aspects of android unit testing, so that i 
can learn from it how to write unit test cases for android applications???

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] Intent with sensitive param

2011-07-22 Thread rich friedel
@Mark That is extremely interesting! Just like you, I assumed that intent 
extras were private. This begs the question... What to do then to keep 
intent extras private? Better yet, how should we pass sensitive data in an 
intent extra in such a way that the data remains secure?

For example, in the OP's question they use the example of a password. Now 
you can encrypt that password before sending as an intent extra thus any 
nefarious app would not actually collect the real password. However, if 
the receiving end expects an encrypted password then all the bad app has to 
do is use the encrypted password string and voila it has access.

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

Re: [android-developers] Re: Help needed for dealing with NullPointerException when calling functions on a service just after binding it

2011-07-22 Thread rich friedel
I solved a similar issue by broadcasting that my service is actually active 
and running and then if my activity is active it receives that broadcast and 
does what it needs to do. This way the Activity always knows when the 
service is active.

The onBind is not applicable to my situation as my Activity and Service are 
independent of each other. (Activity starts/stops Service but Service does 
not need Activity for anything else)

On Friday, July 22, 2011 6:57:42 AM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

 On Fri, Jul 22, 2011 at 4:35 AM, Animesh Sinha anime...@gmail.com wrote:
  You are right in saying that android requires developers to write an
  event-driven code and that effort needs to be put for designing the
  whole chain of events.
 
  But for the following case as shown below, I don't think one can get
  rid of the NullPointerException thrown in onClick() method of
  MyServiceClient; Unless instead of storing Service Interface globally,
  one stores it locally.

 Developers disable UI widgets until they can be used.

 Hence, developers would have R.id.someBtn disabled until
 onServiceConnected() is called, at which point they would enable that
 widget and thereby allow the user to request actions that involve the
 service.

 -- 
 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] Intent with sensitive param

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 3:22 PM, rich friedel rich.frie...@gmail.com wrote:
 @Mark That is extremely interesting! Just like you, I assumed that intent
 extras were private.

Yeah, it shocked the heck out of me when somebody mentioned it.

 This begs the question... What to do then to keep
 intent extras private? Better yet, how should we pass sensitive data in an
 intent extra in such a way that the data remains secure?

Don't pass sensitive stuff in extras used in Intents with
startActivity(). Hold that information elsewhere (e.g., static data
member). Using static data members for passing data between activities
is generally a bad idea, but for this, it may be the best choice. You
could save the data to a local file or something, but that involves
file I/O, which can have performance implications, though for
something like this it's probably OK.

Corollary: don't design an exported activity (i.e., one you want third
parties to invoke) that requires sending sensitive stuff via extras.

-- 
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: Data Transmission

2011-07-22 Thread rich friedel
Or even better...

http://www.google.com/#q=Android+development+json+or+xml

There are some real eye opening test cases out there that show that json is 
faster up to a point then XML is king as far as parsing goes.

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

2011-07-22 Thread rich friedel
You should know if it either started via the Activity or the Service. I 
don't see an issue, or maybe I am just confused. It is not like the app 
magically starts without you, the developer, explicitly knowing how it 
started. You created the entry points from which the app can start. From 
there you pass some sort of data to let whatever is in the hierarchy know 
that something has happened it responds accordingly.

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

2011-07-22 Thread rich friedel
Happens to me all the time on the Droid2 (2.2.1) and the DroidX (both 2.2.1 
and 2.3.3)... and it could be any number of ad heavy sites that it happens 
on... ESPN, WSJ, New York Times, Techcrunch, etc... there is 
no consistency as to when it just... closes (if I am lucky I get a FC 
dialog)

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

2011-07-22 Thread Simon Platten
I've created an image called frame.9.png which according to various online
examples and tutorials should be ok, but when using this name in eclipse the
IDE displays errors for all the other drawables in the folder with a little
red cross by the 9 patch image.

I couldn't see any mention of this online, what do I need to do?


-- 
Regards,
Sy

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

2011-07-22 Thread Simon Platten
Sorry, just dragged the image into the 9 patch tool, re-saved and error
message disappearednot sure why, but its ok now.


On Fri, Jul 22, 2011 at 9:12 PM, Simon Platten simonaplat...@googlemail.com
 wrote:

 I've created an image called frame.9.png which according to various online
 examples and tutorials should be ok, but when using this name in eclipse the
 IDE displays errors for all the other drawables in the folder with a little
 red cross by the 9 patch image.

 I couldn't see any mention of this online, what do I need to do?


 --
 Regards,
 Sy




-- 
Regards,
Sy

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

[android-developers] Re: Listview oddity with imageview

2011-07-22 Thread Simon Platten
Is this a bug or is there a property that needs setting ?

On Fri, Jul 22, 2011 at 7:27 AM, Simon Platten simonaplat...@googlemail.com
 wrote:

 Has anyone else encountered this problem?

 On Thu, Jul 21, 2011 at 7:54 PM, Simon Platten 
 simonaplat...@googlemail.com wrote:

 I have a listview with each item defined as:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android
 
  android:layout_width=fill_parent

  android:layout_height=?android:attr/listPreferredItemHeight
  android:padding=10dp
 LinearLayout android:id=@+id/llHeader
   android:background=@color/blue
   android:orientation=vertical
   android:layout_alignParentTop=true
   android:layout_width=fill_parent
   android:layout_height=fill_parent 
 CheckBox android:id=@+id/chkUse
  android:text=File-name
   android:textColor=@color/yellow
   android:textStyle=bold
  android:layout_width=fill_parent
  android:layout_height=wrap_content
   android:layout_gravity=left /
 /LinearLayout
 ImageView android:id=@+id/ivthumbNail
   android:src=@drawable/placeholder
   android:layout_centerHorizontal=true
   android:layout_below=@+id/llHeader
   android:layout_width=fill_parent
   android:layout_height=fill_parent /
 ImageButton android:id=@+id/btnCCW
  android:src=@drawable/ccw_rotate_btn
 android:layout_alignLeft=@+id/llHeader
android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 ImageButton android:id=@+id/btnCW
  android:src=@drawable/cw_rotate_btn
 android:layout_alignRight=@+id/llHeader
 android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 /RelativeLayout


 This gives a title / checkbox, under this is an imageview with a button
 either side of it.  With the buttons I can rotate the image clockwise or
 counter clockwise by 90 degrees, the routine that performs the rotation and
 scaling of the images:

 public Bitmap scaleAndRotateImage(boolean blnShow) {
 try{
 BitmapFactory.Options bfo = new BitmapFactory.Options();
 bfo.inSampleSize = 4;
 Bitmap bmpData = BitmapFactory.decodeFile(m_strFilename,
 bfo);

 if ( m_intOriginalWidth == 0  m_intOriginalHeight == 0 ) {
 m_intOriginalWidth = bmpData.getWidth();
 m_intOriginalHeight = bmpData.getHeight();
 int intScaledWidth = clsWallpaper.m_intScrWidth;
 float fltAspectRatio = (float)bmpData.getHeight() /
 (float)bmpData.getWidth();
 int intScaledHeight = (int)((float)intScaledWidth *
 fltAspectRatio);
 m_fltScaleWidth = ((float)intScaledWidth) /
 ((float)m_intOriginalWidth);
 m_fltScaleHeight = ((float)intScaledHeight) /
 ((float)m_intOriginalHeight);
 }
 // Apply the scale to the matrix
 Matrix mtx = new Matrix();
 mtx.postScale(m_fltScaleWidth, m_fltScaleHeight);
 // Apply the rotation angle to the matrix
 mtx.postRotate(m_intTotalAngle);
 // Get the scaled and maybe rotated version of the bitmap
 Bitmap bmpScaled = Bitmap.createBitmap(bmpData,
 0, 0,
 m_intOriginalWidth,
 m_intOriginalHeight,
 mtx, true);
 if ( blnShow == true  bmpScaled != null ) {
 m_drwThumbnail = new BitmapDrawable(bmpScaled);
 Activity a = (Activity)m_ivThumbnail.getContext();
 a.runOnUiThread(updateThumbnail);
 }
 return bmpScaled;
 } catch( Exception ex ) {
 Log.e( TAG, rotateThumbnail, ex );
 }
 return null;
 }

 The strange this is when the image is rotated the scaled version is
 smaller than it is supposed to be, if I scroll the listview so the item goes
 out of view then scroll it back into view the item comes back with the image
 of the correct size.  Is they're anything I can do about this?
  --
 Regards,
 Sy




 --
 Regards,
 Sy




-- 
Regards,
Sy

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

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Fred Niggle
Thank you, thats just the tip I needed.

On 22/07/2011, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Jul 22, 2011 at 10:24 AM, Fred Niggle
 fred.nig...@googlemail.com wrote:
 However my original question remains unanswered: How can an activity
 know when a service has performed a task?

 Use a broadcast Intent.

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

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

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

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


Re: [android-developers] Re: Listview oddity with imageview

2011-07-22 Thread Kostya Vasilyev
Try setting a scaleType property on the ImageView, perhaps you can get
consistent results that way.

2011/7/23 Simon Platten simonaplat...@googlemail.com:
 Is this a bug or is there a property that needs setting ?

 On Fri, Jul 22, 2011 at 7:27 AM, Simon Platten
 simonaplat...@googlemail.com wrote:

 Has anyone else encountered this problem?

 On Thu, Jul 21, 2011 at 7:54 PM, Simon Platten
 simonaplat...@googlemail.com wrote:

 I have a listview with each item defined as:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout
 xmlns:android=http://schemas.android.com/apk/res/android;
                      android:layout_width=fill_parent

  android:layout_height=?android:attr/listPreferredItemHeight
                      android:padding=10dp
     LinearLayout android:id=@+id/llHeader
                       android:background=@color/blue
                       android:orientation=vertical
                       android:layout_alignParentTop=true
                       android:layout_width=fill_parent
                       android:layout_height=fill_parent 
         CheckBox android:id=@+id/chkUse
                      android:text=File-name
                   android:textColor=@color/yellow
                   android:textStyle=bold
                      android:layout_width=fill_parent
                      android:layout_height=wrap_content
                   android:layout_gravity=left /
     /LinearLayout
     ImageView android:id=@+id/ivthumbNail
               android:src=@drawable/placeholder
               android:layout_centerHorizontal=true
               android:layout_below=@+id/llHeader
               android:layout_width=fill_parent
               android:layout_height=fill_parent /
     ImageButton android:id=@+id/btnCCW
                      android:src=@drawable/ccw_rotate_btn
                     android:layout_alignLeft=@+id/llHeader
                    android:layout_below=@+id/llHeader
                      android:layout_width=48dip
                     android:layout_height=48dip /
     ImageButton android:id=@+id/btnCW
                      android:src=@drawable/cw_rotate_btn
                     android:layout_alignRight=@+id/llHeader
                     android:layout_below=@+id/llHeader
                      android:layout_width=48dip
                     android:layout_height=48dip /
 /RelativeLayout


 This gives a title / checkbox, under this is an imageview with a button
 either side of it.  With the buttons I can rotate the image clockwise or
 counter clockwise by 90 degrees, the routine that performs the rotation and
 scaling of the images:

     public Bitmap scaleAndRotateImage(boolean blnShow) {
         try{
             BitmapFactory.Options bfo = new BitmapFactory.Options();
             bfo.inSampleSize = 4;
             Bitmap bmpData = BitmapFactory.decodeFile(m_strFilename,
 bfo);

             if ( m_intOriginalWidth == 0  m_intOriginalHeight == 0 ) {
                 m_intOriginalWidth = bmpData.getWidth();
                 m_intOriginalHeight = bmpData.getHeight();
                 int intScaledWidth = clsWallpaper.m_intScrWidth;
                 float fltAspectRatio = (float)bmpData.getHeight() /
 (float)bmpData.getWidth();
                 int intScaledHeight = (int)((float)intScaledWidth *
 fltAspectRatio);
                 m_fltScaleWidth = ((float)intScaledWidth) /
 ((float)m_intOriginalWidth);
                 m_fltScaleHeight = ((float)intScaledHeight) /
 ((float)m_intOriginalHeight);
             }
 // Apply the scale to the matrix
             Matrix mtx = new Matrix();
             mtx.postScale(m_fltScaleWidth, m_fltScaleHeight);
 // Apply the rotation angle to the matrix
             mtx.postRotate(m_intTotalAngle);
 // Get the scaled and maybe rotated version of the bitmap
             Bitmap bmpScaled = Bitmap.createBitmap(bmpData,
                                                     0, 0,
                                                     m_intOriginalWidth,
                                                     m_intOriginalHeight,
                                                     mtx, true);
             if ( blnShow == true  bmpScaled != null ) {
             m_drwThumbnail = new BitmapDrawable(bmpScaled);
             Activity a = (Activity)m_ivThumbnail.getContext();
             a.runOnUiThread(updateThumbnail);
             }
             return bmpScaled;
         } catch( Exception ex ) {
             Log.e( TAG, rotateThumbnail, ex );
         }
         return null;
     }

 The strange this is when the image is rotated the scaled version is
 smaller than it is supposed to be, if I scroll the listview so the item goes
 out of view then scroll it back into view the item comes back with the image
 of the correct size.  Is they're anything I can do about this?
 --
 Regards,
 Sy




 --
 Regards,
 Sy




 --
 Regards,
 Sy

 --
 You received this message because you are subscribed to the 

Re: [android-developers] Re: Listview oddity with imageview

2011-07-22 Thread Simon Platten
I've tried all the scale type options, no effect, except that it fixes 
the width and the height doesn't scale correctly.


It works exactly as I would expect in the emulator, when on my phone it 
shrinks after rotation, but if I scroll out of view then back into view 
its ok...very strange.



On 22/07/2011 9:45 PM, Kostya Vasilyev wrote:

Try setting a scaleType property on the ImageView, perhaps you can get
consistent results that way.

2011/7/23 Simon Plattensimonaplat...@googlemail.com:

Is this a bug or is there a property that needs setting ?

On Fri, Jul 22, 2011 at 7:27 AM, Simon Platten
simonaplat...@googlemail.com  wrote:

Has anyone else encountered this problem?

On Thu, Jul 21, 2011 at 7:54 PM, Simon Platten
simonaplat...@googlemail.com  wrote:

I have a listview with each item defined as:

?xml version=1.0 encoding=utf-8?
RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=fill_parent

  android:layout_height=?android:attr/listPreferredItemHeight
  android:padding=10dp
 LinearLayout android:id=@+id/llHeader
   android:background=@color/blue
   android:orientation=vertical
   android:layout_alignParentTop=true
   android:layout_width=fill_parent
   android:layout_height=fill_parent
 CheckBox android:id=@+id/chkUse
  android:text=File-name
   android:textColor=@color/yellow
   android:textStyle=bold
  android:layout_width=fill_parent
  android:layout_height=wrap_content
   android:layout_gravity=left /
 /LinearLayout
 ImageView android:id=@+id/ivthumbNail
   android:src=@drawable/placeholder
   android:layout_centerHorizontal=true
   android:layout_below=@+id/llHeader
   android:layout_width=fill_parent
   android:layout_height=fill_parent /
 ImageButton android:id=@+id/btnCCW
  android:src=@drawable/ccw_rotate_btn
 android:layout_alignLeft=@+id/llHeader
android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
 ImageButton android:id=@+id/btnCW
  android:src=@drawable/cw_rotate_btn
 android:layout_alignRight=@+id/llHeader
 android:layout_below=@+id/llHeader
  android:layout_width=48dip
 android:layout_height=48dip /
/RelativeLayout


This gives a title / checkbox, under this is an imageview with a button
either side of it.  With the buttons I can rotate the image clockwise or
counter clockwise by 90 degrees, the routine that performs the rotation and
scaling of the images:

 public Bitmap scaleAndRotateImage(boolean blnShow) {
 try{
 BitmapFactory.Options bfo = new BitmapFactory.Options();
 bfo.inSampleSize = 4;
 Bitmap bmpData = BitmapFactory.decodeFile(m_strFilename,
bfo);

 if ( m_intOriginalWidth == 0  m_intOriginalHeight == 0 ) {
 m_intOriginalWidth = bmpData.getWidth();
 m_intOriginalHeight = bmpData.getHeight();
 int intScaledWidth = clsWallpaper.m_intScrWidth;
 float fltAspectRatio = (float)bmpData.getHeight() /
(float)bmpData.getWidth();
 int intScaledHeight = (int)((float)intScaledWidth *
fltAspectRatio);
 m_fltScaleWidth = ((float)intScaledWidth) /
((float)m_intOriginalWidth);
 m_fltScaleHeight = ((float)intScaledHeight) /
((float)m_intOriginalHeight);
 }
// Apply the scale to the matrix
 Matrix mtx = new Matrix();
 mtx.postScale(m_fltScaleWidth, m_fltScaleHeight);
// Apply the rotation angle to the matrix
 mtx.postRotate(m_intTotalAngle);
// Get the scaled and maybe rotated version of the bitmap
 Bitmap bmpScaled = Bitmap.createBitmap(bmpData,
 0, 0,
 m_intOriginalWidth,
 m_intOriginalHeight,
 mtx, true);
 if ( blnShow == true  bmpScaled != null ) {
 m_drwThumbnail = new BitmapDrawable(bmpScaled);
 Activity a = (Activity)m_ivThumbnail.getContext();
 a.runOnUiThread(updateThumbnail);
 }
 return bmpScaled;
 } catch( Exception ex ) {
 Log.e( TAG, rotateThumbnail, ex );
 }
 return null;
 }

The strange this is when the image is rotated the scaled version is
smaller than it is supposed to 

Re: [android-developers] Re: Listview oddity with imageview

2011-07-22 Thread Kostya Vasilyev

Your second paragraph below sounds like a view recycling issue.

The emulator and real devices may have some differences there.

-- Kostya

23.07.2011 0:54, Simon Platten пишет:
I've tried all the scale type options, no effect, except that it fixes 
the width and the height doesn't scale correctly.


It works exactly as I would expect in the emulator, when on my phone 
it shrinks after rotation, but if I scroll out of view then back into 
view its ok...very strange.


--
Kostya Vasilyev

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


[android-developers] Re: Need help with getting records to display in a Spinner

2011-07-22 Thread Vance
Can anyone tell me if the Spinner needs to be in the same layout file
as the ListView?


On Jul 18, 8:27 pm, Vance vance0...@gmail.com wrote:
 I need help with getting employee records to display within a Spinner
 after first selecting a department within a ListView. I'm trying to
 get the Spinner object within the 'onItemClick' listener method of the
 ListView but it's coming back null. The Spinner is in its own layout
 file, as is the ListView. Below is part of the code from the
 'onCreate' method of my Activity subclass:

                 ListView lv =(ListView)findViewById(R.id.listview);
                 lv.setAdapter(adapter);

                 lv.setOnItemClickListener(new OnItemClickListener() {
                         public void onItemClick(AdapterView? parent, View 
 view,
                                 int position, long id) {

                             Cursor c = (Cursor) 
 parent.getItemAtPosition(position);
                 String department = c.getString(1); // Column index
                                 Toast.makeText(getApplicationContext(),
                                         department +  is selected,
                                         Toast.LENGTH_SHORT).show();

                         // Create Spinner View object from layout resource
                         Spinner spinner = (Spinner) 
 findViewById(R.id.spinner1);
                         if (spinner == null) {
                                 Log.e(TAG, Spinner object is null!);
                         }
                         SimpleCursorAdapter adapter = new
 SimpleCursorAdapter(getBaseContext(),
                                 android.R.layout.simple_spinner_item, // Use a
 template
                                                                       // that
 displays a
                                                                       // text 
 view
                                 c, // Give the cursor to the adapter
                                 new String[] {dname}, // Map the NAME 
 column in
 the
                                                                      // 
 department
 database to...
                                 new int[] {android.R.id.text1}); // The 
 text1 view
 defined in
                                                                  // the XML 
 template
                         if (adapter == null) {
                                 Log.e(TAG, Adapter object is null!);
                         }

 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_it 
 em);
                         spinner.setAdapter(adapter);
                         spinner.setOnItemSelectedListener(new
 MyOnItemSelectedListener());
                         }
                 });

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

2011-07-22 Thread Rick Alther
I'm experiencing the same problem, but I'm hitting it with these inherited 
styles:

   - WindowTitleBackground
   - DialogWindowTitle
   - Widget.TextView.ListSeparator.White

Reverting to Platform Tools R5 worked for me as well (Thanks teo2k!)

- Rick

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

2011-07-22 Thread Kostya Vasilyev
If you're talking about this:

// Create Spinner View object from layout resource
Spinner spinner = (Spinner) findViewById(R.id.spinner1);

Then the answer is yes.

This line does not create the spinner. It locates the spinner, and
returns it as a Java object reference.

At this point, the spinner should already exist in the Activity's
layout, which should have been set with setContentView (presumably
inside onCreate).

-- Kostya

2011/7/23 Vance vance0...@gmail.com:
 Can anyone tell me if the Spinner needs to be in the same layout file
 as the ListView?


 On Jul 18, 8:27 pm, Vance vance0...@gmail.com wrote:
 I need help with getting employee records to display within a Spinner
 after first selecting a department within a ListView. I'm trying to
 get the Spinner object within the 'onItemClick' listener method of the
 ListView but it's coming back null. The Spinner is in its own layout
 file, as is the ListView. Below is part of the code from the
 'onCreate' method of my Activity subclass:

                 ListView lv =(ListView)findViewById(R.id.listview);
                 lv.setAdapter(adapter);

                 lv.setOnItemClickListener(new OnItemClickListener() {
                         public void onItemClick(AdapterView? parent, View 
 view,
                                 int position, long id) {

                             Cursor c = (Cursor) 
 parent.getItemAtPosition(position);
                 String department = c.getString(1); // Column index
                                 Toast.makeText(getApplicationContext(),
                                         department +  is selected,
                                         Toast.LENGTH_SHORT).show();

                         // Create Spinner View object from layout resource
                         Spinner spinner = (Spinner) 
 findViewById(R.id.spinner1);
                         if (spinner == null) {
                                 Log.e(TAG, Spinner object is null!);
                         }
                         SimpleCursorAdapter adapter = new
 SimpleCursorAdapter(getBaseContext(),
                                 android.R.layout.simple_spinner_item, // Use 
 a
 template
                                                                       // that
 displays a
                                                                       // 
 text view
                                 c, // Give the cursor to the adapter
                                 new String[] {dname}, // Map the NAME 
 column in
 the
                                                                      // 
 department
 database to...
                                 new int[] {android.R.id.text1}); // The 
 text1 view
 defined in
                                                                  // the XML 
 template
                         if (adapter == null) {
                                 Log.e(TAG, Adapter object is null!);
                         }

 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_it 
 em);
                         spinner.setAdapter(adapter);
                         spinner.setOnItemSelectedListener(new
 MyOnItemSelectedListener());
                         }
                 });

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

2011-07-22 Thread TreKing
On Fri, Jul 22, 2011 at 4:33 PM, Vance vance0...@gmail.com wrote:

 Can anyone tell me if the Spinner needs to be in the same layout file as
 the ListView?


Same file? No. Same view hierarchy? Yes.

So each can be in it's own file. However, at some point they must be added
to the root view or one of it's children.
Otherwise, what is there for findViewById() to actually find?

So you could have:

spinner.xml - Has Spinner with ID
listview.xml - Has ListView with ID
main.xml - This includes the other two

then

setContentView(main.xml); - Now findViewById can find the spinner.

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

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

[android-developers] Re: Request to Google's Android SDK team

2011-07-22 Thread Jimen Ching
I don't deny that real hardware is needed sooner or later.  But I hope 
Google isn't restricting their developer ecosystem to multi-million dollar 
software houses only.  I am developing applications for multiple Android API 
levels, multiple screen resolutions and screen sizes.  Is Google saying 
every developer should buy real hardware for each of these hardware 
configurations?

Considering just API level versions only, you're talking about at least 4 
configurations: 2.2, 2.3.X, 3.1, and the latest/greatest.  Of course, you 
could always try downgrading and upgrading as needed.  But I also need to 
consider convenience and efficiency.  For those developers who haven't 
gotten their million dollar investments yet, we need to still do the 
necessary testing, but on a very low budget.  For us single developer 
houses, there's a very big difference between spending $500 and $5000.  I 
need to think about the total cost, and not just the cost of the tablet. 
 e.g. if my application needs to use peripherals, that will also add to the 
cost.  If I had a choice, I would rather spend that $5000 on the peripherals 
than on another tablet or phone.  Google makes billions of dollars net 
profit every year.  It can afford to buy hardware for each developer.  But 
I'm just starting out, and I'm just asking for a little consideration.

--jc

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

2011-07-22 Thread Dianne Hackborn
Be we are still not getting to the core problem -- why do you need to have
your app initialized certain different ways depending on these uses?  How
have you gotten to this point?  It is the fundamental problem.  This is just
not naturally how Android works -- processes are simply containers to host
specific components like activities and services.

On Mon, Jul 18, 2011 at 11:19 AM, elDoudou the.edouard.merc...@gmail.comwrote:

 Thank you Diane.

 I may have a problem with my design, but if I'm wrong, I'd be
 delighted to be well guided.

 I would like my application to initialize a certain way when it is
 started with an Activity (for instance, I want to set up some caching
 stuff), whereas when launched via a Service, I do not need it to be
 initialized that way. The solution that I have found so far is to
 override the Application.onCreate() method, so as to be notified
 every time the application process starts, and quick-initialize some
 stuff.

 I have declared two android:processes because I thought that it
 might be possible to distinguish the cause of the application process
 start, but if you say that it is not possible to determine the
 android:process responsible for the start of the process, how can I
 solve my problem, please?

 Do you have in mind another design pattern which enables the
 application to be notified at startup, whatever Activity,
 BroadcastReceiver, Service causes its process to start so as to
 initialize some stuff, and to distinguish a specific Service where no
 initialization is supposed to be run, please?

 I would be very grateful to the person who is able to unblock me. And
 please, do not tell me that I have a design problem eventually ;)

 Regards,
 Édouard


 On 14 juil, 20:05, Dianne Hackborn hack...@android.com wrote:
  Sorry, there is no way to know.  Processes are basically anonymous
  containers in which to run code.  If you are needing to distinguish them,
  you have a problem in your design.
 
  On Tue, Jul 12, 2011 at 1:43 AM, elDoudou the.edouard.merc...@gmail.com
 wrote:
 
 
 
 
 
 
 
 
 
   Hello Doug and thank you.
 
   The process id does not indicate the Android declared process in the
   AndroidManifest.xml file, unfortunately. What I need to know is the
   android:process which causes the process to start. If I declare a
   service in the manifest with a specific process name (tag
   android:process), how do I know at runtime when this specific
   service process causes the Application::onCreate() method to be
   invoked, please?
 
   Thank you for your time and support. Regards,
   Édouard
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, 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




-- 
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: version-specific attributes in AndroidManifest.xml

2011-07-22 Thread nadam
I don't think there is any way to do that in the manifest. However,
you can remove android:screenOrientation from the manifest and set it
in the activity's onCreate() method instead:

if (Build.VERSION.SDK_INT  Build.VERSION_CODES.GINGERBREAD)
 
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
else
 
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);


On 20 Juli, 20:43, thedude gil.car...@gmail.com wrote:
 Is there a way to have different valued attributes in the manifest,
 depending on platform version?

 For example, for 2.3 and above, I would like to specify:
 android:screenOrientation=sensorLandscape

 For 2.2 and below, I would like to specify
 android:screenOrientation=landscape

 I want to use a 2.3 build target, but for the application be able to
 run (and be locked to landscape) on 2.2 and below.

 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: fragment activity management

2011-07-22 Thread nadam
If Activity2 is started from Activity1 all you need to do is to finish
it to return to Activity1 where you get the layout you want. So in
Activity2.onCreate():

if (getResources().getConfiguration().orientation
== Configuration.ORIENTATION_PORTRAIT) {
finish();
return;
}

Dianne is doing this in the example at
http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
but for landscape in DetailsActivity.


On 21 Juli, 09:55, mol3ku3l3 mol3ku...@gmail.com wrote:
 Hello,

 I have application build with fragments. I have defined all fragments
 and layouts in xml.
 When screen is small or medium I've divided my UI to two different
 parts:
 |                  | |                  |
 | Fragment1  | | Fragment2 |
 | =Activity1   | | =Activity2  |
 |                  | |                 |

 But when the screen is large I want it to be displayed like that:
 in portrait mode:
 |                 |
 |Fragment1 |
 |                 |
 |Fragment2 |
 |                 |
 |                 |

 in landscape mode (large)- the same as smaller screen:
 |                  | |                 |
 | Fragment1 | | Fragment2 |
 | =Activity1  | | =Activity2  |
 |                  | |                 |

 My problem is when I am in landscape mode, fragment 2 (=activity2) is
 displayed and when I change the orientation to portrait, I would like
 to have portrait mode of the large screen but I get portrait mode of
 small/medium screen (so it is still activity2).
 I know that this is android activity management but it there any way
 that in this case I can display portrait mode after orientation change
 in large screen?

 Thanks for 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] Re: Request to Google's Android SDK team

2011-07-22 Thread Mark Murphy
The 2.2 and 2.3 emulators work fine on decent hardware (e.g.,
dual-core 2GHz+, ample RAM). It is only the Honeycomb series of
emulators that is an issue.

Given the low penetration of Honeycomb devices to date, it is
perfectly reasonable for you to say oh, never mind for now and focus
on Android 2.x, using compatible-screens, other manifest settings,
or the Android Market distribution rules to keep you off of tablets.
Nobody has a gun pointed at your head, forcing you to work on tablets
until you can afford to.

On Fri, Jul 22, 2011 at 5:48 PM, Jimen Ching jimen.ch...@gmail.com wrote:
 I don't deny that real hardware is needed sooner or later.  But I hope
 Google isn't restricting their developer ecosystem to multi-million dollar
 software houses only.  I am developing applications for multiple Android API
 levels, multiple screen resolutions and screen sizes.  Is Google saying
 every developer should buy real hardware for each of these hardware
 configurations?

You need enough hardware to be confident in your product quality. How
much hardware that is only you can decide.

 Google makes billions of dollars net profit every year. It can afford to buy 
 hardware for each developer.

You are welcome to attend Google I|O in 2012. Just be quick on the
registration page.

You are also welcome to use DeviceAnywhere, developer labs (e.g., the
one I arranged at AnDevCon earlier this year), borrowed devices via a
Meetup/GTUG/other form of user group, Samsung's virtual device access
solution, etc.

Or, as I mentioned, simply hold off on tablets until you can afford
to. The sun will still rise in the east tomorrow, continuing to bake
my part of the US to a crisp.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
Available!

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


[android-developers] Re: Locked AVD/emulator even when wiped

2011-07-22 Thread jarmy
Looks like the final part of my message was truncated. Step 5 should
be:

The AVD starts up in locked mode; 2) Previously installed .apk’s still
exist.

There are some warnings and errors under LogCat but I'm not sure if
any would be symptomatic of this problem.

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


[android-developers] Re: [HELP]SQLite + Android

2011-07-22 Thread Abhishek Akhani
you can put your database in assets folder and import it... 

See 
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/


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

2011-07-22 Thread Abhishek Akhani
You may be using capital/special/space characters in name 

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

2011-07-22 Thread William Ferguson
It doesn't matter which style is inherited, all appear to fail.
The triggering factor is a style elements with a parent reference to
@android:style/SomeAndroidStyle

If you use inherited styles, don't update tools to r12 in the
SdkManager.
Or you have to rollback to an old version of the platform-tools.


On Jul 23, 7:39 am, Rick Alther rick.alt...@gmail.com wrote:
 I'm experiencing the same problem, but I'm hitting it with these inherited
 styles:

    - WindowTitleBackground
    - DialogWindowTitle
    - Widget.TextView.ListSeparator.White

 Reverting to Platform Tools R5 worked for me as well (Thanks teo2k!)

 - Rick

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

2011-07-22 Thread mlybrand
Can you guys point me to some best practices on maintain options menus
in Android applications.  I understand the concept that the options
menu is meant to be for a particular activity, but it has to be fairly
common that multiple activities share very similar menus.  So, is
there some one to have an application wide menu and call that after
creating an options menu for an activity. Along the lines of calling
the super class.  Do I somehow subclass the options menu for my app,
call my create which first call this sub class and then populates the
activity specific stuff?  Is this the right pattern?  Do y'all know of
examples specific to Android?  I appreciate any assistance you can
provide.

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: google map marker

2011-07-22 Thread Abhishek Akhani
Hi Arun 
I am giving you two code snippets from my application in which i used three 
different colored markers. One is myOverlay Class Which will be the inner 
class of your Map Screen Activity and another code is a function in your 
activity which creates itemized overlay objects according to need of 
different colored markers and adds that overlay to map... Hope this will 
help you... :-)

MyOverlay Class --


class MyOverlay extends ItemizedOverlayOverlayItem {

private ArrayListOverlayItem mOverlays = new 
ArrayListOverlayItem();
private MapScreenActivity currentContext = null;
private GeoPoint clickedOverlayGeoPoint;
private Point point = null;
private GeoPoint geoPoint = null;
private Point pointTap = null;
private Point pointScreenOverlay = null;
private Point mapCenterPoint = null;
private Drawable marker = null;
private Projection projection = null;
View view = null;
private LayoutInflater inflater;
private TextView  txtAddress;
private ImageView imgBlueArrow;

public MyOverlay(Drawable defaultMarker) {
super(boundCenter(defaultMarker));
marker = defaultMarker;
populate();
}

public MyOverlay(Drawable defaultMarker, Context context) {
super(boundCenter(defaultMarker));
inflater = LayoutInflater.from(context);
view = inflater.inflate(R.layout.popup ,null);
txtAddress = (TextView) view.findViewById(R.id.txtAddress);
imgBlueArrow = (ImageView) view.findViewById(R.id.imgBlueArrow);
marker = defaultMarker;

imgBlueArrow.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
drawPath(new 
GeoPoint((int)(ConstantData.latitude*100), 
(int)(ConstantData.longitude*100)), clickedOverlayGeoPoint, Color.RED, 
mapView);
mapView.invalidate();
}
});
}

@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow) {
super.draw(canvas, mapView, false);

//drawing numbers for overlapped dots
for(int i=0;iarrayList.size();i++){
// get projection to convert geopoint to screen point
geoPoint = new 
GeoPoint((int)(arrayList.get(i).getLatitude()*100), 
(int)(arrayList.get(i).getLongitude()*100));
projection = mapView.getProjection();
Point point = new Point();
projection.toPixels(geoPoint, point);
}

}

public void addOverlay(MapScreenActivity currentContext, Record 
record) {
this.currentContext = currentContext;
geoPoint = new GeoPoint((int) (record.getLatitude() * 1E6),
(int) (record.getLongitude() * 1E6));
OverlayItem overlay = new OverlayItem(geoPoint, Marker, 
Marker Text);
overlay.setMarker(marker);
mOverlays.add(overlay);
populate();
}

@Override
protected OverlayItem createItem(int i) {
// TODO Auto-generated method stub
return mOverlays.get(i);

}

@Override
public int size() {
// TODO Auto-generated method stub
return mOverlays.size();

}

@Override
public boolean onTap(GeoPoint p, MapView mapView) {

try {
pointTap = mapView.getProjection().toPixels(p, null);
if (popup != null  popup.isShowing()) {
popup.dismiss();
putRecordOverlays();
putUserOverlay();
}
} catch (Exception e) {
Log.e(-, e.toString());
}
return super.onTap(p, mapView);
}

@Override
protected boolean onTap(int index) {

geoPoint = mOverlays.get(index).getPoint();
pointScreenOverlay = mapView.getProjection().toPixels(
geoPoint, null);

Rect overlayRect = new Rect();
overlayRect.top = (pointScreenOverlay.y - 
marker.getIntrinsicHeight() / 2) - 10;
overlayRect.left = (pointScreenOverlay.x - 
marker.getIntrinsicWidth() / 2) - 10;
overlayRect.right = (pointScreenOverlay.x + 
marker.getIntrinsicWidth() / 2) + 10;
overlayRect.bottom = (pointScreenOverlay.y + 
marker.getIntrinsicHeight() / 2) + 10;


if (overlayRect.contains(pointTap.x, pointTap.y)) {
try {
OverlayItem item = 

[android-developers] Re: Listview oddity with imageview

2011-07-22 Thread Abhishek Akhani
invalidate the view after rotating... hope this may 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: Sorting Sqlite data while display

2011-07-22 Thread Abhishek Akhani
Hi

You can get the data in ascending order by querying db by ascending order of 
date... 
refer -- http://www.w3schools.com/sql/sql_orderby.asp

OR

You can use comparator interface to compare and sort dates -- 
refer -- 
http://www.javadeveloper.co.in/java-example/java-comparator-example.html

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

[android-developers] Re: popupwindow

2011-07-22 Thread Abhishek Akhani
You can start an activity as a dialog (it will look like a pop up window) by 
setting its theame to Theme.Dialog in menifest.

So Here you can make an activity with list view and open it with 
startActivityWithResult() and set the selected value on text view in 
onActivityResult() method  

Hope this helps...

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

2011-07-22 Thread Abhishek Akhani
Yes you can have dev acc but you cant sell paid apps Check out your 
problem with your bank or android market support...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: application not lauching on simulator when using google map api Installation error: INSTALL_FAILED_MISSING_FEATURE

2011-07-22 Thread Abhishek Akhani
post your xml for more info..

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

[android-developers] Re: Parameters passed to a .NET webservice are always null when using ksoap2 jar

2011-07-22 Thread Abhishek Akhani
I don't know whats the problem here in your code but i can give you a code 
snippet which is slightly different but it works for me...


public boolean userLogin(String userName,String password,Activity 
activity){ 

boolean isLogin = false; 

SoapObject soapObject; 

SoapObject Request = new SoapObject(NAME_SPACE 
,METHOD_NAME_USER_LOGIN); 
Request.addProperty(email, 
a...http://groups.google.com/groups/unlock?_done=/group/android-developers/browse_thread/thread/ab4aaf54445b75a4/4d8aec05499f16f4%3Fshow_docid%3D4d8aec05499f16f4msg=4d8aec05499f16f4@ab.com);
 

Request.addProperty(password, asdfgh); 

SoapSerializationEnvelope soapEnvelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER11); 
soapEnvelope.dotNet=true; 
soapEnvelope.setOutputSoapObject(Request); 

AndroidHttpTransport aht = new AndroidHttpTransport(URL); 
aht.debug=true; 
try { 
aht.call(SOAP_ACTION_USER_LOGIN, soapEnvelope); 
soapObject = (SoapObject) soapEnvelope.getResponse(); 
if(soapObject != null){ 
result = soapObject.getProperty(result).toString(); 
} 

if(result.equalsIgnoreCase(success)){ 
isLogin = true; 
} 
} catch (IOException e) { 
e.printStackTrace(); 
} catch (XmlPullParserException e) { 
e.printStackTrace(); 
} 
return isLogin; 
} 

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

2011-07-22 Thread Abhishek Akhani
I have also encountered this problem i think 9 patch images take some 
space on all four sides which makes the inner content to squeeze you 
have to readjust your text view or just use png... :-)   this is what i 
did

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