Thursday, June 14, 2012

[android-developers] android bluez how to get UUID ?

HI ALL
 
I debug bluetooth in android, i don't know how to get th UUID from Bluez,
 org.bluez.Adapter.GetProperties can't get UUIDS   
//----------------------------------------------------------
$ dbus-send --system --dest=org.bluez --print-reply /org/bluez/653/hci0 org.bluez.Adapter.GetProperties

results:

method return sender=:1.1 -> dest=:1.96
  array [
  dict entry(
  string "Address"
  variant string "A0:75:91:6C:27:82"
  )
  dict entry(
  string "Name"
  variant string "GalaxyS_Leey"
  )
  dict entry(
  string "Class"
  variant uint32 0
  )
  dict entry(
  string "Powered"
  variant boolean true
  )
  dict entry(
  string "Discoverable"
  variant boolean false
  )
  dict entry(
  string "Pairable"
  variant boolean true
  )
  dict entry(
  string "DiscoverableTimeout"
  variant uint32 120
  )
  dict entry(
  string "PairableTimeout"
  variant uint32 0
  )
  dict entry(
  string "Discovering"
  variant boolean false
  )
  dict entry(
  string "Devices"
  variant array [
  object path "/org/bluez/653/hci0/dev_48_C8_62_00_E5_09"
  object path "/org/bluez/653/hci0/dev_00_11_67_00_0D_C3"
  ]
  )
  dict entry(
  string "UUIDs"
  variant array [
  ]
  )
  ]
 
when i vote sdptool browse local
then get the err:
 
Failed to connect to SDP server on 00:00:00:FF:FF:FF: Connection refused
 
 
please anyone tell me how to get the UUID in android  using the bluez?
 
2012-06-14

Smartfire

发件人:android-developers
发送时间:2012-05-25 04:01
主题:[android-developers] Digest for android-developers@googlegroups.com - 25 Messages in 10 Topics
收件人:"Digest Recipients"<android-developers@googlegroups.com>
抄送:
 

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

    Matt Quigley <matthew.quigley@gmail.com> May 24 12:45PM -0700  

    There's something in the app that happens in the background
    sporadically (daily to weekly). It's CPU intensive, but I don't want
    it to slow down the device. Right now, I'm creating a thread with
    MIN_PRIORITY, but it doesn't seem to help in anyway from the perceived
    "slowdown" of the phone while the thread is running.
     
    Thread thread = new Thread() {
    @Override
    public void run() {
    // cpu-intensive stuff here...
    }
    };
    thread.setPriority(Thread.MIN_PRIORITY);
    thread.start();
     
    Some ideas I'm thinking about:
    - Creating a service specifically for this thread, instead of using
    the existing component (Activity/Service/etc.) it was initiated from.
    - Object.wait()ing occasionally (although that really won't stop any
    CPU intensive stuff from occurring)
    - Putting the thread in its own service in its own process, then
    giving the process minimum priority. Thing is, I don't know how to
    make a process use less CPU time.
     
    Any tips or links on how to get a thread to use less CPU*? More
    broadly, to prevent some thread from slowing Android down?
     
    Thanks,
    -Matt
     
    * Technically it's not using less CPU - I still have to do the same
    things. Really, it's spreading the CPU use out over more time, so
    technically it's less CPU usage per unit of time.

     

    Anirudh Loya <loya.anirudh@gmail.com> May 24 01:31PM -0400  

    *
    *
    *Hello Guys,*
    *
    *
    *I have developed an Android Application in version 2.2. Lately, I have
    learnt AdMob for advertisement does not support version 2.2 for developing
    an application's adds. **It supports all versions above 3.2. Now I have to
    convert my application from 2.2 to 3.2 or 4.0.3.*
    *
    *
    *Is there any direct way to do it other than creating new application and
    copy pasting each and every file ?*
     
     
    Thank you****
     
    Anirudh Loya | Android Developer**
     
    Desk: +9140-30681824 | Mobile: +91*9246561265*
     
    *Love your Job but don't Love your company, Because you may not know when
    your company stops loving you.-- Voice Of Love*

     

    TreKing <trekingapp@gmail.com> May 24 12:43PM -0500  


    > Lately, I have learnt AdMob for advertisement does not support version 2.2
    > for developing an application's adds.
     
     
    What has given you that impression?
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Anirudh Loya <loya.anirudh@gmail.com> May 24 01:47PM -0400  

    Because AdMob documentation says that !
     
    Even In Android Manifesto files android:confgchanges, I can't
    add screenSize|smallestScreenSize !
     
    Check it out .
     
     
    --
     
    Thank you****
     
    Anirudh Loya | Android Developer**
     
    Desk: +9140-30681824 | Mobile: +91*9246561265*
     
    *Love your Job but don't Love your company, Because you may not know when
    your company stops loving you.-- Voice Of Love*

     

    TreKing <trekingapp@gmail.com> May 24 12:58PM -0500  


    > Because AdMob documentation says that !
     
     
    Can you provide a direct link? I just have to question this as the vast
    majority of devices are for 2.3.X, so it seem borderline retarded that
    AdMob would cut support for all those devices and only work on a tiny
    fraction of devices.
     
    Plus, I use AdMob and don't recall any email or other warning stating that
    support for 2.X was going away ...
     
    -------------------------------------------------------------------------------------------------
    TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
    transit tracking app for Android-powered devices

     

    Anirudh Loya <loya.anirudh@gmail.com> May 24 02:03PM -0400  

    Adds gets display in all versions above 1.5 !
     
    That is not the issue. When I have developed application in 2.2 version, My
    logcat shows
     
    You must have AdActivity declared in AndroidManifest.xml with
    configChanges.
     
    Which I have already done.
     
    Can you atleast assist me in changing from 2.2 to 4.0.3 ?
     
     
     
    --
     
    Thank you****
     
    Anirudh Loya | Android Developer**
     
    Desk: +9140-30681824 | Mobile: +91*9246561265*
     
    *Love your Job but don't Love your company, Because you may not know when
    your company stops loving you.-- Voice Of Love*

     

    RichardC <richard.critten@googlemail.com> May 24 11:27AM -0700  

    Totally wrong.
     
    You only need to set your build platform to 15, NOT the <uses-sdk> element
    in your manifest.
     
    The current AdMob (6.0.1) still support running on android down to andoird-3
     
    My apps are compiling using platform version 15 with <uses-sdk
    android:minSdkVersion="4" android:targetSdkVersion="8"/> in the manifest.
     
    In summary I:
     
    - build with android-15
    - run on all version down to android-4
    - look and feel like an android-8 app on higher versions
     
    From the AdMob docs
    https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals
    "The Google AdMob Ads SDK for Android requires a run-time of Android *1.5* or
    later (set android:minSdkVersion to at least 3 in yourAndroidManifest.xml).
    This means you can develop with the latest version of the Android SDK and
    your app will still run on an earlier Android version (1.5 minimum). "
     
     
    On Thursday, May 24, 2012 6:31:28 PM UTC+1, Anirudh Loya wrote:

     

    Anirudh Loya <loya.anirudh@gmail.com> May 24 02:31PM -0400  

    You only need to set your build platform to 15, NOT the <uses-sdk> element
    in your manifest.
     
     
    How do i set Build platform to 15 ??
     
     
     
     
    --
     
    Thank you****
     
    Anirudh Loya | Android Developer**
     
    Desk: +9140-30681824 | Mobile: +91*9246561265*
     
    *Love your Job but don't Love your company, Because you may not know when
    your company stops loving you.-- Voice Of Love*

     

    RichardC <richard.critten@googlemail.com> May 24 11:51AM -0700  

    In Eclipse:
     
    right click your project > properties > android > [check] Android 4.0.3
    [OK]
     
    Then clean your project - from the Eclipse main menus:
    Project > Clean > [check] your project
    [OK]
     
     
    On Thursday, May 24, 2012 6:31:28 PM UTC+1, Anirudh Loya wrote:

     

    Anirudh Loya <loya.anirudh@gmail.com> May 24 02:54PM -0400  

    Thanks all ! It works now ..
     
     
    --
     
    Thank you****
     
    Anirudh Loya | Android Developer**
     
    Desk: +9140-30681824 | Mobile: +91*9246561265*
     
    *Love your Job but don't Love your company, Because you may not know when
    your company stops loving you.-- Voice Of Love*

     

    duadinam <somethingclever77@gmail.com> May 24 10:22AM -0700  

    Hi Droids,
     
    I'm a newbie developer working, looking for some advice.
     
    I'm working on a project with a custom drag and drop, and we can't use the
    drag and drop framework. However, many properties will be changing at
    once. I'm looking into using the ViewPropertyAnimator setX & setY function
    and applying them in an onTouchEvent, or changing the margins in
    LayoutParams for the View and invalidating it.
     
    From my research, the ViewProperyAnimator looks like it should be worse;
    however, I thought the difference in performance might be less significant
    when you're changing multiple view properties at the same time.
     
    What do you think?
     
    Thank you
    David

     

    Romain Guy <romainguy@android.com> May 24 10:27AM -0700  

    ViewPropertyAnimator is designed and implemented to be *faster* than
    animating multiple properties with ObjectAnimator, etc. Note that it
    only makes sense if you're animating the values.
     
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com

     

    David Ozersky <somethingclever77@gmail.com> May 24 02:26PM -0400  

    Hi Romain,
     
    Thanks for getting back to me...but I addressed my question to
    "Droids"...and you make "Droids"...does that you make you some kind of
    alien? :)
     
    Here is the other implementation I am thinking of
     
    -------------------------------------------------------------------------------------
    ...ACTION_MOVE
     
    ... get view, set new layout params, change properties etc
     
    invalidate()
    -------------------------------------------------------------------------------------
     
    I'm not sure exactly how the ViewPropertyAnimator works under the hood, but
    it looks like there is a lot going on, and the manual approach would
    probably be more efficient. But if it's a marginal improvement, I'd rather
    use the property animation.
     
    Thank you..whatever you are!
     

     

    Romain Guy <romainguy@android.com> May 24 11:49AM -0700  

    ViewPropertyAnimator is optimized to perform animations. It's not
    meant to be used to discreetly set properties.
     
    On Thu, May 24, 2012 at 11:26 AM, David Ozersky
     
    --
    Romain Guy
    Android framework engineer
    romainguy@android.com

     

    sebastian_bugiu <sebastian.bugiu.reloaded@gmail.com> May 24 10:37AM -0700  

    I have a LinkedQueue that stores the calls to anything from the GLES20
    class. After loading it up I send a requestRender() call to
    GLSurfaceView and in onDrawFrame() I process the queue and call the
    actual GLES20 method.
     
    Yet when I call GLES20.glLinkProgram() the function never returns. I
    don't have anything in the logcat, no exception, no killed thread
    nothing. It just remains there.
     
    Any ideas in which conditions glLinkProgram() doesn't return and what
    can I do to debug this situation?
     
    I use a queue in which I add the gl commands issued by the renderer
    and then I requestRender() to empty the queue by iterating through it
    and calling each method in the added order. Some gl commands are of
    get type and they can't be added to a queue so after issuing
    glCreateShader I immediately requestRender() and store the retrieved
    id that I then pass into the queue with the next commands like
    glAttachShader etc. So in one onDrawFrame() call I create the shaders
    and in the next I attach the source compile and link.
     
    What I do may seem awkward but it does create both a vertex and
    fragment shader and then compiles them both correctly. It also creates
    a program with no errors. But linking the shaders to program just goes
    into infinite loop or something

     

    RichardC <richard.critten@googlemail.com> May 24 11:32AM -0700  

    Have your tried a simple test case? I would suggest a skeleton program
    with just 1 fragment and 1 vertex shader and link them into a program.
     
    Are you calling glGetError and logging or aborting after every OpenGL ES
    API call?
     
     
    On Thursday, May 24, 2012 6:37:17 PM UTC+1, sebastian_bugiu wrote:

     

    sebastian_bugiu <sebastian.bugiu.reloaded@gmail.com> May 24 11:43AM -0700  

    Well the simple case works. I check after each call and compiling
    works.. creating the program works...everything return success. But
    when linking it just remains in the native call, never to return.
     
    I suspected that creating the shaders and program in one
    requestRender() and then linking in the next one could be the issue
    but it isn't.
     
    Anyway even if there is something wrong with my shader code it still
    should return immediately. This sounds like an Android bug to me....
     

     

    sebastian_bugiu <sebastian.bugiu.reloaded@gmail.com> May 24 11:48AM -0700  

    This is the vertex shader. I think it's basic enough
     
    uniform mat4 view_proj_matrix;
    uniform vec4 view_position;
     
    attribute vec4 vertex;
    attribute vec3 normal;
     
    varying vec3 vNormal;
    varying vec3 vViewVec;
     
    void main(void)
    {
    gl_Position = view_proj_matrix * vertex;
    vNormal = normal;
    vViewVec = view_position.xyz - vertex.xyz;
    }
     
    and the fragment shader:
     
    uniform vec4 color;
     
    varying vec3 vNormal;
    varying vec3 vViewVec;
     
    void main(void)
    {
    float v = 0.5 * (1.0 + dot(normalize(vViewVec), vNormal));
    gl_FragColor = v * color;
    }
     
    On May 24, 9:43 pm, sebastian_bugiu

     

    Karakuri Dev <karakuri.dev@gmail.com> May 24 10:05AM -0700  

    I'm trying to download a file in an AsyncTask. Here's the relevant code
    from my AsyncTask implementation:
     
    protected Uri doInBackground(String... params) {
    Uri fileUri = null;
    InputStream inStream;
    String url = params[0];
     
    try {
    URL u = new URL(params[0]);
    HttpsURLConnection connection = (HttpsURLConnection) u.openConnection();
     
    if (connection.getResponseCode() == HttpsURLConnection.HTTP_OK) {
    connection.connect();
    inStream = connection.getInputStream();
     
    String filename = url.substring(url.lastIndexOf(File.separator) + 1);
    File outFile = new File(Environment.getExternalStorageDirectory(), filename);
    FileOutputStream outStream = new FileOutputStream(outFile);
     
    try {
    byte[] buffer = new byte[BUFFER_SIZE];
    int count;
    while ((count = inStream.read(buffer)) != -1) {
    outStream.write(buffer, 0, count);
    }
     
    outStream.flush();
    fileUri = Uri.fromFile(outFile);
     
    } finally {
    inStream.close();
    outStream.close();
    }
    }
     
    } catch (IOException e) {
    Log.e(TAG, e.getMessage(), e.getCause());
    }
     
    return fileUri;
    }
     
    When I reach this line...
     
    FileOutputStream outStream = new FileOutputStream(outFile);
     
    ... I get the following in my logcat:
     
    05-24 09:36:30.589: E/WebViewActivity(1161): /mnt/sdcard/Test.pdf: open failed: EACCES (Permission denied)
    05-24 09:36:30.589: E/WebViewActivity(1161): libcore.io.ErrnoException: open failed: EACCES (Permission denied)
    05-24 09:36:30.589: E/WebViewActivity(1161): at libcore.io.Posix.open(Native Method)
    05-24 09:36:30.589: E/WebViewActivity(1161): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
    05-24 09:36:30.589: E/WebViewActivity(1161): at libcore.io.IoBridge.open(IoBridge.java:390)
    05-24 09:36:30.589: E/WebViewActivity(1161): at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
    05-24 09:36:30.589: E/WebViewActivity(1161): at com.example.webview.WebViewActivity$AsyncDownloader.doInBackground(WebViewActivity.java:119)
    05-24 09:36:30.589: E/WebViewActivity(1161): at com.example.webview.WebViewActivity$AsyncDownloader.doInBackground(WebViewActivity.java:1)
    05-24 09:36:30.589: E/WebViewActivity(1161): at android.os.AsyncTask$2.call(AsyncTask.java:264)
    05-24 09:36:30.589: E/WebViewActivity(1161): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    05-24 09:36:30.589: E/WebViewActivity(1161): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    05-24 09:36:30.589: E/WebViewActivity(1161): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
    05-24 09:36:30.589: E/WebViewActivity(1161): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    05-24 09:36:30.589: E/WebViewActivity(1161): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
    05-24 09:36:30.589: E/WebViewActivity(1161): at java.lang.Thread.run(Thread.java:856)
     
    My manifest has these permissions:
     
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     
    This has happened on both my handset and on emulators, and I can't figure
    out why there are permission issues. What am I missing?

     

    Hyukmin Kwon <u0.usr1@gmail.com> May 25 02:04AM +0900  

     

    m3n0R <cesaryomismo@gmail.com> May 24 09:27AM -0700  

    Hi everybody!
     
    I would like to know, why there is incompatibility problem with my
    application in some android devices (like HTC Explorer, Galaxy Mini...).
    Here is my manifest:
     
     
    <manifest
     
    xmlns:android="http://schemas.android.com/apk/res/android"
     
    package="com.newin.android"
     
    android:versionCode="2"
     
    android:installLocation="preferExternal"
     
    android:versionName="1.0.1" >
     
     
    <uses-sdk
     
    android:minSdkVersion="8"
     
    android:targetSdkVersion="15"/>
     

     
    <uses-permission android:name=
    "android.permission.ACCESS_COARSE_LOCATION" />
     
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
    />
     
    <uses-permission android:name="android.permission.INTERNET" />
     
    <uses-permission android:name="android.permission.ACCESS_GPS" />
     
    <uses-permission android:name="android.permission.CAMERA" />
     
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    />
     
    <uses-permission android:name=
    "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
     
    <uses-permission android:name=
    "android.permission.RECEIVE_BOOT_COMPLETED" />
     
    <uses-permission android:name="android.permission.GET_TASKS" />
     
    <supports-screens
     
    android:largeScreens="true"
     
    android:normalScreens="true"
     
    android:smallScreens="true"
     
    android:xlargeScreens="true"
     
    android:anyDensity="true" />
     
    <application
     
    android:icon="@drawable/ic_launcher"
     
    android:label="@string/app_name"
     
    ....
     
    </application>
     
     
    </manifest>
     
    Any idea?
     
     
    Thanks in advance!

     

    Darren <dakeese@gmail.com> May 24 09:21AM -0700  

    Did you ever get this figured out? I'm running into the same problem.
     
    Actually, the current version of my app doesn't use ES 2.0, so I want to
    leave this old one up for phones that don't support my new version of the
    app, which requires 2.0. When I uploaded the apk and tried to
    simultaneously activate it, the developer console tells me that both APKs
    target exactly the same set of devices, which shouldn't be the case.
     
    On Thursday, December 22, 2011 4:11:02 AM UTC-5, Marc Van Daele wrote:

     

    Richard Pickett <dev.null.1970@gmail.com> May 24 11:11AM -0500  


    > Hey gents,
     
    I'm looking for a basic graphing app that will pull a feed from a server.
    xml, csv, whatever.
     
    would be nice if it also had a widget that would display latest readings,
    also pulled from server (could be in the main dataset, could be separate).
     
    I'm asking more "do you guys know of one that does this" than "could
    someone write one for me", although the later is a possibility I'd
    entertain paying for.
     
    I've searched through tons of apps and haven't found one. The only ones
    I've found are ones you have to hand-enter all the data in yourself, but I
    want something that I can have auto-refresh and get the latest stats.
     
    Basic idea:
     
    1. add the widget to screen, "config" options pop up to enter the URL(s) of
    the feed and frequency of update.
    2. widget shows latest numbers (maybe 2 sets because of the space it has)
    auto-updated.
    3. clicking widget shows graph with menu option to change config.
     
    Just that simple.
     
     
    Thanks and God Bless,
     
    Richard W. Pickett, Jr.
     

     

    Karakuri Dev <karakuri.dev@gmail.com> May 24 08:41AM -0700  

    Someone please help me with this, it has me stuck for two days.

     

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate