Low level access to cell phone chip on Dev Phone 2

by BenYL » Thu, 21 Jan 2010 02:31:03 GMT


Sponsored Links
 For a indoor localization application, we would like to send out a
specific bit pattern across one of the cell phone bands on the Dev
Phone 2. Is this sort of low-level access possible?

Ben



Other Threads

1. Possible (and not possible) customization of the Tab component

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello.

I've got an Activity with a Tab component, whose layout is shown
below. I need to do some customizations and I'd like to know what it's
possible to do and what not - in the latter case, I'll consider
dropping the Tab component and "emulating" it with some buttons.

1. Between the tvTaxon TextView and whatever is rendered in the
FrameLayout a solid 1px divider with a drop shadow below is rendered.
I'd like to get rid of that. I suppose that this drawable has been
designed for separating the TabWidget from the contents below, but as
you can see in my case I have an extra component (tvTaxon) between the
two. If it's not possible to get rid of the divider, I could consider
removing tvTaxon and replicating it in every Activity that is put into
the FrameLayout.

2. I'd like not to render the text in the buttons of the TabHost, only
the icon. Is it possible?

3. When moving to landscape mode, an horizontal TabHost is really a
waste of space. I'd like to specify an alternate layout for landscape
mode and have the TabHost vertically rendered at the left edge. Is it
possible?


Thanks.



<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <TextView
            android:id="@+id/tvTaxon"
            style="@style/TextAppearance.Large"
            android:paddingLeft="4dip"
            android:paddingRight="4dip"
            android:paddingBottom="10dip"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
           
    </LinearLayout>
</TabHost>

- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyIq8AACgkQeDweFqgUGxeJugCfVpWX2IuoGvDwD3pra4A4X9+m
JKgAnAlrebDGlmmEJ7NxR/fZ/UXDTFJE
=DeYb
-----END PGP SIGNATURE-----

-- 

2. RuntimeException retrieving resource

I'm getting a RuntimeException when trying to retrieve a Resource

Here is the code that is failing. It is contained in the constructor
of one of my views:

        final int vibrateMillis =
this.getResources().getInteger(R.attr.button_vibrate_millis);


Here is the definition of the resource in res/values/attrs.xml

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <attr name="button_vibrate_millis" format="integer">50</attr>
</resources>


Here is the log. I receiove the following warning followed almost
immediately by the stacktrace.
Resource 0x7f010000 is the resource for button_vibrate_millis in the
generated resource file.
I have tried deleting the generated resource file.
And i have tried renaming and relocating the resource.
I plan on switching to using a plain int constant to get around it,
but I can't see why its failing and its bugging me.

Any ideas on why it is failing?


WARN/ResourceType(7773): Requesting resource 0x7f010000 failed because
it is complex

Uncaught handler: thread main exiting due to uncaught exception
java.lang.RuntimeException: Unable to start activity
ComponentInfo{au.com.xandar.jumblee/
au.com.xandar.jumblee.GameScreenActivity}:
android.view.InflateException: Binary XML file line #16: Error
inflating class au.com.xandar.jumblee.widget.LetterLattice
  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2496)
  at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2512)
  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
1863)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4363)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:862)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
  at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #16:
Error inflating class au.com.xandar.jumblee.widget.LetterLattice
  at android.view.LayoutInflater.createView(LayoutInflater.java:513)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
565)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
  at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
198)
  at android.app.Activity.setContentView(Activity.java:1631)
  at
au.com.xandar.jumblee.GameScreenActivity.onCreate(GameScreenActivity.java:
33)
  at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
  at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2459)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
  at
au.com.xandar.jumblee.widget.LetterLattice.<init>(LetterLattice.java:
45)
  at java.lang.reflect.Constructor.constructNative(Native Method)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
  at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 22 more
Caused by: android.content.res.Resources$NotFoundException: Resource
ID #0x7f010000
at android.content.res.Resources.getValue(Resources.java:891)
at android.content.res.Resources.getInteger(Resources.java:698)
... 26 more

-- 

3. How to automatically restart widget update service after it is killed?

4. How to customize quick search box? can i add another button?

5. Timer in an App

6. TCP Client Issue

7. Removing the default selection of EditText in Froyo 2.2