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

Comments: (0)

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

    John Coryat <coryat@gmail.com> Nov 30 09:48PM -0800  

    > If you sell all the free hardware you get at the conference, you might end
    > up with a profit.
     
    If you do that, then you miss the whole point of Google IO and might as
    well stay home.
     
    -John Coryat

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Dec 01 03:19PM +0900  

    >> up with a profit.
     
    > If you do that, then you miss the whole point of Google IO and might as well
    > stay home.
     
    Isn't getting free stuff the point? Seriously though, they have hinted
    that there
    would be some sort of quiz or coding challenge this year, so presumably that
    will weed out non-developers who are just after the free stuff. Or perhaps they
    will just give out T-shirts this year...

     

    TreKing <trekingapp@gmail.com> Nov 30 09:32PM -0600  

    On Wed, Nov 30, 2011 at 8:57 PM, Hal Harrison
     
    > What prevents a pirate from copying an apk from an Android phone via wi-fi
    > or cell phone call?
     
    How do you believe this would be accomplished?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Hal Harrison <closeenough.backup@gmail.com> Nov 30 08:26PM -0800  

    > How do you believe this would be accomplished?
     
    For instance, by the corruption/enhancement of whatever handshaking
    goes on when a smart phone enters a hot-spot. If a smart phone can
    compromise an unprotected local wireless network, couldn't the
    converse occur? What's the difference between Android Debug Bridge
    accessing my friend's phone via the USB cable and via wireless? Is
    deselecting 'Unknown Source' secure protection?
     
    Hal Harrison.

     

    John Coryat <coryat@gmail.com> Nov 30 09:47PM -0800  

    Hal,
     
    There are a lot of other things more important to worry about. I'd just
    forget that line of query and move on.
     
    -John Coryat

     

    Nikolay Elenkov <nikolay.elenkov@gmail.com> Dec 01 03:16PM +0900  

    On Thu, Dec 1, 2011 at 1:26 PM, Hal Harrison
     
    > For instance, by the corruption/enhancement of whatever handshaking
    > goes on when a smart phone enters a hot-spot. If a smart phone can
    > compromise an unprotected local wireless network, ...
     
    What do you mean by 'smart phone compromising a wireless network'?
     
    > couldn't the
    > converse occur? What's the difference between Android Debug Bridge
    > accessing my friend's phone via the USB cable and via wireless?
     
    By default adb, only listens on USB. You have to explicitly tell adb to
    listen on a TCP port with something like:
     
    adb tcpip 5555
    adb connect 192.168.0.101:5555
     
    > Is deselecting 'Unknown Source' secure protection?
     
    That has nothing to do with it.
     
    It is a lot easier for 'pirates' to buy a single paid app, break whatever
    protection it has and then resell on a '20$/month all you can download'
    site. Unless you friend looks like a pirate, you don't have much to
    worry about :)

     

    mohana priya <gpriyaraj14@gmail.com> Nov 30 09:51PM -0800  

    Hello android developers.can u please tell me How and where to
    download the motorola droid x emulator for android application with
    phonegap.Thanks in Advance.

     

    dnkoutso <dnkoutso@gmail.com> Nov 30 08:46PM -0800  

    Here's the scenario:
     
    - Start Activity A
    - Activity A starts service S
    - Service S runs in foreground mode and shows up a notification which when
    pressed takes the user to Activity B (singleTop!!)
    - Activity B shows up
    - Press HOME
    - Go into DDMS and kill your apps process to simulate that your app died.
    - Android will say "Rescheduling crashed service in 5000ms" (sometimes
    longer)
    - Service S restarts and notification is shown.
    - User now processes the notification icon...
     
    ...at this time, Android will recover both Activities A and B due to the
    fact the process ended unexpectedly. But despite the fact Activity B is
    singleTop android will spawn it AGAIN because the user clicked on the
    notification. This results into having A -> B -> B on the activity stack.
    Pressing back will take you again onto the first recovered instance of
    Activity B.
     
    Can someone from the Android team clarify what is happening behind the
    scenes and how to avoid this? What is the best way to simulate that Android
    killed the process due to low memory? Is pressing STOP from DDMS good
    enough or an edge case and this should never happen under normal
    circumstances?
     
    What is the difference between Force Stop from Settings --> Applications
    versus STOP from DDMS?
     
    Thanks in advance!

     

    dnkoutso <dnkoutso@gmail.com> Nov 30 09:23PM -0800  

    If the user presses Force Stop from Settings then the service, and overall
    the app process, is never restarted. I am assuming this is intended because
    the user explicitly asked the app to close.

     

    Mukesh Srivastav <mukichamps@gmail.com> Dec 01 10:56AM +0530  

    Absolutely correct.
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
     
    --

     

    Andrei <entredia@gmail.com> Nov 30 08:09PM -0800  

    Good afternoon. Prompt why this code works in Android 2.2 and not
    working in Android 2.1. Сalling dialogue.
    final Dialog pricewc = new Dialog(this);
    LayoutInflater inf = getLayoutInflater();
    View layoutdialog = inf.inflate(R.layout.pricewc,
    (ViewGroup)findViewById(R.id.pricewcadd));
    pricewc.setContentView(layoutdialog);
    final EditText textdialog =
    (EditText)pricewc.findViewById(R.id.pricewcadd);
    pricewc.setTitle(R.string.dialog_add_wc_coast);
    Button bn = (Button)pricewc.findViewById(R.id.buttonAdd);
    Button bn_cansel =
    (Button)pricewc.findViewById(R.id.buttonAdd_cansel);
    bn.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
    showDialog(ExitActvitiFinal);
    pricewc.cancel();
     
    }
    });
    bn_cansel.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
    pricewc.cancel();}
     
    });
    pricewc.setCancelable(false);
    pricewc.show();
    return null ;

     

    lin qian <lqsohu2008@gmail.com> Dec 01 11:29AM +0800  

    According these, I think some cases will you come across :
    open sensor
    1: and then screen off, phone will close sensor. if screen on, sensor will
    be lunched, you can log the sensor go on. It's not affect logging result.
    2: if not close sensor, I think it should be used AlarmManager to log
    because that it can wake up CPU when asleep status.
     
    In here I want to clarify different about Thread.sleep and AlarmManager
    When I create a app using thread sleep to run something every 20s, run that
    app and then let screen off in device not connect any usb line , about
    over 20m, I connect the usb and logcat ,
    I find the thread still run, cpu not sleep, it's amazing. Could you give
    some comments about that ?
     
     
     

     

    Pete <ghar@elusivestars.com> Nov 30 07:17PM -0800  

    www.elusivestars.com
    Currently in open Beta should be live by this weekend. Our approach is
    to use Real Users and Real Devices. Users are a huge part of the
    equation since they are unpredictable :)
    Pricing will be announced when we launch, but it will be Free for Free
    Apps.
     
    Pete
    elusivestars - Founder
     
    On Nov 30, 7:40 pm, Christopher Van Kirk

     

    RAJU V <kathirirajanv@gmail.com> Dec 01 08:49AM +0530  

    ya its possible to do.....
     
     
     
     
    ~~~~~~RAJU~~~~~~
    ~~www.itdoall.co.cc~~
     
     

     

    Thomas Fjellstrom <tfjellstrom@gmail.com> Nov 30 07:04PM -0800  

    > Had exactly the same problem. As it looks like, the issue is not that
    > the callback isn't fired, but that when Android creates a new
    > SurfaceView, it also creates a new holder. Check if this helps you:http://groups.google.com/group/android-developers/browse_thread/threa...
     
    Thanks for the reply. Here's what I currently do when creating the new
    SurfaceView:
     
    surface = new MySurface(getApplicationContext());
    SurfaceHolder holder = surface.getHolder();
    holder.addCallback(surface);
    holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
    setContentView(surface);
     
    So it doesn't look like I'm keeping the holder around, at least it
    shouldn't unless somehow Android is pointing to the wrong one when
    creating a new SurfaceView.

     

    "s.rawat" <imsaurabhrawat@gmail.com> Nov 30 12:06PM +0530  

    HI,
    This question is related to get the gallery View from the images stored in
    the /data or sdcard folder.
     
     
    I have modified the source
    code<http://developer.android.com/resources/tutorials/views/hello-gallery.html>from
    the android.developer site for gallery view of images kept in Drawable
    folder.
     
     
    To display the same images on Click I have modified it as follows, to view
    the image on click :
     
     
    public void onItemClick(AdapterView<?> parent, View v, int
    position, long id) {
    // Toast.makeText(HelloGallery.this, "" + position,
    Toast.LENGTH_SHORT).show();
     
    ImageView imageView = (ImageView) findViewById(R.id.image1);
     
    imageView.setImageResource(mImageIds[position]);
     
    > Setting the Image IDs in the setImageResource.This is simple as the
    images are static and are already present in the Drawable folder.
     
     
    Here is the code snippet(main parts) for the above :
     
    public class HelloGallery extends Activity implements {
    private Integer[] mImageIds = {
    R.drawable.sample_1,
    R.drawable.sample_2,
    R.drawable.sample_3,
     
    };
     
    Gallery gallery = (Gallery) findViewById(R.id.gallery1);
    gallery.setAdapter(new ImageAdapter(this));
     
    gallery.setOnItemClickListener(new OnItemClickListener()
    {
    public void onItemClick(AdapterView<?> parent, View v, int
    position, long id) {
    // Toast.makeText(HelloGallery.this, "" + position,
    Toast.LENGTH_SHORT).show();
     
    ImageView imageView = (ImageView) findViewById(R.id.image1);
     
    imageView.setImageResource(mImageIds[position]);
     
    }
     
    public class ImageAdapter extends BaseAdapter {
    public View *getView*(int position, View convertView,
    ViewGroup parent) {
     
    ImageView imageView = new ImageView(mContext);
    * imageView.setImageResource(mImageIds[position]);*
    imageView.setLayoutParams(new Gallery.LayoutParams(150, 120));
    imageView.setScaleType(ImageView.ScaleType.FIT_XY);
    imageView.setBackgroundResource(mGalleryItemBackground);
     
    return imageView;
    }
     
    }
    But now I want the images to be picked from the SD card or /data folder
    instead from the Drawable f <http://folder.is>older.
    So is it possible to get the * resource id of the files(JPEG, PNG ) so that
    I can reuse the above code.*
     
    Other way could be using bitmap for setting the view of all the images in
    the /data (Not sure)
     
    public View *getView*(int position, View convertView, ViewGroup parent) {
     
    File imgFile = new File("*/data/1321296131284.jpg*");
     
    Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
     
    ImageView imageView = new ImageView(mContext);
     
    // imageView.setImageResource(mImageIds[position]);
     
    imageView.setImageBitmap(myBitmap);
     
    imageView.setLayoutParams(new Gallery.LayoutParams(150, 120));
     
    imageView.setScaleType(ImageView.ScaleType.FIT_XY);
     
    imageView.setBackgroundResource(mGalleryItemBackground);
     
    return imageView;
     
    }
     
     
    But I am not getting the thumbnails of the images by this method nor
    the image on clicking it.I am getting a grey thumbnail out of it.
     
    PLz suggest/advice to achieve this.
     
     
    Plz advice.
    Rgds,
    Saurabh
     
     
     
    "..pain is temporary.....quitting lasts forever......"

     

    Mukesh Srivastav <mukichamps@gmail.com> Nov 30 12:03PM +0530  

    Paste the Complete log
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
    On Wed, Nov 30, 2011 at 11:30 AM, Hunny Jain
     
    --

     

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

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

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

Comments: (0)

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

    Hal Harrison <closeenough.backup@gmail.com> Nov 30 06:57PM -0800  

    What prevents a pirate from copying an apk from an Android phone via
    wi-fi or cell phone call?
     
    I have a complete version of my app minus LVL. I adb install it to my
    friend's Android phone for field testing and he promises not to let
    anyone attach a cable to his phone. How great is the risk of my mild-
    mannered app escaping into the wild without his knowledge?
     
    I apologize if this is a dumb question. Perhaps I should sign my self
    "paranoid".
     
    Hal Harrison

     

    dillipk <codersnet2010@gmail.com> Nov 30 12:28PM -0800  

    Hello,
    I have an app which displays fine on most of the phones(Droid, Droid
    X, Droid 3 already tested). When I installed the same app on Motorola
    Bionic, the screen size looks smaller.
     
    Please advise me..
     
     
    Thanks,
    DK

     

    lbendlin <lutz@bendlin.us> Nov 30 06:39PM -0800  

    define "smaller". Do you see a black border ?

     

    SL <ecp_gen@my-rialto.com> Dec 01 11:09AM -0800  

    With ARM's DS-5, is there a possibility of Android IDE using C/C++,
    instead of java ?
     
    Just contemplating.
     
    --
    Using Opera's revolutionary email client: http://www.opera.com/mail/

     

    Christopher Van Kirk <christopher.vankirk@gmail.com> Dec 01 08:40AM +0800  

    Anyone got a line on a cheap Android app testing service?
     
     
    Cheers...

     

    maddog <JJCurtis88@gmail.com> Nov 30 04:51PM -0800  

    Apkudo is doing beta testing of their testing service. They test your app
    on all Android device and send you a report. Its free from what I
    understand. They use Monkey for their tests. Go to www.Apkudo.com and sign
    up then message them requesting to test your app. More info on
    apkudo.wordpress.com.

     

    Christopher Van Kirk <christopher.vankirk@gmail.com> Dec 01 07:22AM +0800  

    Thanks for this. I was able to get everything uploaded. After
    publishing, however, inexplicably the app doesn't appear in the market.
    Googled it, turned protection off. Still no joy.
     
    I recall seeing some mention of problems with apps not appearing in
    October, but there's a note saying they've fixed that. Anyone published
    a new app recently? Confirmation that it's working for others would help
    me narrow down my problem.
     
    Cheers,
     
    Chris...
     
    On 11/30/2011 9:10 PM, TreKing wrote:

     

    "Harri Smått" <harism@gmail.com> Dec 01 02:23AM +0200  

    Hi,
     
    Last week it took a few hours before my application showed on Android Market searches after publishing it. No problems to my best knowledge since.
     
    --
    H
     
    On Dec 1, 2011, at 1:22 AM, Christopher Van Kirk wrote:
     

     

    Christopher Van Kirk <christopher.vankirk@gmail.com> Dec 01 08:31AM +0800  

    I see what it is now. It's visible in the U.S., but not outside the U.S.
    I guess it must take some time to make its way offshore.
     
    On 12/1/2011 8:23 AM, Harri Smått wrote:

     

    Richard Schilling <coderroadie@gmail.com> Nov 30 04:06PM -0800  

    ping.

     

    Erik <erik@browne.name> Nov 30 03:35PM -0800  

    If you sell all the free hardware you get at the conference, you might end
    up with a profit.

     

    Dianne Hackborn <hackbod@android.com> Nov 30 12:45PM -0800  


    > I guess in Android 3.2 they now allow multitouch to go the multiple
    > views. But I have not tested it.
     
    This was added in Android 3.0, and it does work.
     
     
    > Whoever thought of the one view thing is a moron, period. It should
    > have just worked. But noooooo. We are Google we do everything the hard
    > way.
     
    Well I guess I can live with being called a moron. What shall I call you?
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    niko20 <nikolatesla20@yahoo.com> Nov 30 01:47PM -0800  

    Dianne I appreciate your help in the forums and your hard work on
    Android. However, I think you even have to admit that multitouch, at
    least in its original form, is a poorly implemented, complicated API.
    If they cleaned it up as of Android 3.0, that is good news for devs.
     
    -niko
     

     

    Dianne Hackborn <hackbod@android.com> Nov 30 02:18PM -0800  

    Well Android started without any multi-touch API at all, a simple version
    was added in an update (with the constraint that the platform itself
    couldn't use it for anything), and it has been evolving since then. I
    certainly agree that the initial API was difficult to use for some common
    things, because it was just a low-level API to provide the information for
    apps but apps had to manually deal with the data themselves. I don't know
    why you think the implementation was poor, though I would actually say the
    general touch event implementation was less efficient than it could be (due
    to schedule needs for shipping a product), and the current implementation
    that first appeared in 2.3 is much better.
     
    One bit of advice: you may want to stop and think about calling people
    morons for things when you don't actually know the reasons and design
    trade-offs that were involved in the decisions.
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    niko20 <nikolatesla20@yahoo.com> Nov 30 01:54PM -0800  

    I've set up the community edition on my test PC. It's nice to be able
    to debug native code and have it work (at least on Windows).
     
    -nik
     
    On Nov 30, 5:56 am, Daniel Drozdzewski <daniel.drozdzew...@gmail.com>
    wrote:

     

    "muhammad.umer12@hotmail.com" <muhammad.umer12@hotmail.com> Nov 30 01:48PM -0800  

    Hi,
    I am succeed to record video through Mediarecorder on SD card
    but i want to send this video to pc server without writing to SD card.
    I search it and i found the parcelFileDescriptor is the way to send
    video to TCP socket
    but i don't know how to receive it on server side please explain it.
    here is my client side code
     
    socket = new Socket("192.168.15.220", 8888);
    ParcelFileDescriptor pfd =
    ParcelFileDescriptor.fromSocket(socket);
    recorder = new MediaRecorder();
    recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
    recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
     
    recorder.setOutputFile(pfd.getFileDescriptor());
     
    recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
    mPreview = new Preview(VideoRecorder.this,recorder);
     
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(mPreview);
     
    I want to receive it on server side and save it to file.Is it
    possible? Please help me. I want a server side code.
     
    Thanks and Regards
     
    Umer

     

    John Goche <johngoche99@googlemail.com> Nov 30 10:11PM +0100  

    Hello,
     
    I have posted this message before but got no repiles
    so I decided to post it again because I need to detect
    when a single second finger goes down while the first
    one is still down on my canvas... here is my old post:
     
    I have an LG Optimus Net (P690) which as far as I understand
    claims to support multitouch (as it sais on the following site:
    http://www.mobilespecs.in/2011/10/lg-optimus-net-also-known-as-p690.html
    not sure if capacitive touch screen means the same thing as
    multitouch.
     
    However when I try the following code...
     
    public boolean onTouchEvent(MotionEvent event) {
     
    int pointerIndex = (event.getAction() &
    MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT;
    int action = event.getAction() & MotionEvent.ACTION_MASK;
     
    switch (action) {
     
    case MotionEvent.ACTION_DOWN:
     
    System.out.println("got down");
    case MotionEvent.ACTION_POINTER_DOWN:
    System.out.println("got pointer down");
     
    int screenX = (int) (event.getX(pointerIndex) * scaleX);
    int screenY = (int) (event.getY(pointerIndex) * scaleY);
     
    I see the code run when I place the first finger down. When I place the
    second
    finger down without lifting the first one I don't see the
    ACTION_POINTER_DOWN.
     
    Not sure what I'm doing wrong if anything.
     
    Thanks for your help,
     
    John Goche

     

    Dianne Hackborn <hackbod@android.com> Nov 30 12:42PM -0800  

    Sorry I don't follow, are you saying your layout doesn't care about the
    orientation, but if you should still be checking the orientation? Because
    if that is the question, then I think the answer is no. :)
     
     
    --
    Dianne Hackborn
    Android framework engineer
    hackbod@android.com
     
    Note: please don't send private questions to me, as I don't have time to
    provide private support, and so won't reply to such e-mails. All such
    questions should be posted on public forums, where I and others can see and
    answer them.

     

    Marcelo Henrique <marcelohd02@gmail.com> Nov 30 04:19PM -0200  

    Google Maps
     
     
    main.xml
    Failed to find style 'mapViewStyle' in current theme
     
     
     
     
     
     
    - Marcelo Henrique -
    "Se não puder se destacar pelo talento, vença pelo esforço." (Dave
    Weinbaum)

     

    James Black <planiturthian@gmail.com> Nov 30 03:11PM -0500  

    Under the application element in your manifest add:
    <uses-library android:name="com.google.android.maps" />
     
     
     
    --
    "I know that you believe you understand what you think I said, but I'm not
    sure you realize that what you heard is not what I meant."
    - Robert McCloskey

     

    Kristian <kristian.evensen@gmail.com> Nov 30 10:14AM -0800  

    Hello,
     
    I am experimenting with the VpnService that was added to Android in
    SDK 4.0. I have gotten as far as starting the VpnService, however, I
    am unable to create the virtual interface. My code throws an
    IllegalStateException and I am not able to figure out why.
     
    My cut down example looks like this:
     
    ParcelFileDescriptor pfd = null;
     
    VpnService.Builder b = new VpnService.Builder();
    try{
    b.addAddress("10.0.6.2", 24);
    b.setMtu(1460);
    b.setSession("TunnelTest");
    } catch(IllegalArgumentException e){
    Log.v("Service", "Address is invalid!");
    stopSelf();
    return;
    }
     
    try{
    pfd = b.establish();
    } catch (IllegalArgumentException e){
    Log.v("Service", "Interface was provided with an illegal
    argument");
    } catch (IllegalStateException e){
    e.printStackTrace();
    Log.v("Service", "Illegal state");
    } catch (SecurityException e){
    Log.v("Service", "Security exception thrown");
     
    What I try to do here is to create a virtual interface with IP
    10.0.6.2, belonging to the 10.6.0.0/24 subnet. The exception is thrown
    by the b.establish() call.
     
    This is the full stack trace:
     
    11-30 17:51:10.863: W/System.err(2741):
    java.lang.IllegalStateException: Cannot create interface
    11-30 17:51:10.875: W/System.err(2741): at
    android.os.Parcel.readException(Parcel.java:1335)
    11-30 17:51:10.875: W/System.err(2741): at
    android.os.Parcel.readException(Parcel.java:1281)
    11-30 17:51:10.875: W/System.err(2741): at
    android.net.IConnectivityManager$Stub
    $Proxy.establishVpn(IConnectivityManager.java:1321)
    11-30 17:51:10.875: W/System.err(2741): at android.net.VpnService
    $Builder.establish(VpnService.java:472)
    11-30 17:51:10.875: W/System.err(2741): at no.simtel.TestVpnService
    $TestVpn.run(TestVpnService.java:37)
     
    Thanks in advance for any help.
     
    /Kristian

     

    James Black <planiturthian@gmail.com> Nov 30 03:07PM -0500  

    Is your code running on the UI thread?
     
     
    --
    "I know that you believe you understand what you think I said, but I'm not
    sure you realize that what you heard is not what I meant."
    - Robert McCloskey

     

    Michael Roland <mi.roland@gmail.com> Nov 30 10:46AM -0800  

    Hallo,
     
    >           android:resource="@xml/tecnologia" />
    >         </activity>
     
    > I thought that a TECH_DISCOVERED launch my application but it does not
     
    Have you correctly setup your tecnologia XML file?
     
    For instance if youz want to trigger on type A tags, your XML file
    would look like this:
    <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <tech-list>
    <tech>android.nfc.tech.NfcA</tech>
    </tech-list>
    </resources>
     
    br,
    Michael

     

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

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

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

Comments: (0)

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

    tegbird <tegbird@gmail.com> Nov 30 05:58AM -0800  

    Thanks Mark,
     
    My next question would be does it remains same if we donot add
    "android:sharedUserId" ?
     
     
     

     

    lbendlin <lutz@bendlin.us> Nov 30 07:29AM -0800  

    The ListView is entirely dumb. It only does what the adapter tells it.
    change the data in the adapter and tell the listview to refresh. AFAIK
    there are no such fancy transitions as in IOS where you can (sort of) slide
    in and out list rows.

     

    skink <pskink@gmail.com> Nov 30 07:59AM -0800  

    lbendlin wrote:
    > change the data in the adapter and tell the listview to refresh. AFAIK
    > there are no such fancy transitions as in IOS where you can (sort of) slide
    > in and out list rows.
     
    yes, i know, that's why I asked OP what adapter they are using
     
    pskink

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 04:39PM +0400  

    Message has several fields for switching the logic on the receiving end:
     
    int what
    Object obj
    int arg1
    int arg2
     
    http://developer.android.com/reference/android/os/Message.html
     
    So you could do something like:
     
    void handleMessage(Message msg) {
    final int what = msg.what;
    switch (what) {
    ...
    }
    }
     
    Or even:
     
    void handleMessage(Message msg) {
    Runnable r = (Runnable) msg.obj;
    r.run();
    }
     
    ( or same with your own interface / base class )
     
    -- Kostya
     
    30 ноября 2011 г. 16:32 пользователь John Goche

     

    Christopher Van Kirk <christopher.vankirk@gmail.com> Nov 30 08:40PM +0800  

    If the callbacks share a common interface, you could accomplish that
    with an interface object.
     
     
    On 11/30/2011 8:32 PM, John Goche wrote:

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 04:41PM +0400  

    You can have as many handlers as needed, within reason.
     
    The work of dispatching messages to handlers is done by Looper, anyway.
     
    And that's where I think your original issue has its roots.
     
    Posting a more exact message than "I get an error saying I need to
    call prepare *or something* since I cannot have more than one
    handler per thread *or something*."
     
    ( I am pretty sure what it is, but let's see the message first )
     
    -- Kostya
     
    30 ноября 2011 г. 16:35 пользователь John Goche

     

    John Goche <johngoche99@googlemail.com> Nov 30 03:15PM +0100  

    Thank you for your reply, I've restructured my code a little bit
    and now I do have multiple handlers in my code but no longer
    get the error message about having to call looper.prepare()
    (which I tried calling without understanding exactly what it
    does and didn't get a nice result). Sorry if I left the details
    out, I spent some time restructuring my code and then was
    unable to get the same error message hence the vagueness.
     
    I'm still interested in what might have caused the orignal message
    telling me to call looper.prepare() though and the logic behind it.
     
    Thanks,
     
    John Goche
     
    2011/11/30 Kostya Vasilyev <kmansoft@gmail.com>
     

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 07:48PM +0400  

    A thread that intends to spend its lifetime in a message dispatching loop
    needs to call Looper.prepare() before going into Looper.loop().
     
    http://developer.android.com/reference/android/os/Looper.html
     
    This initializes the data structures needed by loop() later. The UI thread
    has this done by the framework, but it's necessary for your own thread.
     
    -- Kostya
     
    30 ноября 2011 г. 18:15 пользователь John Goche

     

    Adam Bell <abell@safenet-inc.com> Nov 30 07:47AM -0800  

    Seems in particular that close(0), close(1), and close(2) cause a process
    hang when fork() is used.
    When built with Android code under the external directory, everything works
    as expected.

     

    James Black <planiturthian@gmail.com> Nov 30 10:25AM -0500  

    Thank you for your response.
     
    I am doing something similar for determining when a waypoint is reached. I
    was hoping for something simpler, that is all.

     

    Hrishi <hrishikesh.bhalerao@gmail.com> Nov 30 01:38AM -0800  

    Please bare if is repeated question...
     
    I am able to connect to wifi device (printer). Now i want to print a
    pdf file programatically using wifi connection. can someone tell me
    how to do it because i am not getting any way to do it. I am able to
    print text ,html file n images but pdf file not get printed in proper
    format what is the way to send pdf file to printer in proper
    format ...
     
    Is there any API available for printing pdf file ?
     
    Please suggest third party APIs..
     
    Please help me !!
     
    Thanks in advance !!!

     

    Kenny Riddile <kfriddile@gmail.com> Nov 30 09:49AM -0500  

    On 11/30/2011 4:38 AM, Hrishi wrote:
     
    > Please suggest third party APIs..
     
    > Please help me !!
     
    > Thanks in advance !!!
     
    How are you printing the text, html files, and images? I'd really like
    to know because I haven't been able to find anything on Android
    printing. The online documentation for Google's Cloud Print intent has
    been a dead link for months.

     

    "muhammad.umer12@hotmail.com" <muhammad.umer12@hotmail.com> Nov 30 06:26AM -0800  

    Hi,
    I am succeed to record video through Mediarecorder on SD card
    but i want to send this video to pc server without writing to SD card.
    I search it and i found the parcelFileDescriptor is the way to send
    video to TCP socket
    but i don't know how to receive it on server side please explain it.
    here is my client side code
     
    socket = new Socket("192.168.15.220", 8888);
    ParcelFileDescriptor pfd =
    ParcelFileDescriptor.fromSocket(socket);
    recorder = new MediaRecorder();
    recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
    recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
     
    recorder.setOutputFile(pfd.getFileDescriptor());
     
    recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
    mPreview = new Preview(VideoRecorder.this,recorder);
     
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(mPreview);
     
    I want to receive it on server side and save it to file.Is it
    possible? Please help me. I want a server side code.
     
    Thanks and Regards
     
    Umer

     

    "Danny S." <danny.schimke@googlemail.com> Nov 30 06:02AM -0800  

    I think this would not work. TextView extends View already... And If I
    put the TextView within a LinearLayout e.g. and inflate it in the
    constructor of my custom view, I have to set the attributes manually
    too. It seems I have to retrieve all my TextViews and set the Typeface
    for each separate in the code. The idea of an extended TextView would
    be the best and clean way, but I think its not possible as long as I
    add the android based attributes to the "declare-stylable set" too...
    I think this is really ugly... If I forget one - someone wonders why
    their set attributes not act for my custom view.
     
    Best regards,
    -Danny S.
     
     

     

    "Danny S." <danny.schimke@googlemail.com> Nov 30 06:15AM -0800  

    For additional info:
     
    I logged out the attrs that are given to my View:
     
    Attribute 1: textStyle
    Attribute 2: textColor
    Attribute 3: gravity
    Attribute 4: layout_width
    Attribute 5: layout_height
    Attribute 6: ttfName
     
    But textStyle, textColor or gravity for example have no effect. I
    thought when I call the super constructor and pass the attr to it, it
    takes all the relevant attributes... But it doesn't!
     
    -Danny
     

     

    Erik <artificialwonders@gmail.com> Nov 30 06:03AM -0800  

    Google thought the app was "sexually explicit" and banned it. I may
    face the same problem with Paypal. Paypal takes $0.30 per transaction.
    On a $1 donation it´s the same as googles cut on Android Market. From
    my point of view a donation app is the best option and Paypal donation
    the next best.
     

     

    TreKing <trekingapp@gmail.com> Nov 30 07:38AM -0600  


    > then how to go about it.
     
    Do a google search for "android map search".
     
     
    > I need some code examples ??
     
    That's a question ??
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Christopher Van Kirk <christopher.vankirk@gmail.com> Nov 30 08:47PM +0800  

    For some reason, the market won't accept the .apk I'm trying to upload.
    Here's what I did.
     
    Uploaded the .apk once and saved it. Didn't activate or publish.
    Uploaded a bunch of the ancillary files as well. Discovered that I'd
    missed something, so I recompiled the app, then deleted the apk in the
    market. Now I'm trying to upload the new .apk and it's telling me I need
    to upgrade the old one. The old one, however, is no longer visible.
     
    How does one get around this?
     
    Cheers,
     
    Chris...

     

    Kostya Vasilyev <kmansoft@gmail.com> Nov 30 05:09PM +0400  

    Try bumping your version code in the manifest.
     
    30 ноября 2011 г. 16:47 пользователь Christopher Van Kirk <

     

    m3n0R <cesaryomismo@gmail.com> Nov 30 05:02AM -0800  

    Ok I'll try it to do.
     
    Another thing is. Imagine I've made an specific layout, that handles
    different kind of screen wides, but it doesn't care about if you in
    portrait. Shall I use a condition and use a different layout for every
    position?
     
    For example:
     
    if (getResources().getConfiguration().orientation ==
    Configuration.ORIENTATION_LANDSCAPE) {
    //specific layout for LANDSCAPE
    mAdapter = new
    NoLocGigAdapter(getActivity(),R.layout.no_loc_gig_list_landscape,gList);
    else {
    //Portrait Layout
    mAdapter = new
    NoLocGigAdapter(getActivity(),R.layout.no_loc_gig_list_portrait,gList);
    }
    setListAdapter(mAdapter)
     
     
    And in the getView() method:
     
    if (getResources().getConfiguration().orientation ==
    Configuration.ORIENTATION_LANDSCAPE) {
    //specific layout for LANDSCAPE
    holder.tit.setText(g.getTitle());
    else {
    //Portrait Layout
    holder.tit.setText(g.getTitle());
    holder.des.setText(g.getDescription());
    holder.slots.setText(String.valueOf(g.getSlotsFree()));
    holder.time.setText(g.getTimeLeft());
    }
     
     
    Thank you again
     
     

     

    TreKing <trekingapp@gmail.com> Nov 30 06:48AM -0600  

    On Wed, Nov 30, 2011 at 3:20 AM, Efi Merdler-Kravitz
    > being calculated ?
    > I've uploaded a new version yesterday (29th according to my time
    > zone), however the update label has the day before.
     
    What difference does it make?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    skink <pskink@gmail.com> Nov 30 04:43AM -0800  

    Build Account wrote:
    > programmatically.
     
    > Is that possible to call and create a CustomView A from Custom View B?
     
    > Please advice me anything.
     
    what do you want to do with CustomViewA?
     
    pskink

     

    Sheph <ishaibin@gmail.com> Nov 30 01:55AM -0800  

    But where can I found more information about what will be supported in
    the future ?
    Are there any specifications ?
     

     

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

Comments: (0)

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

    John Goche <johngoche99@googlemail.com> Nov 30 01:32PM +0100  

    Thank you TreKing for your advice,
     
    But then in my handleMessage I would have to check with
     
    if (inst instance of Foo)
    inst.foocallback();
    else if (inst instanceof Bar)
    inst.barcallback();
    else if (...)
     
    or is there a neater solution, perhaps using polymorphism or a design
    pattern of some sort
    so that my handleMessage does not quickly turn into a mess?
     
    Thanks,
     
    John Goche
     
     

     

    John Goche <johngoche99@googlemail.com> Nov 30 01:35PM +0100  

    Also, why would it be better to have one handler than multiple handlers
    anyways
    given that in some situations multiple handlers can compile?
     

     

    Shajahan <lovesaiju@gmail.com> Nov 30 05:50PM +0530  

    when we start the application,
    map shows the current location and then if i want to find any particular
    point/location (say a multiplex) within the radius specified in kms(say 25
    kms).
    then how to go about it.
     
    I need some code examples ??

     

    saex <elpablosaez@gmail.com> Nov 30 04:05AM -0800  

    I know which video formats are supported by android (
    http://developer.android.com/guide/appendix/media-formats.html )
     
    But i need to know which resolutions are supported by VideoView
    player. I can't find it on google.
     
    I tested with a 480x320 video and it plays fine, but i tested with
    higher resolution video (976x640) and it fails.
     
    Which resolutions are supported by VideoView?

     

    NaveenShrivastva <kumarnaveen.sinha@gmail.com> Nov 30 05:34PM +0530  

    Hello All your this information helps me very well now i handled this bug...
     
     
    g8 developers you all..
     
    Thanks very much.
     
    On Wed, Nov 30, 2011 at 2:50 PM, NaveenShrivastva <

     

    Rocky <rkjhaw1983@gmail.com> Nov 30 04:41PM +0530  

    Hi All,
     
    I have created Calendar, which is working fine in Samsung, HTC, and other
    device, but whenever I'm using Motorola Milestone 2.1, my task start &end
    time is showing 1 hrs before.
     
    Lets example
     
    I created a task at 9.00 AM to 10.00 AM on 3rd December 2011
     
    when i'm seeing my task it is showing from 8.00 AM to 9AM.
     
    Please help, whether it is issue of code or OS or device, but code is
    working fine for other device(I tested on 5-6 devices with 2.1 to 2.2),
    issue is only with Motorola milestone 2.1.
     
     
    --
    Thanks & Regards
     
    Rakesh Kumar Jha
    Android Developer, Trainer and Mentor
    Bangalore
    (O) +918030274295
    (R) +919886336619

     

    Mukesh Srivastav <mukichamps@gmail.com> Nov 30 04:48PM +0530  

    Rajesh,
     
    It is not a code issue, that is device/OS issue. nothing to do with the
    code.
     
    Probably you need to check the Motorola device Time Settings and check
    whether it has GMT by default or what it is.
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
     
    --

     

    Rocky <rkjhaw1983@gmail.com> Nov 30 05:26PM +0530  

    Thanks Mukesh for quick reply, it is GMT+5.30
     
     
    --
    Thanks & Regards
     
    Rakesh Kumar Jha
    Android Developer, Trainer and Mentor
    Bangalore
    (O) +918030274295
    (R) +919886336619

     

    Christopher Van Kirk <christopher.vankirk@gmail.com> Nov 30 06:28PM +0800  

    Isn't it just as easy to write this mail to ARM?
     
    On 12/1/2011 5:01 AM, SL wrote:

     

    Narendra Bagade <bagadenarendra@gmail.com> Nov 30 05:14PM +0530  

    How to use this tool?
    Does anyone has idea about it...
     
    On Wed, Nov 30, 2011 at 3:58 PM, Christopher Van Kirk <
     
    --
    Regards,
    Narendra
    .

     

    Daniel Drozdzewski <daniel.drozdzewski@gmail.com> Nov 30 11:56AM  

    > How to use this tool?
    did you try HELP or ARM's on-line documentation?
     
    > Does anyone has idea about it...
    some people do...
     
    --
    Daniel Drozdzewski

     

    rachana govilkar <rachana.govilkar@gmail.com> Nov 30 03:41AM -0800  

    hey now i hav a problem working on Create Contact.....i used
    http://developer.android.com/guide/topics/providers/content-providers.html
    this link....
    but as per given there i could create contact statically....
    but i need to create dynamically as android built-in create contact
    functionality....
    n also tell me when u save the contact u do save it in Database or
    smthing else??
    any help is appreciated.....
     
    On Nov 29, 5:10 pm, rachana govilkar <rachana.govil...@gmail.com>
    wrote:

     

    Build Account <newandroid66@gmail.com> Nov 30 03:32AM -0800  

    Hello.
     
    I have a CustomView class which work well.
    And I want to use the Custom View A from Custom View B
    programmatically.
     
    Is that possible to call and create a CustomView A from Custom View B?
     
    Please advice me anything.

     

    Mukesh Srivastav <mukichamps@gmail.com> Nov 30 05:06PM +0530  

    Did u try calling setContentView(new CustomviewB(this));
     
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
     
    --

     

    "Danny S." <danny.schimke@googlemail.com> Nov 30 03:26AM -0800  

    Hi,
     
    I want to create a custom TextView that uses custom Typeface. I do
    this, cause I won't set Typeface for each TextView within the code. I
    created a class:
     
    public class MyTextView extends TextView {
    public MemoryTextView(Context context, AttributeSet attrs) {
    super(context, attrs);
     
    // retrieve attributes
    TypedArray array = mContext.obtainStyledAttributes(attrs,
    R.styleable.MemoryTextView);
     
    String font = array.getString(R.styleable.MemoryTextView_ttfName);
    // set font if defined, otherwise use standard font
    if (font != null)
    setFont(font);
     
    // free up memory
    array.recycle();
    }
    }
     
    I created the attributes for my view within the attrs.xml. And I can
    use the view and see my custom font.
     
    In Layout I use my view this way:
    <my.package.structure.views.MyTextView
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    myTextView:ttfName="AldrichRegular"
    myTextView:text="@string/app_name"
    android:textColor="@color/white"
    android:textStyle="bold"
    android:textSize="18sp"
    android:gravity="center" />
     
    Now the Problem: android based attributes I set does not work. My text
    is not bold, is not sized 18sp and gravity is not set like I would. If
    I add the android attribute to my "declare-styleable" it is used (e.g.
    the gravity).
     
    <declare-styleable name="MemoryTextView">
    <attr name="android:gravity" />
    ... other custom attributes
    </declare-styleable>
     
    But I can not list all the possible TextView styles to this list. It
    seems not to be the clear way. Where is my mistake? I only want a
    TextView with all of it's behavior and additional functionality...
     
    Thanks a lot,
    -Danny

     

    Mukesh Srivastav <mukichamps@gmail.com> Nov 30 05:00PM +0530  

    Your class might needs to extend View not the TextView, that helps.
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
     
    --
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.

     

    "Danny S." <danny.schimke@googlemail.com> Nov 30 03:33AM -0800  

    Note: I renamed it from MemoryTextView to MyTextView but got not all
    of them. Don't mind about the different names. In principle it works,
    but I cant use the android default attributes for my custom text
    view...
     

     

    arvi <s.v.arvi@gmail.com> Nov 30 02:27AM -0800  

    I've been working on a Gallery app. I want it to be able to handle a lot of
    images. And at the same time i don't want it to eat up the RAM ... Right
    now i'm batching images based on the current image viewed and loading only
    those... Is there any other efficient way to do this..

     

    Oli Wright <oli.wright@gmail.com> Nov 30 02:25AM -0800  

    The battle between my geek side and the side of me that might not have a
    spare 2 grand to get over there ;)

     

    rachana govilkar <rachana.govilkar@gmail.com> Nov 30 02:13AM -0800  

    hey e1 i am working on same Contact thing....
    n i did check tat link but http://developer.android.com/guide/topics/providers/content-providers.html
    this link is more helpful....
    n if u know how to create contacts dynamically plz let me know....
    i just want to create contact n send msg to him/her....
    usig the link i referred i am able to create contact via program....
    but i want to create it dynamically n display d list.....
    if anybody know plz leme know soon.....
    thnks
     
     

     

    jaggu <mjagadeeshbabu@gmail.com> Nov 30 03:34PM +0530  

    Hi i have taken tabactvity group .
    from spalchscreen itself how to strat my actvity
    i caludnt able start
    can any one please hguide me how to do this

     

    Mukesh Srivastav <mukichamps@gmail.com> Nov 30 03:38PM +0530  

    Intent intent = new Intent(splash.this,TabBarActivity.class)
    startActivity(intent);
    finish();
     
    Try the above code, Assuming, Splash is your splash screen class and
    TABBarActivtiy class is your which extends the TABActivity.
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
     
    --

     

    Manish Garg <mannishgarg2@gmail.com> Nov 30 01:57AM -0800  

    Hi All,
     
    I am trying to run my application on android 3.0 emulator on windows
    machine having window 7 OS. It is very slow. Sometime application is
    not getting started. Is there any specific hardware requriement like
    RAM size for android 3.0.

     

    Mukesh Srivastav <mukichamps@gmail.com> Nov 30 03:36PM +0530  

    Dont know,
     
    My experience is, it works much faster on Laptop with 2GB of RAM. Desktop
    very slow irrespective the RAM Size.
     
    Warm Regards,
    *Mukesh Kumar*,
    Android Consultant/Freelancer,
    India,Hyderabad.
     
     
     
    --

     

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