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

Comments: (0)

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

    DroidMaster <lyseng.taing@gmail.com> Jan 31 05:25PM -0800  

    Dear Experts,
     
    I have developed an application which is only intended for Jelly Bean ( not
    ICS ). Is it anyway for Google Play to prevent ICS device from download my
    application?
     
    If the same device has the with a different OS ; I know there is a way to
    filter by device id.
     
    What are the work around on Application or Google Play? I think that if the
    work around on application side , the user still be able to download the
    app, but they just can not run.
     
     
    Thanks in advance,

     

    antasis9 <antasis9@gmail.com> Jan 31 06:47PM -0800  

    You can specify minSdkVersion & maxSdkVersion to AndroidManifest.xml.
     
    If a user device's sdk version is less than minSdkVersion or bigger than
    maxSdkVersion, Google Play shows alert string to user, "you can't
    download.. blah blah".
     
    There is detail information.
    http://developer.android.com/tools/publishing/versioning.html
     
    GL to you.
     
    2013년 2월 1일 금요일 오전 10시 25분 54초 UTC+9, DroidMaster 님의 말:

     

    dashman <erjdriver@gmail.com> Jan 31 06:04PM -0800  

    this is the onDraw method for my View sub-class
     
    drawCross() is a simple method that draws a cross.
     
    shouldn't this code result in overlapping crosses.
     
    trying to understand the translate method.
     
     
    drawCross( canvas, 200, 400 ); // no transformations

    Matrix m = new Matrix();
     
    m.setTranslate( 200, 400 );

    canvas.setMatrix(m);

    drawCross( canvas, 0, 0 );
     
    in my case - the 2nd cross is being drawn about 100 px above
    the first. same x.

     

    Romain Guy <romainguy@android.com> Jan 31 06:18PM -0800  

    Calling setMatrix() will override the existing transforms set on the
    Canvas. The Canvas passed to View.onDraw() may already have transforms set
    to draw in the correct location. Instead of using setMatrix(), using
    Canvas.translate(), Canvas.scale(), etc. Don't forget to use Canvas.save()
    and restore().
     
     
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com

     

    dashman <erjdriver@gmail.com> Jan 31 05:19PM -0800  

    As I delve into the Canvas class - here's my first of many questions
     
    I've got a sub-class and handling onDraw()
     
    why does canvas.getWidth()/getHeight() return the full dimensions of
    the device screen.
     
    whereas canvas.getClipBounds() returns a more accurate dimensions of
    the canvas view.
     
    How do I get an accurate dimension of the viewable screen area - not
    dependent on the clip rect.

     

    Romain Guy <romainguy@android.com> Jan 31 05:25PM -0800  

    Canvas.getWidth/getHeight() return the size of the Canvas. The dimension of
    the Canvas is decided by the caller of your draw() method. It would be
    legitimate for instance for every View to use a different Canvas (which is
    actually what happens when hardware acceleration is enabled.)
     
    The dimensions you should care about are View.getWidth/getHeight and
    Canvas.getClipBounds.
     
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com

     

    Prabu Siabuabu <prabudork@gmail.com> Jan 31 05:12PM -0800  

    hi guys, i want to ask how to store path of the images on SQLite db??
    because i was googling about how to store image direct to SQLite and it's a
    very tricky way, and i wonder, is it possible just to store the path of
    images and retrieving all of them? if yes, would you please guys show me
    the code? i'm almost running out of time to finish my final assignment..
    thanks in advance..

     

    bob <bob@coolfone.comze.com> Jan 31 03:09PM -0800  

    Is it possible to pass an open Bluetooth socket from one Activity to
    another?
     
     
    I guess I'm somewhat confused about what activities can and cannot pass.
     
     
    Thanks.

     

    Lew <lewbloch@gmail.com> Jan 31 03:13PM -0800  

    bob wrote:
     
    > Is it possible to pass an open Bluetooth socket from one Activity to
    > another?
     
    > I guess I'm somewhat confused about what activities can and cannot pass.
     
    I don't know if it's possible, but if so it's almost certainly a bad idea.
     
    Once more than one component has a socket open, it becomes orders of
    magnitude
    harder to manage socket state.
     
    A better approach is to have a single manager interact with the resource
    directly,
    and act as a concierge or dispatcher for service requests from the resource.
     
    --
    Lew

     

    Kristopher Micinski <krismicinski@gmail.com> Jan 31 07:50PM -0500  

    When you think about what you can send between activities, think to
    yourself "can I serialize this data to a text file and send it to
    another process?" In this case, you really can't do that, because you
    can't serialize references (generally..).
     
    You should not be doing this, a lightweight solution is to put this in
    the global context:
    http://stackoverflow.com/questions/12264678/intent-and-parcelable-object-android
     
    Instead, it is advisable to have a service mediate access to the
    socket: you write something like an `IntentService` which accepts
    "command" intents, (perhaps backed by a content provider), and then
    run the commands and hand the data back: communicating using an AIDL
    interface.
     
    Kris
     

     

    a1 <arcone1@gmail.com> Jan 31 02:20PM -0800  

    > current locale (and I agree, that looks like a big PITA unless you're
    > supporting just a single or a few languages)
     
    > It's usually done offline (see BMFont
    http://www.angelcode.com/products/bmfont/ and other similar tools).
     
    --
    Bart

     

    bob <bob@coolfone.comze.com> Jan 31 02:58PM -0800  

    I have something for Mac called bmGlyph, which is pretty good. But, I
    haven't written the OpenGL code for loading those yet.
     
     
     
    On Thursday, January 31, 2013 4:20:25 PM UTC-6, a1 wrote:

     

    Ian Ni-Lewis <ilewis@google.com> Jan 31 02:56PM -0800  

    Kristopher is right that socket programming isn't really an
    Android-specific topic. We try to produce samples that won't duplicate
    information you could find elsewhere. Might be reasonable to have a sample
    on "how to move your network code off of the UI thread," though. Android
    provides a rich set of classes that help with this, but it can be hard for
    a newcomer to figure out which APIs to use when.
    Ian
     
    On Thursday, January 31, 2013 1:04:57 PM UTC-8, bob wrote:

     

    Kostya Vasilyev <kmansoft@gmail.com> Jan 31 10:08AM -0800  

    I see this in every app with theme switching, mine included.
     
    My guess is that when Android performs an activity launch "from nothing",
    it runs the launch animation using whatever theme is specified in the
    manifest, before any of the app's code is executed.
     
    You can easily test this by setting a title for your activity in the
    manifest, and then setting a different one in your onCreate. You should see
    the title change (flash) after the animation completes.
     
    It works differently in Chrome, where the launch animation has the "recent
    sites" tiles (Chrome does not have a light/dark theme, but we're talking
    about being able to control the launch animation).
     
    I believe the reason for this is they handle the back key and use
    moveTaskToBackground rather than letting the activity get destroyed.
     
    Again, easy to test: 1) kill Chrome in the app manager, relaunch, watch the
    first launch animation after that, it'll be just white without the "recent
    sites" tiles 2) press Back in Chrome, use "adb shell dumpsys activity
    activities" and you'll see the main Chrome activity in state=STOPPED, not
    destroyed.
     
    And actually, it looks like it's not just Chrome.... DialtactsActivity.java
    (in Contacts):
     
    @Override
    public void onBackPressed() {
    if (mInSearchUi) {
    // We should let the user go back to usual screens with tabs.
    exitSearchUi();
    } else if (isTaskRoot()) {
    // Instead of stopping, simply push this to the back of the
    stack.
    // This is only done when running at the top of the stack;
    // otherwise, we have been launched by someone else so need to
    // allow the user to go back to the caller.
    moveTaskToBack(false);
    } else {
    super.onBackPressed();
    }
    }
     
    The tradeoff is of course a somewhat higher memory usage, and potentially
    emails from users asking "why does your activity keep running, it's really
    affecting my battery and has been proven to cause baldness and insomnia".
     
    -- K
     
    On Thursday, January 31, 2013 8:35:32 PM UTC+4, Pent wrote:

     

    lselwd <webmaster@poliscarhire.com> Jan 31 04:17AM -0800  

    !ENTRY org.eclipse.ui 4 0 2013-01-31 14:12:01.562
    !MESSAGE Unhandled event loop exception
    !STACK 0
    org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTError: No
    more handles
    at
    org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
    at
    org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:77)
    at
    org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:106)
    at
    org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:308)
    at
    org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:322)
    at
    org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:608)
    at
    org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:613)
    at
    org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52)
    at
    org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:560)
    at
    org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:531)
    at
    org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:105)
    at
    org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:61)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
    at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1447)
    at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2328)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4572)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
    at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
    at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3129)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3753)
    at
    org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at
    org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at
    org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at
    org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at
    org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at
    org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at
    org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at
    org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
    Caused by: org.eclipse.swt.SWTError: No more handles
    at org.eclipse.swt.SWT.error(SWT.java:4387)
    at org.eclipse.swt.SWT.error(SWT.java:4276)
    at org.eclipse.swt.SWT.error(SWT.java:4247)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Control.createHandle(Control.java:704)
    at org.eclipse.swt.widgets.Label.createHandle(Label.java:199)
    at org.eclipse.swt.widgets.Control.createWidget(Control.java:744)
    at org.eclipse.swt.widgets.Control.<init>(Control.java:112)
    at org.eclipse.swt.widgets.Label.<init>(Label.java:101)
    at
    org.eclipse.ui.texteditor.StatusLineContributionItem.fill(StatusLineContributionItem.java:182)
    at
    org.eclipse.jface.action.SubContributionItem.fill(SubContributionItem.java:59)
    at
    org.eclipse.jface.action.StatusLineManager.update(StatusLineManager.java:327)
    at
    org.eclipse.ui.internal.WorkbenchPage.updateActivations(WorkbenchPage.java:270)
    at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:248)
    at
    org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:168)
    at
    org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:190)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at
    org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:188)
    at
    org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:163)
    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
    org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    ... 129 more
     
     
    On Wednesday, January 30, 2013 7:25:44 PM UTC+2, lselwd wrote:

     

    Zsolt Vasvari <zvasvari@gmail.com> Jan 30 11:40PM -0800  

    You have to use a shared user ID. Read the Android docs for details.
     
    On Thursday, January 31, 2013 2:37:37 PM UTC+8, samuel wrote:

     

    TreKing <trekingapp@gmail.com> Jan 31 01:41AM -0600  


    > i would like to use this database in another application for searching
    > and displaying the results. Do suggest any solutions.
     
     
    What exactly are you asking? You already have the database file, so write
    code to search it and display the results.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Zsolt Vasvari <zvasvari@gmail.com> Jan 30 11:39PM -0800  

    I don't know the answer to your question, but if your app is a newly
    developed one, I wouldn't worry about supporting Android 2.2 at this point
    in time.
     
     
    On Wednesday, January 30, 2013 7:35:40 AM UTC+8, saex wrote:

     

    Artak Kalantarian <artak@burlymarmot.com> Jan 30 11:37PM -0800  

    I am able to plug in a flash drive to Nexus 7 using an OTG cable.
     
    I am also able to enumerate the device and get an Endpoint.
     
    What do I need to do from there to write a file to the device or read
    the files? Do I need to implement the file system myself? Are there
    any libraries available to help with that?
     
    Thank you,
     
    Artak

     

    Zsolt Vasvari <zvasvari@gmail.com> Jan 30 11:35PM -0800  

    Hi, I don't know.... But unless you have millions of downloads, having an
    ad-supported app is really bad idea as far as revenue prospects are
    considered.
     
    On Thursday, January 31, 2013 1:01:32 AM UTC+8, Amel Jose 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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

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

Comments: (0)

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

    bob <bob@coolfone.comze.com> Jan 31 01:04PM -0800  

    I was looking at the samples for Android, hoping to find an example of a
    TCP Socket client.
     
     
    However, I was unable to. I think it would be especially nice to have this
    now that we shouldn't be using the UI thread.
     
     
    Am I missing something or is there no such sample?
     
     
    Thanks.

     

    Kristopher Micinski <krismicinski@gmail.com> Jan 31 04:36PM -0500  

    You were never supposed to be using the UI thread (apps that were
    doing it were just written incorrectly).
     
    Socket communication really has nothing to do with Android, which is
    why there isn't a sample. Instead you can google "java socket
    programming" and find a bit about it,
     
    Kris
     
     

     

    Lucas Diego <diegolucasb@gmail.com> Jan 31 05:05PM -0300  

    Ok, so...
    what I did to avoid (or at least try to) user send sms, was to show users a
    message by the moment they send the sms. Basically, the messagem says that
    it is aganist the company's rules and they (users) are not suppose to do
    that. Well.. I think it is gonna decrease the amount of sms which is sent
    nowadays by them.
     
    Kris, what about incoming calls? It follows the same rules of SMS?
    am I able to programmatically answer and finish them?
     
    Thank you guys.
     
     
     

     

    Lucas Diego <diegolucasb@gmail.com> Jan 31 06:02PM -0300  

    Yeah I've seen and tried it already...
    The problem is that, it doesn't work on android 2.3.7 or up
    On 31 Jan 2013 17:32, "Kristopher Micinski" <krismicinski@gmail.com> wrote:
     
    A google search on "android stop call programmatically" gives this:
     
    http://stackoverflow.com/questions/1083527/how-to-block-calls-in-android
     
    kris
     
    > Ok, so...
    > what I did to avoid (or at least try to) user send sms, was to show users
    a
    > wrote:
     
    >> On top of what Kristopher says: a custom launcher also does not prevent a
    >> user from installing another launcher or restore the default launcher.
    It's
    >> a bit hackish to enforce these company policies based on a user space
    app.
     
    >> You either need to create your custom firmware, which isn't that bad of
    an
    >> option because you are developing for a closed, controlled environment.
    And
    >> / or your client should negotiate with the mobile phone service provider
    and
     
    >>> Hi everybody,
     
    >>> I have been developping a launcher for a company in order to prevent
    >>> users (from this company of course) from doing some actions on the
    phone,
    >>> So, I'd like to know how can I prevent user from sending sms text.
    >>> After seaching it, all I have found is people saying that it is not
    >>> possible. Well, I refuse to believe that. I think it's gotta be a way
    to do
    >>> Log.i("LAUNCHER",
    >>> cur.getString(cur.getColumnIndex("callback_number")));
    >>> Log.i("LAUNCHER",
    cur.getString(cur.getColumnIndex("read")));
    >>> Log.i("LAUNCHER",
    cur.getString(cur.getColumnIndex("type")));
    >>> Log.i("LAUNCHER",
    cur.getString(cur.getColumnIndex("body")));
    > To unsubscribe from this group and stop receiving emails from it, send an
    > email to android-developers+unsubscribe@googlegroups.com.
    > For more options, visit https://groups.google.com/groups/opt_out.
     
    --
    --
    You received this message because you are subscribed to the Google
    Groups "Android Developers" group.
    To post to this group, send email to android-developers@googlegroups.com
    To unsubscribe from this group, send email to
    android-developers+unsubscribe@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 unsubscribe from this group and stop receiving emails from it, send an
    email to android-developers+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

     

    Kristopher Micinski <krismicinski@gmail.com> Jan 31 04:30PM -0500  

    Again: this *should not* be possible to do. Fundamentally, on the app
    level, you should not have control over this kind of functionality.
     
    The relevant Google bug report is here:
     
    https://code.google.com/p/android/issues/detail?id=15022
     
    But it is marked as closed. The basic story is: don't try to use
    system level APIs.
     
    kris
     

     

    Kristopher Micinski <krismicinski@gmail.com> Jan 31 04:35PM -0500  

    (Though you can apparently still watch the incoming call log and kill
    calls, I see this as a bug in the Android framework, but you're free
    to use as you wish...)
     
    kris
     
    On Thu, Jan 31, 2013 at 4:30 PM, Kristopher Micinski

     

    Goncalo Oliveira <goncalo@minkan.net> Jan 31 05:31PM  

    Nope, that doesn't help :S
    Same radio log...
     
    I tried setting a default network with an invalid APN ( like ... ), as this
    made the other SIM card (with the new APN) to work on the other device, but
    the result is even worse. The other device recognizes ... as an invalid APN
    and does nothing. Samsung just tries to connect... result... constant
    outgoing traffic...
     
    I'm just stumped with this. If I can't find a workaround for this, I'll be
    stuck with getting regular unrestricted 3g SIM cards... :s
    Any thoughts?
     
     
     
    --
    Gonçalo Oliveira

     

    Robert Greenwalt <rgreenwalt@google.com> Jan 31 09:48AM -0800  

    Take a bugreport.
    Search for "SERVICE com.android.phone/.TelephonyDebugService"
    look within it's output for "mAllApns size" and below that is a list of
    APN's for your SIM. See if one matches the mms one you entered.
     
    If your apn is listed with mms in the type field (right before IPV4V6),
    then I don't know what's wrong.
     
     

     

    Goncalo Oliveira <goncalo@minkan.net> Jan 31 07:15PM  

    Is apn type case sensitive? I can't type the APN type in Galaxy note, I can
    only choose "Internet", "Internet + MMS" or "MMS". Though, if I choose
    "Internet + MMS"
    I get this in the logs
     
    2104 D GSM : [GsmDCT] createApnList: X result=[[ApnSettingV2] fceu,
    1352, 26803, fceu.prtop, , , , , , -1, default | supl | mms, IP, IP, true,
    0]
     
    However, if I choose MMS, I get this instead
     
    2104 2104 D GSM : [GsmDCT] createApnList: X result=[[ApnSettingV2]
    fceu, 1352, 26803, fceu.prtop, , , , , , -1, MMS, IP, IP, true, 0]
     
    Other than that, I don't know what else I can do... :s
     
     
     
     
    --
    Gonçalo Oliveira

     

    Robert Greenwalt <rgreenwalt@google.com> Jan 31 01:05PM -0800  

    It's not supposed to be case sensitive, though there was a bug a while back
    where it was. I'd be doubly surprised if samsung made the change from
    typing to a dropdown, used different cases on the two options and made the
    code case sensitive so their ui change would fail testing.
     
    Apparently they changed more things and I can't guess what's happening
    under the hood.
     
    Sorry about the problems.
     
     

     

    prudhvi p n v <prudhviraju1987@gmail.com> Feb 01 01:59AM +0530  

    hi everyone,
     
    i am parsing html page into webview page in android. for this case ,i was
    using html parser. so please download the html parser 1.6 jar while
    executing the code
     
    The error i was facing is :
    responseBody cannot be resolved to a variable
     
    can anyone solve this error..
     
     
    this is my code
     
    layout page
    ---------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <WebView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webView1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    />
     
    activity page
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    package com.android.pnr;
     
    import java.util.ArrayList;
    import java.util.List;
    import org.apache.http.protocol.HTTP;
    import org.htmlparser.Parser;
    import org.htmlparser.filters.TagNameFilter;
    import org.htmlparser.util.NodeList;
     
    import android.R.string;
    import android.app.Activity;
    import android.app.Dialog;
    import android.os.Bundle;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;
     
     
     
    public class MainActivity extends Activity {
    WebView webview;
    List allTables;
    Dialog dialog;
     
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    webview = (WebView) findViewById(R.id.webView1);
    webview.setWebViewClient(new WebViewClient());
    webview .getSettings().setJavaScriptEnabled(true);
    webview .getSettings().setDomStorageEnabled(true);
    webview.loadUrl("http://www.indianrail.gov.in/pnr_Enq.html");
     
    Parser parser=Parser.createParser(responseBody, HTTP.UTF_8);
    NodeList nl = parser.parse(null);
    NodeList tables = nl.extractAllNodesThatMatch(new
    TagNameFilter("table"),true);
    CharSequence error1="FLUSHED PNR / PNR NOT YET GENERATED";
    CharSequence error2="Following ERROR was encountered in your Query
    Processing";
    CharSequence error3="Please Try Again";
    CharSequence error4="Facility Not Avbl due to Network Connectivity
    Failure.";
    for(int i=0;i<tables.size();i++) {
     
     
    if(tables.elementAt(i).toPlainTextString().contains(error1)||tables.elementAt(i).toPlainTextString().contains(error2)||tables.elementAt(i).toPlainTextString().contains(error3)||tables.elementAt(i).toPlainTextString().contains(error4)){
    dialog.dismiss();
    return ;
    }
    {
    List table=new ArrayList();
    List rows;
    List columns;
    NodeList nodes = tables.elementAt(i).getChildren();
    NodeList trs = nodes.extractAllNodesThatMatch(new
    TagNameFilter("tr"),true);
     
    rows=new ArrayList();
    for(int j=0;j<trs.size();j++){
    NodeList trnodes = trs.elementAt(j).getChildren();
    NodeList tds = trnodes.extractAllNodesThatMatch(new
    TagNameFilter("td"),true);
    columns=new ArrayList<Object>();
    for(int z=0;z<tds.size();z++){
     
    if(tds.elementAt(z).toPlainTextString().contains(error1)||tds.elementAt(z).toPlainTextString().contains(error2)||tds.elementAt(z).toPlainTextString().contains(error3)||tds.elementAt(z).toPlainTextString().contains(error4)){
    dialog.dismiss();
     
    return ;
    }
    else
    columns.add(tds.elementAt(z).toPlainTextString().replaceAll(" ","
    " ));
    }
    rows.add(columns);
    }
    table.add(rows);
     
    allTables.add(table);
    }
     
    }
     
    }}
     
     
    thanks in advance

     

    TreKing <trekingapp@gmail.com> Jan 31 02:36PM -0600  


    > The error i was facing is :
    > responseBody cannot be resolved to a variable
     
    > can anyone solve this error..
     
    So you want someone to go download a jar file, build your code with it, run
    it, debug it, fix your error, and report back to you?
     
    Would you like fries with that?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Nathan <nathan.d.mellor@gmail.com> Jan 31 12:05PM -0800  

    I agree that
    It doesn't benefit anyone but Google. I feel sorry for those who have to
    write the message to make it sound like it benefits us.
    We will all have adjusted within 90 days.
     
    I *hope* this is an inconvenience for more people, though not in a bad way.
    Two years ago when they were about to stop paying every day, I mentioned it
    here and it was largely dismissed as pocket change.
    That was a bigger transition then what is happening now.
     
    If no one still cares, it must be that everyone here works for someone else
    and/or the monthly amount is still pocket change.
    I'd like to think that some of us small guys are doing better now, at least
    enough to care.
     
    For me, it wasn't pocket change then and is even less so now. I have people
    to pay and expenses to flow out whether the money comes on time or not. I
    will make short term changes and I will get through it. And I don't have a
    choice anyway.

    >It all depends when your bills are due or if you are capable of managing
    your finances.
    Those things together, yes.
     
    I'm certainly not going to boast in my ability to manage the finances. I'll
    confess that sometimes, the money has come in on the second just in time to
    stop the account from being completely drained from outflows. I guess you
    can call that efficiency if you are being charitable.
    You've got dynamic and fixed costs that aren't always fixed, revenue that
    is not predictable, the IRS that owes me a refund, no they want quarterly
    payments, no they want it monthly, partnerships that require upfront
    investments, my bank that gets bought up by another bank, cutting off
    online access temporarily while I'm locked in jury duty for two weeks, and
    all the usual stuff. It certainly allows me to be challenged and grow
    versus the old boring life with a steady paycheck.
     
    Nathan

     

    Indicator Veritatis <mej1960@yahoo.com> Jan 31 11:27AM -0800  

    And since Blake was too shy to mention his own web site and book, let me do
    it for him;) The coverage of these issues in "Programming Android" is
    better than in many Android books, and in his webcast "Concurrent
    Programming in Android" is even better.
     
    IntentService is so handy, I am amazed it got so little coverage in Android
    Developer documentation all this time. Even with the vast improvements in
    the 4.0 docs, IntentService is still under-documented. There is a lot you
    can do with either this or Looper/Handler without having to resort to
    AsyncTask, which really has been over-billed in recent years as if far more
    flexible and useful than it really is.
     
    On Wednesday, January 30, 2013 4:54:16 AM UTC-8, G. Blake Meike wrote:

     

    saladbowl <chloefotherby@gmail.com> Jan 31 10:36AM -0800  

    *In earlier versions of Android (API level 8-10 I think):*
    If I create my own ListView style with the listSelector attribute set to my
    own custom state list drawable in my styles.xml file, then I am able to see
    my custom colours when a list item is pressed, focused, etc.,
    including in spinner dialogs.
     
    *In later versions of Android (I have tested API levels 16 and 17):*
    I see my custom list selector colours in some list views, but not in the
    ones that appear in *spinner dialogs*. Do I need to do something special to
    use my custom ListView style in spinner dialogs?.
     
    Any help would be much appreciated as I have spent ages try lots of
    different style attributes with no luck.
     
    Thanks.

     

    saladbowl <chloefotherby@gmail.com> Jan 31 10:58AM -0800  

    Some further information ..... this only seems to apply when the
    spinnerMode is set to dialog, the list selector is picked up in dropdown
    mode.
     
    On Thursday, 31 January 2013 18:36:53 UTC, saladbowl wrote:

     

    Larry Meadors <larry.meadors@gmail.com> Jan 31 11:24AM -0700  

    I've been looking for information on how to determine if a device can
    do this or not - is there a standard API for this or is it all
    device/vendor specific?
     
    Larry

     

    Larry Meadors <larry.meadors@gmail.com> Jan 31 11:52AM -0700  

    Thanks, will do!
     
    Larry
     
     

     

    bob <bob@coolfone.comze.com> Jan 31 10:13AM -0800  

    Is there an easy way to tell if a device supports Wi-Fi Direct or not?
     
     
    Thanks.

     

    Nobu Games <dev.nobu.games@gmail.com> Jan 31 09:23AM -0800  

    I haven't tested / benchmarked that myself using OpenGL ES, but what I read
    so far over on Stackoverflow is that developers noticed a performance
    impact when you have an extra view for rendering text on top of a
    GLSurfaceView.
    I only experimented with a custom view with text and graphics rendering on
    top of a camera preview so far. And the frame rate was acceptable (around
    30 FPS on a Galaxy S doing nothing much fancy).
     
    However, I do not want to take that approach because I'm currently
    developing a game engine that has to be portable. Therefore I'm trying to
    abstract platform-specific details and having fonts being rendered in
    OpenGL sounds quite portable to me :-)
     
     
    On Thursday, January 31, 2013 10:58:04 AM UTC-6, latimerius wrote:

     

    Nobu Games <dev.nobu.games@gmail.com> Jan 31 09:30AM -0800  

    Oh, in addition to what I said:
     
    since GL rendering and Android UI are done in two separate threads, there
    is the chance that both text and 3D graphics are not completely in sync.
    This is not much of a problem for HUDs, but it might turn out to be a
    problem when text has to be positioned alongside a moving game object.
     
    On Thursday, January 31, 2013 11:23:02 AM UTC-6, Nobu Games wrote:

     

    Latimerius <l4t1m3r1us@gmail.com> Jan 31 06:50PM +0100  

    Hm, I'm not sure I'm following you. What I have in mind is
     
    - make a new Paint, setTypeface() and setTextSize() on it
    - take a string to render, measure it using getTextBounds()
    - create a Canvas, setting it a Bitmap (usually a Bitmap of bounds
    width*height, both taken to the next power of two if you'll want to use it
    directly as a GL texture)
    - draw your text to the bitmap by calling drawText() on the Canvas
     
    Now you have a Bitmap with rendered text that you can use as any other
    texture.
     
    I don't see a need for overlaying a view on top of GLSurfaceView, or any
    threading issues (unless you want to render walls of dynamic text (unlikely
    for a game) the above only runs once during initialisation, on a thread of
    your choice).
     
     

     

    Nobu Games <dev.nobu.games@gmail.com> Jan 31 10:08AM -0800  

    I see, I misunderstood your previous response. I was thinking you were
    talking about an overlay view on top of the OpenGL view.
    What you're saying is also an approach that seems to be practically used by
    Android game developers. It works well for static common messages. However,
    if you're dealing with text messages that change quite often you'll have to
    resort to a different technique. Score numbers or character dialogs are
    typically often updated for example.
     
    So to sum it up we have the following options:
     
    - Use an overlay view to render text with Canvas
    - Use Canvas to create a texture map with all used characters for the
    current locale (and I agree, that looks like a big PITA unless you're
    supporting just a single or a few languages)
    - Use Canvas to create textures (or a texture map) with all words and
    sentences used by the game / app

     
    On Thursday, January 31, 2013 11:50:20 AM UTC-6, latimerius 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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

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

Comments: (0)

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

    bob <bob@coolfone.comze.com> Jan 31 08:06AM -0800  

    Does anyone know what the best way to do text in OpenGL on Android is?
     
     
    It would be nice if there was a way to do True Type fonts.

     

    Nobu Games <dev.nobu.games@gmail.com> Jan 31 08:13AM -0800  

    What a coincidence. I'm also researching that topic at the moment. And as
    far as I understand there are two approaches.
     
    1. You can integrate one of these fully-featured True Type font libraries
    for OpenGL. I believe you will have to go the native code route because I'm
    not aware of a Java/Android-specific library. However, you have the benefit
    of having true 3D fonts rendered with polygons.
     
    2. This seems to be the Android standard approach: pre-render an atlas /
    map texture with all letters and symbols you need using a Bitmap, Canvas
    and a font of your choice. The Android tools available are very
    straightforward to use and I guess that'll be the way to go for me. The
    only problem here is: you need to take care of rendering the letters with
    correct spacing and line breaks etc. The letter spacing can be determined
    in the map generation step, though.
     
    On Thursday, January 31, 2013 10:06:04 AM UTC-6, bob wrote:

     

    Latimerius <l4t1m3r1us@gmail.com> Jan 31 05:58PM +0100  

    > only problem here is: you need to take care of rendering the letters with
    > correct spacing and line breaks etc. The letter spacing can be determined
    > in the map generation step, though.
     
     
    Why don't you just use Canvas & Paint to render the text(s) you'd like
    display?
     
    Locale handling can turn out a PITA but otherwise, this seems a good
    solution to me. Just out of curiosity, what would you gain by doing what
    you describe (i.e. using the glyphs but writing you own typesetting code)?

     

    Pent <support@apps.dinglisch.net> Jan 31 08:35AM -0800  

    Tearing my hair out over this one.
     
    I'm offering the user a choice of several dark or light themes.
    Setting with getApplication().setTheme() and setTheme() in onCreate of
    activity
    (as the first thing in that function).
     
    There's a period while the app loads when the screen goes black. If
    you have a light desktop, it's very disconcerting (flashes). Of course
    I could set a fixed white theme in the manifest, but then the inverse
    problem occurs when user selects a dark theme.
     
    Tried everything I can think of e.g. overrode Application, set in
    Application:onCreate, created a FrontDoor activity that just sets the
    theme then loads the relevant dedicated Light or Dark activity.
     
    It appears Application:setTheme is completely ignored.
     
    The current best solution I have is to set a manifest theme with a
    grey background. Could create dedicated Dark and Light launcher icons,
    but
     
    Any tips ?
     
    Pent
     
    p.s. tried setting a transparent application theme in the manifest,
    then you can get a huge delay while data loads. And if Android is
    short of memory the user keeps seeing the desktop in-between
    activities.

     

    CameraMX Team <androidmagix@googlemail.com> Jan 31 08:32AM -0800  

    Hi,
     
    I am developer of a quite common camera app.
    We were testing on the new Nexus 4 these days and experienced wrong aspect
    ratios of the MINI_KIND thumbnails for the captured photos.
    The photos are captured in a 16:9 ratio but the MINI_KIND thumbnails are
    created in a distorted 4:3 ratio.
    We use the MINI_KIND thumbnails for preloading in our gallery while the
    original image is decoding.
     
    We think this has something to do with the jpeg-decoder of the Camera class.
    When we save the file, decode it with the jpeg decode of the open jpeg
    group in our native code and resave it with the open jpeg library, the
    MINI_KIND thumbnails are created correctly.
     
    It seems it has nothing to do with exif or mediastore, we've checked that
    too.
     
    We experienced similiar issues on other LG devices.
    Is there something we missed?
     
    Thanks a lot in advance,
    The CameraMX Team.

     

    Goncalo Oliveira <goncalo@minkan.net> Jan 31 10:39AM  

    Thanks for the reply Robert. I also had the idea that this was device side
    only, but I'm still confused by these behaviors.
    I do bet that Samsung's is doing something different (not that uncommon).
    I'm pasting the radio logs below. The SIM card used here is the one that
    works in the other device.
    There's still something else I don't understand... the other SIM card
    doesn't work with either phones. I don't think it's the APN, at least, it
    shouldn't, but maybe the SIM card has any particularity. I'm going to check
    the radio logs also to see if I can trace something at all.
     
    The previous problem log
     
    *D/GSM ( 2104): [GsmDCT] enableApnType: mms is type not available* //
    when startUsingNetworkFeature
    E/RIL ( 1702): ReaderLoop after select
    E/RIL ( 1702): ReaderLoop after FD_ISSET
    D/GSM ( 2104): [GsmDCT] disableApnType:mms // when
    StopUsingNetworkFeature
    D/GSM ( 2104): [GsmDCT] setEnabled(1, false) with old state = false and
    enabledCount = 1
    D/GSM ( 2104): [GsmDCT] disableApnType: return APN_ALREADY_INACTIVE
    D/GSM ( 2104): [GsmDCT] handleMessage msg={ what=270349 when=0 arg1=1 }
    D/GSM ( 2104): [GsmDCT] onEnableApn: apnContext=state=IDLE apnType=mms
    call applyNewState
    D/GSM ( 2104): [GsmDCT] applyNewState(mms, false(false), true(true))
    D/GSM ( 2104): [ApnContext] set enabled as false, for type mms, current
    state is false
    D/GSM ( 2104): [ApnContext] set mDependencyMet as true, for type mms,
    current state is true
     
     
     
     
    --
    Gonçalo Oliveira

     

    Robert Greenwalt <rgreenwalt@google.com> Jan 31 08:29AM -0800  

    Try disabling data (settings->Mobile networks->Data enabled).
     
    I think what's happening is data is enabled, so the default apn is
    requested but we're not able to connect (because you have no default apn)
    so telephony infers that data reception isn't available and so it doesn't
    even try other types. This seems like a bug. By disabling data all you're
    really doing it turning off default data, so the availability stuff isn't
    sure if reception is available or not and it should try mms.
     
    R
     
     

     

    Live Happy <livehappy7@gmail.com> Jan 31 12:51PM +0200  

    i m using a cursor adapter to display items in listview from database and i
    want to limit the number of displaying by get last 20 items and than after
    click on header button retrieve other 20 i tried to use the method
    getCount() in the adapter
     
    public int getCount() {// TODO Auto-generated method stubreturn i;}
     
    with i is the number of chat who increase after header click but
     
    its not work give exception can anyone help me with it thx on advance

     

    lbendlin <lutz@bendlin.us> Jan 31 08:07AM -0800  

    don't change the list view, change the adapter feed with a query that uses
    the limit.
     
    On Thursday, January 31, 2013 5:51:13 AM UTC-5, Live Happy wrote:

     

    Tom <tklapettek@aol.com> Jan 31 01:43AM -0800  

    Hi guys,
     
    I write an app which should use an own account for contacts.
    I found a lot of examples in the internet but not that what I want.
    And the SampleSyncAdapter from the samples doesn't help me so much.
     
    What I want is a something like
     
    AccountManager _accountMgr = AccountManager.get(context);
    Account [] accounts = _accountMgr.getAccounts();
    final Account account = new Account(accounts[0].name, "com.myapplication");
    mAccountManager.addAccountExplicitly(account, null, null);
     
    What I don't want is a new account where I have to input a username and a password.
     
    The issue is, that my app reads the contacts and in the moment I'm using a sqllite database where I store
    the contactid and further information to this ID which my app needs and which I can't store in the normal contacts.
    Normally no problem. But what happened if someone needs a new smartphone. Contacts you can export and import in your new phone.
    But during the import the contactid could change. Then my app can't link the contactid which I stored in my SQLLite-database to the
    right contact in the new smartphone.
    My idea was, to create an new account for my app (like "WhatsApp" is doing that) and storing there my additonal contactinformation.
    This account I can export and import it to a new smartphone.
     
    That's right, or? But for that I don't need an AuthenticatorActivity with username and password.
    I only need a new account.
     
    How can I solve that.
    Thanks for any help
     
    BR
    Tom

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Feb 01 12:49AM +0900  


    > That's right, or? But for that I don't need an AuthenticatorActivity with
    > username and password.
    > I only need a new account.
     
    Not quite clear why think you need an (AccountManager) account. Generally
    you cannot export an account, you need to add it manually to the new phone
    by entering the username and password. Any extra data you store along with
    the account will thus be lost. Sounds like you just need to rebuild your
    internal database on first run by matching/searching the system contacts.

     

    bob <bob@coolfone.comze.com> Jan 31 07:29AM -0800  

    My best guess concerning this is that the 33 bits are for the mantissa.
    Then, the 13 bits are for the exponent. So that gives 46 bits. Then,
    there's a sign bit for the mantissa and a sign bit for the exponent, thus
    yielding 2 extra bits for a total of 48 bits. So, I guess it is a 48 bit
    value. Just a guess though.
     
     
     
    On Wednesday, January 30, 2013 4:03:11 PM UTC-6, bob wrote:

     

    "Héctor Júdez" <hjudez@gmail.com> Jan 31 04:10AM -0800  

    I don't know much about finance but... why could this be good for anyone
    but Google?
     
    El jueves, 31 de enero de 2013 07:50:29 UTC+1, Zsolt Vasvari escribió:

     

    Jim Graham <spooky130u@gmail.com> Jan 31 07:19AM -0600  

    On Wed, Jan 30, 2013 at 10:50:29PM -0800, Zsolt Vasvari wrote:
    > Huh? Why? It's probably good for 10% of the developers, bad for 10% and
    > irrelevant for 80%. It all depends when your bills are due or if you are
    > capable of managing your finances.
     
    Not that I expect this to matter to me anytime soon (if ever), but I'm
    just curious...doesn't google have a high-water mark where if you reach
    that, there's an automatic immediate payout?
     
    Later,
    --jim
     
    --
    THE SCORE: ME: 2 CANCER: 0
    73 DE N5IAL (/4) MiSTie #49997 < Running Mac OS X Lion >
    spooky130u@gmail.com ICBM/Hurr.: 30.44406N 86.59909W
     
    "Now what *you* need is a proper pint of porter poured in a proper
    pewter porter pot.." --Peter Dalgaard in alt.sysadmin.recovery

     

    John Coryat <coryat@gmail.com> Jan 31 05:57AM -0800  

    >> doesn't google have a high-water mark where if you reach that, there's
    an automatic immediate payout?
     
    No.
     
    I can't see how this will be good for anyone but Google as well but it's
    not without precedent. AdMob holds your money for 45 days. AdSense for 21
    days. Google Play is only holding (for now) for 15 days.
     
    Like anything else, we'll get used to it and in 90 days, nobody will
    remember how it used to be.
     
    -John Coryat

     

    Kostya Vasilyev <kmansoft@gmail.com> Jan 31 06:01PM +0400  

    At least they're making it gradual, with two payouts for February 2013...
     
    2013/1/31 John Coryat <coryat@gmail.com>
     

     

    "Héctor Júdez" <hjudez@gmail.com> Jan 31 06:28AM -0800  

    I still remember when they used to pay every day... that was really nice!
    Well, the gradual change makes it a little bit less painful, that's true.
     
     
    El jueves, 31 de enero de 2013 14:57:20 UTC+1, John Coryat escribió:

     

    Jim Graham <spooky130u@gmail.com> Jan 31 07:16AM -0600  

    On Wed, Jan 30, 2013 at 06:39:21PM -0800, DroidMaster wrote:
    > I am kind of agree with you on this; if there is a enforcement from google
    > to ship with chrome only then it would be the same browser war on PC.
     
    Question: does anyone seriously use the default browser anyways? There
    are (in my opinion, at least) several other much better browsers on the
    Market available for free. I can't decide whether my favorite is Dolphin
    or Opera---I use Opera on my Mac, but it's got so many glitches (latest
    version) that I keep find myself wishing Dolphin browser was available
    for the Mac.... But again, just my opinion. The point is, if people
    don't like or want the default browser, why should they care what it is?
    They can just grab another one that they do like.
     
    Later,
    --jim
     
    --
    THE SCORE: ME: 2 CANCER: 0
    73 DE N5IAL (/4) MiSTie #49997 < Running Mac OS X Lion >
    spooky130u@gmail.com ICBM/Hurr.: 30.44406N 86.59909W
     
    "Now what *you* need is a proper pint of porter poured in a proper
    pewter porter pot.." --Peter Dalgaard in alt.sysadmin.recovery

     

    Dan <dan.schmitt@gmail.com> Jan 31 05:50AM -0800  

    On Wednesday, January 30, 2013 9:21:26 PM UTC-5, Mark Murphy (a Commons
    Guy) wrote:
     
    > We will find out when the next version of Android ships. I will be
    > reasonably surprised if we find out before then. And, bear in mind
    > that the choice of browsers is really up to the device manufacturer.
     
    Given that stock 4.2.1 on the Galaxy Nexus has the Browser and
    4.2.1 on the Nexus 4 has Chrome, it doesn't look like Android version
    matters as much as OEM choice.

     

    Andrea Pietroni <andrea.pietroni@gmail.com> Jan 31 03:38AM -0800  

    Hi all,
    this might be OT as it's not programming related, however, have you ever
    tried to have aptoide remove your pirated app? Did you succeed? how long
    did you have to wait (without answers, let alone app removal)?
     
    Thank you,
    Andrea

     

    Andrea Pietroni <andrea.pietroni@gmail.com> Jan 31 04:59AM -0800  

    I can finally answer for myself: 2 days (with email solicitation?) and
    hundreds of downloads :(
     
    Il giorno giovedì 31 gennaio 2013 12:38:58 UTC+1, Andrea Pietroni ha
    scritto:

     

    dashman <erjdriver@gmail.com> Jan 31 02:03AM -0800  

    Little dense...make sure i understand.
     
    You're saying first to a findById on the root layout id and then do another
    one on the control within that - right?
     
     
    On Wednesday, January 30, 2013 9:42:31 AM UTC-5, skink wrote:

     

    skink <pskink@gmail.com> Jan 31 02:58AM -0800  

    dashman wrote:
    > Little dense...make sure i understand.
     
    > You're saying first to a findById on the root layout id and then do another
    > one on the control within that - right?
     
    right, from your example:
     
    layout.xml
    <textview id="@+id/textView1/>
    <textview id="@+id/textView2/>
     
    and in the container layout
    <include id="@+id/
    container" layout="layout"/
     
    View container = findViewById(R.id.container)
     
    tv1 = container.findViewById(R.id.textView1)
     
    pskink

     

    kj <scweeden@gmail.com> Jan 31 04:58AM -0800  

    If there is a layout you want to include that has a lot of components, it
    can be easier to make a View class for that layout and simply use that
    class in your layouts. The easier approach to this is to extend and
    existing ViewGroup class and simply inflate your desired layout in the
    constructor. You can also add your own methods and variables to the class
    to make it easier to handle behavior that view is supposed to support. Then
    in xml you can simply do
     
    <com.my.package.MyView
    android:id="@+id/MyActivity_myView1"
    ... />
     
    If the layout is simple, that approach might be overkill, so <include>
    could be better.
     
    On Tuesday, January 29, 2013 9:19:42 PM UTC-5, dashman 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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.