[android-developers] Re: Image processing

2011-09-26 Thread ko5tik
...  damn german keyboard

On 27 Sep., 08:34, ko5tik  wrote:
> On 24 Sep., 12:26, Venki  wrote:
>
> >        I know Image Processing. I don't know anything about android
> > though. I know Java, J2EE so I think I know some basics.I have planned
> > to do some android apps using image processing. Where should I start?
> > Give me some tutorial related to image processing using android. If
> > you have created any apps using image processing in android please
> > tell me about it.
>
> Zou are welcome to your JavaOCR project:
>
> http://sourceforge.net/projects/javaocr
>
> We are focusing primarily on OCR , but OCR also involves some image
> processing - and we could use help
> on this.   There are android demos (not yet complete,  but sampling
> and teaching recognisers work,  corresponding recogniser is not yet
> ready)
>
> An I already  published applications using this 
> library:http://www.pribluda.de/android/charger/http://www.pribluda.de/android/ocrcall/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: USB Host mode on galaxy tab 10.1 / android 3.1 - Device repeatedly re connecting in dmesg output

2011-09-26 Thread Taylor Alexander
Hey Anil,
I connected my tablet to wifi and it immediately said there was an update.

You have an A501 though? Mine is an A500. Perhaps the A501 does not have an
update yet? I'm not familiar with that model. Mine is wifi only. Since you
mention verizon I assume the A501 is the verizon model. It may have
different updates due to the cell module.

-Taylor



On Mon, Sep 26, 2011 at 11:19 PM, Anil Sasidharan  wrote:

> Hi Taylor,
>
> Thank you so much. Where do we get the 3.1 update that was applied on your
> tablet. Is it OTA (from Verizon??) or Is this available as a firmware
> download somewhere in the Internet? I would really appreciate if you could
> help us get this update for my Acer Tab A501.
>
> Thanks once again for the great support so far...
>
> Warm Regards,
> Anil
>
> On Tue, Sep 27, 2011 at 4:15 AM, Taylor Alexander 
> wrote:
>
>> Yes, the tablet shipped with 3.0 but I immediately applied the 3.1 update.
>> And then another small update wanted to be applied, but I think USB worked
>> after the first one. I didn't try it before that.
>>
>> Under "About Tablet" in settings I have:
>>
>> Model: A500
>> Android Version: 3.1
>> Kernel Version: 3.6.36.3
>> Build Number: Acer_A500_4.0.10.13_COM_GEN2
>>
>> Let me know if you have any other questions!
>>
>>
>>
>> On Sat, Sep 24, 2011 at 8:20 PM, Anil Sasidharan wrote:
>>
>>> Hi Taylor,
>>>
>>> Thanks a lot. Based on what have experienced, I guess the Samsung Tab
>>> 10.1 with Android-3.1 firmware does not yet support USB Host APIs whereas
>>> Acer's Iconia A500 supports the same. Would you please let me know the exact
>>> version of the Android firmware on A500 that worked for you. I've come
>>> across an Acer Tab A501 with Android-3.0.1 version, however I'm not sure if
>>> it supports USB Host API because Google says it is supported only from 3.1
>>> (sdk-version 12 and above) onwards (even though there is an back port of USB
>>> Host library for Gingerbread out there).
>>>
>>> I would greatly appreciate your comments/suggestions on this.
>>>
>>> Warm Regards,
>>> Anil
>>>
>>> On Sat, Sep 24, 2011 at 12:31 AM, Taylor Alexander <
>>> tlalexan...@gmail.com> wrote:
>>>
 Hi Anil,

 Yes, I did get it working with the Acer. I had replied off list to Will
 because my original reply to the list was taking too long to get approved
 (it was my first post to this list).

 Here is my first off-list message, where I gave some details:

 On Thu, Sep 22, 2011 at 1:43 AM, Taylor  wrote:

> Hey,
> I replied to the group, but I'm not seeing the message, so I don't
> know if it failed to post, or if its in limbo since I'm a new user.
> Anyway, I wanted to reply directly to you. I was having the EXACT same
> problem as you. I had a USB device that I had compiled a kernel module
> for. I loaded the module onto the tablet, and lsmod showed it running.
> However, I couldn't get the device to work, and dmesg showed the same
> problem - device not supported, over and over, even though the VID and
> PID matched the source code for the driver. I was going crazy, but I
> thought it was my kernel modules, so I tried a different approach at
> someone's suggestion.
>
> I tried some of google's example code for USB, and when it runs
> getDeviceList() I had it print how many USB devices were connected. It
> always reads zero, even when a functioning USB mouse is connected!
> This was frustrating, so I googled for how to enumerate devices on a
> galaxy tab, and found your post.
>
> After seeing your post, I realized this may be an issue with Samsung.
> I bought an Acer Iconia Tab A500 today, as some users had reported
> success with it - it works! The same code run on the galaxy tab still
> fails.
>
> Both are running 3.1.
>
> So I'm inclined to believe this is an issue with Samsung. Did you ever
> get this working?



 I have had continued success with the Acer, and none with the Samsung.

 Will - replying to your off-list message. I just checked again. The Acer
 enumerates a webcam and thumbdrive I've tried, but not a mouse or keyboard.

 This is with the following code, which logs values to logcat:

 UsbManager usbman = (UsbManager) getSystemService(USB_SERVICE);
  HashMap devlist = usbman.getDeviceList();
 Iterator deviter = devlist.values().iterator();
  PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(
 ACTION_USB_PERMISSION), 0);

 while (deviter.hasNext()) {
 UsbDevice d = deviter.next();
  l("Found device: "
 + String.format("%04X:%04X", d.getVendorId(),
  d.getProductId())); }

 where l is a function that logs stuff to the debug window.

 That is a snippet from the source code found here:
  http://android.serverbox.ch/?p=370

 There is that USB missile launcher that the google demo supports. I have
 

[android-developers] Re: unmarshalling and premature alarm problems

2011-09-26 Thread ko5tik
And I also wrote small , naive, and lightweight Databinding layer for
JSON based on GSON pull parser:

https://github.com/ko5tik/jsonserializer

It is published on maven central and  is reallz lightweight and fast.

enjoy

On 27 Sep., 02:57, Zsolt Vasvari  wrote:
> You could also turn your object into a JSONString and send that
> around.  That also has the advantage of being applicable outside of
> Android.
>
> On Sep 27, 4:00 am, TreKing  wrote:
>
>
>
>
>
>
>
> >   On Mon, Sep 26, 2011 at 2:40 PM, John Goche 
> > wrote:
>
> > > Google "parcelable ClassNotFoundException" for more information.
>
> > >> What I've done is create a "Bundleable" interface that basically does 
> > >> what
> > >> Parcelable is intended to do. Objects extending this interface can put
> > >> themselves and recreate themselves from a Bundle object, which is itself
> > >> Parcelable so you can send it around just like your object - except with 
> > >> the
> > >> minor fact that the system always knows how to load a Bundle type so you
> > >> don't run into this error.
>
> > > Hmmm... Not sure I follow. Could you please give some more details?
>
> > public interface Bundleable
> > {
> >  public Bundle toBundle();
>
> >  public void fromBundle(Bundle b);
>
> > }
>
> > public class MyClass implements Bundleable
> > {
> >  public Bundle toBundle()
> >  {
> >   Bundle b = new Bundle();
> >   // Fill b with data
> >   return b;
> >  }
>
> >  public void from Bundle(Bundle b)
> >  {
> >   // set properties from data in b
> >  }
>
> > }
>
> > // ...
>
> > MyClass m = new MyClass();
> > Intent i = new Intent();
> > i.putBundleExtra("MyClass", m.toBundle());
>
> > // ... Elsewhere
>
> > Bundle b = intent.getBundleExtra("MyClass");
> > MyClass m = new MyClass(b); // Constructor calls fromBundle(b);
>
> > ---­--
> > 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] How to send HD (High Definition) output from android Tab to HDtv

2011-09-26 Thread Rikki
I want to develop an application that will send HD content on my
samsung galaxy tab and show it on HDtv.
I have searched for sample apps that can help me in understanding the
involved processing. But to my surprise, I've found nothing.

I am not able to figure out any library support or APIs for
connecting, detecting and data transfer through HDMI port/adapter.

I want my application to detect the HDTV when connected through HDMI
port and then start showing chosen data on TV.

Any help will be appreciated.

Thanks,
Rikki

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

2011-09-26 Thread ko5tik


On 24 Sep., 12:26, Venki  wrote:
>        I know Image Processing. I don't know anything about android
> though. I know Java, J2EE so I think I know some basics.I have planned
> to do some android apps using image processing. Where should I start?
> Give me some tutorial related to image processing using android. If
> you have created any apps using image processing in android please
> tell me about it.

Zou are welcome to your JavaOCR project:

http://sourceforge.net/projects/javaocr

We are focusing primarily on OCR , but OCR also involves some image
processing - and we could use help
on this.   There are android demos (not yet complete,  but sampling
and teaching recognisers work,  corresponding recogniser is not yet
ready)

An I already  published applications using this library:
http://www.pribluda.de/android/charger/
http://www.pribluda.de/android/ocrcall/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: USB Host mode on galaxy tab 10.1 / android 3.1 - Device repeatedly re connecting in dmesg output

2011-09-26 Thread Anil Sasidharan
Hi Taylor,

Thank you so much. Where do we get the 3.1 update that was applied on your
tablet. Is it OTA (from Verizon??) or Is this available as a firmware
download somewhere in the Internet? I would really appreciate if you could
help us get this update for my Acer Tab A501.

Thanks once again for the great support so far...

Warm Regards,
Anil

On Tue, Sep 27, 2011 at 4:15 AM, Taylor Alexander wrote:

> Yes, the tablet shipped with 3.0 but I immediately applied the 3.1 update.
> And then another small update wanted to be applied, but I think USB worked
> after the first one. I didn't try it before that.
>
> Under "About Tablet" in settings I have:
>
> Model: A500
> Android Version: 3.1
> Kernel Version: 3.6.36.3
> Build Number: Acer_A500_4.0.10.13_COM_GEN2
>
> Let me know if you have any other questions!
>
>
>
> On Sat, Sep 24, 2011 at 8:20 PM, Anil Sasidharan wrote:
>
>> Hi Taylor,
>>
>> Thanks a lot. Based on what have experienced, I guess the Samsung Tab 10.1
>> with Android-3.1 firmware does not yet support USB Host APIs whereas Acer's
>> Iconia A500 supports the same. Would you please let me know the exact
>> version of the Android firmware on A500 that worked for you. I've come
>> across an Acer Tab A501 with Android-3.0.1 version, however I'm not sure if
>> it supports USB Host API because Google says it is supported only from 3.1
>> (sdk-version 12 and above) onwards (even though there is an back port of USB
>> Host library for Gingerbread out there).
>>
>> I would greatly appreciate your comments/suggestions on this.
>>
>> Warm Regards,
>> Anil
>>
>> On Sat, Sep 24, 2011 at 12:31 AM, Taylor Alexander > > wrote:
>>
>>> Hi Anil,
>>>
>>> Yes, I did get it working with the Acer. I had replied off list to Will
>>> because my original reply to the list was taking too long to get approved
>>> (it was my first post to this list).
>>>
>>> Here is my first off-list message, where I gave some details:
>>>
>>> On Thu, Sep 22, 2011 at 1:43 AM, Taylor  wrote:
>>>
 Hey,
 I replied to the group, but I'm not seeing the message, so I don't
 know if it failed to post, or if its in limbo since I'm a new user.
 Anyway, I wanted to reply directly to you. I was having the EXACT same
 problem as you. I had a USB device that I had compiled a kernel module
 for. I loaded the module onto the tablet, and lsmod showed it running.
 However, I couldn't get the device to work, and dmesg showed the same
 problem - device not supported, over and over, even though the VID and
 PID matched the source code for the driver. I was going crazy, but I
 thought it was my kernel modules, so I tried a different approach at
 someone's suggestion.

 I tried some of google's example code for USB, and when it runs
 getDeviceList() I had it print how many USB devices were connected. It
 always reads zero, even when a functioning USB mouse is connected!
 This was frustrating, so I googled for how to enumerate devices on a
 galaxy tab, and found your post.

 After seeing your post, I realized this may be an issue with Samsung.
 I bought an Acer Iconia Tab A500 today, as some users had reported
 success with it - it works! The same code run on the galaxy tab still
 fails.

 Both are running 3.1.

 So I'm inclined to believe this is an issue with Samsung. Did you ever
 get this working?
>>>
>>>
>>>
>>> I have had continued success with the Acer, and none with the Samsung.
>>>
>>> Will - replying to your off-list message. I just checked again. The Acer
>>> enumerates a webcam and thumbdrive I've tried, but not a mouse or keyboard.
>>>
>>> This is with the following code, which logs values to logcat:
>>>
>>> UsbManager usbman = (UsbManager) getSystemService(USB_SERVICE);
>>>  HashMap devlist = usbman.getDeviceList();
>>> Iterator deviter = devlist.values().iterator();
>>>  PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(
>>> ACTION_USB_PERMISSION), 0);
>>>
>>> while (deviter.hasNext()) {
>>> UsbDevice d = deviter.next();
>>>  l("Found device: "
>>> + String.format("%04X:%04X", d.getVendorId(),
>>>  d.getProductId())); }
>>>
>>> where l is a function that logs stuff to the debug window.
>>>
>>> That is a snippet from the source code found here:
>>>  http://android.serverbox.ch/?p=370
>>>
>>> There is that USB missile launcher that the google demo supports. I have
>>> been considering getting one of those to do some more testing with the
>>> Samsung.
>>>
>>> -Taylor
>>>
>>>
>>>  On Fri, Sep 23, 2011 at 7:34 AM, Anil Sasidharan wrote:
>>>
  Hi,

 I'm curious to know if you were able to get this fixed using "Acer
 Iconia A500". Are you able to use the android application to enumerate
 devices using USB Host API?

 Warm Regards,
 Anil


 On Thu, Sep 22, 2011 at 1:05 AM, Taylor  wrote:

> Hey!
>
> I've actually had the EXACT same problems and it was driving me nuts!
> 

[android-developers] Re: Activities aren't getting killed by ActivityManager when app is running out of memory

2011-09-26 Thread FBondarenko
> ... I see each activity enter onStop after the new activity starts, but I 
> don't see
> ActivityManager ever killing them ...

Are you sure you have multiple instances of your activity and not did
not set the
FLAG_ACTIVITY_SINGLE_TOP or relatives to keep it to one single
activity,
thus not having any 'background activities' to spare, i.e. to be
killed?

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


Re: [android-developers] Re: How to install APK programmatically without user prompt

2011-09-26 Thread Pratik Prajapati
In this complex world, there are always some un-common requirements to
implement un-common stuff. It is upto the architect to understand the
security loophole to clear.

-- 
Regards,
Pratik Prajapati

On Mon, Sep 26, 2011 at 10:40 PM, akay  wrote:

> Are you asking this because of recent headlines about android security
> issues that allow apps to install w/O you knowing?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 install APK programmatically without user prompt

2011-09-26 Thread akay
Are you asking this because of recent headlines about android security
issues that allow apps to install w/O you knowing?

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

2011-09-26 Thread Devendran Raju
Thank u...

Thanks & Regards,
Devendran.R

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Problem with MediaPlayer while playing sequence (or) Multiple Files

2011-09-26 Thread julious raj
Hello Jeremy,
Thanks for the Immediate Reply.
I've used that solution.The File is playing well. My problem is
whatever button i've clicked the song plays from the alphabetical
order from assets. I can not call a specific file at runtime that's
why i'm struggling.

On Sep 27, 1:38 am, Jeremy Dagorn  wrote:
> Hi,
>
> So with the link describing someone with the same issue, there is a
> kind of solution by calling different methods in the catch for the
> IllegalStateException.
>
> Did you try it?
>
> On Sep 26, 3:58 am, julious raj  wrote:
>
>
>
>
>
>
>
> > Hello developers,
> >    I am facing one big issue with my application. AFAIK the
> > mediaplayer datasource should be Uri(or) FileDescriptor(or) Path. I
> > have loaded my Files to assets. So i used FileDescriptor as datasource
> > for my player. My problem is whenever i try to play any file the first
> > file from assets played. It doesnot respond to the input i've given. I
> > am new to Android development.I am googling it but does not find a
> > better answer.
> > I also faced the issue in the below 
> > link.http://code.google.com/p/android/issues/detail?id=957
>
> > Thanks in advance for Spending your valuable time.
>
> > My code is Below:
> >         player = new MediaPlayer();
> >         playnext = (Button)findViewById(R.id.button2);
> >         seekplay = (SeekBar)findViewById(R.id.seekBar1);
> >         button = (Button)findViewById(R.id.button1);
> >         button.setOnClickListener(new OnClickListener() {
>
> >                         @Override
> >                         public void onClick(View arg0) {
>
> >                                 AssetFileDescriptor afd;
> >                                 try {
> >                                         if(player.isPlaying())
> >                                 {
> >                                         player.stop();
> >                                         player.release();
> >                                         player = new MediaPlayer();
> >                                 }
>
> >                                         afd = 
> > assetManager.openFd("edho.mp3");
>
> >                                         playFile(afd.getFileDescriptor());
> >                                 } catch (IOException e) {
> >                                         Log.e("Play File", e.toString());
> >                                         e.printStackTrace();
> >                                 }
>
> >                         }
> >                 });
>
> >         playnext.setOnClickListener(new OnClickListener() {
>
> >                         @Override
> >                         public void onClick(View arg0) {
>
> >                                 AssetFileDescriptor afd;
> >                                 try {
> >                                         if(player.isPlaying())
> >                                 {
> >                                         player.stop();
> >                                         player.release();
> >                                         player = new MediaPlayer();
> >                                 }
> >                                         afd = 
> > assetManager.openFd("jugg.mp3");
>
> >                                         playFile(afd.getFileDescriptor());
> >                                 } catch (IOException e) {
> >                                         Log.e("Play Next File", 
> > e.toString());
> >                                         e.printStackTrace();
> >                                 }
>
> >                         }
> >                 });
>
> >     }
>
> >     void playFile(FileDescriptor name)
> >     {
>
> > //      if(player ==null)
> > //              player = new MediaPlayer();
>
> >         try {
> >                 player.reset();
> >                 player.setAudioStreamType(AudioManager.STREAM_MUSIC);
> >                         player.setDataSource(name);
> >                         player.prepare();
>
> >                         player.setOnPreparedListener(new 
> > OnPreparedListener() {
>
> >                                 @Override
> >                                 public void onPrepared(final MediaPlayer 
> > mp) {
>
> >                                         seekplay.setMax(mp.getDuration());
> >                                         new Thread(new Runnable() {
>
> >                                                 @Override
> >                                                 public void run() {
>
> >                                                         
> > while(mp.getCurrentPosition() >                                                         {
> >                                                                 
> > seekplay.setProgress(mp.getCurrentPosition());
> >                                                         }
>
> >                                                 }
> >                                         }).start();
> >                                         player.st

[android-developers] how to send email from android app.

2011-09-26 Thread GopalaKrishnan D
http://stackoverflow.com/questions/4668871/send-auto-email-programmatically

http://stackoverflow.com/questions/7274949/send-email-programmatically-in-android

-- 
~* Regards*
*GopalaKrishnan D*

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

[android-developers] how to send email from android app.

2011-09-26 Thread Devendran Raju
hi,

I need to send response mail from the app to user.

Can anybody help me.


Thanks in advance.

Regards,
Devendran.R

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

2011-09-26 Thread KK
Hi Chris,
Thanks for the links. I'm going to spend some time learning more about using
GIMP utility to help me creating basic splash images, background images
etc.

Thanks,
KK

On Tue, Sep 27, 2011 at 8:44 AM, Chris  wrote:

>
>
> On Sunday, September 25, 2011 8:32:50 AM UTC-4, KK wrote:
>>
>> Hi All,
>>  Can someone point me to some tutorial or help me on how to create these
>> PNG images with ease.
>>
>
> The Android Icon Design Guidelines, here (
> http://developer.android.com/guide/practices/ui_guidelines/icon_design.html)
> and the official Gimp tutorials page (http://www.gimp.org/tutorials/)
> should have enough info to get you started.  If you have specific questions,
> please follow up.
>
> Other Google searches like "png jpg conversion" and the like should help,
> too.  If you come across any Android-specific difficulties, again, follow
> up.
>
> Thanks.
> - C
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Install % statistic removed, replaced with "users" and "devices"

2011-09-26 Thread Zsolt Vasvari
LOL, you must be new to the Android Market...

On Sep 27, 8:51 am, Peter Sinnott  wrote:
> Maybe someone should report it not working to them.
>
> On Sep 27, 1:28 am, TreKing  wrote:
>
>
>
> > On Mon, Sep 26, 2011 at 2:11 PM, Peter Sinnott  wrote:
> > > I tend to think it isn't correct but if Google had actually emailed me an
> > > update on the issue like I asked in the known issues page I would have a
> > > clue.
>
> > Has anyone ever gotten an update to an issue by "signing up" for email
> > notices about it?
>
> > I sign up for every "known issue" - so, you know, approximately every 3 days
> > - yet have never received an update about anything. Even when they're
> > "fixed".
>
> > ---­--
> > TreKing  - Chicago
> > transit tracking app for Android-powered devices- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] apk file installation

2011-09-26 Thread TreKing
On Fri, Sep 23, 2011 at 5:16 PM, JXu  wrote:

> My question is how to use the apk installed in the device to reinstall the
> apk from the android market?
>

What? That doesn't make sense.

-
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] Convert this to add a item to listview?

2011-09-26 Thread TreKing
On Sun, Sep 25, 2011 at 11:57 PM, Dalton Metzler  wrote:

> Okay so i downloaded this database script
>
> and i want to convert it to instead add a item to a listview and on
> load up it will load all those items again
>

Your question doesn't make much sense.

-
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: How to install APK programmatically without user prompt

2011-09-26 Thread Chris


On Monday, September 26, 2011 7:49:25 AM UTC-4, nyarlathotep wrote:

>
> We are not all trying to hack code behind our desks at home. 
> Sometimes there are special requirements in a business environment 
> that you have to implement and which people is not due and even 
> allowed to tell you. 
>
>
The person giving you the special requirement doesn't understand his 
platform.  Though, you're able to accomplish what you want if you're willing 
to write your own firmware, but that might add some time to your development 
schedule and isn't germane to this list. 

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

2011-09-26 Thread Chris


On Sunday, September 25, 2011 8:32:50 AM UTC-4, KK wrote:
>
> Hi All, 
>  Can someone point me to some tutorial or help me on how to create these 
> PNG images with ease.
>

The Android Icon Design Guidelines, here 
(http://developer.android.com/guide/practices/ui_guidelines/icon_design.html) 
and the official Gimp tutorials page (http://www.gimp.org/tutorials/) should 
have enough info to get you started.  If you have specific questions, please 
follow up.

Other Google searches like "png jpg conversion" and the like should help, 
too.  If you come across any Android-specific difficulties, again, follow 
up.

Thanks.
- C 

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

2011-09-26 Thread Perry168
Thank you for your suggection.

On 9月22日, 下午12時09分, Dianne Hackborn  wrote:
> Also if you are using the license check or anything that requires the app be
> modified to be pirated, the pirate will need to sign it with their own cert
> which will not match that of the real app so not be compatible as an update.
>
>
>
>
>
> On Wed, Sep 21, 2011 at 5:40 PM, TreKing  wrote:
> > On Wed, Sep 21, 2011 at 7:38 PM, Spiral123  wrote:
>
> >> I suspect the OP is concerned that someone may obtain a pirated copy
> >> of his app and then subsequently upgrade it from the Android market
> >> without ever paying for it.
>
> > In that case, the Market does not allow downloading an upgrade to a paid
> > app you have not paid for. You can see for yourself. Build an old version of
> > your paid app and try to download the paid version from the market. It
> > prompts you to buy (which you of course can't as the developer).
>
> > --
> > 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
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

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


Re: [android-developers] Want to use Unlock Pattern in my Android App

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 9:31 AM, david joe  wrote:

> Can any tell me how to use this unlock screens in our app.


Read the source to see how it's implemented. Then copy.

-
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] help - image displays after function completes, need it to do so before

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 1:14 PM, xstream  wrote:

> however whats happening is the image doesn't display until the whole
> process is complete and the "waiting to finish" never shows up because the
> textview only changes after the function is complete...how can i change
> that?


Use AsyncTask.

-
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: Creating PNG images for app startup, background etc

2011-09-26 Thread KK
Hi Oli,
Can you elaborate a bit on how to get a PNG exported from a scene or how to
convert some image say in JPEG format to PNG and then put that in proper
dimension and size. Can you point us to some tutorial links?
Thanks in advance.

Thanks,
KK

On Mon, Sep 26, 2011 at 2:35 PM, Oli  wrote:

> I'll give another thumbs up for using Inkscape.  I played around
> recently writing a small game and used it for most of the art assets
> (buttons, logos, etc.).  I found it's particularly handy if you're
> going to want to output multiple sizes of the same artwork without any
> loss in quality.
>
> http://floor4.co.uk/2011/09/16/creating-artwork-for-developers/
>
> Another thing worth looking at if you want to do something a little
> more complex might be Blender.  It's fairly simple to get a png export
> of a 3D scene.  Obviously there's a bit more of a learning curve to
> get the scene created in the first place, but I found it invaluable as
> a non-artist - no need to consider stuff like shading as I could just
> let the lighting do it for me :)
>
> On Sep 25, 6:43 pm, Vishal  wrote:
> > HI,
> > I am in the same situation. I have been searching for a while and got
> > to know that a SVG (http://en.wikipedia.org/wiki/
> > Scalable_Vector_Graphics) editor is good to create your logos etc..
> > I just downloaded Inkscape (free) and am playing around a bit. Hope
> > someone experienced can write more
> > Thanks
> >
> > On Sep 25, 5:32 pm, KK  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi All,
> > > I'm finding it difficult to get a PNG image of required size(and other
> > > parameters) that I can use during app start and may be also for the app
> > > background. Can someone point me to some tutorial or help me on how to
> > > create these PNG images with ease. I tried downloading some images(PNG
> ones
> > > only with 320x480 size) from the web but it dint' work, it me errors
> saying
> > > not a PNG image, wrong format etc..
> >
> > > Any help would be appreciated.
> >
> > > Thanks,
> > > kk
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] I have a intent problem

2011-09-26 Thread ShovelSwingMan
Hi !

May be My description was so poor.
I solved it

Exactly, I want kill activity with code that Activity created by
StartActivity() Method.
But I can't normaly..
So I used Broadcast Receiver.

Anyway Thank you too much your answers.

Have a greate day!!.
2011/9/27 TreKing 

>  On Fri, Sep 23, 2011 at 3:10 AM, Dowon Na wrote:
>
>> How to kill that Activity made by startActivity?
>
>
> Read the documentation for Activity.
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



--

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

Re: [android-developers] I have a intent problem

2011-09-26 Thread TreKing
On Fri, Sep 23, 2011 at 3:10 AM, Dowon Na  wrote:

> How to kill that Activity made by startActivity?


Read the documentation for Activity.

-
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] How to start the com.android.camera.viewImage to view a picture

2011-09-26 Thread TreKing
On Fri, Sep 23, 2011 at 5:06 AM, achellies  wrote:

> the above code is not work..


What does "is not work" means?

-
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] Package name

2011-09-26 Thread TreKing
On Thu, Sep 22, 2011 at 11:53 AM, NEWBIE  wrote:

> I wanted you to explain me what is Package name?


I wanted you to discover Google search.

-
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] Setting duration in Frame Animation

2011-09-26 Thread Krishna Prasad
I just create a frame animation in android but i dont know how to set
the duration. my requirement is it should animate for a particular
time and after that go to next activity using intent.Is it possible in
frame animation to set duration.can anybody help me

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


Re: [android-developers] devender

2011-09-26 Thread TreKing
On Thu, Sep 22, 2011 at 11:51 PM, Devender Gupta wrote:

> i want to move on android so any help to provide go behalf on android
>

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

And read the documentation.

-
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] Scheduled SMS service

2011-09-26 Thread TreKing
On Fri, Sep 23, 2011 at 12:23 AM, vibhu  wrote:

> I m new in android development , want to code a scheduled sms service .
> please help me out ..
>

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

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

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

Re: [android-developers] OCR android

2011-09-26 Thread Ray da Costa
http://code.google.com/p/tesjeract/
http://code.google.com/p/tesseract-ocr/
http://www.itwizard.ro/interfacing-cc-libraries-via-jni-example-tesseract-163.html
http://code.google.com/p/mezzofanti/


2011/9/25 Ravijadhav 

> Hello Everyone,
>
> I am a newbie to android
> I want to develop an application based on OCR.
> However, the OCR engine should be implemented on android itself.
> Which are the libraries(classes) available in android which provide
> image processing functions??
> and is there a tutorial available on those libraries??
>
> Thank you,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




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

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

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

2011-09-26 Thread Indicator Veritatis
Short answer: no. Longer: why do you need point attenuation? There are
other ways to do anti-aliasing, and some really cool graphics have
been done for Android phones using that instead of point attenuation.

On Sep 26, 6:26 am, MobileVisuals  wrote:
> I have found that everything implemented with Point attenuation will
> look like a blurry mess on devices from HTC and  LG. This happens on
> even the newest devices from HTC, like HTC Desire HD. Why is it like
> this? Haven't they implemented Android in the right way?
>
> Point attenuation works like it should on most Android devices, like
> those from Samsung. I have implemented Point attenuation according to
> the Android specification in two of my company's apps.I have worked
> with Point attenuation on Symbian and C++ before, so I am quite sure
> that I have implemented it the right way. It is about the same code
> implementation in all OpenGL.
>
> Shouldn't all new Android devices support Point attenuation? It works
> on IPhone, so I think Point attenuation should work on all new Android
> devices too.

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

2011-09-26 Thread RAJU V
me too going to develop app in OCR only
but still now didt start to develop...
but i have some concept to develop ya.



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


On Sun, Sep 25, 2011 at 11:12 AM, Ravijadhav  wrote:

> Hello Everyone,
>
> I am a newbie to android
> I want to develop an application based on OCR.
> However, the OCR engine should be implemented on android itself.
> Which are the libraries(classes) available in android which provide
> image processing functions??
> and is there a tutorial available on those libraries??
>
> Thank you,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-09-26 Thread TreKing
On Thu, Sep 22, 2011 at 3:49 PM, Tahir Satti wrote:

> Please send me some links so that i can present the facts infront of me
> faculty
>

Try the documentation and Google.

-
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: Android market problems with my App

2011-09-26 Thread Jim Graham
On Mon, Sep 26, 2011 at 06:10:39PM -0700, Matteo Camilli wrote:
> Thank you jim, I've received your answer
> 
> what do you mean with "unless it's already a high-ranking app before it's 
> launched"
> how an app can be high-ranking before its launch?

Don't ask me...I've been asking the very same question.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)| "> There it was, right in the title bar:
spooky1...@gmail.com|  > Microsoft Operations POS."
< Running FreeBSD 7.0 > | 
ICBM / Hurricane:   | "Never before has a TLA been so appropriately
   30.44406N 86.59909W  |  mis-parsed." (alt.sysadmin.recovery)

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] Re: How to do a Thread that only executes itself one time? (but continues alive)

2011-09-26 Thread Indicator Veritatis
Also, while you are on the topic of Threads and Loopers, 99% of the
time, if you think you need to create your own Looper instead of using
one created by the system, your design has a mistake in it. Handler,
HandlerThread and pre-existing Loopers should be enough. Even then
AsyncTask is often easier and better.

On Sep 26, 8:30 am, Kostya Vasilyev  wrote:
> The exception is due to your thread not having a Looper, which a
> fundamental low-level mechanism used by Android to delivers events to an
> application. You can fix this, but
>
> You don't really need a thread for this - after you register a listener,
> the main thread will continue to run, receiving event callbacks as needed.
>
> If your app is having performance problems, take a look at what you do
> inside the listener callbacks and make it take less time.
>
> -- Kostya
>
> 26.09.2011 19:25, saex пишет:
>
> > It is for Augmented Reality App, i really need to use Threads for
> > this, or the camera doesn't works properly
>
> > The code that i posted gives me an exception how can i avoid that
> > exception? the Exception is posted in the question.
>
> > Thanks
>
> > On 26 sep, 16:52, TreKing  wrote:
> >> On Mon, Sep 26, 2011 at 8:37 AM, saex  wrote:
> >>> But i want to do it on a separate Thread, to optimize my app removing 
> >>> tasks
> >>> from the main thread, because the main thread have a lot of tasks on it 
> >>> and
> >>> it needs to use threads for such thinks
> >> Putting arbitrary functionality on another thread will not optimize your 
> >> app
> >> unless you make really good use of multi-core processers. In fact, it will
> >> slow it down with the overhead of creating, switching to, running, and
> >> cleaning up the thread.
>
> >>> please tell me how to make a thread that only executes itself one time
> >> The code you already have will do exactly that, as pointless as it is.
>
> >> -
> >> TreKing  - Chicago
> >> transit tracking app for Android-powered devices
>
> --
> Kostya Vasilyev

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


Re: [android-developers] Re: How to install APK programmatically without user prompt

2011-09-26 Thread Kristopher Micinski
It's not really a matter of not wanting to help so much as, it just
plain won't work ;-)

Kris

On Mon, Sep 26, 2011 at 9:09 PM, Indicator Veritatis  wrote:
> More importantly, sometimes these business people who come up with
> "special requirements in a business environment" do not know what they
> are talking about. What you are asking for, as Dianne explained, is
> breaking the security model of Android. We will NOT help you do this.
>
> On Sep 26, 4:49 am, nyarlathotep  wrote:
>> I honestly thing these are the most frustrating answers to get in a
>> forum.
>>
>> People has not to explain what they're trying to achieve.
>> If you know the answer good, if you don't, please don't say that there
>> is no good reason for doing this or that.
>>
>> We are not all trying to hack code behind our desks at home.
>> Sometimes there are special requirements in a business environment
>> that you have to implement and which people is not due and even
>> allowed to tell you.
>>
>> On Sep 19, 12:11 pm, Oli  wrote:
>>
>> > Pratik,
>>
>> > I think you should explain what you're trying to achieve with this and
>> > maybe someone can suggest an alternative.  There's no good reason why
>> > you should want to install an apk without user input as that would
>> > break security, so I think you just need an alternative approach here.
>>
>> > Cheers,
>> > Oli
>>
>> > On Sep 16, 6:32 pm, Pratik Prajapati 
>> > wrote:
>>
>> > > I need to install some non market place APK programmatically *without 
>> > > *user
>> > > prompt. I found some links on stackoverflow, but all those mechanism will
>> > > prompt the user.
>> > > Is there any way to do it with some APIs or I should use 'pm install > > > name>' command (doing with system() api)?
>>
>> > > --
>> > > Regards,
>> > > Pratik Prajapati
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Android market problems with my App

2011-09-26 Thread Matteo Camilli
Thank you jim, I've received your answer

what do you mean with "unless it's already a high-ranking app before it's 
launched"
how an app can be high-ranking before it's launch?

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

2011-09-26 Thread Indicator Veritatis
More importantly, sometimes these business people who come up with
"special requirements in a business environment" do not know what they
are talking about. What you are asking for, as Dianne explained, is
breaking the security model of Android. We will NOT help you do this.

On Sep 26, 4:49 am, nyarlathotep  wrote:
> I honestly thing these are the most frustrating answers to get in a
> forum.
>
> People has not to explain what they're trying to achieve.
> If you know the answer good, if you don't, please don't say that there
> is no good reason for doing this or that.
>
> We are not all trying to hack code behind our desks at home.
> Sometimes there are special requirements in a business environment
> that you have to implement and which people is not due and even
> allowed to tell you.
>
> On Sep 19, 12:11 pm, Oli  wrote:
>
> > Pratik,
>
> > I think you should explain what you're trying to achieve with this and
> > maybe someone can suggest an alternative.  There's no good reason why
> > you should want to install an apk without user input as that would
> > break security, so I think you just need an alternative approach here.
>
> > Cheers,
> > Oli
>
> > On Sep 16, 6:32 pm, Pratik Prajapati 
> > wrote:
>
> > > I need to install some non market place APK programmatically *without 
> > > *user
> > > prompt. I found some links on stackoverflow, but all those mechanism will
> > > prompt the user.
> > > Is there any way to do it with some APIs or I should use 'pm install  > > name>' command (doing with system() api)?
>
> > > --
> > > Regards,
> > > Pratik Prajapati

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


[android-developers] Re: Will Android Ever Have It's Own Serialization?

2011-09-26 Thread Emanuel Moecklin
Hi Alex

Too slow for what?
I'm using Java serialization on Android a lot and it's not slow at all but 
of course that depends on what you are doing and how you implement it.
I'm serializing/deserializing neural networks with several thousands of 
neurons and connections and yes it takes a couple of seconds to load the 
network but doing it in a separate thread keeps the app responsive.
I'm also serializing/deserializing objects of medium complexity in the gui 
thread with no impact on responsiveness at all.

Of course using standard Java serialization might be too slow and might also 
lead to StackOverflowExceptions.
But fortunately there are ways to speed up serialization (and to prevent 
stack overflows):

   1. Instead of using ObjectOutputStream.writeObject(ob) you can do an 
   ob.writeObject(ObjectOutputStream out) with writeObject being your custom 
   method to write the object.
   This is MUCH faster than using standard Java Serialization (not primarily 
   because of your custom writeObject method but because you avoid all the 
   highly reflective code that runs between the 
   ObjectOutputStream.writeObject(ob) method call and your 
   writeObject(ObjectOutputStream out) method). Deserializing an object can be 
   done by implementing an according readObject(ObjectInputStream in) method 
   and calling it directly (ob.readObject(in)) or by implementing a constructor 
   MyObject(ObjectInputStream in) (my preferred method).
   2. Of course a custom writeObject method is also much faster than the 
   standard implementation because your own implementation won't use 
   reflection.
   3. If your data structure is recursive you might run into stack overflow 
   problems that can be addressed by writing objects iterative instead of 
   recursively (as the standard serialization code would do).
   4. Having your own implementation also keeps the serialized objects small 
   because fields can be merged into smaller data structures (several booleans 
   into integers, shorts etc. or large arrays into a stream of bits, even using 
   a ZipOuputStream is an option). This can make a huge difference if you 
   serialize thousands of objects as blobs into a database.

Note 1: whenever you use Java Serialization you want to version the 
serialized objects because sometimes in the near future you might want to 
change your serialization code but you still have to read serialized objects 
in the "old" format.
Note 2: if you use ProGuard don't forget to add a section like the following 
to your proguard.cfg (readObject/writeObject methods are normally private 
and would be stripped out by ProGuard):
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}

BTW you might want to read: 
http://java.sun.com/developer/technicalArticles/Programming/serialization/

Best Regards
Emanuel Moecklin
1gravity LLC



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

2011-09-26 Thread Indicator Veritatis
What you need to do is pick your customers/clients more carefully. Any
client who asks you for such a feature either has completely failed to
understand the Android ecosystem or is up to no good. As already
explained, what you are asking for would break the security of
Android. This is NOT tolerable.

On Sep 16, 10:32 am, Pratik Prajapati 
wrote:
> I need to install some non market place APK programmatically *without *user
> prompt. I found some links on stackoverflow, but all those mechanism will
> prompt the user.
> Is there any way to do it with some APIs or I should use 'pm install  name>' command (doing with system() api)?
>
> --
> Regards,
> Pratik Prajapati

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

2011-09-26 Thread Indicator Veritatis
#1 necessary thing: don't cross-post or double post. It risks
alienating the people otherwise mostly likely to help you. Also, see
http://catb.org/~esr/faqs/smart-questions.html, far more important
than mere image processing technical knowledge.

On Sep 26, 8:01 am, Venki  wrote:
>   I know java, j2ee. I have planned to create some image processing
> apps using android. What are the necessary things that I should know.

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

2011-09-26 Thread Indicator Veritatis
You should start with the chapter on running Sobel Edge Detection on
Android using the NDK in "Android in Action", 2nd or 3rd edition.

The 3rd edition is really written for Honeycomb, so you might want to
go ahead and buy the 2nd which is already available. Or go to the
website for the book and download the code, though it will be hard to
pick up much from it without the accompanying text.

For heavy duty image processing you are likely to want to use the NDK
rather than the SDK. Yet 'zxing' does surprisingly well without using
the NDK. That too is a good project for you to look at, since it uses
image processing for barcode decoding. The Java code is better
documented than many other open source projects.

On Sep 24, 9:26 am, Venki  wrote:
>        I know Image Processing. I don't know anything about android
> though. I know Java, J2EE so I think I know some basics.I have planned
>Y to do some android apps using image processing. Where should I start?
> Give me some tutorial related to image processing using android. If
> you have created any apps using image processing in android please
> tell me about it.
>
> Thanks in advance.

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


[android-developers] Re: unmarshalling and premature alarm problems

2011-09-26 Thread Zsolt Vasvari
You could also turn your object into a JSONString and send that
around.  That also has the advantage of being applicable outside of
Android.


On Sep 27, 4:00 am, TreKing  wrote:
>   On Mon, Sep 26, 2011 at 2:40 PM, John Goche 
> wrote:
>
> > Google "parcelable ClassNotFoundException" for more information.
>
> >> What I've done is create a "Bundleable" interface that basically does what
> >> Parcelable is intended to do. Objects extending this interface can put
> >> themselves and recreate themselves from a Bundle object, which is itself
> >> Parcelable so you can send it around just like your object - except with 
> >> the
> >> minor fact that the system always knows how to load a Bundle type so you
> >> don't run into this error.
>
> > Hmmm... Not sure I follow. Could you please give some more details?
>
> public interface Bundleable
> {
>  public Bundle toBundle();
>
>  public void fromBundle(Bundle b);
>
> }
>
> public class MyClass implements Bundleable
> {
>  public Bundle toBundle()
>  {
>   Bundle b = new Bundle();
>   // Fill b with data
>   return b;
>  }
>
>  public void from Bundle(Bundle b)
>  {
>   // set properties from data in b
>  }
>
> }
>
> // ...
>
> MyClass m = new MyClass();
> Intent i = new Intent();
> i.putBundleExtra("MyClass", m.toBundle());
>
> // ... Elsewhere
>
> Bundle b = intent.getBundleExtra("MyClass");
> MyClass m = new MyClass(b); // Constructor calls fromBundle(b);
>
> ---­--
> 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: Hide few fields of database OR hide a table in the database from being accessed from other applications

2011-09-26 Thread Zsolt Vasvari
Other applications cannot read yoru database.  If you want to give
access to your data, you could create a ContentProvider and expose
whatever you want.

PS: Do NOT e-mail or chat request me.

On Sep 27, 8:51 am, elham  wrote:
> Dear All,
>
> I want to allow only one table from the database to be accessed from
> other applications.
>
> I am also wondering if i can deny access to  few fields from outside
> the application. Is this possible ?
>
> Thanks and Regards,

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


[android-developers] Re: Install % statistic removed, replaced with "users" and "devices"

2011-09-26 Thread Peter Sinnott
Maybe someone should report it not working to them.

On Sep 27, 1:28 am, TreKing  wrote:
> On Mon, Sep 26, 2011 at 2:11 PM, Peter Sinnott  wrote:
> > I tend to think it isn't correct but if Google had actually emailed me an
> > update on the issue like I asked in the known issues page I would have a
> > clue.
>
> Has anyone ever gotten an update to an issue by "signing up" for email
> notices about it?
>
> I sign up for every "known issue" - so, you know, approximately every 3 days
> - yet have never received an update about anything. Even when they're
> "fixed".
>
> -
> 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] Hide few fields of database OR hide a table in the database from being accessed from other applications

2011-09-26 Thread elham
Dear All,

I want to allow only one table from the database to be accessed from
other applications.

I am also wondering if i can deny access to  few fields from outside
the application. Is this possible ?

Thanks and Regards,

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


Re: [android-developers] Re: Android market problems with my App

2011-09-26 Thread Jim Graham
On Mon, Sep 26, 2011 at 05:41:37PM -0700, Matteo Camilli wrote:

> But still remain the first problem..

The first problem being that your app isn't listed, right?  That is
the new Google design.  You don't get your app listed in the new
category (or any other) unless it's already a high-ranking app before
it's launched, or, you are one of the top-rated developers.  Get used
to it.  And no, I don't like it either.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)| Peter da Silva:  No, try "rm -rf /"
spooky1...@gmail.com| Dave Aronson:As your life flashes before
< Running FreeBSD 7.0 > |  your eyes, in the unit of time known as an
ICBM / Hurricane:   |  ohnosecond (alt.sysadmin.recovery)
   30.44406N 86.59909W  |

Android Apps Listing at http://www.jstrack.org/barcodes.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: Android market problems with my App

2011-09-26 Thread Matteo Camilli
Ok, thank you!

But still remain the first 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: Install % statistic removed, replaced with "users" and "devices"

2011-09-26 Thread Zsolt Vasvari
I can do better than you:

I have 0 users with 298 devices.  That means an Infinite # of devices
per user


On Sep 27, 3:50 am, Adam Ratana  wrote:
> I see something similar with a Live Wallpaper I recently launched.  The
> total installs (now users) went to 200 after 2 days and has been there
> since.  These same 200 users keep on buying devices though, and keep
> installing the wallpaper on those devices, to where each user now has 4+
> devices.  These are some power users for sure, and they sure love this
> wallpaper.
>
> What is interesting though is it seems they fixed the graphs on the web
> version of the market.  For a day or so it showed a huge drop in installs
> for almost everyone's apps.  These graphs seem to be updated with seeming
> regularity, just not the numbers in the developer console.
>
>
>
> On Monday, September 26, 2011 2:10:26 PM UTC-4, John Coryat wrote:
>
> > Now it all makes sense!
>
> > One of my apps (a beta) has 3 users with 655 devices. I guess that's about
> > right. Doesn't everyone have a little over 200 Android devices?
>
> > -John Coryat- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] Re: Install % statistic removed, replaced with "users" and "devices"

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 2:11 PM, Peter Sinnott  wrote:

> I tend to think it isn't correct but if Google had actually emailed me an
> update on the issue like I asked in the known issues page I would have a
> clue.
>

Has anyone ever gotten an update to an issue by "signing up" for email
notices about it?

I sign up for every "known issue" - so, you know, approximately every 3 days
- yet have never received an update about anything. Even when they're
"fixed".

-
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: Android market problems with my App

2011-09-26 Thread Emanuel Moecklin
Check out:
http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs&ki_topic=24493&issue=1672472&bucket=24495&action=notify

Emanuel Moecklin
1gravity LLC

On Sep 26, 11:30 am, Matteo Camilli  wrote:
> Hello,
>
> i've got some problem with an app that i published 2 days ago.
>
> The problems are:
> 1) The app still doesn't appear in the market within the new entries
> (appear only with direct link)
> 2) In the dev console i see strange numbers: 0 installation BUT 40
> active (0%).
>
> About 1 month ago, I've uploaded a previous version of that app..with
> the same name and a different package name.
> It was a beta so i disabled it in the console and i uploaded a NEW app
> with the same name but different package name...This can be related
> with the problems mentioned before?
>
> is there a way to solve?
>
> here a screenshot of the console:  http://cl.ly/3C3L1O1W0r1H232R1005

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Install % statistic removed, replaced with "users" and "devices"

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 2:35 PM, b0b  wrote:

> They'll talk to you one-on-one exclusively now with the mythical"one-on-one 
> support that is best for the types of threads that have
> historically been posted to this forum by app developers" .
> Well, if this wasn't clear enough, just kidding
>

That one-on-one support seems to be going really well.
http://www.google.com/support/forum/p/Android+Market/thread?tid=211c51a47407e17a&hl=en

-
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] unmarshalling and premature alarm problems

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 6:49 PM, Mark Murphy wrote:

> That's akin to asking why we have java.util.List and
> java.util.ArrayList, and why we can't just have java.util.ArrayList.
> One (List) is the interface, and there can be many possible
> implementations of the interface.
>

Ah, great point.


> The OS uses Parcelable in many places. Parcelable *can* be used by SDK
> applications, but in a few spots (like the ones you've encountered) it
> causes problems, because the OS tries to reconstitute objects from
> parcels in places it arguably shouldn't. Why *that* is happening would
> be my question...
>

Yes. I would settle for some documentation in Parcelable stating these
gotchas.

-
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] In mt twitter application how to send my tweets to another device via bluetooth

2011-09-26 Thread TreKing
On Fri, Sep 23, 2011 at 5:22 AM, parasnath  wrote:

> When i send my tweets then I got an error that si null pointer exception I
> dont know how to solve it.please help me.
>

Try debugging your application.

-
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] unmarshalling and premature alarm problems

2011-09-26 Thread Mark Murphy
On Mon, Sep 26, 2011 at 7:38 PM, TreKing  wrote:
>> Anyways, besides designing parcelable as a performance improvement over
>> serializable I'm still puzzled by why the android team had to come up with
>> both bundles and parcels and not just have say bundles.
>
> Good question. I'd love to hear on that as well.

That's akin to asking why we have java.util.List and
java.util.ArrayList, and why we can't just have java.util.ArrayList.
One (List) is the interface, and there can be many possible
implementations of the interface. The other (ArrayList) is a very
flexible and popular implementation of that interface. But there are
other implementations of List with different characteristics, like
Stack or CopyOnWriteArrayList.

The OS uses Parcelable in many places. Parcelable *can* be used by SDK
applications, but in a few spots (like the ones you've encountered) it
causes problems, because the OS tries to reconstitute objects from
parcels in places it arguably shouldn't. Why *that* is happening would
be my question...

-- 
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] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Glorious Red Leader
Mark thanks for taking the time to help.  Going to contact the samsung people.

On Mon, Sep 26, 2011 at 4:20 PM, Mark Murphy  wrote:
> It's probably a device-specific bug, given the rest of your testing.
>
> On Mon, Sep 26, 2011 at 7:17 PM, Glorious Red Leader
>  wrote:
>> Thanks for the reply, I thought you were on to something but the error
>> still occurs when I use:
>>
>>
>> Intent intent = new Intent(ActivityOne.this, ActivityTwo.class);
>>
>> Or
>>
>> button.setOnclickListener(this);
>>
>>
>> @Override
>> public void onClick(View v) {
>>        Intent intent = new Intent(this, ActivityTwo.class);
>>        startActivity(intent);
>> }
>>
>>
>> I also tried creating the menu and submenu programatically - still
>> getting the error.
>>
>> On Mon, Sep 26, 2011 at 1:48 PM, Mark Murphy  wrote:
>>> On Sat, Sep 24, 2011 at 8:05 PM, Glorious Red Leader
>>>  wrote:
 This sample application will throw a "leaked IntentReceiver" error by
 following these steps:


 - Somehow aquire a Sprint Samsung Galaxy s2 Epic Touch 4g (the one
 with the 4.52" screen)
 - Launch application
 - Press "Launch Activity Two" button
 - Open menu, then open the sub menu (Food) - NOTE: You don't need to
 click on an option, simply viewing the submenu is sufficient
 - Press the phone's back button to close the submenu and menu
 - Press the phone's back button again to return to ActivityOne -
 eclipse will print the error below.

 If you simply open the menu and select a single option item (not a
 submenu) then press the back button you will not see the error.

 So my question is: Where is this registered IntentReceiver coming
 from, and how can I unregister it?
>>>
>>> It presumably is coming from a modified version of Android loaded on
>>> that Samsung device, from inside the menu implementation. You cannot
>>> unregister it directly.
>>>
>>> The only thing that looks a bit odd to me in your code is your use of
>>> getApplicationContext() rather than ActivityOne.this.
>>>
>>> --
>>> 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
>>
>
>
>
> --
> 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] unanswered topic: premature alarm problems

2011-09-26 Thread John Goche
Hello again,

Besides my question about parcelable and extras which ended with TreKing's
suggestion about Bundleable  I still got no feedbac
on the following problem...

On Mon, Sep 26, 2011 at 8:12 PM, John Goche wrote:

>
> Hello,
>
> I am having a few problems with my alarm code.
>
> 1. Suppose I set the alarm for the first time for it to expire at a future
> time.
> In this case it goes off immediately instead of after the del
>


> 2. Every other time following the first time I set the alarm again for it
> to expire at some future time
> it again goes off immediately, but this time displaying the data in the
> parcel I passed to it the first time.
>


I found the following
thread:http://stackoverflow.com/questions/4003892/set-the-time-in-alarm-manager-android-alarm-fired-instantly<%20http://stackoverflow.com/questions/4003892/set-the-time-in-alarm-manager-android-alarm-fired-instantly>
where the poster has the same problem as mine. Someone suggested that
cal.getTimeInMillis() is returning the current time
but even in my code this is not the case (in fact my code is the same as the
original poster).

Anyone know what is wrong with the OP's code? Anyone have the same problem.
No error messages in CatLog for this one.
Just an immediate firing of the broadcast receiver.

Regards,

John Goche

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

Re: [android-developers] unmarshalling and premature alarm problems

2011-09-26 Thread TreKing
On Mon, Sep 26, 2011 at 4:33 PM, John Goche wrote:

> Now I see what you mean. So these bundle objects are better than parcels to
> pass things around. Still don't understand why parcelable isn't
> working since my process was still around when I called it in some cases.
>

Not sure - but even if you figure that out, you'll run into the issue I
described. Honestly, best to just forget about custom Parcelable types, IMO.


> Anyways, besides designing parcelable as a performance improvement over
> serializable I'm still puzzled by why the android team had to come up with
> both bundles and parcels and not just have say bundles.
>

Good question. I'd love to hear on that as well.


> Also, if an application has a unique context, then does a context
> correspond to a process? I see context passed around as a parameter a lot,
> but don't understand exactly what I am passing and why. It seems to me I
> keep on passing the same thing around. Or does each activity have a
> different context. Please help coming to grips with these presumably
> simple concepts.
>

Each Activity *is* a different Context (see the inheritance hierarchy in the
docs). What is it? The way I think about things named "context" (GL and GWT
have the same concept) is "thingie that describes the environment you're
running in, which provides and interface to that environment". On Android a
Context is usually your primary gateway to the system APIs. It's more of an
abstract concept than an true object.


> Finally, I think as an alternative to using the Bundleable interface
> described below I think it is also possible to pass parameters around by
> storing them in an SQLite database since most applications will already have
> one. Any disadvantages with this alternative approach (which at least should
> work not only when the process is killed but also across reboots???)
>

I wouldn't call storing data in a database to retrieve later "passing
parameters around".
I wouldn't say "most applications already have one". If an developer needs
one, they'll make one in their app.

Primary disadvantage to this: I'd imaging saving to and reading from a DB
will be considerably slower than putting that data in a Bundle. Not to
mention the extra code to write to and read from the DB. There may also be
concurrency considerations.

Besides that, these are two fundamentally different concepts: marshalling
data vs storing and persisting it. You could certainly use a DB to "pass
data" around, but I'll bet you'll regret it later.

-
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] barcode scanner - displaying info

2011-09-26 Thread leigh8347
hello

im having a bit of trouble displaying the results of a bar code scan
in a EditText box please can you help

here is what i have

package com.android.app;

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


public class Scanner extends Activity {


EditText barcode1;



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


public Button.OnClickListener scan1 = new
Button.OnClickListener() {
public void onClick(View v) {
Intent intent = new
Intent("com.google.zxing.client.android.SCAN");

intent.putExtra("com.google.zxing.client.android.SCAN.SCAN_MODE",
"ONE_D_MODE");
startActivityForResult(intent, 0);
}
};


public void onActivityResult(int requestCode, int resultCode,
Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String contents  =
intent.getStringExtra("SCAN_RESULT");
String format =
intent.getStringExtra("SCAN_RESULT_FORMAT");
// Handle successful scan
} else if (resultCode == RESULT_CANCELED) {
// Handle cancel


barcode1.setText(getString(contents));
}
}
}



}

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

2011-09-26 Thread John Goche
Hi,

On Tue, Sep 27, 2011 at 1:16 AM, Mark Murphy wrote:

> On Mon, Sep 26, 2011 at 7:02 PM, John Goche 
> wrote:
> >> 1. Suppose I set the alarm for the first time for it to expire at a
> future
> >> time.
> >> In this case it goes off immediately instead of after the del
>
> You have a bug in your code, where you are supplying the wrong time.
>

If I change the line of code

alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis() ,
pendingIntent);

to the following:

alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis() * 1000 * 60,
pendingIntent);

or even to the following

alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis() * 1000 * 60
* 60, pendingIntent);

and recompile and run then the broadcast receiver still fires off
immediately. There must be another answer...

> Anyone know what is wrong with the OP's code?

Presumably, hour and min are zero.
>
> Also, setTimeInMillis() is redundant, as Calendar.getInstance() is
> already initialized to the current time.
>
> > No error messages in CatLog for this one.
> > Just an immediate firing of the broadcast receiver.
>
> Which means that you are setting the alarm time to the current time.
>

So then why the above?


>
> Here is some sample code showing setting a recurring alarm to occur
> every day at the same time, culled from a SharedPreference:
>
> public static void setAlarm(Context ctxt) {
>AlarmManager
> mgr=(AlarmManager)ctxt.getSystemService(Context.ALARM_SERVICE);
>Calendar cal=Calendar.getInstance();
>SharedPreferences
> prefs=PreferenceManager.getDefaultSharedPreferences(ctxt);
>String time=prefs.getString("alarm_time", "12:00");
>
>cal.set(Calendar.HOUR_OF_DAY, TimePreference.getHour(time));
>cal.set(Calendar.MINUTE, TimePreference.getMinute(time));
>cal.set(Calendar.SECOND, 0);
>cal.set(Calendar.MILLISECOND, 0);
>
>if (cal.getTimeInMillis()  cal.add(Calendar.DAY_OF_YEAR, 1);
>}
>
>mgr.setRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
>  AlarmManager.INTERVAL_DAY,
>  getPendingIntent(ctxt));
>  }
>
>

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

2011-09-26 Thread Mark Murphy
On Mon, Sep 26, 2011 at 7:02 PM, John Goche  wrote:
>> 1. Suppose I set the alarm for the first time for it to expire at a future
>> time.
>>     In this case it goes off immediately instead of after the del

You have a bug in your code, where you are supplying the wrong time.

>> 2. Every other time following the first time I set the alarm again for it
>> to expire at some future time
>>     it again goes off immediately, but this time displaying the data in
>> the parcel I passed to it the first time.

See above.

> http://stackoverflow.com/questions/4003892/set-the-time-in-alarm-manager-android-alarm-fired-instantly
> where the poster has the same problem as mine.
>
> Someone suggested that
> cal.getTimeInMillis() is returning the current time
> but even in my code this is not the case (in fact my code is the same as the
> original poster).

As the last comment on the accepted answer indicates, that code does
not indicate whether hour and min are zero.

> Anyone know what is wrong with the OP's code?

Presumably, hour and min are zero.

Also, setTimeInMillis() is redundant, as Calendar.getInstance() is
already initialized to the current time.

> No error messages in CatLog for this one.
> Just an immediate firing of the broadcast receiver.

Which means that you are setting the alarm time to the current time.

Here is some sample code showing setting a recurring alarm to occur
every day at the same time, culled from a SharedPreference:

public static void setAlarm(Context ctxt) {
AlarmManager mgr=(AlarmManager)ctxt.getSystemService(Context.ALARM_SERVICE);
Calendar cal=Calendar.getInstance();
SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(ctxt);
String time=prefs.getString("alarm_time", "12:00");

cal.set(Calendar.HOUR_OF_DAY, TimePreference.getHour(time));
cal.set(Calendar.MINUTE, TimePreference.getMinute(time));
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);

if (cal.getTimeInMillis()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: Activities aren't getting killed by ActivityManager when app is running out of memory

2011-09-26 Thread Artem Russakovskii
Hi SOB,

No, since according to the SDK docs, that function is supposed to run
on general OS low memory and not on application low memory. On a real
system, these will almost never coincide, unless my app happens to
overflow the OS to a low memory state.
http://developer.android.com/reference/android/app/Application.html#onLowMemory%28%29

However, I do get this in the log every time: INFO/
ActivityManager(61): Low Memory: No more background processes

This is kind of confusing, because the emulator shouldn't run out of
memory just because my app is getting close to its heap limit. These
are the kinds of things I'm confused about and looking to clarify
here.

On Sep 26, 3:36 pm, Streets Of Boston  wrote:
> Just for debugging purposes:
> Have you implemented the Activity's method 'onLowMemory()'  and put a
> debug/logcat statement in there to see it this one gets called or not?

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


Re: [android-developers] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Mark Murphy
It's probably a device-specific bug, given the rest of your testing.

On Mon, Sep 26, 2011 at 7:17 PM, Glorious Red Leader
 wrote:
> Thanks for the reply, I thought you were on to something but the error
> still occurs when I use:
>
>
> Intent intent = new Intent(ActivityOne.this, ActivityTwo.class);
>
> Or
>
> button.setOnclickListener(this);
>
>
> @Override
> public void onClick(View v) {
>        Intent intent = new Intent(this, ActivityTwo.class);
>        startActivity(intent);
> }
>
>
> I also tried creating the menu and submenu programatically - still
> getting the error.
>
> On Mon, Sep 26, 2011 at 1:48 PM, Mark Murphy  wrote:
>> On Sat, Sep 24, 2011 at 8:05 PM, Glorious Red Leader
>>  wrote:
>>> This sample application will throw a "leaked IntentReceiver" error by
>>> following these steps:
>>>
>>>
>>> - Somehow aquire a Sprint Samsung Galaxy s2 Epic Touch 4g (the one
>>> with the 4.52" screen)
>>> - Launch application
>>> - Press "Launch Activity Two" button
>>> - Open menu, then open the sub menu (Food) - NOTE: You don't need to
>>> click on an option, simply viewing the submenu is sufficient
>>> - Press the phone's back button to close the submenu and menu
>>> - Press the phone's back button again to return to ActivityOne -
>>> eclipse will print the error below.
>>>
>>> If you simply open the menu and select a single option item (not a
>>> submenu) then press the back button you will not see the error.
>>>
>>> So my question is: Where is this registered IntentReceiver coming
>>> from, and how can I unregister it?
>>
>> It presumably is coming from a modified version of Android loaded on
>> that Samsung device, from inside the menu implementation. You cannot
>> unregister it directly.
>>
>> The only thing that looks a bit odd to me in your code is your use of
>> getApplicationContext() rather than ActivityOne.this.
>>
>> --
>> 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
>



-- 
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] Activity has leaked IntentReceiver - Are you missing a call to unregisterReceiver() - Sprint Samsung Galaxy s2 (Android 2.3.4)

2011-09-26 Thread Glorious Red Leader
Thanks for the reply, I thought you were on to something but the error
still occurs when I use:


Intent intent = new Intent(ActivityOne.this, ActivityTwo.class);

Or

button.setOnclickListener(this);


@Override
public void onClick(View v) {
Intent intent = new Intent(this, ActivityTwo.class);
startActivity(intent);
}


I also tried creating the menu and submenu programatically - still
getting the error.

On Mon, Sep 26, 2011 at 1:48 PM, Mark Murphy  wrote:
> On Sat, Sep 24, 2011 at 8:05 PM, Glorious Red Leader
>  wrote:
>> This sample application will throw a "leaked IntentReceiver" error by
>> following these steps:
>>
>>
>> - Somehow aquire a Sprint Samsung Galaxy s2 Epic Touch 4g (the one
>> with the 4.52" screen)
>> - Launch application
>> - Press "Launch Activity Two" button
>> - Open menu, then open the sub menu (Food) - NOTE: You don't need to
>> click on an option, simply viewing the submenu is sufficient
>> - Press the phone's back button to close the submenu and menu
>> - Press the phone's back button again to return to ActivityOne -
>> eclipse will print the error below.
>>
>> If you simply open the menu and select a single option item (not a
>> submenu) then press the back button you will not see the error.
>>
>> So my question is: Where is this registered IntentReceiver coming
>> from, and how can I unregister it?
>
> It presumably is coming from a modified version of Android loaded on
> that Samsung device, from inside the menu implementation. You cannot
> unregister it directly.
>
> The only thing that looks a bit odd to me in your code is your use of
> getApplicationContext() rather than ActivityOne.this.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


RE: [android-developers] Re: How to install APK programmatically without user prompt

2011-09-26 Thread Ted Neward
Sometimes, though, the answer you want just doesn't exist, and by asking
"What are you really after?", the responder is trying to help you achieve
your goal by thinking around the problem.

Of course, if you'd prefer to just be told, "You can't. The end.", then so
be it.

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com

> -Original Message-
> From: android-developers@googlegroups.com [mailto:android-
> develop...@googlegroups.com] On Behalf Of nyarlathotep
> Sent: Monday, September 26, 2011 4:49 AM
> To: Android Developers
> Subject: [android-developers] Re: How to install APK programmatically
> without user prompt
> 
> I honestly thing these are the most frustrating answers to get in a forum.
> 
> People has not to explain what they're trying to achieve.
> If you know the answer good, if you don't, please don't say that there is
no
> good reason for doing this or that.
> 
> We are not all trying to hack code behind our desks at home.
> Sometimes there are special requirements in a business environment that
> you have to implement and which people is not due and even allowed to tell
> you.
> 
> On Sep 19, 12:11 pm, Oli  wrote:
> > Pratik,
> >
> > I think you should explain what you're trying to achieve with this and
> > maybe someone can suggest an alternative.  There's no good reason why
> > you should want to install an apk without user input as that would
> > break security, so I think you just need an alternative approach here.
> >
> > Cheers,
> > Oli
> >
> > On Sep 16, 6:32 pm, Pratik Prajapati 
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I need to install some non market place APK programmatically
> > > *without *user prompt. I found some links on stackoverflow, but all
> > > those mechanism will prompt the user.
> > > Is there any way to do it with some APIs or I should use 'pm install
> > >  > > name>' command (doing with system() api)?
> >
> > > --
> > > Regards,
> > > Pratik Prajapati
> 
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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

2011-09-26 Thread gjs
Hi,

Get an android device that does, 2nd hand on ebay is cheap, or sbc.

Regards

On Sep 23, 2:41 pm, Nakul Varge  wrote:
> Hii...this is Nakul Varge. I am final year student of PICT college,Pune.
> I am doing my BE project in android and have to use bluetooth functionality
> of the android.
> But the emulator is not supporting bluetooth..i m using latest android
> platform..?
> what 2 do?
> please help.

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


Re: [android-developers] Re: USB Host mode on galaxy tab 10.1 / android 3.1 - Device repeatedly re connecting in dmesg output

2011-09-26 Thread Taylor Alexander
Yes, the tablet shipped with 3.0 but I immediately applied the 3.1 update.
And then another small update wanted to be applied, but I think USB worked
after the first one. I didn't try it before that.

Under "About Tablet" in settings I have:

Model: A500
Android Version: 3.1
Kernel Version: 3.6.36.3
Build Number: Acer_A500_4.0.10.13_COM_GEN2

Let me know if you have any other questions!



On Sat, Sep 24, 2011 at 8:20 PM, Anil Sasidharan  wrote:

> Hi Taylor,
>
> Thanks a lot. Based on what have experienced, I guess the Samsung Tab 10.1
> with Android-3.1 firmware does not yet support USB Host APIs whereas Acer's
> Iconia A500 supports the same. Would you please let me know the exact
> version of the Android firmware on A500 that worked for you. I've come
> across an Acer Tab A501 with Android-3.0.1 version, however I'm not sure if
> it supports USB Host API because Google says it is supported only from 3.1
> (sdk-version 12 and above) onwards (even though there is an back port of USB
> Host library for Gingerbread out there).
>
> I would greatly appreciate your comments/suggestions on this.
>
> Warm Regards,
> Anil
>
> On Sat, Sep 24, 2011 at 12:31 AM, Taylor Alexander 
> wrote:
>
>> Hi Anil,
>>
>> Yes, I did get it working with the Acer. I had replied off list to Will
>> because my original reply to the list was taking too long to get approved
>> (it was my first post to this list).
>>
>> Here is my first off-list message, where I gave some details:
>>
>> On Thu, Sep 22, 2011 at 1:43 AM, Taylor  wrote:
>>
>>> Hey,
>>> I replied to the group, but I'm not seeing the message, so I don't
>>> know if it failed to post, or if its in limbo since I'm a new user.
>>> Anyway, I wanted to reply directly to you. I was having the EXACT same
>>> problem as you. I had a USB device that I had compiled a kernel module
>>> for. I loaded the module onto the tablet, and lsmod showed it running.
>>> However, I couldn't get the device to work, and dmesg showed the same
>>> problem - device not supported, over and over, even though the VID and
>>> PID matched the source code for the driver. I was going crazy, but I
>>> thought it was my kernel modules, so I tried a different approach at
>>> someone's suggestion.
>>>
>>> I tried some of google's example code for USB, and when it runs
>>> getDeviceList() I had it print how many USB devices were connected. It
>>> always reads zero, even when a functioning USB mouse is connected!
>>> This was frustrating, so I googled for how to enumerate devices on a
>>> galaxy tab, and found your post.
>>>
>>> After seeing your post, I realized this may be an issue with Samsung.
>>> I bought an Acer Iconia Tab A500 today, as some users had reported
>>> success with it - it works! The same code run on the galaxy tab still
>>> fails.
>>>
>>> Both are running 3.1.
>>>
>>> So I'm inclined to believe this is an issue with Samsung. Did you ever
>>> get this working?
>>
>>
>>
>> I have had continued success with the Acer, and none with the Samsung.
>>
>> Will - replying to your off-list message. I just checked again. The Acer
>> enumerates a webcam and thumbdrive I've tried, but not a mouse or keyboard.
>>
>> This is with the following code, which logs values to logcat:
>>
>> UsbManager usbman = (UsbManager) getSystemService(USB_SERVICE);
>>  HashMap devlist = usbman.getDeviceList();
>> Iterator deviter = devlist.values().iterator();
>>  PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(
>> ACTION_USB_PERMISSION), 0);
>>
>> while (deviter.hasNext()) {
>> UsbDevice d = deviter.next();
>>  l("Found device: "
>> + String.format("%04X:%04X", d.getVendorId(),
>>  d.getProductId())); }
>>
>> where l is a function that logs stuff to the debug window.
>>
>> That is a snippet from the source code found here:
>>  http://android.serverbox.ch/?p=370
>>
>> There is that USB missile launcher that the google demo supports. I have
>> been considering getting one of those to do some more testing with the
>> Samsung.
>>
>> -Taylor
>>
>>
>>  On Fri, Sep 23, 2011 at 7:34 AM, Anil Sasidharan wrote:
>>
>>>  Hi,
>>>
>>> I'm curious to know if you were able to get this fixed using "Acer Iconia
>>> A500". Are you able to use the android application to enumerate devices
>>> using USB Host API?
>>>
>>> Warm Regards,
>>> Anil
>>>
>>>
>>> On Thu, Sep 22, 2011 at 1:05 AM, Taylor  wrote:
>>>
 Hey!

 I've actually had the EXACT same problems and it was driving me nuts!
 I'm running a 16GB Wifi Galaxy tab with the 3.1 touchwiz update.

 I can connect a USB mouse and keyboard and hub all just fine, they
 work great. However, when I try to enumerate the devices, I get
 nothing.

 To compound the confusion, I was trying to build custom kernel drivers
 for an unsupported device (FTDI chips) and it was driving me crazy
 because I could install the module and verify it was running, but I
 had the same problem - the device is not supported message. I thought
 it was me!

[android-developers] Re: Activities aren't getting killed by ActivityManager when app is running out of memory

2011-09-26 Thread Streets Of Boston
Just for debugging purposes:
Have you implemented the Activity's method 'onLowMemory()'  and put a 
debug/logcat statement in there to see it this one gets called or not?

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

[android-developers] Activities aren't getting killed by ActivityManager when app is running out of memory

2011-09-26 Thread Artem Russakovskii
Hi,

I've been battling this issue
http://stackoverflow.com/questions/7536988/android-app-out-of-memory-issues-tried-everything-and-still-at-a-loss
for the past couple of days, and at this point, either I don't
understand how Android works anymore, even after reading all the docs,
or I still have a bug that prevents activities from getting killed
when the process starts to run out of memory.

If my understanding is correct, if you have an app like Facebook and
you navigate it without ever clicking Back, the Android process could
eventually run out of memory. In this case, from what I'm reading,
Android would then start killing activities, specifically in onStop()
state. I'm not talking about total memory running low on the device,
I'm talking about getting close to the limit and risking the OOM
exception in the process itself.

I'm just not seeing this behavior. I simplified my app to the point
that I can just call the same activity 3-4 times in a row from itself
(using an Intent), and it will run out of memory and crash. I see each
activity enter onStop after the new activity starts, but I don't see
ActivityManager ever killing them. Instead, all I get are OOM. I watch
the heap grow and grow and never shrink back.

I got the activity itself in a pretty simple state too - a BaseAdapter
and a bunch of text in each cell, with the source of data about being
5,000 rows (just for testing - it doesn't take nearly this many to
crash when my simplifications are reverted). What I would expect to
happen in this test case is for the first instance of this Activity to
die as soon as memory in the heap starts getting low, but I'm not
seeing it.

Am I completely off base here? What am I missing?

Thank you.

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


Re: [android-developers] Re: Extracting RGB data from Bitmap

2011-09-26 Thread New Developer

Trying to add an Image to PDF
Can anyone Please let me know where I have gone wrong ?
Currently this is what I generate  using  bmp


ByteArrayOutputStream bos = new ByteArrayOutputStream();
bmp.compress(CompressFormat.JPEG, 100 , bos);

   "stream \n" +
   bos.toString() +  "\n" +
  "endstream \n" +




101  0  obj
<<  /Type  /XObject
   /Subtype /Image
   /Filter  /DCTDecode
   /Width  341
   /Height  256
   /ColorSpace  /DeviceRGB
   /BitsPerComponent  8
   /Length 87296
>>
stream
^@^PJFIF^@^A^A^@^@^A^@^A^@^@??^@C^@^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A^A$
^K??^@?^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^G"q^T2???^H#B??^UR??$3br?

?QU,?qXy?p??H??kz,??$
endstream
endobj

102 0 obj
<< /Type /Page
   /Parent 1 0 R
   /MediaBox [0 0 341  256]
   /Contents 103 0 R
   /Resources 105 0 R
>>
endobj


104 0 obj
<>
stream
q
  1 0 0 1  100 100 cm
  341 0 0 256 cm
  /I103  Do
Q
endstream
endobj

105 0 obj
64
endobj


106 0 obj
<>
>>
endobj


xref
0 6
00 65535 f
10 0 n
65 0 n
000156 0 n
000367 0 n
001015 0 n
trailer
<<
  /Size 5
  /Root 1 0 R
>>
startxref
78802
%%EOF





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

2011-09-26 Thread Mark Murphy
On Mon, Sep 26, 2011 at 5:58 PM, Wall-E  wrote:
> Am I guaranteed to get the IMEI/MEID by calling getDeviceId() from the
> telephony manager?

Not really:

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

> I ask because you don't always have access to the device phone
> number.  I want to be able to have an ID that is specific to the
> hardware and I'm not sure if the ANDROID_ID is constant or if it will
> change if the user upgrades the version of Android.

To quote the blog posted linked to above:

"There are many good reasons for avoiding the attempt to identify a
particular device. For those who want to try, the best approach is
probably the use of ANDROID_ID on anything reasonably modern, with
some fallback heuristics for legacy devices."

-- 
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] IMEI/MEID guaranteed?

2011-09-26 Thread Wall-E
Am I guaranteed to get the IMEI/MEID by calling getDeviceId() from the
telephony manager?

I ask because you don't always have access to the device phone
number.  I want to be able to have an ID that is specific to the
hardware and I'm not sure if the ANDROID_ID is constant or if it will
change if the user upgrades the version of Android.

Thanks.

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


Re: [android-developers] how start fragments

2011-09-26 Thread Mark Murphy
I would recommend that the activity handle all starting of fragments.
The activity is the code that knows how big the screen is and
therefore whether these other fragments should be displayed directly
or displayed by starting another activity. IOW, keep the fragments
themselves ignorant of screen size to the extent possible.

On Sat, Sep 24, 2011 at 10:13 AM, emanuele  wrote:
> Hello guys, I ve the following scenario: A fragmentActivity which
> manage four different ListFragment. Every ListFragment can launch
> different kind of fragments and these could launch others fragments.
> What I need to understand is who can or cannot launch fragments. Is
> responsability of the FragmentActivity or could be the ListFragment,
> when onListItemClick is fired, for instance?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] unmarshalling and premature alarm problems

2011-09-26 Thread John Goche
Hi,

Now I see what you mean. So these bundle objects are better than parcels
to pass things around. Still don't understand why parcelable isn't working
since my process was still around when I called it in some cases.

Anyways, besides designing parcelable as a performance improvement
over serializable I'm still puzzled by why the android team had to come
up with both bundles and parcels and not just have say bundles.

Also, if an application has a unique context, then does a context correspond
to a process? I see context passed around as a parameter a lot, but don't
understand exactly what I am passing and why. It seems to me I keep on
passing the same thing around. Or does each activity have a different
context. Please help coming to grips with these presumably simple
concepts.

Finally, I think as an alternative to using the Bundleable interface
described below I think
it is also possible to pass parameters around by storing them in an SQLite
database since
most applications will already have one. Any disadvantages with this
alternative approach
(which at least should work not only when the process is killed but also
across reboots???)

Feedback and thoughts more than welcome,

Regards,

John Goche

On Mon, Sep 26, 2011 at 10:00 PM, TreKing  wrote:

>   On Mon, Sep 26, 2011 at 2:40 PM, John Goche 
> wrote:
>
>> Google "parcelable ClassNotFoundException" for more information.
>>>
>>> What I've done is create a "Bundleable" interface that basically does
>>> what Parcelable is intended to do. Objects extending this interface can put
>>> themselves and recreate themselves from a Bundle object, which is itself
>>> Parcelable so you can send it around just like your object - except with the
>>> minor fact that the system always knows how to load a Bundle type so you
>>> don't run into this error.
>>>
>>
>> Hmmm... Not sure I follow. Could you please give some more details?
>>
>
> public interface Bundleable
> {
>  public Bundle toBundle();
>
>  public void fromBundle(Bundle b);
> }
>
> public class MyClass implements Bundleable
> {
>  public Bundle toBundle()
>  {
>   Bundle b = new Bundle();
>   // Fill b with data
>   return b;
>  }
>
>  public void from Bundle(Bundle b)
>  {
>   // set properties from data in b
>  }
> }
>
> // ...
>
> MyClass m = new MyClass();
> Intent i = new Intent();
> i.putBundleExtra("MyClass", m.toBundle());
>
> // ... Elsewhere
>
> Bundle b = intent.getBundleExtra("MyClass");
> MyClass m = new MyClass(b); // Constructor calls fromBundle(b);
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: standalone popup: UI question

2011-09-26 Thread Mark Murphy
On Mon, Sep 26, 2011 at 5:29 PM, Ryan Mattison  wrote:
> The only way to learn a lot of stuff is to browse the Android source
> tree (http://source.android.com/source/index.html)  I think the tree
> is down right now.

Note that Google Code Search still has it indexed, at least last I checked.

-- 
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: standalone popup: UI question

2011-09-26 Thread Ryan Mattison
Hey John,

The only way to learn a lot of stuff is to browse the Android source
tree (http://source.android.com/source/index.html)  I think the tree
is down right now.  This source code should be easily adaptable into a
ListView, I actually have an implementation of it in a project
ListViewDialog, but it isn't on this PC.

To me, it feels exactly like CSS doesn't work the same on all phones &
99% of the time it feels like a hack job getting something working
correctly :P.

If you're early into Android development, my tool is clutch in saving
your wrists:  
http://www.ryangmattison.com/page/Lazy-Android-Code-Gen-Android-findViewById-carpal-tunnel-syndrome-eclipse.aspx

All you need to do is drag and drop the eclipse install button into
your environment.  It has a youtube video explaining what to do.  This
will save you a lot of trial and error time.

Thanks,

Ryan

On Sep 26, 4:19 pm, John Goche  wrote:
> Hi Ryan,
>
> Thanks for posting the tutorial. I was indeed looking for something like
> that. Just
> that since I have one to N messages to display inside the popup I will have
> to
> include a listview in there and am not sure this will be possible (I don't
> know
> how long or how many messages I will have, even though this may sound
> somewhat odd.) I think your tutorial is going to be very helpful, by the
> looks
> of it it seems very well done.
>
> Thanks,
>
> John Goche
>
> P.S. Where did you learn about all the styling bits besides in the android
> developer docs
> and how far can this be taken when compared to an HTML/CSS solution like on
> webOS?
>
> On Mon, Sep 26, 2011 at 11:03 PM, Ryan Mattison wrote:
>
>
>
>
>
>
>
> > Is there moderation time or something on these forums, why do posts
> > appear, go invisible, appear again.  Honestly, worlds greatest search
> > engine fails at forums.
>
> >http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transpare...
>
> > Ryan Mattison
>
> > On Sep 26, 1:37 pm, John Goche  wrote:
> > > Hello,
>
> > > I would like to know whether it is somehow possible
> > > to create a popup window which does not take up the
> > > whole display area. I am asking because I need to display
> > > a message when an alarm expires but do not want to resort
> > > to notifications because they seem to be squished in the top
> > > right corner of the phone and I think would make it hard to turn
> > > an alarm off it it were a notification. On the other hand bringing
> > > up an entire window could obfuscate other applications. I guess
> > > there is nothing like HP/Palm webOS's notification mechanism
> > > on android (there you can pop up a window and the users can
> > > still keep on interacting with whatever app they were using or
> > > close the popup window)???
>
> > > Regards,
>
> > > John Goche
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Async Task, rotation and indeterminate progressbar in custom header.

2011-09-26 Thread joebowbeer
My apologies: I thought I was responding to a different thread,
concerning the rotating async task problem.

Responding to you question:

Yes. Maintaining the state (and async task itself) in the application
object is a reasonable way to handle this.  If you need persistence
across application/process instances, you'll need to persist progress
in shared preferences or another persistent store.

On Sep 26, 2:14 pm, joebowbeer  wrote:
> I've also solved this problem in the way you've described: by managing
> the task instance in the application object.  This does burden your
> application implementation with task details that logically are the
> responsibility of an activity or fragment.  In the interest of
> robustness, though, I do like to keep a tight grip on thread instances
> and centralized management via the application object accomplishes
> that.
>
> The other approaches described in this thread are:
>
> 1. Stop/cancel the task on rotation but remember what it was doing and
> restart it when the activity is restarted.
>
> 2. Don't stop the task on rotation but detach from it, retain its
> instance (onRetainNonConfigurationInstance), and reattach to it when
> the new activity is created.  (A generalized version of Mark's async
> task can be helpful here.)
>
> Joe
>
> On Sep 23, 6:29 pm, João Rossa  wrote:
>
>
>
>
>
>
>
> > The use case is that the user should always see the loading progressbar if
> > there's any background work being done in whatever activity the user is and
> > if the task was launched from another activity. I tried putting a reference
> > in the application class to the progressbar and then refresh it in the
> > activities in the oncreate and onrestart,that the way the task will always
> > have the refreshed reference on the postexecute method
> > Any inconvinients on this procedure?
>
> > regards,
>
> > On Fri, Sep 23, 2011 at 7:13 PM, blake  wrote:
> > > AsyncTasks are a nifty tool but they have a fairly limited specific
> > > set of uses.  The previous responses have pointed out a several
> > > problems with this code: you can't keep static refs to Activites or
> > > Views, multiple Activities can't share a progress bar, etc.
>
> > > I don't understand the use case, but I agree with Mark that, from the
> > > code you've supplied, this might be better done as an IntentService or
> > > as a pair of Fragments.
>
> > > I'm going to be giving a Webinar on the pitfalls surrounding
> > > AsyncTasks next week, on the 29th:
>
> > >http://oreillynet.com/pub/e/2061
>
> > > -blake
> > > Programming Android, FTW!
> > >http://oreilly.com/catalog/0636920010364
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, 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: standalone popup: UI question

2011-09-26 Thread John Goche
Hi Ryan,

Thanks for posting the tutorial. I was indeed looking for something like
that. Just
that since I have one to N messages to display inside the popup I will have
to
include a listview in there and am not sure this will be possible (I don't
know
how long or how many messages I will have, even though this may sound
somewhat odd.) I think your tutorial is going to be very helpful, by the
looks
of it it seems very well done.

Thanks,

John Goche

P.S. Where did you learn about all the styling bits besides in the android
developer docs
and how far can this be taken when compared to an HTML/CSS solution like on
webOS?

On Mon, Sep 26, 2011 at 11:03 PM, Ryan Mattison wrote:

> Is there moderation time or something on these forums, why do posts
> appear, go invisible, appear again.  Honestly, worlds greatest search
> engine fails at forums.
>
>
> http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transparent-Dialog-Alarm-Style-.aspx
>
> Ryan Mattison
>
> On Sep 26, 1:37 pm, John Goche  wrote:
> > Hello,
> >
> > I would like to know whether it is somehow possible
> > to create a popup window which does not take up the
> > whole display area. I am asking because I need to display
> > a message when an alarm expires but do not want to resort
> > to notifications because they seem to be squished in the top
> > right corner of the phone and I think would make it hard to turn
> > an alarm off it it were a notification. On the other hand bringing
> > up an entire window could obfuscate other applications. I guess
> > there is nothing like HP/Palm webOS's notification mechanism
> > on android (there you can pop up a window and the users can
> > still keep on interacting with whatever app they were using or
> > close the popup window)???
> >
> > Regards,
> >
> > John Goche
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2011-09-26 Thread emanuele
Hello guys, I ve the following scenario: A fragmentActivity which
manage four different ListFragment. Every ListFragment can launch
different kind of fragments and these could launch others fragments.
What I need to understand is who can or cannot launch fragments. Is
responsability of the FragmentActivity or could be the ListFragment,
when onListItemClick is fired, for instance?

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


[android-developers] Re: Newbie question about SimpleAdapter and ViewBinder

2011-09-26 Thread Chen Ming Wei
The methods I used for my major project is to get the values from another 
string array,
an example: 
[The coding may be wrong as I currently don't have a eclipse software to 
debug]

//

private Spinner selectCountry;
private ArrayList countryName = new ArrayList();
private ArrayList countryCode = new ArrayList();

countryName.add("Alabama");
countryName.add("California");
countryCode.add("AL");
countryCode.add("CA");

ArrayAdapter spinnerArrayAdapter = new 
ArrayAdapter(this,android.R.layout.simple_spinner_dropdown_item, countryName
);
selectCountry.setAdapter(spinnerArrayAdapter);


public void onCreate(Bundle savedInstanceState)
{
selectCountry.setOnItemSelectedListener(new 
Spinner.OnItemSelectedListener() 
{
public void onItemSelected(AdapterViewarg0, View arg1,int arg2,long arg3)
{
String storeCode = countryCode.getSelectedItemPosition();
}
});
}

//

you use countryName to display the country in the spinner, and when u 
selected a country, it refers to the 
value in the countryCode [the storeCode should be have the value of the 
countryCode], because the
getSelectedItemPosition(); will point to the rows you have selected, hope 
the rough idea 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] Sony S1 adb driver

2011-09-26 Thread Coolblue2000
I need a driver for my Sony S1 tablet. I have enabled USB Debugging
but my computer can only see the tablet as USB storage device and AVD
manager can't see the tablet as a device.

I also have a desire HD and simply downloaded the htc adb driver,
installed it and everything works fine. I however can not find a
driver on the sony site and their tech support simply told me I needed
the google usb driver which I already have installed..

Does anyone have any idea how I get this working?

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


[android-developers] Re: Where the Apk files are stored in Device ?

2011-09-26 Thread Bazza
Try /data/app
Think it is only accessible if phone is rooted

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

[android-developers] Image processing using android

2011-09-26 Thread Venki
  I know java, j2ee. I have planned to create some image processing
apps using android. What are the necessary things that I should know.

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


[android-developers] sending data from Android app to computer

2011-09-26 Thread kaps
Hello,

I am looking for a sample application which will send some data from
Android App to computer.
Can somebody tell where can I get sample project code. I am newbi in
Android Dev.


--
Kaps Kumar
Banglore Ind

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


[android-developers] R.java not updating

2011-09-26 Thread Harish
Hi everyone  When i add a button to main.xml file ,the id not visible
in R.java
I cleaned project but no effect.R.java is not updating for any change
Please Help

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


[android-developers] Re: display one view from 2 different activity

2011-09-26 Thread Chen Ming Wei
from my understanding, you wouldn't want duplicated codes of the date view?
how about writing them in a date picker class file, so whenever you using 
date view
you can simply call the date picker class to get the value for display, does 
this 
answered your question?


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

[android-developers] Android market problems with my App

2011-09-26 Thread Matteo Camilli
Hello,

i've got some problem with an app that i published 2 days ago.

The problems are:
1) The app still doesn't appear in the market within the new entries
(appear only with direct link)
2) In the dev console i see strange numbers: 0 installation BUT 40
active (0%).

About 1 month ago, I've uploaded a previous version of that app..with
the same name and a different package name.
It was a beta so i disabled it in the console and i uploaded a NEW app
with the same name but different package name...This can be related
with the problems mentioned before?

is there a way to solve?

here a screenshot of the console:  http://cl.ly/3C3L1O1W0r1H232R1005

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

2011-09-26 Thread lincbarr
+1 I am experiencing the same issue. A temporary workaround is to use
the arrow keys on the keyboard to scroll.

On Sep 8, 11:44 am, Mehuge  wrote:
> I have installed the android SDK on a mac running OS X Lion using
> eclipse as the IDE.  When I run apps in the emulator, scrolling is
> completely broken.  If I scroll a list all the way to the top, android
> then scrolls it all the way back down again.  If I scroll slowly, the
> scrolling is jumping up and down all over the place.
>
> Even if I disable the 'scroll direction: natural' option to revert os
> x scrolling the emulator still behaves erratically when scrolling (at
> least using my mac books touchpad).
>
> This was happening with the Android 2.1 and 2.3.3 emulators.
>
> Is there any fix for this?

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


[android-developers] OCR android

2011-09-26 Thread Ravijadhav
Hello Everyone,

I am a newbie to android
I want to develop an application based on OCR.
However, the OCR engine should be implemented on android itself.
Which are the libraries(classes) available in android which provide
image processing functions??
and is there a tutorial available on those libraries??

Thank you,

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


[android-developers] Image processing

2011-09-26 Thread Venki
   I know Image Processing. I don't know anything about android
though. I know Java, J2EE so I think I know some basics.I have planned
to do some android apps using image processing. Where should I start?
Give me some tutorial related to image processing using android. If
you have created any apps using image processing in android please
tell me about it.


Thanks in advance.

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


[android-developers] Standard benchmark programs for Android mobile

2011-09-26 Thread kaps
Hi

I am looking for small benchmark programs for measuring mobile
performance which will run inside my Android application. I want to
use this data for performing other operation in my app.
Can somebody please suggest some small benchmarking programs code/
project ?


--
Kaps Kumar
Banglore, Ind

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


[android-developers] Store data permanently in Android sqlit

2011-09-26 Thread jiss jose
hi,
i m try to make app like note pad by phonegap database api.But it work
only if we drop and create table in each time of app works.So i can't
store data permentlt.I have added the code.please help
/
*...



  
Contact Example

  


// Wait for PhoneGap to load
//
   // document.addEventListener("deviceready", onDeviceReady, false);
var html = "
    "; // Populate the database // function populateDB(tx) { var val=document.getElementById('datafield').value; //alert(val); //tx.executeSql('DROP TABLE IF EXISTS newdataaa'); tx.executeSql('CREATE TABLE IF NOT EXISTS newdataaa (id unique, data)'); qry='INSERT INTO newdataaa (id, data) VALUES (1,"'+val+'")'; tx.executeSql(qry); tx.executeSql('INSERT INTO newdataaa (id, data) VALUES (2, "Second row")'); } // Query the database // function queryDB(tx) { tx.executeSql('SELECT * FROM newdataaa', [], querySuccess, errorCB); } // Query the success callback // function querySuccess(tx, results) { var len = results.rows.length; // alert("newdataaa table: " + len + " rows found."); for (var i=0; i\n'; //alert("Rowsss = " + i + " IDsss = " + results.rows.item(i).id + " Data = " + results.rows.item(i).data); } html +='
'; document.getElementById("mydata").innerHTML = html; } // Transaction error callback // function errorCB(err) { console.log("Error processing SQL: "+err.code); } // Transaction success callback // function successCB() { var db = window.openDatabase("Database", "1.0", "PhoneGap newdataaa", 20); db.transaction(queryDB, errorCB); } // PhoneGap is ready // function getDataFromForm() { var db = window.openDatabase("Database", "1.0", "PhoneGap newdataaa", 20); db.transaction(populateDB, errorCB, successCB); } Examplenew Database /**. app will work in we remov comment from //tx.executeSql('DROP TABLE IF EXISTS newdataaa'); please help . -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

[android-developers] help:how to play custom encode mp3 file

2011-09-26 Thread kun chen
I use my algorithm encode mp3 file.Now, I want to play it with
MediaPlayer.
A solution is decode this mp3 file to temporary file.then, play this
temporary file.
I want send  decode mp3 data to MediaPlayer,when MediaPlayer need
data.
I haven't find this interface that can receive data.
Is there anyone understand my meaning?

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


[android-developers] apk file installation

2011-09-26 Thread JXu
Hi,

I have installed an apk file from sdcard. My question is how to use
the apk installed in the device to reinstall the apk from the android
market? Any problematical or manual approach to achieve the purpose.

Thanks,
Forrest

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Async Task, rotation and indeterminate progressbar in custom header.

2011-09-26 Thread joebowbeer
I've also solved this problem in the way you've described: by managing
the task instance in the application object.  This does burden your
application implementation with task details that logically are the
responsibility of an activity or fragment.  In the interest of
robustness, though, I do like to keep a tight grip on thread instances
and centralized management via the application object accomplishes
that.

The other approaches described in this thread are:

1. Stop/cancel the task on rotation but remember what it was doing and
restart it when the activity is restarted.

2. Don't stop the task on rotation but detach from it, retain its
instance (onRetainNonConfigurationInstance), and reattach to it when
the new activity is created.  (A generalized version of Mark's async
task can be helpful here.)

Joe

On Sep 23, 6:29 pm, João Rossa  wrote:
> The use case is that the user should always see the loading progressbar if
> there's any background work being done in whatever activity the user is and
> if the task was launched from another activity. I tried putting a reference
> in the application class to the progressbar and then refresh it in the
> activities in the oncreate and onrestart,that the way the task will always
> have the refreshed reference on the postexecute method
> Any inconvinients on this procedure?
>
> regards,
>
>
> On Fri, Sep 23, 2011 at 7:13 PM, blake  wrote:
> > AsyncTasks are a nifty tool but they have a fairly limited specific
> > set of uses.  The previous responses have pointed out a several
> > problems with this code: you can't keep static refs to Activites or
> > Views, multiple Activities can't share a progress bar, etc.
>
> > I don't understand the use case, but I agree with Mark that, from the
> > code you've supplied, this might be better done as an IntentService or
> > as a pair of Fragments.
>
> > I'm going to be giving a Webinar on the pitfalls surrounding
> > AsyncTasks next week, on the 29th:
>
> >http://oreillynet.com/pub/e/2061
>
> > -blake
> > Programming Android, FTW!
> >http://oreilly.com/catalog/0636920010364
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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: standalone popup: UI question

2011-09-26 Thread Ryan Mattison
Is there moderation time or something on these forums, why do posts
appear, go invisible, appear again.  Honestly, worlds greatest search
engine fails at forums.

http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transparent-Dialog-Alarm-Style-.aspx

Ryan Mattison

On Sep 26, 1:37 pm, John Goche  wrote:
> Hello,
>
> I would like to know whether it is somehow possible
> to create a popup window which does not take up the
> whole display area. I am asking because I need to display
> a message when an alarm expires but do not want to resort
> to notifications because they seem to be squished in the top
> right corner of the phone and I think would make it hard to turn
> an alarm off it it were a notification. On the other hand bringing
> up an entire window could obfuscate other applications. I guess
> there is nothing like HP/Palm webOS's notification mechanism
> on android (there you can pop up a window and the users can
> still keep on interacting with whatever app they were using or
> close the popup window)???
>
> Regards,
>
> John Goche

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


[android-developers] Re: standalone popup: UI question

2011-09-26 Thread Ryan Mattison
Sorry Mark,

Not sure what is up with Blog Engine .NET .. when I link the URL it
works locally, but seems to break when I put it on forums.  If you
navigate to
http://www.ryangmattison.com  and go to the first post, Android Custom
Transparent Dialog Alarm Style it should have all the information Mark
needs.

Thanks,

Ryan Mattison
http://www.ryangmattison.com

On Sep 26, 3:51 pm, Mark Murphy  wrote:
> On Mon, Sep 26, 2011 at 4:47 PM, Ryan Mattison  wrote:
> > These forums have mad lag:
>
> >http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transpare...
>
> > If it didn't go through before ... I made a post for you.
>
> I'm getting a 404 on that URL.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

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


Re: [android-developers] Re: standalone popup: UI question

2011-09-26 Thread Mark Murphy
On Mon, Sep 26, 2011 at 4:47 PM, Ryan Mattison  wrote:
> These forums have mad lag:
>
> http://www.ryangmattison.com/post/2011/09/26/Android-Custom-Transparent-Dialog-Alarm-Style-.aspx
>
> If it didn't go through before ... I made a post for you.

I'm getting a 404 on that URL.

-- 
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: How to know if the phone is facing a given GPS point? (I have the Azimuth of the Phone and his GPS position)

2011-09-26 Thread lbendlin
Google the interwebs for the formulas for the spherical bearing and distance 
between two geopoints. Then use the GPS heading or the compass heading (the 
latter should be more helpful) and if the heading equals the bearing that 
means you're looking in the direction of the building.

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