Re: [android-developers] Re: Doubt about heap size

2012-06-25 Thread Francisco M. Marzoa Alonso
Thanks a lot,

I thought that something like that may be happening.

But I have not very clear yet how this memory assigment works, due to
the DDMS feedback: when my app runs on the 2.1 emulator it shows 3M of
available heap space. In a given moment I have ~75% of that heap memory
allocated. Assuming it should grew dynamically, it is expected that when
I try to load a bitmap that does not fit on the 25% free heap memory, it
should grew to some more than 3M and load the bitmap within the new heap
available space. But instead of doing that, it crashes with an Out of
memory exception. The bitmap is just 800x480 pixels,  that with four
bytes per colour (including one for alpha) should occupy less than 1,5M
in RAM.

I have managed to solve these problems -at least for now- making a more
intelligent use of the heap, recycling bitmaps sometimes when they are
not needed for a long period, and loading them again from assets or
resources when needed. But I am still curious about this behaviour
because it may be a real problem for me further, in this app or in other
one.

Best regards,

On 24/06/12 16:28, Streets Of Boston wrote:
> Don't mistake *maximum *heap for *available *heap.
>
> A process can have free memory in its allocated heap. This is available 
> heap.
>
> A process' currently allocated heap space is equal or *less *than the 
> maximum. When needed, the process can get some extra heap space until its 
> maximum has been reached.
>
> On Sunday, June 24, 2012 5:56:08 AM UTC-4, Fran wrote:
>> Hi there, 
>>
>> I have read that the maximum heap available for an app is 16M, despite 
>> that there may be higher on newer devices. 
>>
>> Anyway on a 2.1 emulator with Eclipse/DDMS my available heap shown is 
>> just about 3M, while in  my SGS2 real device shows about 5M of available 
>> heap. As you see, a lot of lower than 16M. 
>>
>> My app runs fine on my SGS2, but it crashes complaining about not having 
>> sufficient heap memory on the emulator, and I have received a few 
>> reports with the same error on Google Play. 
>>
>> I am currently doing an effort to decrease heap consumption, but I 
>> wonder why DDMS shows values so low and if some devices may actually 
>> have less than 16M of heap memory. 
>>
>> My app is developed for Android 2.1+ 
>>
>> Best 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] Activity Animation

2012-06-24 Thread Francisco M. Marzoa Alonso
Hi,

Emulator is really slow, you should not measure
your app performance based on emulator results.

The speed of an animation depends on the speed of the device: the faster
the device, the faster the animation.

You must use some kind of method to sync your animation framing so it
runs at same speed on all devices. For example, if you plan to show 25
frames per second, i.e. one frame every 40 milliseconds, you may
calculate the time for next frame based on System.currentTimeMillis() + 40.

It should be something like:


// Init this value on the constructor, for example
nextFrameTiming = 0;

...

// This could be wherever the image its drawn or prepared to be drawn,
depending on how your code works
if ( System.currenTimeMillis >= nextFrameTimming ) {
nextFrameTiming = System.currentTimeMillis() + 40;
changeFrame();
}

So you only change to a new frame as fast as once each 40 milliseconds.
Note that this will be useful to make the animation slower in devices
where it runs too fast, but obviously it will not made it to run faster
in devices where it runs too slow due hardware limitations.


On 24/06/12 14:00, ala hammad wrote:
> Hello all ,
> i want to ask why when animate activity show slow in emulater but in device 
> show very fast ..
> how to make it slowly to show it to user ???
>


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


[android-developers] Doubt about heap size

2012-06-24 Thread Francisco M. Marzoa Alonso
Hi there,

I have read that the maximum heap available for an app is 16M, despite
that there may be higher on newer devices.

Anyway on a 2.1 emulator with Eclipse/DDMS my available heap shown is
just about 3M, while in  my SGS2 real device shows about 5M of available
heap. As you see, a lot of lower than 16M.

My app runs fine on my SGS2, but it crashes complaining about not having
sufficient heap memory on the emulator, and I have received a few
reports with the same error on Google Play.

I am currently doing an effort to decrease heap consumption, but I
wonder why DDMS shows values so low and if some devices may actually
have less than 16M of heap memory.

My app is developed for Android 2.1+

Best 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: l10n and coordinate mapping on an image

2012-06-23 Thread Francisco M. Marzoa Alonso
Thanks a million. Again. ;-)

On 21/06/12 23:14, Nobu Games wrote:
> You can use a regular Java resource 
> bundlewhich can be fully localized. 
> They are a set of files ending with 
> .properties which you can use for storing the button coordinates for each 
> local.
>
> Just create in one of your packages a set of files with the same base name 
> ("ButtonCoords" for example), followed by an underscore and the locale like 
> "_en_US" or just "_en". The suffix is ".properties":
>
> *ButtonCoords_en.properties:*
> homeButton = 10,10,100,100
> closeButton = 20,20, 200,200
> ...
> *ButtonCoords_fr.properties:*
> homeButton = 12,11,105,105
> closeButton = 22,22, 201,201
> ...
>
> Then you need to load that properties file with following code. Java 
> automatically takes care of picking the correct file for the currently set 
> locale:
>
> ResourceBundle bundle = 
>> ResourceBundle.getBundle("path/to/package/ButtonCoords");
>>
> The retrieved bundle object will be something like a HashMap that maps 
> Strings ("homeButton", "closeButton") to their according values.
>
> String coordsStr = bundle.getString("homeButton");
> String[]  coordsArray = coordsStr.split(",");
>> int[] coords = new int[coordsArray.length];
>> int i = 0;
>>
>> for(String coord : coordsArray) {
>> coords[i++] = Integer.parseInt(coord.trim());
>> }
>>
> Make sure to provide a default .properties file without a locale (name it 
> just ButtonCoords.properties) so there won't be an error when someone plays 
> your game with an unsupported locale.
>


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


[android-developers] l10n and coordinate mapping on an image

2012-06-21 Thread Francisco M. Marzoa Alonso
Hi there,

I am using a bitmap with several parts that can be touched by the user
as they were buttons. These parts may be bigger or littler depending on
the language.

Currently, as I have split English and Spanish version into two
different apps, I just have the coordinates hardcoded in my Java classes.

But now I am integrating both languages on the same app, having yet done
the different string and image resources, but I do not know what is the
best approach to this problem.

I could make some hack, like encoding the coordinates between an string
using string file resources, and parsing these as needed to get again
the coordinates. But I think there should be a better way and I do not
want to do -again- dirty code that I will need to change sooner than later.

Any ideas?

Thanks a lot 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


Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Francisco M. Marzoa Alonso
Hi,

Thanks a lot for your instructive answer. I have no strings in my
application where the order of the arguments are relevant, but I will
bear this in mind for further.

Best regards,


On 21/06/12 17:55, Tor Norbye wrote:
> You need to number the string arguments because in some translations, the
> order in which the substitutions appear may not be the same. If you just
> use %s, there is no way to for example use the second argument earlier than
> the first; it will need to find the first occurrence of %s and match it
> with the first parameter, and so on. With numbered arguments, one
> translation could do this:  "Dear %2$s, %1$s." (for example when the
> strings represent first and last names, where there are different
> conventions across localizations.)
>
> -- Tor
>
> On Thu, Jun 21, 2012 at 8:24 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Well, the other approach also seems to solve the problem, so as both
>> approaches seems to solve the problem, I do not see the difference
>> between them. And your answer didn't help me, indeed.
>>
>> BTW, there is no need of being so high-handed when answering.
>>
>> Best regards,
>>
>>
>> On 21/06/12 17:11, Justin Anderson wrote:
>>>> Is there some difference with your proposal?
>>>>
>>> Yes, the difference is that his fixes the problem.  Did you try it?
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/magouyaware
>>>
>>>
>>> On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
>>> fmmar...@gmail.com> wrote:
>>>
>>>> Is there some difference with your proposal?
>>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] Formatted string and localization problem

2012-06-21 Thread Francisco M. Marzoa Alonso
Well, the other approach also seems to solve the problem, so as both
approaches seems to solve the problem, I do not see the difference
between them. And your answer didn't help me, indeed.

BTW, there is no need of being so high-handed when answering.

Best regards,


On 21/06/12 17:11, Justin Anderson wrote:
>> Is there some difference with your proposal?
>>
> Yes, the difference is that his fixes the problem.  Did you try it?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Is there some difference with your proposal?
>>

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


[android-developers] ANR keyDispatching TimedOut

2012-06-21 Thread Francisco M. Marzoa Alonso
Hi,

I am getting more and more of these errors from people that has
installed my game on Google Play:

Activity: com.marzoa.ruletafree/.RuletaAfortunadaGame
Cause: ANR keyDispatchingTimedOut

The weird thing is that on the stacktrace attached there is no reference
to my own application or any of its packages:

DALVIK THREADS:
"main" prio=5 tid=1 MONITOR
  | group="main" sCount=1 dsCount=0 s=N obj=0x40020cf8 self=0xcd58
  | sysTid=17349 nice=0 sched=0/0 cgrp=default handle=-1345017776
  at
android.app.ActivityThread.completeRemoveProvider(ActivityThread.java:~4384)
  - waiting to lock <0x467c8a80> (a java.util.HashMap) held by ???
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2137)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4627)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
  at dalvik.system.NativeStart.main(Native Method)

"SmsReceiverService" prio=5 tid=9 WAIT
  | group="main" sCount=1 dsCount=0 s=N obj=0x4681d560 self=0x268718
  | sysTid=17361 nice=10 sched=0/0 cgrp=bg_non_interactive handle=2531112
  at java.lang.Object.wait(Native Method)
  - waiting on <0x4681dc90> (a android.os.MessageQueue)
  at java.lang.Object.wait(Object.java:288)
  at android.os.MessageQueue.next(MessageQueue.java:146)
  at android.os.Looper.loop(Looper.java:110)
  at android.os.HandlerThread.run(HandlerThread.java:60)

"Thread-11" prio=5 tid=8 MONITOR
  | group="main" sCount=1 dsCount=0 s=N obj=0x468095a0 self=0x260980
  | sysTid=17360 nice=0 sched=0/0 cgrp=default handle=2493120
  at android.app.ActivityThread.releaseProvider(ActivityThread.java:~4360)
  - waiting to lock <0x467c8a80> (a java.util.HashMap) held by ???
  at
android.app.ContextImpl$ApplicationContentResolver.releaseProvider(ContextImpl.java:1660)
  at
android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1453)
  at
com.android.mms.data.Contact$ContactsCache.getContactInfoForPhoneNumber(Contact.java:635)
  at
com.android.mms.data.Contact$ContactsCache.getContactInfo(Contact.java:580)
  at
com.android.mms.data.Contact$ContactsCache.updateContact(Contact.java:521)
  at com.android.mms.data.Contact$ContactsCache.access$500(Contact.java:306)
  at com.android.mms.data.Contact$ContactsCache$1.run(Contact.java:457)
  at com.android.mms.data.Contact$ContactsCache.get(Contact.java:472)
  at com.android.mms.data.Contact.get(Contact.java:131)
  at com.android.mms.data.ContactList.getByIds(ContactList.java:54)
  at com.android.mms.data.Conversation.fillFromCursor(Conversation.java:766)
  at com.android.mms.data.Conversation.(Conversation.java:131)
  at
com.android.mms.data.Conversation.cacheAllThreads(Conversation.java:1062)
  at com.android.mms.data.Conversation.access$800(Conversation.java:35)
  at com.android.mms.data.Conversation$2.run(Conversation.java:901)
  at java.lang.Thread.run(Thread.java:1096)

"Thread-8" prio=5 tid=7 WAIT
  | group="main" sCount=1 dsCount=0 s=N obj=0x46806220 self=0x25d800
  | sysTid=17357 nice=0 sched=0/0 cgrp=default handle=2479720
  at java.lang.Object.wait(Native Method)
  - waiting on <0x468061b0> (a java.util.ArrayList)
  at java.lang.Object.wait(Object.java:288)
  at
com.android.mms.data.Contact$ContactsCache$TaskStack$1.run(Contact.java:388)
  at java.lang.Thread.run(Thread.java:1096)

"Binder Thread #2" prio=5 tid=6 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x467ccc20 self=0x23cd60
  | sysTid=17355 nice=0 sched=0/0 cgrp=default handle=1205896
  at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=5 NATIVE
  | group="main" sCount=1 dsCount=0 s=N obj=0x467c8108 self=0x140f60
  | sysTid=17354 nice=0 sched=0/0 cgrp=default handle=1314592
  at dalvik.system.NativeStart.run(Native Method)

"Compiler" daemon prio=5 tid=4 VMWAIT
  | group="system" sCount=1 dsCount=0 s=N obj=0x467c22a0 self=0x13ebc0
  | sysTid=17353 nice=0 sched=0/0 cgrp=default handle=1305472
  at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=3 RUNNABLE
  | group="system" sCount=0 dsCount=0 s=N obj=0x467c21e8 self=0x13e970
  | sysTid=17351 nice=0 sched=0/0 cgrp=default handle=1309296
  at dalvik.system.NativeStart.run(Native Method)

"HeapWorker" daemon prio=5 tid=2 VMWAIT
  | group="system" sCount=1 dsCount=0 s=N obj=0x449e7628 self=0x13f848
  | sysTid=17350 nice=0 sched=0/0 cgrp=default handle=1251936
  at dalvik.system.NativeStart.run(Native Method)

So this is not very useful to isolate and try to solve the problem. Any
hints?

Thaks A LOT 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
T

Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Francisco M. Marzoa Alonso
Hi Tor,

I used this instead:

Couldn\'t load
music file %s (%s)

Is there some difference with your proposal?

Thanks a lot in advance,


On 20/06/12 20:35, Tor Norbye wrote:
> Try   Couldn\'t load music file
> %1$s (%2$s)
>
> -- Tor
>
> On Wed, Jun 20, 2012 at 11:31 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Hi there,
>>
>> I have a l10n string that I need to format later, it looks like this:
>>
>>Couldn\'t load music file %s
>> (%s)
>>
>> But Eclipse complains about a couple of errors on XML parsing:
>>
>> - error: Multiple substitutions specified in non-positional format; did
>> you mean to add the formatted="false" attribute?
>> - error: Unexpected end tag string
>>
>> It dissapear adding that formatted="false" attributed, but I am curious
>> about that...
>>
>> I use these %s because I will use Formatter.format later to build an
>> string with the file name that raises the exception and the e.toString()
>> output.
>>
>> 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
>>

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


[android-developers] Formatted string and localization problem

2012-06-20 Thread Francisco M. Marzoa Alonso
Hi there,

I have a l10n string that I need to format later, it looks like this:

Couldn\'t load music file %s
(%s)

But Eclipse complains about a couple of errors on XML parsing:

- error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute?
- error: Unexpected end tag string

It dissapear adding that formatted="false" attributed, but I am curious
about that...

I use these %s because I will use Formatter.format later to build an
string with the file name that raises the exception and the e.toString()
output.

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: Localization doubt

2012-06-20 Thread Francisco M. Marzoa Alonso
After thinking it a bit, I will relay on system's language and so
Android's l10n for user's interface, and threath the game words language
independently. I think it is the better approach.

Thanks for your help, it has been useful for me to find the best path.

On 20/06/12 18:17, Nobu Games wrote:
> http://stackoverflow.com/questions/2900023/change-language-programatically-in-android
>

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


Re: [android-developers] Re: Localization doubt

2012-06-20 Thread Francisco M. Marzoa Alonso
It seems not to exists an straight way to do it. That guy says "this is
the code, but I advice you not to use it never..." And other commenters
complain about it not working well.

I am afraid will end implementing my own l10n handling regardless
Android's one...



On 20/06/12 18:17, Nobu Games wrote:
> http://stackoverflow.com/questions/2900023/change-language-programatically-in-android
>

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


Re: [android-developers] Re: Localization doubt

2012-06-20 Thread Francisco M. Marzoa Alonso
Excellent!

Thanks a million.
 
:-)
On 20/06/12 18:17, Nobu Games wrote:
> http://stackoverflow.com/questions/2900023/change-language-programatically-in-android
>

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


Re: [android-developers] Re: How to move an app to another on Google Play

2012-06-20 Thread Francisco M. Marzoa Alonso
Thanks for the point, but as far as I have hardcoded strings on my Java
code, I need to change my code... Also the concept of code may be
understood on a wider manner that includes not only Java code, but also
XML resource files and other things like that.

Of course I have been reading that guide, and also the Helo l10n example.

Anyway thank you very much for the interest,




On 20/06/12 17:52, Nobu Games wrote:
>
>> I have yet a clear idea on what changes I must do to my code for 
>> supporting several languages at once, 
>>
> Maybe I'm getting you wrong but I'm having the impression that you don't 
> completely understand the features that are already there. If you coded 
> your app how Google wanted you to code your app in the first place you do 
> not need to change anything about your *code*. Ever since then Android 
> comes with a pretty good working internationalization feature. I suggest 
> that you read following page before trying to implement your own 
> internationalization feature: 
> http://developer.android.com/guide/topics/resources/localization.html
>
> But maybe you already know about that.
>

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


[android-developers] Localization doubt

2012-06-20 Thread Francisco M. Marzoa Alonso
Hi there,

I am starting with l10n and I have a doubt on that.

As I have read, the system will choose the l10n resources for me based
on user's configuration, but I planned to give the users of my app to
choose a different language from configuration one if they want.

My app is a casual game for guessing words, it is in Spanish and
English, but some Spanish people -me among them- may find useful to play
also the English version of the game so they improve their English
vocabulary, and vice versa.

Is there any way to tell the system to use resources of a given
language, regardless system configuration?

Thanks a lot 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


Re: [android-developers] How to move an app to another on Google Play

2012-06-20 Thread Francisco M. Marzoa Alonso
On 20/06/12 17:40, Justin Anderson wrote:
>> The question is that I have created an application in two languages, as
>> it was my first one and I want to release it ASAP, I simply create two
>> different applications for each one (Spanish and English), and uploaded
>> them such way to Google Play.
>>
> That doesn't make any sense... You wanted to get your app out the door
> faster so you created two different applications?  All you had to do was
> add another strings.xml file and stick with one app... How would creating
> two applications be faster than adding a single file to your project?
Ok, it looks pretty straightforward when you know how localization works
on Android, but I released my first application after reading just the
first half of the book "Beggining Android Games" that does not cover
localization and many other things, so I did it with the limited
knowledge I had on that moment, and most of the time recycling sample code.

So if I had invest more time in learning, perhaps I had released the
application with localization even faster. But I could not know how much
time I could need to learn those things before learning those things...
chicken and egg problem.

Also my lack of experience didn't let me figure out the problems that I
could have further -as I had now- doing that way.

> I have yet a clear idea on what changes I must do to my code for
>> supporting several languages at once, however this will generate some
>> problems with Google Play that I have not very clear how to address.
>>
> Any string that is displayed in the UI should be converted to a string
> reference... You will have a different values folder for each language you
> want to support... For example, re/values will contain a strings.xml file
> and it will usually be English.  Then if you want to add another language,
> say French, you would create a res/values-fr folder that contains the
> French version of the strings.xml file
Yeah, by now I have read about that on developer.android.com yet.
> The question is: what about the 30% of
>> Google Play? It will be returned to the user also? It will be charged to
>> me even when I refund the user?
>>
> I'm not 100% sure, but when I've refunded money it seemed like Google lost
> their 30%...
Thanks for that point, it is a really valuable information for me.
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>

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

2012-06-20 Thread Francisco M. Marzoa Alonso
Greetings,

Well, I know the subject sounds weird, but I do not know how to express
it better in a brief.

The question is that I have created an application in two languages, as
it was my first one and I want to release it ASAP, I simply create two
different applications for each one (Spanish and English), and uploaded
them such way to Google Play.

I have had no major problems with this, apart from loosing positioning
as installations and ratings are separated, but now I have planned to
release a new version in Italian and may be later in German, and I do
not want to keep them separated because I prefer that all installations
and ratting are in one application account instead of spread among
several ones.

Also adding improvements and fixing bugs will be easier with just one
application than with one for each language.

Moreover, I for each language I must maintain two versions: free with
ads and per pay without them. Not a major problem with just two
languages neither, but a bit annoying with four.

I have yet a clear idea on what changes I must do to my code for
supporting several languages at once, however this will generate some
problems with Google Play that I have not very clear how to address.

The first problem is that if I create a new application package, I will
lost all ratings and installs on previous one. I think the best solution
may be reusing the application package for the Spanish version, that is
about reaching 100 000 total installs and 1400 comments, and send the
English version to the trash, loosing just about 15 000 installs and 75
comments.

So, I am not specially concerned about that. But it happens that appart
from free versions of my app, I have also released per pay versions in
both Spanish and English. I do not care about loosing both the comments
and the installs on those, since I have just one comment in the English
version and less than 70 installs counting both English and Spanish, but
If I just discontinue the development of one of those, the users will
complain as they have paid for it.

I do not want to just refund them for the old application, since I am
pretty sure that I will lost money because many of them may decide to
keep the old version even without updates instead of buying the new one
with the refunded money. So I have considered offering refund on the
purchase of the new app instead for those users that can probe that they
have purchased the old one. The question is: what about the 30% of
Google Play? It will be returned to the user also? It will be charged to
me even when I refund the user?

Well, any ideas on this issue as a whole are welcome.

Thanks a lot 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


Re: [android-developers] reading pdf in android emulator

2012-06-19 Thread Deepa M
Please add your PDFbox Library by Creating new folder called libs and put
those library jar in to that and then  build so all jar file ka classes
will be found

On Tue, Jun 19, 2012 at 2:04 PM, David Olsson  wrote:

> Have you really followed all steps in:
> http://stackoverflow.com/a/3643015/824914 ? The folder should be called
> libs
>
>
> On Tue, Jun 19, 2012 at 10:28 AM, kampy  wrote:
>
>>
>> i added to the jar file to the build path and added the jar file to the
>> lib folder in the project .
>>
>>but both didnt work for me
>>
>> On Tuesday, June 19, 2012 1:51:06 PM UTC+5:30, David wrote:
>>>
>>> How did you add the library to your project?
>>>
>>> On Tue, Jun 19, 2012 at 10:17 AM, kampy  wrote:
>>>
>>>> hi
>>>>
>>>>  i tried this one also but didnt get the appliation executed
>>>>
>>>> On Tuesday, June 19, 2012 11:34:36 AM UTC+5:30, asheesh arya wrote:
>>>>>
>>>>> just go through this link
>>>>> http://stackoverflow.com/**quest**ions/3831019/how-to-read-**a-**
>>>>> pdf-in-android<http://stackoverflow.com/questions/3831019/how-to-read-a-pdf-in-android>
>>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to android-developers@**
>>>> googlegroups.com 
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>>
>>>
>>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks& Regards
Deepa M

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

[android-developers] UTF-8 encoding and decoding

2012-06-14 Thread Francisco M. Marzoa Alonso
Hi,

I am implementing an standalone client/server protocol to make one of my
games online capable. One of the problems I have found is that some
strings passwed between client and server may have characters that must
be encoded on UTF-8 (like spanish ñ for example).

The first thing I though was using hexadecimal notation for each char,
so an string like ESPAÑA will be enconded and sent as:

004500530050004100D10041

But I rather like to avoid this, since it generates an unnecessary
network load for just one char, and I expect to have hundreds of
concurrent connections, so it is important to loose all the fat I can...

I have found this altenative notation may be a good alternative:

ESPAU+00D1A

But I did not found where it is documented, also I do not know if
Android has native functions to handle this, that may be an interesting
advantage for prefering one notation over another.

Also this one, claimed to be "JavaScript escapes" looks interesting,
with the same load than the previous one:

ESPA\u00D1A

I am using this online tool for my testings:

http://www.rishida.net/tools/conversion/

Well, bearing in mind that the client will be written in Android, and
the server in PHP, what you think should be the best option for encoding
UTF-8 chars during transmission?

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] Changing "hosts" file on an Android device

2012-06-09 Thread Francisco M. Marzoa Alonso
I finally ending just using my hosting provider DNS and creating there
subdomains of actual domains for development, using internal IP
addresses of my network instead of public ones.

It works perfectly and I do not need to set up and keep running my own
DNS server.

Best regards,



On 08/06/12 17:30, Kristopher Micinski wrote:
> On Fri, Jun 8, 2012 at 11:12 AM, Francisco M. Marzoa Alonso
>  wrote:
>> Hi there,
>>
>> When I develop a dynamic web site I used to change the /etc/hosts file
>> on my linux boxes and the equivalent on Windows ones to test the site on
>> different browsers, so I add a line in the way of:
>>
>> 192.168.1.21devel.mysite.com
>>
>> So when I put http://devel.mysite.com on a browser, it connects to my
>> development Apache server.
>>
>> So what I'd like to do it is the same on my Android device, I think I
>> cannot edit /etc/hosts file on it at least while it is not rooted, but
>> if there is other way to do this it will be enough.
>>
> That's right, you'll need root to do this..  typically mods do this
> sort of thing to disable ads across the system...
>
>> I know there are complexer ways to do this, like setting up a DNS server
>> on my own network and give it through DHCP to the device when its
>> connected to my WIFI access point, but I rather like to do it in a
>> simpler manner if there is any...
>>
> Hmm.. That's also right, you can't really modify the system internals
> without root or firmware mods, but, as you note, setting up DNS,
> etc...
>
> Wait, why are you doing this again?  Is this something you want to
> work just for your development device, or do you want it to work
> across apps?
>
> kris
>

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


Re: [android-developers] Re: Data interchange with a PHP server

2012-06-09 Thread Francisco M. Marzoa Alonso
Hi,

Thanks by your advices. I do not need validation against schema nor XML
structure neither, so I will start directly with JSON.

Thanks a lot,

On 09/06/12 15:25, Chris Mawata wrote:
> The built in http client is the usual Apache HttpClient so it can handle 
> the passing of a cookies for you. I would suggest you make the program 
> actually work and produce correct results before worrying about speed. 
>  
> First worry about what you need. For example do you need validation against 
> a schema? (JSON won't do that). Do you need the extra structure of XML? 
> Which of the two (actually three since you might go for SAX parsing rather 
> than DOM parsing) fits the skill sets already available to you? 
>  
> Isolate the code that processes the http response in its own module so that 
> you can change it without affecting the rest of the code. Once the code is 
> working and giving you correct results then worry about speed. 
>  
> Optimizing a non-running program rarely works.
>  
>
> On Friday, June 8, 2012 6:48:22 AM UTC-4, Fran wrote:
>
>> Hi there, 
>>
>> I need to interchange data between my Android app, written in Java using 
>> eclipse, and an Apache HTTP server through some PHP scripts. 
>>
>> What is the best way to do so? 
>>
>> I do not know if there is some bultin functions yet on API that could 
>> make the communication easier than directly using sockets and parsing 
>> strings. 
>>
>> Thanks a lot in advance, 
>>
>>
> On Friday, June 8, 2012 6:48:22 AM UTC-4, Fran wrote:
>> Hi there, 
>>
>> I need to interchange data between my Android app, written in Java using 
>> eclipse, and an Apache HTTP server through some PHP scripts. 
>>
>> What is the best way to do so? 
>>
>> I do not know if there is some bultin functions yet on API that could 
>> make the communication easier than directly using sockets and parsing 
>> strings. 
>>
>> Thanks a lot 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


Re: [android-developers] Changing "hosts" file on an Android device

2012-06-09 Thread Francisco M. Marzoa Alonso
Hi Kristopher,

It is just for development, but I do not want to root my own devices
since, you know, I want to try my applications in devices closed to
users ones, that are not rooted usually. Moreover, If I root my devices
it may not work properly with services like Google Play, and I use them
also to check downloaded packages from Google Play and so.

And I have not infrastructure yet to have several devices rooted and
several non-rooted for checking both things. To be honest, I have just
two devices for development: one is my own phone and the other is my
wife's one X-D

Things may be easier if my DLS router and WIFI AP had DNS server
capabilities, but it has not, so I should configure a Bind or something
similar in some of my other computers and then instruct the router to
use its IP as primary DNS server for DHCP configuration.

A pain in the...

The other way could be to do this programmatically, so... is there any
way to configure a host resolution table just within my application
through Android?

I cannot just use the IP addresses directly, because I will access some
virtual servers through HTTP and the requests to these must include its
domain name, since they share the same IP address.

Regards,


On 08/06/12 17:30, Kristopher Micinski wrote:
> On Fri, Jun 8, 2012 at 11:12 AM, Francisco M. Marzoa Alonso
>  wrote:
>> Hi there,
>>
>> When I develop a dynamic web site I used to change the /etc/hosts file
>> on my linux boxes and the equivalent on Windows ones to test the site on
>> different browsers, so I add a line in the way of:
>>
>> 192.168.1.21devel.mysite.com
>>
>> So when I put http://devel.mysite.com on a browser, it connects to my
>> development Apache server.
>>
>> So what I'd like to do it is the same on my Android device, I think I
>> cannot edit /etc/hosts file on it at least while it is not rooted, but
>> if there is other way to do this it will be enough.
>>
> That's right, you'll need root to do this..  typically mods do this
> sort of thing to disable ads across the system...
>
>> I know there are complexer ways to do this, like setting up a DNS server
>> on my own network and give it through DHCP to the device when its
>> connected to my WIFI access point, but I rather like to do it in a
>> simpler manner if there is any...
>>
> Hmm.. That's also right, you can't really modify the system internals
> without root or firmware mods, but, as you note, setting up DNS,
> etc...
>
> Wait, why are you doing this again?  Is this something you want to
> work just for your development device, or do you want it to work
> across apps?
>
> kris
>

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


Re: [android-developers] Printing PDF in Android

2012-06-08 Thread Carlos A. M. dos Santos
On Fri, Jun 8, 2012 at 2:44 AM, RAJESH RAJARAM  wrote:
> Hi
> I have pdf document in my sdcard, I have to print the document from the
> android mobile. About this i didn't have any idea. Is it possible? This
> there any API in Android? and Advise and Idea's please.

There are several vendor-supplied printing apps for Android. If you
have a printer from HP, take a look at

https://play.google.com/store/apps/details?id=com.hp.android.print

-- 
"The flames are all long gone, but the pain lingers on"

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


[android-developers] Changing "hosts" file on an Android device

2012-06-08 Thread Francisco M. Marzoa Alonso
Hi there,

When I develop a dynamic web site I used to change the /etc/hosts file
on my linux boxes and the equivalent on Windows ones to test the site on
different browsers, so I add a line in the way of:

192.168.1.21devel.mysite.com

So when I put http://devel.mysite.com on a browser, it connects to my
development Apache server.

So what I'd like to do it is the same on my Android device, I think I
cannot edit /etc/hosts file on it at least while it is not rooted, but
if there is other way to do this it will be enough.

I know there are complexer ways to do this, like setting up a DNS server
on my own network and give it through DHCP to the device when its
connected to my WIFI access point, but I rather like to do it in a
simpler manner if there is any...

I use Eclipse for development, so if there is a chance to do something
via DDMS or using command line tools like adb, it will be welcomed.

Best 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: Data interchange with a PHP server

2012-06-08 Thread Francisco M. Marzoa Alonso
Hi,

For JS it is clear that JSON will be faster, but what is the better
choose in Java for Android? I mean, is it JSON parsed faster than XML on
Dalvik?

And for the authentication I used to use PHP sessions and cookies when
developing web pagers.

Will be this also the prefered way to do it with the Android HTTP
client? The other way I am considering is to give the client a token
from the server after authentication and pass it in every POST or GET
request to the server.

This has the disadvantage of having to take care of passing it in every
request, but on the other hand avoiding cookies should made the code
simpler and easier to debug.

Regards,


On 08/06/12 15:59, Chris Mawata wrote:
> There is an HTTP client on Android. When you talk about parsing strings, 
> what structure do you have? There are facilities for handling JSON and
> XML. 
>
> On Friday, June 8, 2012 6:48:22 AM UTC-4, Fran wrote:
>
>> Hi there, 
>>
>> I need to interchange data between my Android app, written in Java using 
>> eclipse, and an Apache HTTP server through some PHP scripts. 
>>
>> What is the best way to do so? 
>>
>> I do not know if there is some bultin functions yet on API that could 
>> make the communication easier than directly using sockets and parsing 
>> strings. 
>>
>> Thanks a lot 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] Data interchange with a PHP server

2012-06-08 Thread Francisco M. Marzoa Alonso
Hi there,

I need to interchange data between my Android app, written in Java using
eclipse, and an Apache HTTP server through some PHP scripts.

What is the best way to do so?

I do not know if there is some bultin functions yet on API that could
make the communication easier than directly using sockets and parsing
strings.

Thanks a lot 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


Re: [android-developers] HTML content on AppWidget

2012-06-04 Thread sha m
Hi,
   Android allows to draw remote views for widget.
Remote view do not support all the view to be placed in it.

On Mon, Jun 4, 2012 at 9:49 AM, zhang guichuan wrote:

> i have search for a long time. some method can add a complex app widget on
> launcher.  such as add append a activity app on launcher .
> but I dont know how to implement it.
>
>
> On Fri, Jun 1, 2012 at 7:19 PM, Mark Murphy wrote:
>
>> You cannot use WebView in an app widget. However, setTextViewText()
>> takes a CharSequence, so if your HTML is fairly limited, use
>> Html.fromHtml() to create such a CharSequence and put it in a TextView
>> in your app widget.
>>
>> On Fri, Jun 1, 2012 at 3:14 AM, zhang guichuan 
>> wrote:
>> > hi guys!
>> > I am searching for some information about how to show HTML content on
>> > appwidget.
>> > there is a old post in the forum ,
>> >
>> https://groups.google.com/group/android-developers/browse_thread/thread/cb6a65d4aaad5b13/ec4e1ad5845cd073?lnk=gst&q=webview+appwidget#ec4e1ad5845cd073
>> >
>> > I wanna to know if there any way can do that, or is there any open
>> source
>> > project can achieve it since its a long time from that old post.
>> > if you know ...please do let me know~ 3x
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to
>> android-developers@googlegroups.com
>> > To unsubscribe from this group, 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
>>
>> _The Busy Coder's Guide to Android Development_ Version 3.7 Available!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2012-06-04 Thread sha m
why shouldnt  startservice/stopservice instead of bind/unbinding to the
service


On Mon, Jun 4, 2012 at 3:15 PM, Kostya Vasilyev  wrote:

>
> 04.06.2012 13:06, Greenhand написал:
>
>  I modify my code and use bindService(new
>> Intent(getApplicationContext()**, MessengerService.class), mConnection,
>> Context.BIND_AUTO_CREATE) but my service still be killed and created
>> with my Activity life cycle. Can you please illustrate "Don't unbind
>> in the old activity instance -- only unbind from the new one." more
>> clearly, such as some code fragments?
>>
>
> Don't unbind from the activity that's going away during rotation.
>
> Use onRetainNonConfigurationInstan**ce / getLastNonConfigurationInstanc**e
> to carry the service connection over from the "portrait" activity instance
> to the "landscape" activity instance.
>
> Unbind as usual when the second, rotated, instance gets destroyed.
>
>
>  I have never used a fragement. Is it different from Activity when it
>> comes to handling bound service on rotation?
>>
>
> If you bind to the service from a fragment, you can have the framework
> retain the fragment on rotation by setting fragment.setRetainInstance(**true),
> rather than using the two Activity methods with unpronounceable names,
> above.
>
> -- K
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com
> To unsubscribe from this group, 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: SoundPool error "Unable to load sample: (null)"

2012-05-30 Thread Francisco M. Marzoa Alonso
I answer to myself, JFTR:

For some reason SoundPool were unable to load a wav sample that in fact
works in every other player that I have used. So I simply ended using
another file with a different format. Here is the format of the
offending file, as told by mplayer on my GNU/LiNUX box:

|Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 96000 Hz, 1 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
|

And here it is the one for the other file that does work:

|Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 22050 Hz, 2 ch, s16le, 705.6 kbit/100.00% (ratio: 88200->88200)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
|

There are many differences, but the point is that the second works, so I
simply discarded the first one and move into the second. Knowing this if
I needed the first sound sample, I just need to adjust its rate and
channels with an audio editor like Audacity to solve the problem.

Why it did not just work in first case? Who knows, but if I can solve it
so easy... who cares at all?


On 30/05/12 19:21, Francisco M. Marzoa Alonso wrote:
> Hi there,
>
> I am facing an "Unable to load sample: (null)" error with the SoundPool,
> while trying to load a sample (not surprising, yeah?).
>
> I have discarded all common flaws that should raise that kind of error,
> so the file does exists (I can see it there), the file is readable
> (assets manager seems to read it with no problem), and the file is not
> corrupt (I can reproduce it with a wav player without problems).
>
> So I do not know what could be the cause of this error. Here is the code
> snippet:
>
> try {
> AssetFileDescriptor assetDescriptor = assets.openFd(filename);
> int soundId = soundPool.load(assetDescriptor, 0);
> return new AndroidSound(soundPool, soundId);
> } catch (IOException e) {
> throw new RuntimeException("Couldn't load sound '" +
> filename + "'");
> }
>
> assets is an AssetManager instance, and it loads pretty well other
> samples in the same directory. It does not raises an IOException, so it
> is pretty clear that the file is there and it is readable, but when
> executing the soundPool.load line, it complains with the error "Unable
> to load sample: (null)".
>
> Any ideas?
>
> Thanks a million,
>

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

2012-05-30 Thread Francisco M. Marzoa Alonso
It looks, at least for me. May be my own ignorance, or perhaps that I
have not understood you very well.

My point is that Android OS is a linux based system, where you cant exec
MS-DOS/WINDOWS binary executable files like those with .exe extension
(at least not directly, you can do it with some using WINE for example,
but thats another history...).

Also if you develop your application the common way, i.e. in Java with
Android SDK, it will run on a sandbox within the system, on the Dalvik
VM, so your chances to execute native code are even less (though I think
you can use JNI for the task), and to be honest I do not know how to do
that and what issues you may found (may be you need even a "rooted" device).

Anyway, the point is that you cannot execute a Micro$oft .exe binary
file within your Android device. And installing WINE or something for
the task seems to be too complicated for just considering it.

Maybe I am wrong anyway.

Regards,



On 30/05/12 13:16, Anirudh Loya wrote:
> Crazy ?
>
> On Wed, May 30, 2012 at 6:56 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> On 30/05/12 12:03, Meryeme Ayache wrote:
>>> I am trying to install a .exe softaware
>> WHAT???
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>

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


Re: [android-developers] Google play stats stalled

2012-05-30 Thread Francisco M. Marzoa Alonso
Hmmm... I have this message on my console:

"Issues with statistics export
Temporary issues exporting statistics
Learn more
"

It is not exactly the same, since I do not want to export stats, but may
be it is related: if they are working on solving stats exporting, may be
they are retaining the whole thing... thought...

I will wait til twomorrow before complaining...

Best regards,


On 30/05/12 17:50, Kostya Vasilyev wrote:
> Not sure if my stats are affected, but I remember seeing a notice in the
> developer console about this yesterday. The notice also said they're
> working on a fix (as ever).
>
> -- K
>
>

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


[android-developers] SoundPool error "Unable to load sample: (null)"

2012-05-30 Thread Francisco M. Marzoa Alonso
Hi there,

I am facing an "Unable to load sample: (null)" error with the SoundPool,
while trying to load a sample (not surprising, yeah?).

I have discarded all common flaws that should raise that kind of error,
so the file does exists (I can see it there), the file is readable
(assets manager seems to read it with no problem), and the file is not
corrupt (I can reproduce it with a wav player without problems).

So I do not know what could be the cause of this error. Here is the code
snippet:

try {
AssetFileDescriptor assetDescriptor = assets.openFd(filename);
int soundId = soundPool.load(assetDescriptor, 0);
return new AndroidSound(soundPool, soundId);
} catch (IOException e) {
throw new RuntimeException("Couldn't load sound '" +
filename + "'");
}

assets is an AssetManager instance, and it loads pretty well other
samples in the same directory. It does not raises an IOException, so it
is pretty clear that the file is there and it is readable, but when
executing the soundPool.load line, it complains with the error "Unable
to load sample: (null)".

Any ideas?

Thanks a million,

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


Re: [android-developers] Google play stats stalled

2012-05-30 Thread Francisco M. Marzoa Alonso
Ok, I am more confident now.

Thank you very much,

On 30/05/12 17:50, Kostya Vasilyev wrote:
> Not sure if my stats are affected, but I remember seeing a notice in the
> developer console about this yesterday. The notice also said they're
> working on a fix (as ever).
>
> -- K
>
>

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


[android-developers] Google play stats stalled

2012-05-30 Thread Francisco M. Marzoa Alonso
Hi,

The stats on my Google Play developer console seems to be stalled since
yesterday. It has been updating between 12:00 and 13:00 GMT, but today
at 15:40 GMT they are showed outdated. I have the same active install
that I had yesterday, and the last day shown on graphics is 28 May.

I rather like to know if this is a general issue or it is affecting just me.

Anyone with same problem?

Thanks a lot in advance.

Best 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] want to install a software .exe from my Android App

2012-05-30 Thread Francisco M. Marzoa Alonso
On 30/05/12 12:03, Meryeme Ayache wrote:
> I am trying to install a .exe softaware
WHAT???

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


[android-developers] Eclipse and DDMS

2012-05-26 Thread Francisco M. Marzoa Alonso
Hi,

Is there anyway to see and edit hidden files on android devices from
Eclipse/DDMS?

Thanks a lot 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


Re: [android-developers] Re: Send the user to Google Play application's page

2012-05-24 Thread Francisco M. Marzoa Alonso
Nice to known that , thanks Treking. Although documentation is very vast
and sometimes it is hard to find what you are looking for if you do not
know where to search exactly. I agree that documentation is my friend,
but most of the time discussion groups are even friendly than docs.

Regards,


On 23/05/12 22:55, TreKing wrote:
> FYI, there is a large section in the official documentation that is about
> the Android Mark-, Google Crap Store.
>
> One of the topics covered is exactly what you asked about: showing a given
> app in the store,
>
> They also document how to search and list apps for a given publisher.
> Documentation is your friend.
>
> -
> 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: Send the user to Google Play application's page

2012-05-24 Thread Francisco M. Marzoa Alonso
That's right. Note you can use market:// url instead http:// scheme so
the link is opened directly with Google Play.

On 23/05/12 20:34, Bas Verhoog wrote:
> Hello,
>
> Good to see that you've found an answer. That means I'm most likely right 
> :).
>

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


Re: [android-developers] Re: Send the user to Google Play application's page

2012-05-23 Thread Francisco M. Marzoa Alonso
Thank you very much, Bas.

In the meantime I also found this answer on stackoverflow:

http://stackoverflow.com/questions/1964819/start-android-market-from-app

That says the same as you.

Best regards,

On 23/05/12 19:07, Bas Verhoog wrote:
> Hello,
>
> I'm also just beginning with Android, every day we learn :).
>
> So, about the intent.
> If you're using a normal Activity (or a derivative thereof), starting a new 
> Intent to open a URL would look like the following: 
> Intent i = new Intent(Intent.ACTION_VIEW);
> i.setData(Uri.parse("thisismyurl.com"));
> startActivity(i);
>
> Now, if you replace the URL (thisismyurl.com) with the URL of your app on 
> the Play Store, Android will automatically detect that and prompt the user 
> to open the link using either one of the browsers, or the Play Store 
> application.
>
> Hope this helped.
>

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


Re: [android-developers] Re: Send the user to Google Play application's page

2012-05-23 Thread Francisco M. Marzoa Alonso
Hi,

First, thanks by your fast answer.

On the issue, I will try to be the less obstrusive as possible, showing
the message just one time for the same user for the rest of his life,
and only if the user has been playing the game for a long time, so he
likes it. If it says "no", I will not ask again.

On the code, could you develop a bit more this idea?

"make it so that a new intent is passed with the URL for your app, using
the ACTION_VIEW"

It is my first app for Android, and also I have no write a line of Java
code until this for more than 15 years...

Thanks a lot in advance,

On 23/05/12 18:42, Bas Verhoog wrote:
> I don't really think you should force them into going to the Play Store, 
> but that's not your question.
>
> I would use public void onBackPressed (right mouse click -> Source -> 
> Implement/Override Methods), and make it so that a new intent is passed 
> with the URL for your app, using the ACTION_VIEW. This will also let the 
> user choose whether or not to view it in Google Play, then call `finish();` 
> at the end to be sure.
>
> On Wednesday, May 23, 2012 6:37:33 PM UTC+2, Fran wrote:
>> Hi there, 
>>
>> I rather like to encourage users to write reviews on my app. Is there 
>> any manner to open the Google Play app's page from within my code when 
>> the user is leaving the application? 
>>
>> Thanks a lot 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] Send the user to Google Play application's page

2012-05-23 Thread Francisco M. Marzoa Alonso
Hi there,

I rather like to encourage users to write reviews on my app. Is there
any manner to open the Google Play app's page from within my code when
the user is leaving the application?

Thanks a lot 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


Re: [android-developers] How to force an exception?

2012-05-23 Thread Francisco M. Marzoa Alonso
Hi and thanks by your fast answer,

If I try to throw an exception that way just after AssetFileDescriptor
... line, Eclipse complains about Unreachable code.

Regards,

On 23/05/12 17:30, Justin Anderson wrote:
> Just throw a new IOException...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, May 23, 2012 at 9:26 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Hi there,
>>
>> Just for debugging my code I rather like to simulate the case an
>> exception is raised, and I do not know how to do it.
>>
>> The code is the following:
>>
>>try {
>>AssetFileDescriptor assetDescriptor = assets.openFd(filename);
>>return new AndroidMusic(assetDescriptor);
>>} catch (IOException e) {
>>throw new RuntimeException("Couldn't load music '" +
>> filename + "'");
>>}
>>
>> What I want to do is to force the IOException after
>>
>> AssetFileDescriptor assetDescriptor = assets.openFd(filename);
>>
>> So the code goes into the catch block.
>>
>> How could I do that?
>>
>> Thanks a lot in advance,
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] How to force an exception?

2012-05-23 Thread Francisco M. Marzoa Alonso
Hi there,

Just for debugging my code I rather like to simulate the case an
exception is raised, and I do not know how to do it.

The code is the following:

try {
AssetFileDescriptor assetDescriptor = assets.openFd(filename);
return new AndroidMusic(assetDescriptor);
} catch (IOException e) {
throw new RuntimeException("Couldn't load music '" +
filename + "'");
}

What I want to do is to force the IOException after 

AssetFileDescriptor assetDescriptor = assets.openFd(filename);

So the code goes into the catch block.

How could I do that?

Thanks a lot 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] Learing Hint

2012-05-20 Thread priyan M
Hai Guys im very new to android development. Can u guys guide me to develop 
an application. 
I have Android sdk and i have completely update upto date, and im using 
Eclipse Helios as an IDE and i using Windows xp os.
So far instalation process is completed for. Can u guys help me to learn 
 this technology. im waiting 4 u valuable reply...

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

[android-developers] Ads on my game, Where to start learning?

2012-05-14 Thread Francisco M. Marzoa Alonso
Hi there,

I have deployed my first casual game yet to Google Play. I planned to
release also a free version with ads. So what is the fastest way to add
ads to my game?

Links to docs on the issue are very wellcome.

Thanks a lot 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] Error in Google Play

2012-05-13 Thread Francisco M. Marzoa Alonso
May be a bit topic, but I have published my first app on Google Play about
six hours ago and it seems that nobody is able to purchase it. It gives a
very low informative error about that transaction could not be done and
advicing to try again later.

I have experiment the error trying to purchase it by myself, and two of my
friends has the same problem.

Has someone experienced similar problems?

TIA

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

[android-developers] Changing application name for the launcher

2012-05-13 Thread Francisco M. Marzoa Alonso
Hi there,

I have created a game with an Eclipse project called "AwesomeGame", and
the problem is that when installing it on the device it is also called
"AwesomeGame", but I rather like to change it to "Awesome Game" with an
space between words.

Where is the right place to change this???

Thanks a lot 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] Noise between FX sounds and music

2012-05-11 Thread Francisco M. Marzoa Alonso
Hi there,
 
I am facing problems when playing at same time music and some FX sound.
The FX sound is a "click" similar to the click of the mouse. It sounds
fine when playing alone one time, although it gets some noise at the end
of the reproduction when trying to repeat it too fast.

But when it is played with some background music, it does the noise at
the end (like a "puk" or so) every time.

Some ideas?

TIA,

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


[android-developers] have picture taken show in preview and save on request

2012-04-22 Thread K M
I have an activity that starts a camera and after the picture is taken
it shows an alert dialog so user can choose save, cancel, retry. I
cannot seem to delete the picture data on cancel, nor transfer the
image to another activity, in the same app, on save. There is no error
showing, it just doesn't clear the data and I don't know how to access
the data to use in an imageview on the other activity. Here is the
relevant code:

PictureCallback jpegCallback = new PictureCallback() {
  @Override
  public void onPictureTaken(byte[] data, Camera c) {
tempdata = data;
done();
}
};

void done() {
Bitmap bm = BitmapFactory.decodeByteArray(tempdata,  0,
tempdata.length);
final String url = Images.Media.insertImage(getContentResolver(), bm,
null, null);
bm.recycle();
Bundle bundle = new Bundle();
if(url != null) {
bundle.putString("url", url);
Intent mIntent = new Intent();
mIntent.putExtras(bundle);
setResult(RESULT_OK, mIntent);
}else{
Toast.makeText(this, "Picture can not be saved",
Toast.LENGTH_SHORT).show(); }

AlertDialog dialog = new AlertDialog.Builder(this).create();

I have 3 buttons in the dialog, save, cancel, and retry.  The retry
works fine, I need to clear the data on cancel and recall the save
data in another activity if they choose save.

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

2012-04-18 Thread sha m
thank you for the information.

On Wed, Apr 18, 2012 at 6:28 PM, Mark Murphy wrote:

> On Wed, Apr 18, 2012 at 8:21 AM, sha m  wrote:
> > I do not want to refer the library project source code in the application
> > project since android has provided an option to export the library jar
> and
> > res seperately from r15.
>
> This is not supported for redistribution, AFAIK. That is still a work
> in progress. An Android library project must be attached directly, as
> is described in the documentation (e.g.,
>
> http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject
> )
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-04-18 Thread sha m
Hi folks,

I have jar and resource folder of an android library project.
I wanted to refer the resources of the library project in my project from
eclipse.
I do not want to refer the library project source code in the application
project since android has provided an option to export the library jar and
res seperately from r15.
Though I have an option to include jar via properties-> library -> build
path, I couldnt figure out where the resource should be specified.
I using android 4.0.3 - r15.
Could someone help me on this?

regards,
sha

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

2012-03-19 Thread sha m
There are four components part of application.
Instead of using activity create a service and try to use it...

On Mon, Mar 19, 2012 at 7:09 PM, RedBullet  wrote:

> My application is a GPS nav type app. Needs to be running when I am doing
> a route.
>
> It appears that the system can decide to kill my process (I see onDestroy)
> get called for example.
>
> So, what's the right policy here, should I over-ride the onDestroy and
> just have it do nothing, but provide a way to manually kill the activity?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Connectivity Manager does not return Active network information

2012-03-16 Thread sha m
Hi Mark and Robert ,
   Thanks a lot for the information.
I had my bluetooth active and connected to another mobile, but still
returned null in API level 7.
So it means this can be verified only above API level 13?

My intention was to check the VPN connection.
Could you please guide me on that?

Regards,
Sha


On Thu, Mar 15, 2012 at 9:22 PM, Mark Murphy wrote:

> On Thu, Mar 15, 2012 at 11:48 AM, Robert Greenwalt
>  wrote:
> > In some situations (reverse tethering) BT can be the active network, but
> as
> > Mark says you'd have to have that turned on and connected.
>
> Oops, I forgot they added that in API Level 13. Thanks for pointing that
> out!
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Back button not working properly after coming out of Tabactivity

2012-03-15 Thread sha m
Why is the current process killed on back press??

On Thu, Mar 15, 2012 at 4:11 PM, vani reddy wrote:

>
> Hi friends,
>
> Under a particular tab of the tabactivity ,there are 2 activities. A and
> then B.From the menu of B activity when i press Logout it goes to Login
> screen,which is outside the tabactivity.On back button press of login
>  screen it goes back to the Activity B.Though i have given
>  @Override
> public void onBackPressed() {
> // TODO Auto-generated method stub
>  super.onBackPressed();
> System.out.println("INSIDE ONBACK PRESSED ");
>  android.os.Process.killProcess(android.os.Process.myPid());
> }
> in the Login Screen.
>
> How to resolve this issue.
> --
> Regards,
> Vani Reddy
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Connectivity Manager does not return Active network information

2012-03-15 Thread sha m
Hi,
I'm trying to find the current active network with the help of
ConnectivityManager.
ConnectivityManager.getActiveNetworkInfo() always returns null in android
2.1 device, eventhough i have enabled wifi,bluetooth.
Could someone advice me on this.

Regards,
Sha

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

2012-03-15 Thread sha m
hope this tutorial helps you

http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html

regards,
sha


On Thu, Mar 15, 2012 at 4:45 PM, Satheesh Kumar T <
satheesh.androiddevelo...@gmail.com> wrote:

> hi,
> how to registration id of the android app???
> thank u
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] if condition not working in intent activity

2012-03-08 Thread sha m
pin is the edittext object.
compare the value of the pin "pin.getText().toString()" to compare the
value that u expect



On Tue, Mar 6, 2012 at 12:45 AM, ~JAI~  wrote:

> hi friends,
>
> i'm new to android. i'm using the code below to create a new intent
> activity based on if condition validation.. but it doesn't work... pls
> help me..
>
>
>
> CODE
>
>
> package com.example.helloandroid;
>
> public class Main extends Activity {
>/** Called when the activity is first created. */
>@Override
>public void onCreate(Bundle savedInstanceState) {
>super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>
>
>ImageButton next2 = (ImageButton)
> findViewById(R.id.imageButton1);
>next2.setOnClickListener(new View.OnClickListener() {
>public void onClick(View view) {
>
>EditText pin =
> (EditText)findViewById(R.id.editText1); //value from edit text
>
> Log.v("EditText", pin.getText().toString()); //
> this works in log
>
>if (pin.equals()){
>Intent myIntent = new Intent(view.getContext(),
> home.class);
>startActivityForResult(myIntent, 1);
> }
>}
>});
>}
>@Override
>public void onBackPressed() {
>return;
>
>}
> }
>
>
> the log file gets the value from text box, but the if condition does
> not work.. pls help me.. thanks in advance...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Background and foreground image views

2012-03-08 Thread sha m
FrameLayout helps to draw one view above another


On Thu, Mar 8, 2012 at 6:10 PM, Put_tiMe  wrote:

> I need to have a background and a foreground image views in a LinearLayout.
>
> Obviously the background has to be drawn before the foreground.
>
> How can I do it?
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-03-06 Thread sha m
The label of the activity can be used instead using a seperate text view.

Regards,
Sha

On Mon, Mar 5, 2012 at 12:04 PM, ravi .  wrote:

> I need to display a textview on the top of the coverflow of each item
> when i scroll
>
> http://4.bp.blogspot.com/_UW2f-eaiXZs/S4lCNH-wpyI/AJE/0Ce8jGe8fSA/s1600-h/coverflowv2.png
> can any one help
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: how to create Pdf files from some data

2012-02-22 Thread Deepa M
where we need to store text files  to access!!!

On Mon, Feb 20, 2012 at 3:07 PM, Chandra Sekhar wrote:

> Hi Ankur, try this one
>
> Do this one in  onCreate() method   (All the best)
> *
> ArrayAdapter adapter;
>  ArrayList listItems=new ArrayList();
>  File[] imagelist;
>  String[] pdflist;
>  File images = Environment.getExternalStorageDirectory();
>  imagelist = images.listFiles(new FilenameFilter(){
>  public boolean accept(File dir, String name)
>  {
>  return ((name.endsWith(".pdf")));
>  }
>  });
>  pdflist = new String[imagelist.length];
>  Log.i("RGT"," Size  :"+imagelist.length);
>
>  for(int i = 0;i  {
>  pdflist[i] = imagelist[i].getName();
>  Log.i("RGT"," Size  :"+imagelist.length);
>  }
>  this.setListAdapter(new ArrayAdapter(this,
>  android.R.layout.simple_list_item_1, pdflist));
> }
> --
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks& Regards
Deepa M

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

2012-02-22 Thread Deepa M
i want to create a own database to store all inbox messages... its my
interest project..pls refer

On 2/22/12, moktarul anam  wrote:
> Hi Deepa,
> What do want to do ?  already sms db table is there in android.
>
>
> Moktarul
>
> On Feb 22, 12:56 pm, Deepa M  wrote:
>> Dear All
>>
>> can any one help me to create a sms database table as sms table in
>> android to store all iin that created database incoming messages ...
>>
>> --
>> Thanks& Regards
>> Deepa M
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en


-- 
Thanks& Regards
Deepa M

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


[android-developers] SMS Table

2012-02-21 Thread Deepa M
Dear All


can any one help me to create a sms database table as sms table in
android to store all iin that created database incoming messages ...

-- 
Thanks& Regards
Deepa M

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


[android-developers] put icon and text in same line in tab

2012-01-30 Thread W M


i'm new in android and want to put icon and text in same line in tab
spec=t.newTabSpec("diary").setIndicator("Diary",
r.getDrawable(R.drawable.diary)).setContent(intent);
how can i do 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] How to create a sms database table to store inbox messages in Android

2012-01-30 Thread Deepa M
hi everyone!
i am going develop an android application to show all inbox messages
in a  own sms database table...
help me pls...

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

2012-01-23 Thread M CC
Hello asxz,
thank you for posting this issue of yours.
Unfortunately I cannot help you with the code (I wrote a couple of
apps myself a few months ago but not using Flash Player).
What I can tell you is, as far as I know, the Flash player is (quite
strangely) made not to play/function when in background. I hate this
because for example
there is no way to listen to a youtube video music without having to
look at the video itself (in some case the video is a still image!!).
Have a look at this:

http://android-developers.blogspot.com/2010/04/multitasking-android-way.html

Regards



On Dec 29 2011, 2:55 am, asxz8722  wrote:
> Hi, dear
>
> I want to build a live video chating system.
>
> In my design, there are two activities:
> 1. chat
>    People can chat in this activity.
>    There should be a list of TextView, dynamic changing when someone is
> talking.
> 2. Live video player
>    In this activity, a WebView embed a flash player to play the live
> stream.
>
> I can overwrite the onOptionsItemSelected in Activities to switch between
> Activities
> Here is a part of my code:
> public boolean onOptionsItemSelected(MenuItem item){
> switch(item.getItemId()){
> case Menu.FIRST;:
> Intent intent = new Intent();
> intent.setClass(Video.this,Chat.class);
> startActivity(intent);
> break;
> default:}
>
> return super.onOptionsItemSelected(item);
>
> }
>
> and, here is my problem:
> When I am chating with other people, the live stream should still alive.
> However, when I change the activity from Live video player to chat
> Activities
>
> Intent intent = new Intent();
> intent.setClass(Video.this,Chat.class);
> startActivity(intent);
>
> would recreate the Chat activity, and the original activity(Live video
> player) would be paused.
>
> So, is there any solution to make the flash player play like in background?
> even when changing activities, this flash player is still playing.
>
> P.S I have tried to put a webview with a flash player embed in in Service
> and get the
> webview back from Service and add it to chat activity.
>
> then I get an error:
>
> Thread [<1> main] (Suspended (exception ClassCastException))
> ViewRoot.draw(boolean) line: 1634
> ViewRoot.performTraversals() line: 1323
> ViewRoot.handleMessage(Message) line: 1959
> ViewRoot(Handler).dispatchMessage(Message) line: 99
> Looper.loop() line: 150
> ActivityThread.main(String[]) line: 4310
> Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean)
> line: not available [native method]
> Method.invoke(Object, Object...) line: 507
> ZygoteInit$MethodAndArgsCaller.run() line: 839
> ZygoteInit.main(String[]) line: 597
> NativeStart.main(String[]) line: not available [native method]
>
> But, when the webview just load a normal url without flash likewww.google.com,
> it will load successfully.

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


[android-developers] Http post and get

2012-01-20 Thread n3d!m
My application connects to website which requires username and password. 
After POST is done http GET cannot access next page after login.
After searching for solution I cam e to conclusion I need to send cookie 
with http POST.
Tried this 

DefaultHttpClient mHttpClient = new DefaultHttpClient();
BasicHttpContext mHttpContext = new BasicHttpContext();
CookieStore mCookieStore  = new BasicCookieStore();
mHttpContext.setAttribute(ClientContext.COOKIE_STORE, mCookieStore);

HttpResponse response = mHttpClient.execute(mRequest, mHttpContext);

But it doesnt work.
Other examples shows usage of
httpclient.getCookieStore().getCookies();

My problem is there is no method getCookieStore in http client.

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

2012-01-20 Thread M J
Thanks,
I will try

On 20 Jan., 16:56, Mark Murphy  wrote:
> You may have better luck asking that on the android-ndk Google Group.
>
>
>
>
>
>
>
>
>
> On Fri, Jan 20, 2012 at 10:54 AM, M J  wrote:
> > Hey guys,
>
> > I have another problem. I want to compile all my files (*.c and *.cpp)
> > with a c++ compiler. How can I tell ndk-build to do that? Currently it
> > decides to use a normal c-compiler to compile *.c files and a c++-
> > compiler to compile *.cpp files.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 4.0 Programming Books:http://commonsware.com/books

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


[android-developers] Force ndk-build to use c++ compiler

2012-01-20 Thread M J
Hey guys,

I have another problem. I want to compile all my files (*.c and *.cpp)
with a c++ compiler. How can I tell ndk-build to do that? Currently it
decides to use a normal c-compiler to compile *.c files and a c++-
compiler to compile *.cpp files.

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


[android-developers] Submit username and password to website

2012-01-20 Thread n3d!m
I am trying to post login and username to the website.
How to do that?

Here is the code:

if (v.getId()==R.id.loginBtn) {
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://ius.edu.ba:8080/sis/
index.php");
try {
EditText username = (EditText)
findViewById(R.id.editUsername);
EditText password = (EditText) 
findViewById(R.id.editPassword);

String enteredUsername;
String enteredPassword;
enteredUsername=username.getText().toString();
enteredPassword=password.getText().toString();

List userData=new 
ArrayList(2);
userData.add(new
BasicNameValuePair("username",enteredUsername));
userData.add(new
BasicNameValuePair("password",enteredPassword));

post.setEntity(new UrlEncodedFormEntity(userData));
HttpResponse response = client.execute(post);


String siteResponse;
 
siteResponse=getResponse(response.getEntity().getContent()).toString();

if (siteResponse.contains("Note:"))
Toast.makeText(getBaseContext(), "Wrong 
username or password!"
+ siteResponse, Toast.LENGTH_LONG).show();

else
Toast.makeText(getBaseContext(), "Logged in! " +
siteResponse , Toast.LENGTH_LONG).show();

} catch (IOException e) {
e.printStackTrace();
}

}

}

private StringBuilder getResponse(InputStream stream) {
String line = "";
StringBuilder result = new StringBuilder();
BufferedReader reader = new BufferedReader(new
InputStreamReader(stream));
try {
while ((line = reader.readLine()) != null) {
result.append(line);
}
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
}

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


[android-developers] Renderscript benchmrks

2012-01-16 Thread m lobo
Hi,
I m interested in analyzing power/performance benchmarks for the
platform (just like HoverJet and Taiji for OpenGL).
Can anyone suggest such a benchmark or is there one in development.

Thanks

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


[android-developers] Re: JNI and caching jobject "thiz"?

2012-01-16 Thread M J
Hey,

hmmm, I do not think so. I just want to know how to call a Java method
from C without having the jobject. Can I cache it when I previously
got it as parameter?

On 16 Jan., 09:11, FrankG  wrote:
> Hello !
>
> It seems for me, that your question is not really  ndk and android
> related,
> instead more or less something related to Reflection and the Dynamic
> Invocation API.
>
> Good luck ! Frank
>
> On 13 Jan., 11:11, M J  wrote:
>
>
>
>
>
>
>
> > Hey guys,
>
> > I nned your help. I am currently developing an application which uses
> > JNI and native sockets. The problem is that I have to call Java code
> > if some packages arrive on the native socket connection. Currently I
> > am using CallVoidMethod to do that. The JNIEnv cannot be cached so I
> > get it like this:
>
> > inline JNIEnv *get_env()
> > {
> >         JNIEnv *env;
> >         jvm->GetEnv((void **)&env, JNI_VERSION_1_4);
> >         return env;
>
> > }
>
> > The jmethodID I is cached and initialized on startup. My only problem
> > now is, how can I get the jobject? Currently I am making a global
> > reference on the parameter jobject thiz, which is passed to my init
> > function.
>
> > Is this okay? I am asking because I am having some trouble with that,
> > eg. the reference to the local and the global obj are exactly the
> > same. And when I a call DeleteGlobalRef on the global reference there
> > is a warning in the log cat output that this reference does not exist
> > and the app crashes.
>
> > I also tried using the local reference but then the CallVoidMethod
> > crashes and the output says this reference does not exist, so I think
> > I am on the right way.
>
> > 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] JNI and caching jobject "thiz"?

2012-01-13 Thread M J
Hey guys,

I nned your help. I am currently developing an application which uses
JNI and native sockets. The problem is that I have to call Java code
if some packages arrive on the native socket connection. Currently I
am using CallVoidMethod to do that. The JNIEnv cannot be cached so I
get it like this:

inline JNIEnv *get_env()
{
JNIEnv *env;
jvm->GetEnv((void **)&env, JNI_VERSION_1_4);
return env;
}

The jmethodID I is cached and initialized on startup. My only problem
now is, how can I get the jobject? Currently I am making a global
reference on the parameter jobject thiz, which is passed to my init
function.

Is this okay? I am asking because I am having some trouble with that,
eg. the reference to the local and the global obj are exactly the
same. And when I a call DeleteGlobalRef on the global reference there
is a warning in the log cat output that this reference does not exist
and the app crashes.

I also tried using the local reference but then the CallVoidMethod
crashes and the output says this reference does not exist, so I think
I am on the right way.

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: Android documentation in PDF

2012-01-11 Thread Mehmet M.
I bundled each main subject on the android page to separate .pdf
files . There is not index or any other kind of navigational content,
though.

http://hotfile.com/dl/141110161/55376ad/Android_Documentation.7z.html

includes:
Android Framework Topics
Android Market Topics
Android Developing
Android Publishing

On Dec 2 2011, 1:42 am, SL  wrote:
> Is there somewhere the online Android developer documentation in PDF
> format I can download ?
>
> It is easier to read and search without going online, I think.
>
> Thanks.
>
> --
> Using Opera's revolutionary email client:http://www.opera.com/mail/

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

2012-01-06 Thread m l
Thank you

On Jan 6, 8:49 am, TreKing  wrote:
> On Fri, Jan 6, 2012 at 8:27 AM, m l  wrote:
> > Can someone give me an example?
>
> https://www.google.com/search?q=android+handler+example
>
> --- 
> --
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: changing ImageButton image

2012-01-06 Thread m l
Can someone give me an example?

On Jan 5, 8:58 am, TreKing  wrote:
> On Wed, Jan 4, 2012 at 12:06 AM, m l  wrote:
> > The first Image change ( step 2)  never happens
>
> Yes it does, but you're doing it all in the main thread, so you never see
> it because you don't give the system a chance to draw your changes.
>
> You need to read up on and understand threading, the main / GUI thread, and
> how to run timed tasks. See the Handler class for starters.
>
> --- 
> --
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] changing ImageButton image

2012-01-04 Thread m l
I am trying to make this simple app. Any help would be appreciated,
thank you.
What I want it to do.
1: Show a clickable image ( imageButton)
2:When clicked  change imageButton to second image.
3:Then play a sound.
4:Wait a few seconds ( I have been using thread sleep() )
5:Change image back to the original picture.

Sounds simple right?
Well what I am getting is this.
1: Show a clickable image ( imageButton)
2:When clicked it plays the sound.
3:Waits a few seconds.
4:Then sets the imageButton to original. ( I know this part happens
because I tried 3 pictures. A starting image, photo2 and last photo1
as a test to see if it was even trying to change the imageButton)

The first Image change ( step 2)  never happens , even though when I
step through the app with a debugger it shows it going to that point.



Code---

package my.picture.changer;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

public class PictureChangerActivity extends Activity {

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

  setButtonClickListener();
 }

 public void setButtonClickListener() {
  final MediaPlayer mp = MediaPlayer.create(this, R.raw.mysound);
  final ImageButton imageButton1 = (ImageButton)
findViewById(R.id.imageButton1);
  imageButton1.setOnClickListener(new View.OnClickListener() {
   @Override
   public void onClick(View v) {
// set button image to photo2
imageButton1.setImageDrawable(getResources().getDrawable(
  R.drawable.photo2));

mp.start();// play sound
sleeper();// wait 5 seconds
// tried moving sleep out of method to
see if that made a difference (no)
// change button image back to photo1
imageButton1.setImageDrawable(getResources().getDrawable(
  R.drawable.photo1));
   }
  });
 }

 private void sleeper() {
  // wait 5 seconds

  try {
   Thread.sleep(5000);
  } catch (InterruptedException e) {
   e.printStackTrace();
  }
  return;

 }

}

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

2012-01-03 Thread Carlos A. M. dos Santos
On Mon, Jan 2, 2012 at 2:04 PM, Mark Murphy  wrote:
> You can listen for ACTION_PACKAGE_REPLACED to determine if your
> application has been updated.

Will the replaced package itself receive the broadcast? As far as I
can tell the only way to get such notification is by means of
ACTION_MY_PACKAGE_REPLACED (Android 3.1.).

> On Mon, Jan 2, 2012 at 10:52 AM, guich  wrote:
>> Is there any kind of notification that is sent when a program is
>> installed? I could get a notification that my program was installed or
>> updated and then save this date/time to use later.
>>
>> thanks
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy

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


[android-developers] Could not find hello-world.apk

2011-12-29 Thread Francisco M. Marzoa Alonso
Hello,

I'm starting writting android games with a book called Beginning Android
Games, of Mario Zechner. I've written the first Hello World application
after installing everything on my Ubuntu 11.10 laptop, and I
doublechecked that I have followed the instructions on the book, but
when I try to run it Eclipse says:

Could not find hello-world.apk!

Build Automatically option is enabled within Project, so it should be
generated automatically, but it seems like it should not.

This is the complete output I get when trying to run it:

[2011-12-28 19:25:47 - SDK Manager] Warning: Ignoring add-on
'addon-real3d-lge-10': File not found: manifest.ini
[2011-12-28 19:25:47 - SDK Manager] Warning: Ignoring add-on
'addon-dual_screen_apis-kyocera_corporation-10': File not found:
manifest.ini
[2011-12-28 19:25:47 - SDK Manager] Warning: Ignoring add-on
'addon-dual_screen_apis-kyocera_corporation-8': File not found: manifest.ini
[2011-12-28 19:25:47 - SDK Manager] Warning: Ignoring add-on
'addon-real3d-lge-8': File not found: manifest.ini
[2011-12-28 19:25:48 - SDK Manager] ERROR: null
[2011-12-28 19:25:49 - SDK Manager] Fetching
https://dl-ssl.google.com/android/repository/addons_list-1.xml
[2011-12-28 19:25:49 - SDK Manager] Validate XML
[2011-12-28 19:25:49 - SDK Manager] Parse XML
[2011-12-28 19:25:49 - SDK Manager] Fetched Add-ons List successfully
[2011-12-28 19:25:49 - SDK Manager] Fetching URL:
https://dl-ssl.google.com/android/repository/repository-5.xml
[2011-12-28 19:25:50 - SDK Manager] Validate XML:
https://dl-ssl.google.com/android/repository/repository-5.xml
[2011-12-28 19:25:51 - SDK Manager] Parse XML:   
https://dl-ssl.google.com/android/repository/repository-5.xml
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 1.1,
API 2, revision 1 (Obsolete)
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 1.5,
API 3, revision 4
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 1.6,
API 4, revision 3
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 2.0,
API 5, revision 1 (Obsolete)
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android
2.0.1, API 6, revision 1 (Obsolete)
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 2.1,
API 7, revision 3
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 2.2,
API 8, revision 3
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android
2.3.1, API 9, revision 2 (Obsolete)
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android
2.3.3, API 10, revision 2
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 3.0,
API 11, revision 2
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 3.1,
API 12, revision 3
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 3.2,
API 13, revision 1
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android 4.0,
API 14, revision 3
[2011-12-28 19:25:51 - SDK Manager] Found SDK Platform Android
4.0.3, API 15, revision 1
[2011-12-28 19:25:51 - SDK Manager] Found ARM EABI v7a System Image,
Android API 14, revision 2
[2011-12-28 19:25:51 - SDK Manager] Found ARM EABI v7a System Image,
Android API 15, revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 7,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 8,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 9,
revision 1 (Obsolete)
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 10,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 11,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 12,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 13,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 14,
revision 2
[2011-12-28 19:25:51 - SDK Manager] Found Samples for SDK API 15,
revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Android SDK
Platform-tools, revision 10
[2011-12-28 19:25:51 - SDK Manager] Found Android SDK Tools, revision 16
[2011-12-28 19:25:51 - SDK Manager] Found Documentation for Android
SDK, API 15, revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Sources for Android SDK,
API 14, revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Sources for Android SDK,
API 15, revision 1
[2011-12-28 19:25:51 - SDK Manager] Found Android Support package,
revision 6
[2011-12-28 19:25:51 - SDK Manager] Fetching URL:
https://dl-ssl.google.com/android/repository/addon.xml
[2011-12-28 19:25:54 - SDK Manager] Validate XML:
https://dl-ssl.google.com/android/repository/addon.xml
[2011-12-28 19:25:54 - SDK Manager] Parse XML:   
https://dl-ssl.google.com/android/repository/addon.xml
[2011-12-28 19:25:54 - SDK Manager] Found Google APIs by Google
Inc., Android API 3, revision 3
[2011-12-28 19:25:54 - SDK Manager] Found Google APIs by Google
Inc., Android API 4, revision 2
[2011-12-2

[android-developers] Re: Could not find hello-world.apk

2011-12-29 Thread Francisco M. Marzoa Alonso
My first message has not been published yet, but I answer it anyway to
say that I solved the problem just by restarting Eclipse... O_o

On 28/12/11 20:21, Francisco M. Marzoa Alonso wrote:
> Hello,
>
> I'm starting writting android games with a book called Beginning Android
> Games, of Mario Zechner. I've written the first Hello World application
> after installing everything on my Ubuntu 11.10 laptop, and I
> doublechecked that I have followed the instructions on the book, but
> when I try to run it Eclipse says:
>
> Could not find hello-world.apk!
>
> Build Automatically option is enabled within Project, so it should be
> generated automatically, but it seems like it should not.
>
> This is the complete output I get when trying to run it:
>
...

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


[android-developers] USB communication

2011-12-20 Thread manjunath M
Hello Sir,

   Currently im using samsung mobile(model no:GT-I5801) with
android 2.2, now i need to communicate with my PC through USB cable.
The text which i type from my phone should simultaneously be visible
in PC. How to go through this problem ?? Apart from android is there
any alternative ? Please help me with this query because it is very
much essential to my project.

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] native udp socket & sleep mode

2011-12-19 Thread M J
Hey guys,

I am currently developing an app, where I need a udp connection to a
server. The code which communicates with the server is written in C,
so I am using the ndk and I open a posix udp socket. I send every 30
seconds a message to the server to register and to keep the connection
alive.

My problem is now that sometimes when the phone is in sleep mode (e.g.
display is off) messages from the server are lost. I only have this
problem in UMTS (3G, ..), not when I am connected via Wifi.

My question is now, how does the android system react in sleep mode
when a udp connection is open, especially when using native sockets.
Will the connection be ignored? Or just closed sometimes?

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


Re: [android-developers] Android documentation in PDF

2011-12-01 Thread Carlos A. M. dos Santos
On Thu, Dec 1, 2011 at 9:42 PM, SL  wrote:
>
> Is there somewhere the online Android developer documentation in PDF format
> I can download ?

Not in PDF.

> It is easier to read and search without going online, I think.

You can read it in HTML:

file:///docs/offline.html

Searching will be limited to the currently displayed page, of course,

-- 
"The flames are all long gone, but the pain lingers on"

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


[android-developers] Creating a layout from XML Parsing

2011-11-29 Thread Adam M
Hi all

I am trying to create an application where the widgets of the layout,
that is the TextViews, EditTexts etc are all stored in an XML file,
which is then parsed and added programatically. I also need to be able
to set the location on screen from this XML file. Reason this is
required is that I want to be able to customize layout just by
changing the XML file, which will then be parsed and update the
layout.

I have been trying a few things to get this working, but its proving
rather complicated. I have tried searching in many different places,
and I can't seem to find any tutorials or examples of this type of
thing. Would anyone be able to point me in the right direction, or
give me any pointers?

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: Slow Down In Android Emulator (AVD)

2011-11-29 Thread Adam M
 Only way to get it running faster is upgrade computer I am afraid.

On Nov 29, 1:26 pm, Mitul Patel  wrote:
> Hello,
>  I need help to get fast run time of Android AVD. It takes about 3-5
> minutes. I can't able to test is fast. I have Window 7 as Operating system
> with Android SDK 2.3 API 10 Level.
>
> Thanks

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


[android-developers] Re: getdisplay width height and assign it to static int

2011-11-29 Thread Adam M
Use


Display display = getWindowManager().getDefaultDisplay();

Then do

int height = display.getHeight();
int weight = display.getWidth();

Now you wont be able to assign these as static, as if you try to get
the width and height outside the onCreate method, and then run program
it will crash. Although I am not sure why you would need to assign the
width and height as a static variable. I suppose one way to get around
this would have a class with a static height and width variable and in
your main class where you declare the onCreate method, use Window
Manager, get width and height, then pass the variables from there into
the static variables in the other class.
On Nov 26, 12:43 pm, Darshan Santoki 
wrote:
> I am new in developing.
> I want display width and height and assign it static integer.
> If this possible than how?

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

2011-11-28 Thread Carlos A. M. dos Santos
On Mon, Nov 28, 2011 at 2:49 PM, Mark Murphy  wrote:
> On Mon, Nov 28, 2011 at 11:37 AM, Carlos A. M. dos Santos
>  wrote:
>> Can anybody help me to debug this? I'm whiling to fill a bug report,
>> but I need additional information. I suspect that the problem is
>> caused by the conversion to DEX code.
>
> Tactically, unless you really have ~1 billion separate
> startActivityForResult() calls, switch REQ_CODE to be 1. Or 1337. Or
> something else small. It only has to be unique within your calling
> activity.

Already did this. Looks like all clauses in the switch fail if the
constant in the first cause is 0x7fff.

> Beyond that, post the source to a sample project that demonstrates
> this issue somewhere, and I'll take a peek at it.

http://www.4shared.com/file/qE-CPf7l/MyApp.html

The zip file contains a built APK.

Thanks for helping.

-- 
"The flames are all long gone, but the pain lingers on"

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


[android-developers] Re: Mysterious behavior of switch statement inside onActivityResult

2011-11-28 Thread Carlos A. M. dos Santos
On Mon, Nov 28, 2011 at 12:17 AM, Carlos A. M. dos Santos
 wrote:
> Hello,
>
> I have the following code in class MyActivity:
>
>    public static final int REQ_CODE = 0x7fff;
> ...
>                    startActivityForResult(intent, REQ_CODE);
> ...
>    @Override
>    public void onActivityResult(int requestCode, int resultCode, Intent data) 
> {
>        Log.d(TAG, " onActivityResult: " +
> Integer.toHexString(requestCode));
>        switch (requestCode) {
>            case 0:
>            case REQ_CODE:
>                Log.d(TAG, " REQ_CODE ");
>                break;
>            default:
>                Log.d(TAG, " Equals: " + (requestCode == REQ_CODE));
>        }
>    }
>
> When I run it I get the following log messages:
>
> D/MyActivity(11505):  onActivityResult: 7fff
> D/MyActivity(11505):  REQ_CODE 
>
> Now for the mystery. If I comment-out the "case 0" clause I get these
> log messages:
>
> D/MyActivity(11471):  onActivityResult: 7fff
> D/MyActivity(11471):  Equals: true
>
> If I comment-out the "case 0" clause and change the value of REQ_CODE
> to 0x7ffe I get a correct result again. To make the case even more
> mysterious, a similar code works perfectly well in another class,
> inside a method overriding Handler.handleMessage(Message msg).
>
> My environment:
>
> - Ubuntu 11.10 x86 (32bit).
> - Android SDK Tools r15
> - ADT Version: 15.0.1.v20031820-219398
> - javac 1.6.0_26
> - Project target API: 7 (Android 2.1)
>
> Additional information:
>
> - Building with ant does not make any difference.
> - Changing Java compliance to 1.5 does not make any difference.
> - The problem can reproduced 100% of the times, both on Nexus S with
> Android 2.6.3 and on emulator running Android 2.1.
> - No, I'm not drunk!

Extra additional information: the problem also happens when I build on
another machine, with SDK Tools r12 and Platform-tools r6.

Can anybody help me to debug this? I'm whiling to fill a bug report,
but I need additional information. I suspect that the problem is
caused by the conversion to DEX code.

-- 
"The flames are all long gone, but the pain lingers on"

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


[android-developers] Mysterious behavior of switch statement inside onActivityResult

2011-11-27 Thread Carlos A. M. dos Santos
Hello,

I have the following code in class MyActivity:

public static final int REQ_CODE = 0x7fff;
...
startActivityForResult(intent, REQ_CODE);
...
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(TAG, " onActivityResult: " +
Integer.toHexString(requestCode));
switch (requestCode) {
case 0:
case REQ_CODE:
Log.d(TAG, " REQ_CODE ");
break;
default:
Log.d(TAG, " Equals: " + (requestCode == REQ_CODE));
}
}

When I run it I get the following log messages:

D/MyActivity(11505):  onActivityResult: 7fff
D/MyActivity(11505):  REQ_CODE 

Now for the mystery. If I comment-out the "case 0" clause I get these
log messages:

D/MyActivity(11471):  onActivityResult: 7fff
D/MyActivity(11471):  Equals: true

If I comment-out the "case 0" clause and change the value of REQ_CODE
to 0x7ffe I get a correct result again. To make the case even more
mysterious, a similar code works perfectly well in another class,
inside a method overriding Handler.handleMessage(Message msg).

My environment:

- Ubuntu 11.10 x86 (32bit).
- Android SDK Tools r15
- ADT Version: 15.0.1.v20031820-219398
- javac 1.6.0_26
- Project target API: 7 (Android 2.1)

Additional information:

- Building with ant does not make any difference.
- Changing Java compliance to 1.5 does not make any difference.
- The problem can reproduced 100% of the times, both on Nexus S with
Android 2.6.3 and on emulator running Android 2.1.
- No, I'm not drunk!

-- 
"The flames are all long gone, but the pain lingers on"

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


Re: [android-developers] Proguard causes problems with SSL keystore on Android

2011-11-18 Thread Carlos A. M. dos Santos
On Fri, Nov 18, 2011 at 3:05 AM, Mathias Lin  wrote:
> In an Android app, I fetch content from a https url; in order to avoid SSL
> cert verification errors, I add the SSL public key to my keystore, which
> then resides in my res/raw folder of the app. Following the instructions as
> on http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html,
> which all works fine so far.
>
> ..until I activate Proguard and obfuscation. With Proguard activated, I am
> getting the following error,
>
> ERROR/Login(4401): Could not login.
>     javax.net.ssl.SSLException: hostname in certificate didn't match:
>  !=  OR
> 
>     at xyz.fd.a(Unknown Source)
>
> which I don't quite understand. Why would the identification of the url
> change in a way that it's also fetching the / together with the
> domain name, whereas it works fine without Proguard obfuscation.

It is not fetching the IP address. The
"store.mydomain.com/185.165.192.15" you see is just the result of
InetAddress.toString(). Please post the entire stack trace contained
in the exception. Also, tell proguard to keep line numbers and file
names:

-keepattributes SourceFile,LineNumberTable

> As the httpClient for fetching the https content, I use sources as in
> MyHttpClient
> at:http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html
>
> proguard.cfg:
>
> -optimizationpasses 5
> -dontusemixedcaseclassnames
> -dontskipnonpubliclibraryclasses
> -dontpreverify
> -verbose
> -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
>
> -keep public class * extends android.app.Activity
> -keep public class * extends android.app.Application
> -keep public class * extends android.app.Service
> -keep public class * extends android.content.BroadcastReceiver
> -keep public class * extends android.content.ContentProvider
> -keep public class * extends android.app.backup.BackupAgentHelper
> -keep public class * extends android.preference.Preference
>
> -keep class * extends DefaultHttpClient
>
> -ignorewarnings
> -repackageclasses 'xyz'
> -allowaccessmodification
>
> -keepclasseswithmembernames class * {
>     native ;
> }
>
> -keepclasseswithmembers class * {
>     public (android.content.Context, android.util.AttributeSet);
> }
>
> -keepclasseswithmembers class * {
>     public (android.content.Context, android.util.AttributeSet, int);
> }
>
> -keepclassmembers class * extends android.app.Activity {
>    public void *(android.view.View);
> }
>
> -keepclassmembers enum * {
>     public static **[] values();
>     public static ** valueOf(java.lang.String);
> }
>
> -keep class * implements android.os.Parcelable {
>   public static final android.os.Parcelable$Creator *;
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
"The flames are all long gone, but the pain lingers on"

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


Re: [android-developers] How secure are SharedPreferences on rooted devices?

2011-11-17 Thread Carlos A. M. dos Santos
On Thu, Nov 17, 2011 at 7:50 PM, Ricardo Amaral
 wrote:
> I was thinking of implementing a coupon based system for my app so I could
> offer some copies of the full version to some people. I found blog article
> which provided the server code (to install on Google AppEngine) and the
> client code to use on the app. I looked at the source code and realized the
> way the system works (after the coupon has been validated and activated) is
> with a simple a boolean variable with SharedPreferences.
>
> 1) My main question about this is, how safe is this? How easily is the
> SharedPreferences file hackable on rooted devices to change that boolean
> flag and "convert" an app to a full version even without a coupon code?

It's not safe.

> I'm talking about coupons here but they don't really matter. I thought about
> using SharedPreferences before to handle a similar situation (ie: boolean
> variable to control if the app is the full version or not). So the question
> is really about SharedPreferences and how safe are they to control the
> free/paid version of an app based on a boolean flag. If they are not safe,
> is there any other way?

Use the account manager. Ask the user to create an account and save
the boolean variable along with the account credentials. Be warned,
however, that for security reasons apps installed on the SD card will
have their accounts removed each time the SD card is unmounted/mounted
(including power-switching the device).

> 2) My second question and now related to the coupons system but we can look
> at this as validating and activating an app through the Internet. The idea
> is that I just want to activate the full version of my app to someone,
> temporarily, some sort of a trial.
>
> The problem is the deactivating part. Let's say I disable the full version
> for a specific device on the validation server. If the user doesn't open my
> app while connected to the Internet, the app will always be on "full mode"
> and there's nothing I can do about it. Or is there?

This can be managed at the server side, revoking the user account.

-- 
"The flames are all long gone, but the pain lingers on"

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


Re: [android-developers] Re: Print from device

2011-11-17 Thread Carlos A. M. dos Santos
On Thu, Nov 17, 2011 at 11:29 AM, ecspertiza  wrote:
> Thanks, i find this 
> http://www.slideshare.net/wolfpaulus/android-print-intent-8431140
> may by that help me :)

Be warned that HP does not officially support that API. It can change
or even disappear in the future.

DISCLAIMER: I'm *not* speaking on behalf of HP, even though I'm
responsible for that app.

> On Nov 17, 3:42 pm, "Carlos A. M. dos Santos" 
> wrote:
>> On Thu, Nov 17, 2011 at 6:01 AM, ecspertiza  wrote:
>> > HI, can i print document from android device ? May be there is Action
>> > or SDK ?
>>
>> Unfortunately there is no official "print" action. Some printing
>> applications answer to the "share" and/or "view" action, but this is
>> just a workaround.

-- 
"The flames are all long gone, but the pain lingers on"

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


[android-developers] ADT 15: opening declaration in library project jumps to read-only source

2011-11-17 Thread Carlos A. M. dos Santos
Hi,

I have ClassA, declared in library project ProjA, and ClassB, declared
in project ProjB. ProjB references ProjA as a library, therefore ADT
creates a ProjA_src link at the root folder of ProjB. This link can
*not* be included in the Java build path, otherwise the build fails
due to classes being added twice. So far, so good, but if I put the
cursor on ClassB, over a reference to ClassA, and hit "F3" Eclipse
opens a read-only tab with the source code, entitled "ClassA.class",
not the source under ProjA_src. This is a regression compared to ADT
13 and before, in my opinion, so I have two questions.

Does anybody know a workaround?

Did anybody fill a bug report, already?

Thanks in advance for your help.

-- 
"The flames are all long gone, but the pain lingers on"

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


Re: [android-developers] Print from device

2011-11-17 Thread Carlos A. M. dos Santos
On Thu, Nov 17, 2011 at 6:01 AM, ecspertiza  wrote:
> HI, can i print document from android device ? May be there is Action
> or SDK ?

Unfortunately there is no official "print" action. Some printing
applications answer to the "share" and/or "view" action, but this is
just a workaround.

-- 
"The flames are all long gone, but the pain lingers on"

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


[android-developers] Display battery status of my application

2011-11-08 Thread Manikandan M
Hi All,

How to display battery usage of my app. In Settings->Application-
>Battery Use it display the battery usage of some applications. How to
add my application over there?



Thanks in Advance
Mani.

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


[android-developers] C2DM Message fails

2011-11-02 Thread Manikandan M
Hi All,

I used c2dm to get messages for my application. it is working fine but
in droid x i am unable to get messages.

Registration is fine i got the registration id even i too got the
valid response from the c2dm server while sending message but  i am
unable to get the message in the device this is happen only in droid
x. other devices are fine.

response from the c2dm server after sending message :
id=0:1319892812710374%3421e3b10030

Please help me,

Thanks in Advance,
Mani

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Leaked IntentReceiver exception is being thrown even though I call unregisterReceiver

2011-10-31 Thread vijayakumar M
Hi Friends,

I don't understand why I'm getting this exception when hitting the back
button. I have the IntentReceiver registered in the onCreate method and it
is supposed to be unregistered in the onPause method. My Log.w() call
inside of the onPause method leads me to believe that the
unregisterReceiver() method is being called, but I am getting this
exception still... please any help me

-- 




"Nobody can go back and start a new beginning, but anyone can start today
and make a new ending"
-
Thanks,
Regards,
νιנαソαkum@r M
BloG:http://iamvijayakumar.blogspot.com/

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

Re: [android-developers] Types of mobile application

2011-10-29 Thread Manikandan M
Hi,

Please help me. i am curios about this.

Thanks
Manikandan

On Sat, Oct 29, 2011 at 10:29 PM, Manikandan M wrote:

> Hi All,
>
> It seems to me only native and webview  are the two types of mobile
> application we can create. using mobile jquery we can create web
> application that make effective UI in mobile devices.
>
> Correct me if i am wrong, and another type of mobile app we can create in
> android?
>
> Thanks
> Manikandan
>
>
> On Sat, Oct 29, 2011 at 4:20 PM, Manikandan M wrote:
>
>> Hi
>>
>> Any Ideas.
>>
>>
>> Thanks
>> Manikandan
>>
>>
>> On Tue, Oct 25, 2011 at 9:52 AM, Manikandan M wrote:
>>
>>> Hi All,
>>>
>>> I am new android development i want to know what are the different
>>> ways to create mobile applications.
>>>
>>> 1. Native App
>>> 2. Using jquery mobile to create web app
>>> 3. Using webview
>>>
>>> is webview and jquery mobile are same and any other types we can
>>> create mobile app.
>>>
>>>
>>> Thanks
>>> Manikandan
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>

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

2011-10-29 Thread Manikandan M
Hi All,

It seems to me only native and webview  are the two types of mobile
application we can create. using mobile jquery we can create web
application that make effective UI in mobile devices.

Correct me if i am wrong, and another type of mobile app we can create in
android?

Thanks
Manikandan

On Sat, Oct 29, 2011 at 4:20 PM, Manikandan M wrote:

> Hi
>
> Any Ideas.
>
>
> Thanks
> Manikandan
>
>
> On Tue, Oct 25, 2011 at 9:52 AM, Manikandan M wrote:
>
>> Hi All,
>>
>> I am new android development i want to know what are the different
>> ways to create mobile applications.
>>
>> 1. Native App
>> 2. Using jquery mobile to create web app
>> 3. Using webview
>>
>> is webview and jquery mobile are same and any other types we can
>> create mobile app.
>>
>>
>> Thanks
>> Manikandan
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

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

Re: [android-developers] How to get updated c2dm registration Id.

2011-10-29 Thread Manikandan M
Hi Steven,

This is the response i am getting from the c2dm server.

id=0:1319892812710374%3421e3b10030



Thanks
Manikandan

On Sat, Oct 29, 2011 at 8:35 PM, Studio LFP  wrote:

> What type of response code are you getting from the C2DM server when you
> try to send a message to that specific device ID? It will let you know if
> there is any issues with your current device ID.
>
>
> Steven
> Studio LFP
> http://www.studio-lfp.com
>
>
> On Saturday, October 29, 2011 5:37:58 AM UTC-5, Manikandan M wrote:
>
>> Hi Steven,
>>
>> Thanks for the reply.
>>
>> I am using droid x and i am unable to get c2dm messages, registration is
>> fine even i also have response id from the c2dm server but message is not
>> delivered to the device. It works for all other devices.
>>
>>
>> Thanks
>> Manikandan
>>
>> On Fri, Oct 28, 2011 at 8:20 PM, Studio LFP  wrote:
>>
>>> I don't think the ID you get for the device expires.
>>>
>>> If you give the user the option of unregistering, then you would use the
>>> same register routine again to get a new ID. If the user uninstalls the
>>> application, it also unregisters and you would need to get a new ID if they
>>> reinstalled. If neither of these two happen, I believe you don't ever have
>>> to refresh the ID of the device.
>>>
>>> Are you running into a problem?
>>>
>>> Steven
>>> Studio LFP
>>> http://www.studio-lfp.com
>>>
>>>
>>>
>>> On Friday, October 28, 2011 9:33:05 AM UTC-5, Manikandan M wrote:
>>>
>>>> Hi All,
>>>>
>>>> Any ideas.
>>>>
>>>>
>>>> Thanks
>>>> Manikandan
>>>>
>>>> On Fri, Oct 28, 2011 at 3:50 PM, Manikandan M wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> Is that any other way to do this without registering at particular
>>>>> interval.
>>>>>
>>>>>
>>>>> Thanks
>>>>> Manikandan
>>>>>
>>>>>
>>>>> On Fri, Oct 28, 2011 at 2:52 PM, Manikandan M wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> As i know c2dm registration id periodically refreshed, how do i get
>>>>>> the refreshed c2dm registration id.
>>>>>>
>>>>>> Is i want to register again at particular interval?
>>>>>>
>>>>>>
>>>>>> Thanks in Advance
>>>>>> Manikandan.
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Android Developers" group.
>>>>>> To post to this group, send email to androi...@googlegroups.com
>>>>>>
>>>>>> To unsubscribe from this group, send email to
>>>>>> android-develop...@**googlegroup**s.com
>>>>>>
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/**group**/android-developers?hl=en<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-d...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-develop...@**googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Types of mobile application

2011-10-29 Thread Manikandan M
Hi

Any Ideas.


Thanks
Manikandan

On Tue, Oct 25, 2011 at 9:52 AM, Manikandan M wrote:

> Hi All,
>
> I am new android development i want to know what are the different
> ways to create mobile applications.
>
> 1. Native App
> 2. Using jquery mobile to create web app
> 3. Using webview
>
> is webview and jquery mobile are same and any other types we can
> create mobile app.
>
>
> Thanks
> Manikandan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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