[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 12 Topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    Marty <mchinn@blueshiftinc.com> Oct 31 10:49AM -0700  

    Hi, we're working on a project where we are trying to make Android's
    implementation of OpenSL ES compatible with our platform and need access to
    the source code in order to help with the porting process. Can someone
    point us to where we can find the source code for OpenSL ES on Android?
    Any help would be greatly appreciated. Thanks!

     

    Marty <mchinn@blueshiftinc.com> Oct 31 11:52AM -0700  

    Thanks for the quick reply. I'm familiar where the source code is located
    and have downloaded the whole tree. What I can't find is the source code
    for OpenSL ES in that drop though. At best I found the header files but not
    the source implementation. Which of the groups in the second link would you
    recommend trying to get an answer from?
     
    On Wednesday, October 31, 2012 11:45:46 AM UTC-7, RichardC wrote:

     

    John Coryat <coryat@gmail.com> Oct 31 11:52AM -0700  

    More info:
     
    Once the project id is coded into the developer console, the statistics for
    GCM messages and registration show up in the developer console statistics
    section. The statistics seem to cover the period from when we started using
    GCM even though I just initialized the code.
     
    The statistics are similar to the ones for other statistics in the
    developer console. For instance, it says that we sent over 1,000,000
    messages through GCM on Monday, October 29. This is when the hurricane was
    rolling over the northeast and we were sending out NWS Alerts to all our
    users.
     
    -John Coryat

     

    lbendlin <lutz@bendlin.us> Oct 31 11:30AM -0700  

    I would think that the view IDs are bound to the activity or fragment where
    they are inflated in. But the best thing for you is to actually try it out
    and see for yourself.
     
    On Tuesday, October 30, 2012 8:12:06 PM UTC-4, Mark Phillips wrote:

     

    bob <bob@coolfone.comze.com> Oct 31 07:16AM -0700  

    Why not just use post instead of postDelayed? That's what I use to update
    display of the battery level every 10 seconds:
     
    public class Battery_Level_Thread extends Thread {
     
    @Override
    public void run() {
     
    while (true)
    {
    MainActivity.handler.post(new Runnable() {
    @Override
    public void run() {
    MainActivity.update_battery_level();
    }
    });
    try {
    Thread.sleep(10*1000);
    } catch (InterruptedException e) {
     
    e.printStackTrace();
    }
    }
    }
     
    }
     
    On Tuesday, October 30, 2012 7:10:57 PM UTC-5, marcpolo wrote:

     

    marcpolo <marc.armstrong89@gmail.com> Oct 31 09:05AM -0700  

    I used java.util.Timer and TimerTask instead of the Runnable and this
    resulted in much improved performance, allowing me to schedule the task at
    40Hz (on average).
     
    As expected, given this is not a RTOS, the cycles vary +/-1-2ms, however I
    the the average cycle time is 25ms as desired.
     
    So, it is shown that the Timer performs better than Runnable for scheduling
    tasks at frequencies around 40Hz (on the Galaxy S3).
     
    Thanks very much for your help.

     

    Kristopher Micinski <krismicinski@gmail.com> Oct 31 02:20PM -0400  

    It's not an RTOS thing, it's more of a Java thread scheduler thing, so this
    happens closer to the framework level.
     
    kris
     

     

    Francisco Marzoa <fmmarzoa@gmail.com> Oct 31 02:31PM +0100  

    Hi there,
     
    I have a real problem when providing different resources for different
    displays, according to their density. Putting all the needed graphics on
    the same apk file makes it really big, and most of the graphics will not
    be used by the device where they are installed never.
     
    I have seen that what some developers does is to have an HD separated
    version of their app, but this implies more development effort and
    dispersing social promotion of the game (user's ratings, position on the
    market, social network links, etc.)
     
    I think the best approach should be something that keeps the minimal
    needed resources on the apk, and during the first run of the app takes
    care of downloading the ones that fits the display of the device.
     
    This has some additional difficulties, but I do not want to write a
    thesis on this, just to ask if someones knows something that does this
    yet written, before I start reinventing the wheel for my own projects.
     
    Best regards,

     

    Francisco Marzoa <fmmarzoa@gmail.com> Oct 31 05:57PM +0100  

    Hi,
     
    You are right. I thought this was just for breaking too big apks into
    smaller parts, but thats not the case.
     
    This solves a great percent of the problem, and although you still have
    the inconvenience of managing multiple builds, this may be the best
    approach anyway, having in account the inconveniences of the others.
     
    Thank you very much,
     
     
    On 10/31/2012 04:14 PM, Johan Appelgren wrote:

     

    Francisco Marzoa <fmmarzoa@gmail.com> Oct 31 06:27PM +0100  

    Hi,
     
    Well, after reading that whole document, I have found that using
    multiple apks have a lot more inconveniences in addition to managing
    multiple builds. In the same document they insist a lot on NOT using
    multiple apks if you can avoid it due these inconveniences.
     
    So in the end it does not look like the best approach neither, but it
    was important to know about even for discarding it, so thank you again.
     
    Best regards,
     
    On 10/31/2012 05:57 PM, Francisco Marzoa wrote:

     

    Abdul Rahman Majeed <a.rahman.uaf@gmail.com> Oct 31 12:57PM +0500  

    HI
    i am using facebook sdk for facebook apps and here i have problem ; when i
    use android 2.3 version it awesome but it sucks my code and said
    "unfortunately Stopped application" in 4.0.3, please help me...

     

    Michael Banzon <michael@banzon.dk> Oct 31 09:08AM +0100  

    Can you provide some more detailed debug information? Exception/LogCat?
     
    On Wed, Oct 31, 2012 at 8:57 AM, Abdul Rahman Majeed
     
    --
    Michael Banzon
    http://michaelbanzon.com/

     

    Asheesh Arya <asheesharya.cs@gmail.com> Oct 31 02:10PM +0530  

    may be external jar creating problem!! check it wheather you import
    external jar in libs folder.

     

    bob <bob@coolfone.comze.com> Oct 31 07:18AM -0700  

    Sounds like it is trying to do networking on the UI thread.
     
     
     
    On Wednesday, October 31, 2012 3:00:57 AM UTC-5, Abdul Rahman Majeed wrote:

     

    vani reddy <vani.reddy.blore@gmail.com> Oct 31 07:11PM +0530  

    HI friends,
     
    I am doing the drag annd drop of list view items., I checked the
    TouchedInterceptor.java but i dont know how to use it.
    Please post some code snippets.
     
    --
    Regards,
    Vani Reddy

     

    TreKing <trekingapp@gmail.com> Oct 31 09:01AM -0500  


    > Please post some code snippets.
     
     
    Please review the documentation and use Google to find code snippets on
    your own. It's not that hard to find information if you put a little effort
    into it.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Parthi K <parthisoft13@gmail.com> Oct 31 04:34PM +0530  

    use image switcher ....
     
    On Wed, Oct 31, 2012 at 10:54 AM, Sravanthi Dadu

     

    Dinesh kumar <dragonfirefd@gmail.com> Oct 31 04:45PM +0530  

    use animation listener and relative layout you will get
     

     

    Rahul Kaushik <rahulkaushik85@gmail.com> Oct 31 05:58PM +0530  

    I am using XMPPConnection with jabber ,am able to connect with the server
    but
     
    connection.getRoster();
     
    method is rturning null i.e no buddies :(
     
    Any suggestions or help would be greatfull
     
    Thanks
    RK

     

    "Carlos A. M. dos Santos" <unixmania@gmail.com> Oct 30 10:29PM -0200  

    Send me your MacBook Pro with retina display and I will send you back my
    dual-head PC on which the emulator is displayed perfectly. Problem solved!
     
     
    --
    "The flames are all long gone, but the pain lingers on"

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

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

[android-developers] Digest for android-developers@googlegroups.com - 10 Messages in 8 Topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    Robert Greenwalt <rgreenwalt@google.com> Oct 30 05:28PM -0700  

    Are you sure the host publishes its address to the dns server you're using?
     
     
    On Fri, Oct 19, 2012 at 1:49 PM, Sterling Michel Diaz De Oleo <

     

    shubh <shubhampatni86@gmail.com> Oct 30 10:49PM -0700  

    I created an live wallpaper application, like how we get default wallpaper
    on home screen, how to set the Live Wallpaper as default wallpaper even
    after my Android mobile is restarted?

     

    Jovish P <android.fryo@gmail.com> Oct 31 10:39AM +0530  

    When user clicks on a button i want to open the pdf file stored inside our
    application(ie which is inside Assets folder of our app). Open means , to
    view the pdf file using Intent. I don't have any problem in using third
    party applications to view pdf file.In the intent i sepcify mimetype , so
    it will list all the pdf viewer installed in his phone. So user can select
    his favorite pdf viewer to view the pdf file which is stored in our
    application
     
    <some-context-instance>.getAssets().open(assetName) will return
    inputstream. That is not wht we need. Thanks for this suggestion
     
    I guess now everything is clear. sorry for my bad English.
     
    Regards,
    Jovish
     
     
    Regards,
    Jovish
     

     

    "Carlos A. M. dos Santos" <unixmania@gmail.com> Oct 30 09:47PM -0200  

    > In our application we are storing few pdf files inside asstes folder(<1MB).
    > Using Intent we want to open that pdf. Is it possible ? If yes, how to do
    > that ?
     
    It's hard to help if you don't provide enough information about your problem.
     
    > What we tried :
     
    > If we copy file from assets to sd card and then try to open using intent it
    > is working.
     
    What are you using to "open" the PDF files? Do you mean "view/display"
    or "read the file". Android does not support PDF natively so I suppose
    that you use either an external application or a PDF rendering
    library.
     
    > But we directly want to open it from assets folder.
     
    Doesn't <some-context-instance>.getAssets().open(assetName) work for you?
     
    --
    "The flames are all long gone, but the pain lingers on"

     

    rauf qureshi <qureshirauf7@gmail.com> Oct 31 10:51AM +0530  

    hello friends,
     
    I am developing listview with customerAdapter which extends baseAdapter,in
    each item of list there is two textview and one check box is there , so i
    want to select one check box at a time but i am unable to do that can any
    body give me solution for that
     
    Thanks in advance

     

    Lili Deng <denglili@gmail.com> Oct 30 09:33PM -0700  

    But why -large qualifier doesn't work well on nexus7?
     
    I am using different layout for portrait and landscape mode on nexus7. If I
    use -sw600dp and -w720dp to tell detect the case, I guess the layout
    defined in -sw600dp will take the precedence over -w720dp even in landscape
    mode according to Android doc, right?
     
    On Monday, October 29, 2012 7:49:16 AM UTC-7, Streets Of Boston wrote:

     

    Kevin Davis <kevin@kevincdavis.net> Oct 30 03:08PM -0500  

    Here you go:
     
    [2012-10-30 15:00:16 - Ambius] ------------------------------
    [2012-10-30 15:00:16 - Ambius] Android Launch!
    [2012-10-30 15:00:16 - Ambius] adb is running normally.
    [2012-10-30 15:00:16 - Ambius] Performing com.rentokil.ambius.MainActivity
    activity launch
    [2012-10-30 15:00:16 - Ambius] Automatic Target Mode: launching new
    emulator with compatible AVD 'Android-test'
    [2012-10-30 15:00:16 - Ambius] Launching a new emulator with Virtual Device
    'Android-test'
    [2012-10-30 15:00:27 - Emulator] emulator: device fd:588
    [2012-10-30 15:00:27 - Emulator] HAX is working and emulator runs in fast
    virt mode
    [2012-10-30 15:00:27 - Emulator]
    [2012-10-30 15:00:32 - Ambius] New emulator found: emulator-5554
    [2012-10-30 15:00:32 - Ambius] Waiting for HOME ('android.process.acore')
    to be launched...
    [2012-10-30 15:01:14 - Ambius] HOME is up on device 'emulator-5554'
    [2012-10-30 15:01:14 - Ambius] Uploading Ambius.apk onto device
    'emulator-5554'
    [2012-10-30 15:01:15 - Ambius] Installing Ambius.apk...
    [2012-10-30 15:01:15 - Ambius] Success!
    [2012-10-30 15:01:15 - Ambius] Starting activity
    com.rentokil.ambius.MainActivity on device emulator-5554
    [2012-10-30 15:01:15 - Ambius] ActivityManager: Starting: Intent {
    act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
    cmp=com.rentokil.ambius/.MainActivity }
     
     

     

    Giuseppe <porcelli.giuseppe@gmail.com> Oct 30 02:24AM -0700  

    Starting SDK 4.1.1 I have continuously the
    error: E/SpannableStringBuilder(1068): SPAN_EXCLUSIVE_EXCLUSIVE spans
    cannot have a zero length
     
    What is it ? How can I remove it from LogCat ?

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

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

[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 15 Topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    TreKing <trekingapp@gmail.com> Oct 30 08:21PM -0500  

    On Tue, Oct 30, 2012 at 6:47 PM, Carlos A. M. dos Santos <
    > library.
     
    > > But we directly want to open it from assets folder.
     
    > Doesn't <some-context-instance>.getAssets().open(assetName) work for you?
     
     
    As you said, reading PDFs is not a native feature and requires an external
    app, which would not have permission to read the PDF from another app's
    Assets folder.
     
    I believe the OP would have to write his own PDF viewer imbedded in his
    app, or stick with the "copy to SDcard then open" strategy.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Sheado <chadata@gmail.com> Oct 30 06:35PM -0700  

    hey peoples,
     
    On 4.0.3 if I start an activity for an ACTION_VIEW (for an http url)
    without an intent chooser then I get the following weird behavior in the
    following order:
     
    1. start browser
    2. my activity: onPause()
    3. my activity: onResume()
    4. my activity: onPause()
    5. at this point the browser is loaded up fine - but my app went through
    an unnecessary (and potentially sluggish) restart
     
    If I use an Intent chooser and pick any browser that comes up, this issues
    doesn't happen (e.g. no weird restart).
     
    Is this an Android bug? I'm not seeing this issue on older versions of
    Android.
     
    Any ideas?
     
    Thanks!
     
    -Chad

     

    Mark Phillips <mark@phillipsmarketing.biz> Oct 30 03:49PM -0700  

    As a newbie, I was wondering if layouts are reusable. For example, say I
    have Activities A and B, and they both have the same layout for the screen.
    So I create Layout L in the file my_layout.xml, which has a Textfield with
    @id+/textfield1 in the layout and it is blank.
     
    In the onCreate() of both Activities A and B, can I have the line
    setContentView(R.my_layout)? Will there be any issues when switching from
    one Activity to the other?
     
    Will I have issues accessing the Textfield with id textfiel1? If the user
    sets the value Activity A and I save it somewhere (say in the Application
    object), then when I display Activity B, textfield1 should be blank. Right?
     
    Other than one less layout file, am I really saving any resources by having
    one layout file?
     
    Or, is it better practice to create two layout files, one for each
    Activity, and to have two unique textfields in these two layouts.
     
    Thanks,
     
    Mark

     

    Mark Phillips <mark@phillipsmarketing.biz> Oct 30 05:08PM -0700  

    Thanks for your response.
     
    What happens to the ids of the elements in the layout? Will I have one id
    for the TextViews in my example, so when I do something to it (change the
    color or text, for example), will all the TextViews in all the layouts
    change? I guess it will not matter on a small screen as there will only be
    one activity at time.
     
    What if I use fragments and have two fragments on the screen at the same
    time with the same layout for each fragment. Then there are two active
    TextViews with the same id....is this an issue? If I change one, will both
    change?
     
    Thanks!
     
    Mark
     

     

    Romain Guy <romainguy@android.com> Oct 30 03:56PM -0700  

    You can reuse XML layouts (just like you can reuse any resource.) When you
    use a layout resource (with setContentView() for instance) it gets
    "inflated." This means the layout is parsed and converted into actual View
    objects. If you reuse the same layout in several activities, you will
    simply create several sets of View objects that all have the same
    characteristics.
     
     
    On Tue, Oct 30, 2012 at 3:49 PM, Mark Phillips
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com

     

    huberte <svend.walter@gmail.com> Oct 30 06:25PM -0700  

    thanks a lot bob, for your answer
     
    Le mardi 30 octobre 2012 12:04:29 UTC-4, bob a écrit :
     
    > Please see the following method in this class:
     
    > *android.graphics.Bitmap*
     
    I did not need this, when programming in eclipse :
     
    ImageView image = (ImageView) findViewById(R.id.imageview);
     
    And voilà, autofit, autosize, autoscale :) and clean image.
     

     
     
    > Note you will probably have to get rid of your WebView approach.
     
    I cant, this time I need to do a web app, beacause of the many teachers
    beta testing, and then using it.
     
    try it
     
    http://www.sciences-physiques.eu/appli/carimage/
     
    you have one image in image and 3 in carimage (carousel)
     
    the result is horrible in the stock browser, not so bad in chrome on my
    sgs2.
     
    why ?

     

    "Carlos A. M. dos Santos" <unixmania@gmail.com> Oct 30 10:16PM -0200  

    > Eu sou novo em desenvolvimento mobile mas estou conseguindo criar meu
    > aplicativo.
     
    The accepted language in this discussion group is English. You will
    not get any help writing in Portuguese,
     
    > esse usário)
    > Tentei utilizar a API twitter4j, mas como sou novo na área, não descobri
    > como fazer.
     
    Please ask in the twitter4j suport forums. Your problem is not related
    to the Android framework neither to the Android SDK.
     
    > Pensei em até redirecionar para URL do usário, mas também não consegui
    > descobrir como redirecionar para uma pagina em JAVA.
     
    You must use an Intent to invoke the browser (or any suitable
    application to do the job).
     
    > Se alguém souber como me ajudar eu fico muito agradecido.
     
    Não espera que eles vão aprender Português só pra te ajudar.
     
     
    --
    "The flames are all long gone, but the pain lingers on"

     

    Daniel <greywanderer012345@gmail.com> Oct 30 05:14PM -0700  

    I have an education app that is small, cheap, but useful. As a developer, I
    advertise that I am a pre-health student myself. I feel that about 1/15 of
    my buyers are likely curious professors who might respond to a donate
    selection in the options list. I don't plan on putting the donate button in
    the way of the app, nor will it unlock any features. I would also be using
    the "In App Products" service to "sell" the donation. However, I am
    wondering whether the Billing permission would drive away as many users as
    I would get donations. Does anyone have any advice for me? Thank you.

     

    bob <bob@coolfone.comze.com> Oct 30 02:28PM -0700  

    Sounds like you want a java.util.Timer
     
     
    On Tuesday, October 30, 2012 2:41:05 PM UTC-5, marcpolo wrote:

     

    Lew <lewbloch@gmail.com> Oct 30 02:46PM -0700  

    bob wrote:
     
    > Sounds like you want a java.util.Timer
     
    http://developer.android.com/reference/java/util/Timer.html
    "This class does not offer guarantees about the real-time nature of task
    scheduling."
    "Prefer ScheduledThreadPoolExecutor<http://developer.android.com/reference/java/util/concurrent/ScheduledThreadPoolExecutor.html> for
    new code."
     
    marcpolo, this illustrates why you should take advice with a grain of salt
    and a
    pound of verification.
     
    'Timer' does not guarantee an exact interval, thus does not solve the OP's
    problem.
     
    marcpolo wrote:
    > public void run()
    > {
    > m_handler.postDelayed(this, (int)m_samplePeriod_ms);
     
    Underscores in variable names violate the Java Coding Conventions, with the
    exception of constant variables.

     
    > Galaxy S3.
     
    > Are there other alternatives? I have tried using a thread but I run into
    > problems when I try to update the UI.
     
    What do you mean "tried using a thread"? Show us the code.
     
    You certainly don't want to put that delay on the GUI thread.
     
    Timing in a non-real-time system is approximate.
     
    --
    Lew

     

    marcpolo <marc.armstrong89@gmail.com> Oct 30 05:10PM -0700  

    Thanks very much for the feedback.
     
    When I mentioned that I used a thread, I meant that I extended the Thread
    class with the run() method being overriden. I'm at home at the moment so
    can't show some code. Basically I would start/stop the thread from a button
    'click' handlers. Inside the Run() method was simply a loop to perform the
    range measurements and sleep for the remainder of the 25ms. This solution
    didn't work because I couldn't update the UI entities from this thread.
    Runnable seems to be the better option for accessing views.
     
    I appreciate that android is not a realtime system but thought that 40Hz
    wouldn't be too difficult to achieve, with the occasional overrun, which
    wouldn't impair my app. I am getting nowhere near this - even when I remove
    the range measurement functionality from the run method.
     
    I'll investigate both the timer and scheduledThreadPoolExecutor.
     
    Thanks again.
     
    Marc

     

    Kristopher Micinski <krismicinski@gmail.com> Oct 30 08:14PM -0400  

    > wouldn't be too difficult to achieve, with the occasional overrun, which
    > wouldn't impair my app. I am getting nowhere near this - even when I remove
    > the range measurement functionality from the run method.
     
    It's not that it's "too difficult to achieve," it's just that for most
    circumstances it's easier and more efficient to schedule with very
    loose timing guarantees. So this isn't really the framework's fault,
    per se, it's more of a "feature" :-)...
     
    kris

     

    "S.T.V. Ingeniería" <ingenieria.stv@gmail.com> Oct 30 07:41PM -0300  

    The problem is that i can't cast my custom EditText to a EditText in my
    adapter. Or, saw it from a diferent point, i can´t place my custom EditText
    in my Layout.
     
    Thanks for answer me anyway.
     
    2012/10/29 Lew <lewbloch@gmail.com>
     
     
    --
     
    *San Francisco - Córdoba - Argentina*
    *CP: 2400*
    *TE: 03564-15561617 - 15599945*

     

    Jan Burse <janburse@fastmail.fm> Oct 31 12:40AM +0100  

    tete schrieb:
    > I want to override the OnKeyPreIme method of a EditText got from a
    > findByView(int id), to make the activitiy finish() when user press back key.
     
    You can override the back key of your activity(*), and make
    the finish call dependent on the focused view, i.e. check
    whether the user is inside the edit text.
     
    Bye
     
    (*)
     
    public void onBackPressed ()
    Added in API level 5
     
    Called when the activity has detected the user's press of the back key.
    The default implementation simply finishes the current activity, but you
    can override this to do whatever you want.
     
    http://developer.android.com/reference/android/app/Activity.html#onBackPressed%28%29

     

    Lew <lewbloch@gmail.com> Oct 30 05:01PM -0700  

    tete wrote:
     
    > adapter. Or, saw it from a diferent point, i can´t place my custom EditText
    > in my Layout.
     
    > Thanks for answer me anyway.
     
    Thanks for not answering me anyway.
     
    How do you expect help without interacting with those trying to help you?
     
    I asked questions. I would be glad to try to help you if you answered them.
    Please
    consider doing so. Since you have refused so far, I am much less glad.
     
    --
    Lew

     

     

    Daniel <greywanderer012345@gmail.com> Oct 30 05:00PM -0700  

    You can sell physical items through any method you want, including paypal.
    You can even sell some part of a service, such as those credits you
    mentioned. The policy is very very clear that the only thing you absolutely
    HAVE to use the "In App Products" service to sell are actual features in
    your app itself. If Blizzard made a WoW app, there could be an option to
    pay your WoW bill from the app (as long as that isn't all the app could
    do). For physical items though, I'd suggest using google checkout. Google
    bots won't be so quick about assuming you're doing something wrong.
    Checkout charges *30% *for* In App Purchases*, but for* physical items *they
    charge* 2.90% + $0.30.*

     

    bob <bob@coolfone.comze.com> Oct 30 03:23PM -0700  

    Well, according to my GIF Animator program, it was encoded to loop
    infinitely.
     
     
    But, it didn't on Android.
     
     
    Using a large number (i.e. 100,000) for the loop count seems to be a good
    enough workaround for now.
     
     
     
    On Monday, October 29, 2012 3:10:02 PM UTC-5, bob wrote:

     

    TreKing <trekingapp@gmail.com> Oct 30 06:10PM -0500  


    > Well, according to my GIF Animator program, it was encoded to loop
    > infinitely.
     
    > But, it didn't on Android.
     
    Here's a tip: if something should work correctly, but doesn't, and you've
    thoroughly debugged your own app, check b.android.com for a possible bug in
    the framework.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Daniel <greywanderer012345@gmail.com> Oct 30 04:30PM -0700  

    Admob and others use the CTR when determining what bids to give your app,
    or to give any at all. If you have a small CTR, all of your users will see
    less ads, and ads with lower bids. As a result, users who are likely to, or
    do click on ads, will see fewer ads, and those they do see and click on are
    more likely to be lower bids.

     

    Iroid <irfan.f.khan@gmail.com> Oct 30 04:10PM -0700  

    Hello Everyone,
    I have to create a custom account in Android that
    will be integrated with Account and Sync framework.
    By default Account Manager caches the Auth token and
    returns the same for all request.
    Is there any way to change this default behavior, I
    do not want Account Manager to cache the token.
    Please let me know.
     
    Thanks in Advance.
     
    Regards,
    Irfan

     

    pushbit <pushbit@gmail.com> Oct 30 03:36PM -0700  

    I'm having a problem where an EditText in landscape/full screen mode
    becomes empty after turning the screen off and then on when the system
    Screen lock is set to 'None'. The keyboard remains active, but it doesn't
    appear to have focus and no text updates are displayed on the screen. If I
    press 'Done' or rotate to portrait, then the full screen editor is removed
    and I can see the previously entered text in the normal EditText view. I'm
    reproducing this on JB on both the emulator and a device.
     
    I found the same problem in Calendar, but not in Messaging. When editing
    an SMS message in landscape/full screen mode and then turning the screen
    off/on, at first the message appears to be empty, but then it returns after
    a second. I reviewed the source code below, but I didn't see anything
    special in onResume() that looked to be addressing this issue.
     
    https://github.com/android/platform_packages_apps_mms/blob/master/src/com/android/mms/ui/ComposeMessageActivity.java
     
    Does anyone know how to properly fix this, so that when Screen lock is
    'None' you can edit text in landscape/full screen mode, turn the screen off
    and then back on, and the text is displayed just as you left it?
     
    Thanks,
    pb
    ----
    Open Source Android App
    Dining Out (with friends)<https://play.google.com/store/apps/details?id=net.sf.diningout>

     

    pushbit <pushbit@gmail.com> Oct 31 12:01AM +0100  

    Yes, the EditText has an android:id. I've found this problem with a
    variety of EditText and AutoCompleteTextView configurations, but only when
    the system Screen lock setting is set to 'None'. Everything works fine
    when it's set to Slide or Pattern, so I suspect that the lack of a screen
    lock is the source of this problem. Though if possible, I would like to
    find a way to work around this, as the Message app seems to be able to do.
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Oct 31 02:18AM +0400  

    I think you should be able to retrieve the icons from the network
    ahead of time / on demand, save to disk, and serve as content:// type
    URIs in the column you mentioned (this can work on Android 2.2 and
    higher).
     
    Another way: the framework's SearchRecentSuggestionsProvider uses an
    "android.resource://system" type URI, so you might be able to do this
    as well, for a fixed set of most often used icons, using a
    "resource://" URI that references your package.
     
    -- K
     

     

    John Coryat <coryat@gmail.com> Oct 30 02:20PM -0700  

    More info:
     
    By recording the GCM API Key: "Key for browser apps (with referers)" the
    project number itself is recorded. Most likely, the developer console is
    using the browser key to verify and retrieve the project Id for statistics.
    Makes sense.
     
    Perhaps the documentation in the developer's console could be improved to
    include this bit.
     
    -John Coryat

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

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

[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 13 Topics

Comments: (0)

Group: http://groups.google.com/group/android-developers/topics

    tma <tmall@telus.net> Oct 30 09:46AM -0700  

    Greetings,
     
    I am wondering if there is a way to check moderator approval
    status? I joined this group a few days ago but still haven't seen my first
    post appear on the list. I wonder what the typical wait time is? I imagine
    there are many members in this group and it is understandable that it may
    take a while.
     
    tma

     

    Kristopher Micinski <krismicinski@gmail.com> Oct 30 01:20PM -0400  

    Usually only messages from new users are moderated, I would check back
    to see if your message has appeared by searching through the group's
    history and then resending if it hasn't appeared in a day or so.
     
    kris
     

     

    tma <tmall@telus.net> Oct 30 10:23AM -0700  

    I guess I am approved as this message was posted immediately.
    Seems like my first posting must have gone to the bit bin.
     
     
    On Tuesday, October 30, 2012 9:46:14 AM UTC-7, tma wrote:

     

    TreKing <trekingapp@gmail.com> Oct 30 02:47PM -0500  


    > Seems like my first posting must have gone to the bit bin.
     
     
    Usually we get a flood of 50 or more messages every couple days -
    apparently when the moderators catch up and hit "Approve All" or something.
    So it's probably sitting in that queue, waiting for the flood gates to
    open, but it can't hurt to re-post.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Kevin Davis <kevindavis338@gmail.com> Oct 30 12:14PM -0700  

    Hi there,
     
    When I try to run my android app in the eclipse emulator, I get the
    following message: Unfortunately, the application has stopped...
     
    Here is the java code:
     
    package com.rentokil.ambius;
     
    import android.os.Bundle;
    import android.app.Activity;
    import android.view.Menu;
    import android.content.Context;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.AdapterView;
    import android.widget.BaseAdapter;
    import android.widget.Gallery;
    import android.widget.ImageView;
    import android.widget.TextView;
    import android.widget.AdapterView.OnItemSelectedListener;
     
     
    public class MainActivity extends Activity {
     
    TextView myIntro;
    TextView mySelection;
    Gallery myGallery;
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    myIntro = (TextView) findViewById(R.id.myIntro);

    mySelection = (TextView) findViewById(R.id.mySelection);

    myGallery = (Gallery) findViewById(R.id.myGallery);

    myGallery.setAdapter(new ImageAdapater());

    myGallery.setOnItemSelectedListener(new OnItemSelectedListener() {
     
    public void onItemSelected(AdapterView<?> parent, View v,
    int position, long id) {
    mySelection.setText(" selected option: " + position );

    }
     
    public void onNothingSelected(AdapterView<?> parent) {
    mySelection.setText("Nothing selected");

    }
     
     
    });
    }




     
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
    }
    }
     
     
    and here is the xml code:
     
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
    android:id="@+id/myIntro"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#ff000000"
    android:text="Welcome to Ambius"
    android:textColor="#ffffffff"
    android:textSize="15dp"
    android:textStyle="bold"
    android:typeface="sans" />
     
    <TextView
    android:id="@+id/mySelection"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="20dp" android:textStyle="bold"/>
    <Gallery
    android:id="@+id/myGallery"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="bottom"

    />

     
    </LinearLayout>
     
     
    Thank you,
    Kevin Davis

     

    TreKing <trekingapp@gmail.com> Oct 30 02:16PM -0500  


    > When I try to run my android app in the eclipse emulator, I get the
    > following message: Unfortunately, the application has stopped...
     
     
    Can you at least post a stack trace? Providing code and no explanation will
    get you nowhere.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Josphat Muchiri <jmuchiri27@gmail.com> Oct 30 12:23PM -0700  

    @treking-thats not the right way to adress better keep quiet
     

     

    TreKing <trekingapp@gmail.com> Oct 30 02:42PM -0500  


    > @treking-thats not the right way to adress better keep quiet
     
     
    If you have a better way to "adress" a post that provides no details, then
    please, show me.
     
    Otherwise, how about *you* keep quiet if you have nothing to contribute to
    the issue at hand?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    marcpolo <marc.armstrong89@gmail.com> Oct 30 12:41PM -0700  

    Hi,
     
    I'm developing an application to perform range measurements at 40Hz and
    display them on a UI.
     
    To achieve this I have created a Runnable class to perform each cycle and I
    post to the message queue using the postDelay command to schedule the next
    command for 25ms. My run method is as follows.
     
    @Override
    public void run()
    {
    m_handler.postDelayed(this, (int)m_samplePeriod_ms);
    displayRangeData();
    }
    My timing measurements have shown that around half of the time the run
    method gets executed at 25ms intervals, whereas the rest are typically
    around 29-32ms.
     
    Is there a way to increase the priority of the Runnable thread so that I
    can achieve a consistent 40Hz?
     
    Am I being unrealistic in my expectations? I am running on a Samsung Galaxy
    S3.
     
    Are there other alternatives? I have tried using a thread but I run into
    problems when I try to update the UI.
     
    Thanks in advance.

    Marc.

     

    Satya Komatineni <satya.komatineni@gmail.com> Oct 30 03:40PM -0400  

    Examples of fragment dialogs look like this
     
    SomeActivity
    {
    public void buttonClicked(View someView)
    {
    DialogFragment newFragment = new DatePickerFragment();
    newFragment.show(getFragmentManager(), "timePicker");
    }
    public static class DatePickerFragment extends DialogFragment(){ .... };
    }
     
     
    If you have a compound control extending a layout like a linear layout
    how do you isolate this to the view? how do you get a
    "fragmentManager" from the bowels of a view? or do you pass that to
    the view explicitly?
     
    Thank you very much for your help
    Satya

     

    John Gaby <jgaby@gabysoft.com> Oct 30 09:15AM -0700  

    I also have a small number of users who fail the LVL test (< 1%). My
    solution is to have my app call my website first to ask if it should do the
    LVL test. That way, if a user contacts me that it is not working I can set
    it up so that his device no longer performs the check. I actually
    implemented this from the very beginning, because the whole LVL test
    worried me and I wanted to have a way to override the check if, for some
    reason, it failed to work. As it turned out, I am glad I did.

     

    Pent <support@apps.dinglisch.net> Oct 30 11:40AM -0700  

    > To bring this back on topic, has anyone who has experience with LVL, in a
    > NON in-app purchase way, just felt it was a waste of time and stopped using
    > it?
     
    Yes, used it for 2 years but gave up in the summer due to problems
    since spring.
     
    >  I am starting to feel this way as one of the most frequent emails I
    > get regarding support is that the LVL check failed when they just purchased
    > the app.
     
    Yep, plus it's just too embarrassing new customers having to deal with
    licensing problems. No response from Google (naturally).
     
    Pent

     

    Jay Howard <jhoward@alumni.utexas.net> Oct 30 10:09AM -0500  

    Thanks so much for the response! If you'll indulge me with a few more
    questions...
     
    So I instantiate the handler in the onCreate() method of my Application,
    which I assume means it's tied to the UI thread.
     
    The method that removes and re-sends messages is called primarily on the UI
    thread, but can also be called from an IntentService that I use to handle
    network communication. Since the service is executed by a thread other
    than the UI thread it appears that I do need to synchronize.
     
    To give some more detail on my goals for this: I'm attempting to use the
    handler to track both user inactivity and server session expiration. The
    Service calls a "session refreshed" method to remove session-related
    delayed messages and re-add them with a new delay. The UI thread calls an
    "user activity occurred" method to indicate the user "did something"; that
    method removes inactivity-related delayed messages and re-adds them with a
    new delay.
     
    One other kink: I also have code to respond to SCREEN_ON and SCREEN_OFF.
    At screen off I remove all messages from the handler; at screen on I
    re-send each message that was queued at the point at which screen off
    occurred, albeit with a revised delay to account for the time that elapsed
    while the screen was off.
     
     
    On Tue, Oct 30, 2012 at 9:43 AM, Streets Of Boston

     

    Jay Howard <jhoward@alumni.utexas.net> Oct 30 01:35PM -0500  

    Here's what I ended up doing:
     
    1. Ensure that my timer class, which creates a Handler in its <init> method
    on the caller's thread, is always instantiated on the main thread.
    2. My class is also a BroadcastReceiver, but onReceive() is guaranteed to
    be called by the main thread so it can access the handler directly.
    2. Structure each external method that accesses the handler (and that could
    potentially be called from multiple threads) as follows:
     
    private void doSomethingWithHandlerSync() {
    // access the handler directly
    }
     
    public void doSomethingWithHandler() {
    if (Thread.currentThread().equals(mHandler.getLooper().getThread())) {
    doSomethingWithHandlerSync();
    } else {
    mHandler.post(new Runnable() {
    @Override
    public void run() {
    doSomethingWithHandlerSync();
    }
    });
    }
    }
     
    Does that thread check look right? Seems like it should be sufficient to
    guarantee that doSomethingWithHandlerSync(), handleMessage() and
    onReceive() will never execute concurrently.
     
     

     

    Streets Of Boston <flyingdutchie@gmail.com> Oct 30 12:03PM -0700  

    Yep, that looks good.
     
    Strictly, it is not necessary to do the 'if (...)' statement at all. You
    can just always do the mHandler.post(...) instead.
     
    On Tuesday, October 30, 2012 2:39:24 PM UTC-4, Jay Howard wrote:

     

    RichardC <richard.critten@googlemail.com> Oct 30 11:21AM -0700  

    Manual Updates can be (are usually) because the permission for the App has
    changed so you need to check if you want the App to update with the new
    permissions.
     
    On Tuesday, October 30, 2012 3:01:06 PM UTC, saex wrote:

     

    Kristopher Micinski <krismicinski@gmail.com> Oct 30 01:45PM -0400  


    > Register-based access tends to be faster than stack-based if the right
    > values are passed via
    > registers.
     
    Lew is correct,
     
    But as far as actual VMs go, the differences are more cosmetic than
    anything these days, as Dalvik's JIT will change things somewhat.
    Furthermore, even when you're running under the interpreter, the
    'register based' mapping in Dalvik is really only ever an offset from
    the beginning of a stack frame anyway.
     
    As an Android programmer you don't really need to worry about this at
    all, you will never see it, it's all handled by the Android toolchain
    (which takes a class based Java file and transforms it into a register
    based Dalvik file).
     
    (If you're writing a compiler, a stack based VM is dead simple to
    generate code for.., a register based VM is not much more work, but
    usually you do some static analysis and optimization to correctly
    place registers which are in use at the same time..)
     
    kris

     

    Pedro Cortez <pedro.fellipe.cortez@gmail.com> Oct 30 03:41PM -0200  

    HI, can you help me to create a proper credentials? Because i did
    everything that they said and still not work. I always get this error
    : E/Zygote(15498): java.io.IOException: Operation not permitted
     
     
     
    --
    att,
    Pedro Cortez

     

    bob <bob@coolfone.comze.com> Oct 30 08:17AM -0700  

    "If your app is done in API 11 or higher, in the < application /> in the
    Android Manifest.xml, you can use *largeHeap="true"* which will allow the
    application to use more heap if it is available."
     
     
     
    On Tuesday, October 30, 2012 9:45:41 AM UTC-5, new_android_dev wrote:

     

    new_android_dev <bilal703@gmail.com> Oct 30 09:51AM -0700  

    My min is API 8, but for some lower end devices this will not work.
     
    On Tuesday, 30 October 2012 15:17:26 UTC, bob wrote:

     

    huberte <svend.walter@gmail.com> Oct 30 08:24AM -0700  

    Trying to load http://www.sciences-physiques.eu/appli/oneimage/ both in iOS
    and Android (SGS2).
     
    Image is 1600*2262
     
    The result is a better image on iOS. I know android can do better, because
    I had an application with such big image downsized, and the text was
    "clearer".
     
    I red a lot about adding some code in css, but it seems that it does not
    apply to webkit
     
    Here are the screenshots :
     
    http://tof.canardpc.com/show/9144d047-0aaf-4906-9c96-1a991112f9fc.html
     
    http://tof.canardpc.com/show/36008198-e6ef-4b02-820b-fe2ca8b8df1c.html
     
    The code is :
     
    <!DOCTYPE HTML><html manifest="" lang="en-US"><head>
    <meta charset="UTF-8">
    <title>carimage</title>
    <style type="text/css">
    img { width: 100%; }
    html, body {
    height: 100%;
    background-color: #1985D0
    }
    </style>
    <body>
    <img src="1.png" />
    </body></html>
     
    just that you know, if I put max-width instead of width, the result is worse than with only the "width" attribute
     
    Because I'll have physics, chemistry, math and for good rendering I use Latek. So I have to use image. On Android my pupils say I could use something better than a bad scanner. On iOS they say it's like in their books...
     
    Thanks a lot !

     

    bob <bob@coolfone.comze.com> Oct 30 09:04AM -0700  

    Please see the following method in this class:
     
    *android.graphics.Bitmap*
     
    public static Bitmap *createScaledBitmap* (Bitmap src, int dstWidth, int
    dstHeight, boolean filter)
    Added in API level 1
    Creates a new bitmap, scaled from an existing bitmap, when possible. If the
    specified width and height are the same as the current width and height of
    the source btimap, the source bitmap is returned and now new bitmap is
    created.
    Parameters
    src
    The source bitmap.
    dstWidth
    The new bitmap's desired width.
    dstHeight
    The new bitmap's desired height.
    filter
    true if the source should be filtered.
    Returns
     
    The new scaled bitmap or the source bitmap if no scaling is required.
     
     
    I bet when you set filter to true, it will look kind of like iOS. When
    it's false, I bet it looks bad like on your Android now.
     
    Note you will probably have to get rid of your WebView approach.
     
     
     
     
    On Tuesday, October 30, 2012 10:24:26 AM UTC-5, huberte wrote:

     

You received this message because you are subscribed to the Google Group android-developers.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

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