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

Comments: (0)

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

    satish bhoyar <getsatonline@gmail.com> Jan 01 11:56AM +0530  

    hi all,
     
    Happy new year to all of you.
    I am trying to make application like file browser.
    the constraint is I want to browse the files that are shared on the
    network in my company.
    My android device is in LAN and in my app I want to give ip of pc and
    app should search that PC and if i click in it I should be able to see
    contents that PC is sharing.
     
    Problem -
    - How should I search computer , is there any api or example which I
    can start on.?
    - once I found the computer I want to get information about the
    contents or folders that are shared by that computer.
     
    Any help will be very usefull.
     
    thanks,
    satish

     

    "Jignesh Kakkad(Jiggy)" <jig2nesh@gmail.com> Jan 01 05:23PM +1100  

    Hi there,
     
     
    I would like to get the battery consumption for sending an SMS or
    downloading data (~1MB) from server.
     
     
    Currently, I am using following way to get the information about battery
    voltage, level and etc.
     
     
     
     
    private void getBatLevel(){
     
    BroadcastReceiver batteryLevelReceiver = new BroadcastReceiver() {
     
    public void onReceive(Context context, Intent intent) {
     
    int scale = -1;
     
    int level = -1;
     
    int voltage = -1;
     
    int temp = -1;
     
    context.unregisterReceiver(this);
     
    level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
     
    scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
     
    temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, -1);
     
    voltage = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1);
     
    batUsageString.setText(String.valueOf(voltage));
     
    Log.d("DEBUG", "level is "+level+"/"+scale+", temp is "+temp+", voltage is
    "+voltage);
     
    }
     
    };
     
    IntentFilter batteryLevelFilter = new
    IntentFilter(Intent.ACTION_BATTERY_CHANGED);
     
    registerReceiver(batteryLevelReceiver, batteryLevelFilter);
     
    }
     
     
     
     
    I would like to know if there is any other way to get the precise
    information about battery (I mean in float or double)
     
     
     
     
    PS: I am calling above method before and after sending an SMS.
     
    Thanks
     
     
     
     
    Regards
     
    Jiggy

     

    bob <bob@coolfone.comze.com> Dec 31 05:38PM -0800  

    Thanks.
     
    By the way, I tried your Deadly Chambers game. It is impressive. I like
    how the guy's name is Chambers. Very funny.
     
     
     
    On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote:

     

    Adam Ratana <adam.ratana@gmail.com> Dec 31 01:35AM -0500  

    No, I mean literally not supported -- that is if you go to settings and
    select languages you will not have the ability to choose Afrikaans; it is
    missing from the available languages on the device.

     

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

    Jake Colman <colman@ppllc.com> Dec 31 03:30PM -0500  

    I have written code to select at runtime whether my widget should use a
    background PNG image or just select a background color in place of the
    image. This code works fine but is not esthetically pleasing. The
    problem is that when I set just the background color in lieu of the
    image the entire grid space occupied by the widget is colored and it
    just looks bad.
     
    My next idea was to specify a different background that specifies a
    <shape> resource instead of the PNG image. This code works fine too.
    At runtime I select one of two values for setBackgroundResource and I
    can see either the PNG image or the shaped colored background. This
    shaped colored background has margins and rounded corners so it looks
    better than just coloring the background.
     
    Here is my question: Is there a way to specify the color of the shaped
    background at runtime? I can call RemoteView.setInt with
    setBackgroundResource to set the shaped background but how can I set the
    resource's background color?
     
    --
    Jake Colman -- Android Tinkerer

     

    Jake Colman <colman@ppllc.com> Dec 31 04:44PM -0500  

    I don't think it helps to get access to the drawable resource and use
    setColorFilter to set its background color since I don't see a way to
    set the modified drawable resource as the background resource for the
    view.
     
    Am I missing something obvious? I did google before posting but that
    doesn't mean I didn't miss it.
     
    >>>>> "Jake" == Jake Colman <colman@ppllc.com> writes:
     
    Jake> I have written code to select at runtime whether my widget
    Jake> should use a background PNG image or just select a background
    Jake> color in place of the image. This code works fine but is not
    Jake> esthetically pleasing. The problem is that when I set just the
    Jake> background color in lieu of the image the entire grid space
    Jake> occupied by the widget is colored and it just looks bad.
     
    Jake> My next idea was to specify a different background that
    Jake> specifies a <shape> resource instead of the PNG image. This
    Jake> code works fine too. At runtime I select one of two values for
    Jake> setBackgroundResource and I can see either the PNG image or the
    Jake> shaped colored background. This shaped colored background has
    Jake> margins and rounded corners so it looks better than just
    Jake> coloring the background.
     
    Jake> Here is my question: Is there a way to specify the color of the
    Jake> shaped background at runtime? I can call RemoteView.setInt
    Jake> with setBackgroundResource to set the shaped background but how
    Jake> can I set the resource's background color?
     
    Jake> --
    Jake> Jake Colman -- Android Tinkerer
     
    Jake> --
    Jake> You received this message because you are subscribed to the Google
    Jake> Groups "Android Developers" group.
    Jake> To post to this group, send email to android-developers@googlegroups.com
    Jake> To unsubscribe from this group, send email to
    Jake> android-developers+unsubscribe@googlegroups.com
    Jake> For more options, visit this group at
    Jake> http://groups.google.com/group/android-developers?hl=en
     
    --
    Jake Colman -- Android Tinkerer

     

    monty <mca.himanshusharma@gmail.com> Dec 30 10:35PM -0800  

    Hello,
     
    Is there any way to choose one particular theme from list of theme's at run
    time and apply it to entire activities in an application.
     
    I want to show a dialog fragment with radio buttons (with theme names)
    .User will select a particular theme and that theme will be applied to the
    activities.
     
    Dialog fragment is available with me.
     
    Thanks

     

    TreKing <trekingapp@gmail.com> Dec 31 03:29PM -0600  


    > Is there any way to choose one particular theme from list of theme's at
    > run time and apply it to entire activities in an application.
     
     
    Have you done any research on this topic yourself yet? A quick Google
    search shows many Stack Overflow questions and answers on this topic.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    sree android <android.sreenivas@gmail.com> Dec 31 12:19PM +0530  

    i gave two single dimensional arrays
     
    one array
    prioritynamearray=alistpriorityname.toArray(new
    String[alistpriorityname.size()]);
     
    two array
    taskvaluesarray=taskvaluesarraylist.toArray(new
    String[taskvaluesarraylist.size()]);
     
    The above code i take two ArrayList and convert two single dimensional
    arrays,
    now i need these two seperate arrays as two dimensional array.
    how please convert it and give solution,
     
    thanks in advance.

     

    TreKing <trekingapp@gmail.com> Dec 31 03:27PM -0600  

    On Mon, Dec 31, 2012 at 12:49 AM, sree android
     
    > how please convert it and give solution,
     
    This is not "urgent", nor does it have anything to do with Android
    development.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Giuseppe <porcelli.giuseppe@gmail.com> Dec 30 10:42PM -0800  

    Sorry for my English, I will try to write better.
     
    Attached you will find the dump file of alarms on my device, you will see
    that there is no sign of any PendingIntent that have Backup_Email_Receiver
    as class.
     
    I have uninstalled the app, restarted the device, the function is still
    working and every minute sending an email.
     
    Any suggestion is appreciate.

     

    TreKing <trekingapp@gmail.com> Dec 31 03:25PM -0600  


    > I have uninstalled the app, restarted the device, the function is still
    > working and every minute sending an email.
     
     
    Is there anything in the logs when the alarms go off?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Evan Ruff <evan.ruff@hendersonsawmill.com> Dec 31 09:49AM -0500  

    Guys,
     
    Thanks so much for your suggestions. I had tried all of the notify* and
    invalidate* methods on the adapter and list to no avail. The easiest
    solution for me was removing the swapCursor( null ) call. After doing this,
    the "orphaned" views no longer persist and everything is working as
    expected.
     
    Thanks guys!
     
    E
     
     

     

    "Nelson André" <nelson.dias.andre@gmail.com> Dec 31 04:32AM -0800  

    Hello all,
     
    I have a JSON list that I retrive from one website I have that gives me the
    following fields:
     
     
    - Name
    - Latitude
    - Longitude
     
    This list has around 200 items.
     
    I want to order the list by distance to my current location, closer
    locations on top.
     
    How may I do this calculation and ordering?
     
    Many Thanks
     
    Nelson

     

    Spiral123 <cumisnic@gmail.com> Dec 31 05:15AM -0800  

    If you mean straight line distance and if the locations are reasonably
    close and/or reasonably well distributed then just do a straightforward
    trig calculation.
     
    If you want more accuracy use a great circle distance calculation (just
    Google it). Assuming you just need a ranking rather than accurate
    distance I suspect this would be overkill in most real-world situations.
     
    If you had thousands of locations to sort rather than just 200 I would do
    the simple trig calc, then sort into distance order and then walk the list
    to see if the distance/separation of adjacent location pairs was within a
    threshold and do the the gc calc to determine the closest.
     
     
     
    On Monday, December 31, 2012 7:32:18 AM UTC-5, Nelson André wrote:

     

    lbendlin <lutz@bendlin.us> Dec 31 06:17AM -0800  

    If the locations are roughly in the same geographical area then you can use
    a corrective factor for the longitude difference. The latitude is always
    the same distance per degree but the longitude distance per degree depends
    on the latitude (biggest at the equator,zero at the poles). For a latitude
    of 52 degrees the factor would be around 0.63 etc.
     
    On Monday, December 31, 2012 7:32:18 AM UTC-5, Nelson André wrote:

     

    Mark Murphy <mmurphy@commonsware.com> Dec 31 08:07AM -0500  

    > I'm specifically trying to first get the
    > ICS AOSP launcher to install on any ICS phone, and then modify it with some
    > features.
     
    You are welcome to copy the source code out of AOSP, import it into an
    Android SDK project, and hack away to get rid of things that do not
    compile anymore. This may take some time.
     
    > I don't
    > necessarily have to use Eclipse, I'm fine with "make Launcher2".
     
    That is not how you build an SDK project from the command line.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    _The Busy Coder's Guide to Android Development_ Version 4.4 Available!

     

    Dev Guy <devguy.ca@gmail.com> Dec 31 06:18AM -0500  

    Carlos thanks, that's what I did and got things working!
     
     
    On Sun, Dec 30, 2012 at 6:24 AM, Carlos A. M. dos Santos <
     
    --
    Kind Regards,
    Rajinder Yadav
     
    SafetyNet Test Driven Development
    http://safetynet.devmentor.org

     

    sebouh00 <sebouh00@gmail.com> Dec 30 11:26PM -0800  

    Sorry, but you're just repeating what Mark said. It's not helpful.
     
    I am not looking for a solution with GPS. My research shows GPS is bad at
    altitude calculations. And I'm sure it uses more power to get an altitude
    because it requires time and outdoors to get a lock, but I have no tests to
    show that.
     
    I asked where I can get real-time sea-level pressure data. I didn't get an
    answer.
     
     
    On Monday, December 31, 2012 1:45:46 AM UTC+3, Lew wrote:

     

    Ifor <ifor@blueyonder.co.uk> Dec 31 01:03AM -0800  

    The method I use for calibrating the barrometric altitude functionality in
    my biking app is to use the gps to get a location I then use Googles Elervation
    API <https://developers.google.com/maps/documentation/elevation/> to get an
    altitude for this location and adjust my reference pressure to get the
    barometric based altitude to match. Haveing done this the relative
    altitude reading during a bike ride tend to be good but if the weather is
    changing a lot you can easaly be +-50m by the end of of a few hours riding.

    Aviation services should have the reference pressure for vaious airfields
    airfields avalable. I would investigate the various weather service api to
    see what is avalable but I think your going to strugle with what you are
    trying to achieve the weather is just too big a variable over significant
    time periods.

    Ifor

     
    On Monday, 31 December 2012 07:26:44 UTC, sebouh00 wrote:
     

     

    Steve Mills <sdemills@gmail.com> Dec 31 01:06AM -0800  

    As a pilot I can tell you that we get a MSL (Mean Sea Level) pressure reading and key that into the altimeter which compares it with current pressure and gives altitude to +50ft/-75ft accuracy.
     
    The MSL is provided by the local airport, is adjusted to ensure any regional error puts us higher than any obstacles, and it varies so the airport will alert us if and when it changes.
     
    Above what's known as the Transitional Layer we are high enough to avoid all ground obstacles to we use standard pressure of 1013.25 mb so that aircraft's altitude is computed relative to each other.
     
    We do heed GPS altitude warnings that we're about to bust airspace but not for accurate altitude measurement.
     
    Hope that helps.
     
    Cheers
    Steve

     

    sebouh00 <sebouh00@gmail.com> Dec 31 01:21AM -0800  

    Thanks guys. I now understand more.
     
    I will have to do some more testing with this information in mind, but from
    what I've understood, achieving the day long accuracy I'm looking for will
    require GPS and frequent base reference updates.

     

    Lew <lewbloch@gmail.com> Dec 31 02:35AM -0800  

    sebouh00 wrote:
     
    > Sorry, but you're just repeating what Mark said. It's not helpful.
     
    >> I repeated it because you clearly did not assimilate it. I also asked
    questions,
    which you chose not to answer.
     
    "It's not helpful" means "I have decided to reject what you say". There's
    nothing
    wrong with the advice /per se/.
     
    But please, no more disingenuous apologies.
     
    --
    Lew

     

    NimeshChanchani <nimeshchanchani@gmail.com> Dec 31 02:32AM -0800  

    sorted.... Stupid path error!
     
     
     
    On Friday, 28 December 2012 16:57:14 UTC+5:30, NimeshChanchani wrote:

     

    monty <mca.himanshusharma@gmail.com> Dec 30 10:38PM -0800  

    use this setRetainInstance(true) in that fragment to which you want to save
    state. within onCreate();
     
    On Saturday, December 29, 2012 1:38:01 PM UTC+5:30, Dmitriy F wrote:

     

    monty <mca.himanshusharma@gmail.com> Dec 30 10:40PM -0800  

    On Saturday, December 29, 2012 1:38:01 PM UTC+5:30, Dmitriy F wrote:

     

    Dmitriy F <midnight.88s@gmail.com> Dec 31 12:41AM -0800  

    In vain - it doesn't work either way. I've made an app to test on - could
    you look into it please ? Full project's in the attachment
     
    public class MainActivity extends FragmentActivity {
     
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
     
    findViewById(R.id.show_the_second_btn).setOnClickListener(
    new OnClickListener() {
    @Override
    public void onClick(View v) {
    ((TextView)findViewById(R.id.textView1)).setTextColor(getResources().getColor(R.color.red));
    replaceCurrentFragment();
    }
    });
     
    replaceCurrentFragment();
    }
     
    private void replaceCurrentFragment() {
    FragmentManager fragmentManager = getSupportFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager
    .beginTransaction();
     
    fragmentTransaction.replace(R.id.fragment_holder, new TestFragment());
    fragmentTransaction.addToBackStack(null);
    fragmentTransaction.commit();
    }
     
    public static class TestFragment extends Fragment {
     
    final static String TAG = "TestFragment";
    final static String STATE_KEY = "k";
     
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
    Bundle savedInstanceState) {
    inspectInstanceState(savedInstanceState);
    return inflater.inflate(R.layout.fragment_test, null);
    }
     
    @Override
    public void onCreate(Bundle savedInstanceState) {
    setRetainInstance(true);
    super.onCreate(savedInstanceState);
    inspectInstanceState(savedInstanceState);
    }
     
    @Override
    public void onSaveInstanceState(Bundle outState) {
    Log.d(TAG, "onSaveInstanceState");
    outState.putString(STATE_KEY, "GG");
    super.onSaveInstanceState(outState);
    }
     
    private void inspectInstanceState(Bundle b) {
    if (b != null && b.containsKey(STATE_KEY))
    Log.d(TAG, "inspectRestoredState key:" + b.getString(STATE_KEY));
    }
    }
     
    понедельник, 31 декабря 2012 г., 10:38:02 UTC+4 пользователь monty написал:

     

    AndroidCompile <androidcompile@gmail.com> Dec 30 11:41PM -0800  

    How can I save the bitmap programatically in a 2 color palette png? Is that
    possible?
     
    On Sunday, December 30, 2012 5:26:42 PM UTC+2, Nobu Games wrote:

     

    Zsolt Vasvari <zvasvari@gmail.com> Dec 30 10:24PM -0800  

    What does "language not supported" means? Are you saying you translated
    your app to Afrikaans but it still shows up in English? Or you have some
    other issue?
     
     
     
    On Monday, December 31, 2012 2:37:42 AM UTC+8, Adam Ratana 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

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

Comments: (0)

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

    galapogos <goister@gmail.com> Dec 30 08:43PM -0800  

    Hi,
     
    Is there any way of removing the private APIs so that the AOSP launcher may
    be used with any Android device? I'm specifically trying to first get the
    ICS AOSP launcher to install on any ICS phone, and then modify it with some
    features.
     
    Would appreciate any pointers on how to remove the private APIs. I don't
    necessarily have to use Eclipse, I'm fine with "make Launcher2".
     
    Thanks.
     
    On Wednesday, September 22, 2010 1:14:09 AM UTC+8, Dianne Hackborn wrote:

     

    galapogos <goister@gmail.com> Dec 30 08:36PM -0800  

    Hi,
     
    Is it possible to build the ICS AOSP launcher without private APIs so that
    it will install into any ICS device? I've tried to build the ICS AOSP
    launcher from the AOSP source but had trouble installing it into regular
    ICS devices. I keep getting the error INSTALL_FAILED_DEXOPT.
     
    Thanks.

     

    William Ferguson <william.ferguson@xandar.com.au> Dec 30 02:24PM -0800  

    Use case:
    I have a log file (courtesy of the changes to log access in Jellybean) that
    I want to allow a user to send me along with some notes that they make etc.
    I want the process to be transparent to the user. I want to reuse existing
    rather build a lot of infrastructure myself. And I don't want to add any
    new permissions like WRITE_EXTERNAL_STORAGE. I want this simple as it is
    far from core functionality .
     
    Current design:
    I create a the log file using
    http://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLEand use a send Intent with the Uri to the file passed as
    Intent.EXTRA_STREAM along with the contact email address. This hands off to
    the email client and the user send an email containing the attached logs
    plus any notes. This is almost ideal except that MODE_WORLD_READABLE has
    been deprecated as of API#17.
     
    So considering the use case how do I rebuild without using
    MODE_WORLD_READABLE?
     
    William

     

    Mark Murphy <mmurphy@commonsware.com> Dec 30 05:45PM -0500  

    On Sun, Dec 30, 2012 at 5:24 PM, William Ferguson
    > So considering the use case how do I rebuild without using
    > MODE_WORLD_READABLE?
     
    Create a ContentProvider to serve the file using openFile(). Then use
    a content:// Uri instead of a file:// Uri. This may reduce the number
    of apps that can handle the ACTION_SEND Intent -- those that
    advertised that they specifically support file:// instead of just
    generically supporting the MIME type will not show up in your chooser.
     
    Here is a sample project that packages a PDF file in an asset, unpacks
    it on first run, then makes that PDF available via a ContentProvider
    and views it using ACTION_SEND and your chosen PDF viewer:
     
    https://github.com/commonsguy/cw-omnibus/tree/master/ContentProvider/Files
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    In questi siti web puoi chiedere o rispondere a domande relative allo
    sviluppo di applicazioni Android: http://www.andglobe.com

     

    TreKing <trekingapp@gmail.com> Dec 30 09:54PM -0600  

    On Sun, Dec 30, 2012 at 4:24 PM, William Ferguson <
    > rather build a lot of infrastructure myself. And I don't want to add any
    > new permissions like WRITE_EXTERNAL_STORAGE. I want this simple as it is
    > far from core functionality .
     
     
    You could use ACRA, or it's core idea: keep a local log file and then
    upload it to a Google Document or server where you can view the data. It's
    a pretty straightforward implementation.
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    TreKing <trekingapp@gmail.com> Dec 30 09:50PM -0600  


    > But there is no way to delete it !!!!
     
     
    What do you mean by this? What exactly is the issue you're having?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Etienne <lawloretienne@gmail.com> Dec 30 04:19PM -0800  

    I am not clear whether this is an issue with different versions of Android,
    or different screen sizes, but I am getting some unpredictable behavior.
     
    I am testing the UI of the dropdown of a MultiAutoCompleteTextView on a Nexus
    S which is onAndroid v4.1.2 and I am testing on a Nexus 4 which is on Android
    v4.2.1.
     
    When I begin to enter text into the MultiAutoCompleteTextView it returns
    some results. I have created a custom view which contains an ImageView to
    the left of a TextView. When the a row is first displayed, the ImageView will
    have a certain height, however once you scroll through the list of results
    and back up to that original row one of two things happens. Either the
    ImageView stays the same dimensions, or the dimensions of the ImageView will
    change. This specific behavior is happening on the Nexus 4, but I cannot
    reproduce this on the Nexus S.
     
    I am loading Bitmaps into ImageViews just like it is done in the developer
    training Loading Large Bitmaps Efficiently<http://developer.android.com/training/displaying-bitmaps/load-bitmap.html>
    .
     
    Can anyone point me in the right direction as far as what to look into? Is
    this a screen resolution issue, or does the latest version of Android
    handle this situation differently than previous versions?

     

    niko20 <nikolatesla20@yahoo.com> Dec 30 03:36PM -0800  

    Put a boolean flag in there and you'll have to handle it yourself in some
    way
     
    On Monday, December 24, 2012 5:16:52 AM UTC-6, Tamás Kovács wrote:

     

    niko20 <nikolatesla20@yahoo.com> Dec 30 03:35PM -0800  

    I'm not sure if that would be useful. From what I've read, OpenGL ES is
    actually more modern and streamlined and loses a lot of the crud that
    OpenGL has gained over the years. In effect it's a cleaner more modern
    implementation anyway.
     
     
    On Wednesday, December 26, 2012 11:21:42 AM UTC-6, bob wrote:

     

    Lew <lewbloch@gmail.com> Dec 30 02:45PM -0800  

    sebouh00 wrote:
     
    > Wouldn't I need a lock on the GPS location in order to get the altitude? I
    > would assume that would take more time, hence more power then just using
    > the barometer.
     
     
    Less power + wrong answer/no answer = ?
     
    What about the altitude apps. How do they usually determine the approximate
    > altitude. Do they suffer from +/- 500 meter inaccuracy?
     
    My brief Google search indicates GPS. I think not.
     
    What does your online search tell you?

    Mark Murphy (a Commons Guy) wrote:
    > of premature optimization, unless you have already implemented the
    > GPS-based solution and proven that the power consumption is over your
    > budget.
     
    Here Mark sends you to basic information about what you're trying to do.
    Your next
    response repeats the plaint that you don't know what you're doing. This
    despite your
    having just received relevant information. I suggest that you digest the
    information and
    utility of advice already offered.
     
    In case you missed it:
    - Barometric pressure will not do what you're asking /per se/.
    - You have not provided evidence that the GPS power requirements are
    egregious.
    - You have not commented on whether comparison with a topographic map plus
    recalibration, as suggested, will solve your problem. I'm guessing you
    haven't even
    tried it.
     
    --
    Lew

     

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 12 Topics

Comments: (2)

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

    Giuseppe <porcelli.giuseppe@gmail.com> Dec 30 11:51AM -0800  

    I have created a PendingIntent with AlarmManager that send an email every
    minute with following code:
     
    public void SetAlarm(Context context) {
    AlarmManager am = (AlarmManager)
    context.getSystemService(Context.ALARM_SERVICE);
    Intent i = new Intent(context, Backup_Email_Receiver.class);
    PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
    am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 1000 *
    60 * 1, pi);
    }
     
    and now I am trying to remove it using:
     
    public void CancelAlarm(Context context) {
    Intent intent = new Intent(context, Backup_Email_Receiver.class);
    PendingIntent sender = PendingIntent.getBroadcast(context, 0, intent, 0);
    AlarmManager alarmManager = (AlarmManager)
    context.getSystemService(Context.ALARM_SERVICE);
    alarmManager.cancel(sender);
    }
     
    But there is no way to delete it !!!!
    I am getting crazy as I have tried in any way, please any help before I
    wipe the device ?
     
    Also I have create this Pending Intent in different situation, like a Unit
    Test and from a service, and I have already tried to delete it using the
    same system, but no way.

     

    "G. Blake Meike" <blake.meike@gmail.com> Dec 30 12:28PM -0800  

    That's odd... the cancel really should work. You need an intent that is
    identical to the one you are trying to cancel. It looks as if that's what
    you've got. Is it possible that you've scheduled multiple but slightly
    different alarms, while developing?
     
    Uninstalling the app that scheduled the alarm should get rid of it.
     
    G. Blake Meike
    Marakana
     
    Programming Android 2ed is now in stores:
    http://bit.ly/programmingandroid
     
     
    On Sunday, December 30, 2012 11:51:06 AM UTC-8, Giuseppe wrote:

     

    Giuseppe <porcelli.giuseppe@gmail.com> Dec 30 12:54PM -0800  

    I have uninstalled the app and the unit test app too, no way alarm is still
    there.
    I have also dump the alarm from adb, my pendingIntent is not there.
     
    I am starting to get crazy

     

    Adam Ratana <adam.ratana@gmail.com> Dec 30 10:08AM -0800  

    Hello, I'm hoping someone can answer this question: Why are some languages
    available on some devices, but not others, even while running the latest
    version of Android?
     
    I've been fortunate to have some users do a few translations of my app, and
    2 of the languages, Turkish and Afrikaans are present on certain tablets,
    but maybe not on others, or on certain phones. For example, the Nexus 4
    and Nexus 7 do not have Afrikaans support, but the Nexus 10 does.
     
    Because these are Nexus devices, variables such as carrier skinning and
    manufacturer skinning/custom OS builds are out of the question, so I'm
    wondering if anyone can answer what the reason may be? I don't really have
    a satisfactory answer, nor could I find one by searching. For the person
    who did the Afrikaans translation, he can only enjoy it on his tablet, but
    not his phone. This also doesn't seem to change with OS upgrades.

     

    Mark Murphy <mmurphy@commonsware.com> Dec 30 01:21PM -0500  

    > Hello, I'm hoping someone can answer this question: Why are some languages
    > available on some devices, but not others, even while running the latest
    > version of Android?
     
    Because languages take up space, so device manufacturers typically
    only ship the languages of relevance for where they intend to market
    the device.
     
    > Because these are Nexus devices, variables such as carrier skinning and
    > manufacturer skinning/custom OS builds are out of the question
     
    Not really. Google presumably negotiates with device manufacturers on
    all sorts of features based upon costs and such. Which languages to
    support would be one of those features.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    In questi siti web puoi chiedere o rispondere a domande relative allo
    sviluppo di applicazioni Android: http://www.andglobe.com

     

    Adam Ratana <adam.ratana@gmail.com> Dec 30 01:37PM -0500  


    > Not really. Google presumably negotiates with device manufacturers on
    > all sorts of features based upon costs and such. Which languages to
    > support would be one of those features.
     
    Interesting, but I suppose this makes sense. It's frustrating to Android
    adopters who live in countries where some devices support their native
    language and others do not.
     
    I've noticed with iOS that the languages supported are the languages
    supported, period, which is a win on the consistency side. The same
    consistency across "pure google" devices would be nice and ensure consumer
    confidence in some of these presumably smaller markets, but I'm preaching
    to the choir here.
     
    I suppose that short of an official answer from someone at Google, this
    will have to do. Thanks Mark.

     

    "Zxanatos C. Omyda" <omydazx1@gmail.com> Dec 30 01:31PM -0500  

    Thank you so very much!
     
    Zxanatos Carsten Omyda
    OmydaZX1@gmail.com
    Http://Omyda.com

     

    Nobu Games <dev.nobu.games@gmail.com> Dec 30 07:48AM -0800  

    I just checked the implementation of (Simple)CursorAdapter. Calling
    swapCursor with argument null (instead of another cursor object) internally
    calls notifyDataSetInvalidated. That is basically a "death sentence" for an
    Adapter and signals to the ListView it belongs to that the data source
    should not be used anymore.
     
    Why it seems to still be working erratically after setting a different
    cursor object might have to do with an internal bug in ListView and its
    view caching strategies. You just triggered a sequence of events that is
    undefined or not allowed to happen in the framework.
     
    So you have three options:
     
    1. Don't call swapCursor(null)
    2. If you want the ListView to be blank then call listView.setAdapter(null)
    3. Or temporarily let Adapter.getCount() return 0 and call
    notifyDataSetChanged until the new cursor is loaded.
     
     
    On Wednesday, December 19, 2012 9:23:25 PM UTC-6, Evan Ruff wrote:

     

    Nobu Games <dev.nobu.games@gmail.com> Dec 30 07:34AM -0800  

    There is no Android-SDK-specific solution for a page curl effect. However,
    if you would search Google for "Android page curl effect" then you would
    immediately see that other people already implemented something for you.
     
    On Sunday, December 30, 2012 3:52:56 AM UTC-6, laxman k wrote:

     

    Jim Duda <jim@duda.tzo.com> Dec 30 10:32AM -0500  

    On 12/29/2012 11:52 PM, Jonathan S wrote:
     
    > <intent
    > android:targetPackage="com.example.android.misterhouse.activity"
    > android:targetClass="SettingsActivity" /
     
    I tried that one too. I get the same error. I guess I have to start
    digging into sources/android.
     
    Regards,
    Jim
     

     

    AndroidCompile <androidcompile@gmail.com> Dec 30 06:04AM -0800  

    Hi,
    Can anyone recommend a way to compress a 2 color Bitmap? (preferably a
    lossless one)
     
    I suppose I should use RGB_565 (I am currently using ARGB) , but other
    than that, what should give me the best compression ratio? (JPEG, PNG,...)
    Should I think of my own compression algorithm for this?

     

    Nobu Games <dev.nobu.games@gmail.com> Dec 30 07:26AM -0800  

    You can store your bitmap as a palette-based PNG with 2 colors. As far as I
    know the PNG format allows lossless run-length encoding compression.
     
    If you really want to implement your own data format then the simplest
    approach would be a file header with image width and height, 6 bytes for
    the two RGB color definitions for your two colors, followed by a sequence
    of pixel bytes. Each byte encodes 8 sequential pixels from your bitmap
    where a set bit represents one color and an unset bit the other.
    If you want to go fancy you could RLE-encode the sequence of pixels but
    then you might as well store the image as a palette-based PNG.
     
    On Sunday, December 30, 2012 8:04:33 AM UTC-6, AndroidCompile wrote:

     

    sebouh00 <sebouh00@gmail.com> Dec 30 03:24AM -0800  

    On my galaxy nexus, I created a simple app which displays the current
    altitude. My observation of the result shows that the altitude is
    increasing and then decreasing again throughout the day.
     
    I am not seeking the actual altitude, so using PRESSURE_STANDARD_ATMOSPHERE
    is sufficient for my needs.
     
    Regarding the result, my guess is that as the temperature changes outside,
    the reading is changing as well. So this leads me to the questions:
     
    1. How can I get a constant reading throughout the day? Should I use a
    reference pressure that changes as well?
    2. If so, is there a service on the web which gives me real time sea-level
    pressure values for locations around the world? The API doc says I can get
    a reading from a nearby airport, but that would mean I have to change this
    reference every time I move to a new region?
     
    Thanks.

     

    Todd Grigsby <tgrigsby777@gmail.com> Dec 30 03:45AM -0800  

    You can't use a barometer to accurately determine altitude. Air pressure
    changes almost continuously for a variety of meteorological reasons. What
    level of accuracy were you expecting?

     

    Mark Murphy <mmurphy@commonsware.com> Dec 30 07:35AM -0500  

    > You can't use a barometer to accurately determine altitude. Air pressure
    > changes almost continuously for a variety of meteorological reasons.
     
    Over a period of few minutes, you can. The XOOM was the first device
    with a barometer IIRC, and I definitely recall presentations by (now
    former) MOTODEV staff discussing tests they ran using parking garages,
    and how the XOOM nailed the height change fairly well.
     
    Over a period of hours or longer, though -- such as what the OP's
    trying to do -- you are spot on. Weather will have a substantial
    impact on barometric pressure.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    In questi siti web puoi chiedere o rispondere a domande relative allo
    sviluppo di applicazioni Android: http://www.andglobe.com

     

    sebouh00 <sebouh00@gmail.com> Dec 30 05:14AM -0800  

    I would like to save the altitude in my app and use it to check if the
    device is at the same altitude in the future. Using GPS will not be
    applicable because of minimal power usage restrictions in my app.
     
    Would it be possible to do such a thing? I don't care about the altitude
    value being correct, as long as it is the same (almost same... i can work
    with ranges) at the same location all the time.
     
    Thanks.
     
    On Sunday, December 30, 2012 3:35:41 PM UTC+3, Mark Murphy (a Commons Guy)
    wrote:

     

    Mark Murphy <mmurphy@commonsware.com> Dec 30 09:05AM -0500  

    > I would like to save the altitude in my app and use it to check if the
    > device is at the same altitude in the future. Using GPS will not be
    > applicable because of minimal power usage restrictions in my app.
     
    What tests have you run to determine that the barometer is
    sufficiently lower power than the GPS radio? I suspect it is, but I
    have never tried testing the scenario.
     
    > Would it be possible to do such a thing?
     
    IMHO, not reliably. If you are trying to get altitude accuracy +/- 500
    meters or so, perhaps.
     
    http://en.wikipedia.org/wiki/Atmospheric_pressure
    http://en.wikipedia.org/wiki/Altimeter
     
    Moreover, none of this has anything to do with Android, and it smacks
    of premature optimization, unless you have already implemented the
    GPS-based solution and proven that the power consumption is over your
    budget.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    In questi siti web puoi chiedere o rispondere a domande relative allo
    sviluppo di applicazioni Android: http://www.andglobe.com

     

    sebouh00 <sebouh00@gmail.com> Dec 30 06:50AM -0800  

    Wouldn't I need a lock on the GPS location in order to get the altitude? I
    would assume that would take more time, hence more power then just using
    the barometer.
     
    What about the altitude apps. How do they usually determine the approximate
    altitude. Do they suffer from +/- 500 meter inaccuracy?
     
    I don't have any experience with this, that's why I'm asking here.
     
    Thanks.
     
    On Sunday, December 30, 2012 5:05:12 PM UTC+3, Mark Murphy (a Commons Guy)
    wrote:

     

    Brad Stintson <geek.binary@gmail.com> Dec 30 07:53PM +0530  

    Hi,
     
    How to use google authentication to use an android application?
     
    Regards,
    Brad

     

    lbendlin <lutz@bendlin.us> Dec 30 04:10AM -0800  

    Take the Parrot Asteroid as an example. The user may have forgotten to plug in the USB GPS and/or the 3G dongle. So you want to ask the user to check the physical connections.

     

    Mark Murphy <mmurphy@commonsware.com> Dec 30 07:30AM -0500  

    > I guess when "best" returns NULL it really means there ain't
    > nothing available to satisfy my request.
     
    Ignoring the double negative, you are correct. getBestProvider() will
    progressively relax constraints you specified in your Criteria to try
    to give *something*, but if it does so and there are still no matches,
    you get null.
     
    > That was really the core of my question.
     
    TreKing's list seems pretty good.
     
    You can add "screwball device that doesn't meet the CDD/CTS but has a
    pirated version of the Play Store on it anyway" as another
    possibility. I've seen reports of weird stuff related to locations
    (and maps) with such devices. However, this is a fringe case, unless
    you're specifically trying to distribute to such devices.
     
    > If "best" returns NULL I have
    > to assume that I cannot determine the location - and then do something
    > accordingly.
     
    Yup. Popping a dialog that leads the user over to the Location portion
    of Settings seems to be a popular option, figuring that the issue is
    that the user has providers disabled. I get caught by that a fair bit,
    as I keep GPS disabled on my personal phone unless I am actively
    trying to use it. Occasionally, I'll try to get into Google
    Navigation, and it will yelp because I have GPS disabled.
     
    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://github.com/commonsguy
    http://commonsware.com/blog | http://twitter.com/commonsguy
     
    In questi siti web puoi chiedere o rispondere a domande relative allo
    sviluppo di applicazioni Android: http://www.andglobe.com

     

    "Carlos A. M. dos Santos" <unixmania@gmail.com> Dec 30 09:24AM -0200  


    > $ uname -a
    > Linux karma 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012
    > x86_64 x86_64 x86_64 GNU/Linux
     
    From http://developer.android.com/sdk/installing/index.html
     
    "If you are running a 64-bit distribution on your development machine,
    you need to install the ia32-libs package using apt-get::
     
    apt-get install ia32-libs"
     
    --
    "The flames are all long gone, but the pain lingers on"

     

    gran33 <ran@sds-digitalradio.com> Dec 30 02:55AM -0800  

    Hey all,
     
    Does Android support any generic Bluetooth BLE profile? e.g GATT (Generic
    Attribute Profile)
     
    10x in advance,
    RAN

     

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 - 20 Messages in 12 Topics

Comments: (0)

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

    Dev Guy <devguy.ca@gmail.com> Dec 30 12:53AM -0500  

    Hello I am getting the following error after I run the Android SDK Manager:
     
    Installing Google APIs, Android API 17, revision 1
    Installed Google APIs, Android API 17, revision 1
    Updated ADB to support the USB devices declared in the SDK add-ons.
    Stopping ADB server failed (code -1).
    Unable to run 'adb': Cannot run program
    "/opt/android-sdk-linux/platform-tools/adb": java.io.IOException: error=2,
    No such file or directory.
    Starting ADB server failed (code -1).
    Done. 9 packages installed.
    Done loading packages.
     
     
    I am trying to install Android on a Linux x64 box, I have
     
    $ uname -a
    Linux karma 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012
    x86_64 x86_64 x86_64 GNU/Linux
     
    I have the following java installed:
     
    $ java -version
    java version "1.6.0_37"
    Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
     
     
    Also I am not seeing the ADT plugin getting installed when I install the
    ATD from eclipse following the instruction here:
     
    http://developer.android.com/sdk/installing/installing-adt.html
     
    I do see the Android preferences from eclipse but I do not see the ATD
    toolbar button in eclipse.
     
    --
    Kind Regards,
    Rajinder Yadav
     
    SafetyNet Test Driven Development
    http://safetynet.devmentor.org

     

    Jim Duda <jim@duda.tzo.com> Dec 29 06:38PM -0500  

    My application is using modern preference headers. I need to support
    compatibility with Gingerbread. The PreferenceHeaders work fine
    with post GingerBread.
     
    I am following this guide for legacy compatiblity.
     
    http://developer.android.com/guide/topic/ui/settings.html#BackCompatHeaders
     
    The initial PreferenceScreen loads fine. However, whenever
    selecting one of the entries, I get the following exception:
     
    android.content.ActivityNotFoundException: Unable to find explicit
    activity class {com.example.android.misterhouse.activity/
    com.example.android.misterhouse.activity.SettingsActivity};
    have you declared activity in your AndroidManifest.xml?
     
    For some reason, my Intents are not binding the the SettingsActivity.
    The reference example doesn't want to work properly. I have attempted
    three different means of identifying the targetClass. None of these
    attempts works.
     
    Might anyone know what I might be doing wrong?
     
    PreferenceScreen and AndroidManifest follow below.
     
    Thanks, Jim
     
    Here is my PreferenceScreen:
     
    <PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android">
    <Preference
    android:title="@string/pref_settingsTitle"
    android:summary="@string/pref_settingsTitle_summ" >
    <intent
    android:targetPackage="com.example.android.misterhouse"
    android:targetClass="activity.SettingsActivity"

    android:action="com.example.android.misterhouse.activity.SETTINGS" />
    </Preference>
    <Preference
    android:title="@string/pref_connectionsTitle"
    android:summary="@string/pref_connectionsTitle_summ" >
    <intent
    android:targetPackage="com.example.android.misterhouse"
    android:targetClass=".activity.SettingsActivity"

    android:action="com.example.android.misterhouse.activity.CONNECTIONS" />
    </Preference>
    <Preference
    android:title="@string/pref_aboutTitle" >
    <intent

    android:targetPackage="com.example.android.misterhouse.activity"

    android:targetClass="com.example.android.misterhouse.activity.SettingsActivity"

    android:action="com.example.android.misterhouse.activity.ABOUT" />
    </Preference>
    </PreferenceScreen>
     
    And finally, my AndroidManifest:
     
    <application
    android:label="@string/app_name"
    android:icon="@drawable/mh_logo">
    <activity
    android:name=".activity.MisterhouseActivity"
    android:noHistory="false"
    android:configChanges="orientation|keyboardHidden"
    android:launchMode="singleInstance"
    android:label="@string/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category
    android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <activity
    android:name=".activity.SettingsActivity" >
    </activity>
    <service
    android:name=".service.MisterhouseService"
    android:process=":misterhouse_process"
    android:icon="@drawable/mh_logo"
    android:label="@string/service_name">
    </service>
    </application>

     

    Jonathan S <xfsunoles@gmail.com> Dec 29 08:52PM -0800  

    How about
     
    <intent android:targetPackage="com.example.android.misterhouse.activity"
    android:targetClass="SettingsActivity" />
     
    On Saturday, December 29, 2012 6:38:32 PM UTC-5, Jim Duda wrote:

     

    jtoolsdev <brianjtools@gmail.com> Dec 29 07:57PM -0800  

    Of course that tuner is DVB which will work in Europe but they don't have
    an ATSC Android tuner which one would need in the US. They do have one for
    laptops.
     
    On Friday, December 28, 2012 2:08:31 PM UTC-8, bob wrote:

     

    "Zxanatos C. Omyda" <omydazx1@gmail.com> Dec 29 07:26PM -0800  

    I am trying to find a developer that understands USB devices. Basically I
    have a MK802 Android 4.0 device. I am trying to connect a USB Resistive
    touchscreen to it, but it does nothing. I here that Google stripped that
    out to keep Android light, since most devices now use capacitive screens.
    How would I go about finding a developer to add resistive touchscreen back
    into my devices.

    Basically I am using these for a Google powered car system. It features a
    MK802 in each seat, a MK808 for shared use. As of now they work great in
    the car, except the touchscreens will not work.

    Any help or advice would be great. I have searched all mighty Google, but
    all the information is fragmented or not understandable to me. The MK802,
    and MK808 are rooted if that makes a difference.

     

    Jake Colman <colman@ppllc.com> Dec 29 07:27PM -0500  

    Under what circumstances will getBestProvider return NULL and what is
    the best way to handle it?
     
    My app uses the provider to determine the current location. If
    getBestProvider returns NULL I request an update from NETWORK on the
    assumption that there is always a NETWORK provider even if the GPS is
    not available. What does it mean if there is no "best"? Doesn't
    Android automatically relax my criteria until it finds a match? And why
    would a device would not have a NETWORK provider?
     
    --
    Jake Colman -- Android Tinkerer

     

    Jake Colman <colman@ppllc.com> Dec 29 08:13PM -0500  

    >>>>> "T" == TreKing <trekingapp@gmail.com> writes:
     
    >> and what is the best way to handle it?
     
    T> Check for null?
     
    I'm already doing that! If I get NULL I hard-code a request to the
    NETWORK provider. Under certain circumstances I'm crashing my app since
    I assumed (stupidly) that when "best" returns NULL I can still access
    NETWORK. I guess when "best" returns NULL it really means there ain't
    nothing available to satisfy my request.
     
    >> And why would a device would not have a NETWORK provider?
     
    T> User disabled it?
    T> Device is in AirPlane mode?
    T> Device just doesn't have that radio?
     
    T> (I'm just guessing, I don't really know).
     
    That was really the core of my question. If "best" returns NULL I have
    to assume that I cannot determine the location - and then do something
    accordingly.
     
    Thanks.
     
    --
    Jake Colman -- Android Tinkerer

     

    Robert Green <rbgrn.net@gmail.com> Dec 29 10:46AM -0800  

    Yes, texture mapping is fairly standard and is very well supported.
     
    BAI means "Binary Asset Import" and is a compact memory-safe format of the
    internal structure of the open asset importer library. We did create it
    ourselves but it's simple, easy to maintain and extend and fully compatible
    with version 2 of that library, which is why you can easily add more
    formats to the engine.
     
    On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote:

     

    "Italo Mendonça Rocha" <italomr@gmail.com> Dec 29 12:08PM -0300  

    Hello,
     
    I have an application that uses the Camera and SurfaceView to take
    pictures. When I take photos by Galaxy S2 or smaller devices the picture
    resolution is perfect. But when I try to take pictures by Galaxy S3 or
    tablets the picture resolution is too low. I use the following code:
     
    camera.takePicture(null, callBack, callBack, callBack);
     
    private PictureCallback callBack = new PictureCallback() {
    @Override
    public void onPictureTaken(byte[] data, Camera camera) {
    if (data != null) {
    savePhoto(data);
    }
    }
    };
     
    Any idea how to solve this? Thank you.
     
    Sorry for my bad English.
     
    Ítalo.

     

    Jim Graham <spooky130u@gmail.com> Dec 29 11:11AM -0600  

    On Sat, Dec 29, 2012 at 12:08:52PM -0300, Italo Mendon?a Rocha wrote:
    > }
    > };
     
    > Any idea how to solve this?
     
    Yes. Based on your code, you aren't specifying the image size, so you
    get what the device sets as the default. While working on my camera app,
    I have seen devices that set the maximum as the default, and some that
    set the minimum as the default. You need to determine the available
    image sizes for the device the app is running on (see camera.parameters)
    and either select one, or better still, let the USER select the image
    size THEY want to use. The user might want the max, or they might want
    a smaller image (say, for sending in an e-mail, using in a web page,
    etc., without having to resize it). Again, see camera.parameters.
     
    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

     

    Balint <balintfarago@gmail.com> Dec 29 07:03AM -0800  

    Recently many users were complaining about a virus in my app. This is
    really annoying because I am losing many new users (my app has >150.000
    downloads).
    I checked with AVG and AVAST and neither of them found any viruses on my
    phone (I downloaded my app from the market before I scanned the whole
    phone).
    Both of them checks the newly installed apps at first run and neither of
    them found any virus. I scanned my whole phone as well.
     
    My guess is that these people are using bad antivirus applications.
     
    Any ideas?

     

    RLScott <fixthatpiano@yahoo.com> Dec 29 08:51AM -0800  

    Does the souce code contain only code that you wrote, or did you
    include a third party library that you did not write? I am assuming
    that if the code is all yours you would know well enough whether you
    put a virus in it.

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Dec 30 02:05AM +0900  


    > My guess is that these people are using bad antivirus applications.
     
    Or a pirated version that may have malware injected. Or you are using
    and ad network that gets classified as malware by some AVs. Try to
    get the APK from a user, and do a search for your app in popular
    all-you-can-eat Android sites.
     
    'Bad antivirus' is actually not too likely. Even if some AV misclassifies
    your app as virus/malware, the chance of multiple AVs doing it is
    quite small.

     

    Jim Graham <spooky130u@gmail.com> Dec 29 11:06AM -0600  

    On Sat, Dec 29, 2012 at 07:03:29AM -0800, Balint wrote:
    > Recently many users were complaining about a virus in my app.
    [....]
    > My guess is that these people are using bad antivirus applications.
     
    > Any ideas?
     
    A virus? On a Unix-based OS? Last time I checked, this wasn't possible.
    On a windoze system, sure, a virus can have a field day. But file/group
    permissions alone can block a virus. Now...a worm is another story. But
    I'm still skeptical, even there. What are your users (or should that be
    lusers?) claiming it's doing?
     
    Later,
    --jim
     
    --
    THE SCORE: ME: 2 CANCER: 0
    73 DE N5IAL (/4)
    ICBM/Hurr.: 30.44406N 86.59909W || < Running Mac OS X Lion >
     
    Seen in alt.sysadmin.recovery: "Priceless; that's better than telling
    him to use the Read Manual command with the Real Fast option."

     

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

    I would focus on your force close error and fix that one instead of trying
    to work around other apps.
     
    On Thursday, December 27, 2012 12:02:06 AM UTC-6, Amit Dwivedi wrote:

     

    lbendlin <lutz@bendlin.us> Dec 29 07:16AM -0800  

    I can second the map panning effect. That seems to be able to lock up some
    older devices (with less RAM, or poorly managed RAM?) randomly.
     
    On Friday, December 28, 2012 7:34:05 PM UTC-5, Nathan wrote:
     

     

    Priyanka <eratkar.priyanka89@gmail.com> Dec 29 12:36AM -0800  

    Hi Asheesh,
    I have seen this post, however it does not support 4.x
    android devices.
     
    On Friday, 28 December 2012 12:22:23 UTC+5:30, asheesh arya wrote:

     

    Dmitriy F <midnight.88s@gmail.com> Dec 29 12:08AM -0800  

    I have a couple of fragments which substitute one for another. The UI of
    these fragments changes and I need to hold it's new state. So the code
    looks pretty trivial:
     
    FragmentManager fragmentManager = getSupportFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager
    .beginTransaction();
     
    if (mStepTwo == null) {
    mStepTwo = new QuizStepTwo();
    mStepTwo.setListener(mStepTwoListener);
    } else {
    fragmentTransaction.remove(mStepTwo);
    }
     
    fragmentTransaction.replace(R.id.step_holder, mStepTwo);
    fragmentTransaction.addToBackStack("second_step");
     
    fragmentTransaction.commit();
     
    However when I replace the second step with the first, for instance by
    pressing the back-button,- its' UI state rolls back to initial.
     
    How do I hold the state ? OnSaveInstanceState ? or something more
    comfortable ?

     

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