No com.android.camera.CropImage on HTC Magic?

by Dianne Hackborn » Sun, 30 Aug 2009 00:16:47 GMT


Sponsored Links
 This is not part of the SDK.  You dug up the internal package and class name
from somewhere, which happens to exist on the G1, but there is no guarantee
it will exist on other devices (nor that it won't change in a future update
to the G1).






-- 
Dianne Hackborn
Android framework engineer
hack...@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.

--~--~---------~--~----~------------~-------~--~----~



No com.android.camera.CropImage on HTC Magic?

by Dianne Hackborn » Tue, 01 Sep 2009 00:59:53 GMT


 I don't know what you mean by "wallpaper," so there is no way to help you.

As for cropping, as I said, I don't believe there is an official intent to
do this.  You'll need to implement it yourself.  If nothing else, just go
copy the code out of the camera app that does what you want.

On Mon, Aug 31, 2009 at 1:57 AM, admin.androidsl...@googlemail.com <







-- 
Dianne Hackborn
Android framework engineer
hack...@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.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


No com.android.camera.CropImage on HTC Magic?

by Dianne Hackborn » Tue, 01 Sep 2009 08:38:07 GMT


  don't think there is a standard activity you can launch, but there is the
actual API on Context you can use to set the wallpaper to whatever you want.

On Mon, Aug 31, 2009 at 5:23 PM, admin.androidsl...@googlemail.com <
admin.androidsl...@googlemail.com> wrote:



--
Dianne Hackborn
Android framework engineer
hack...@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.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. setting mapView to R.id.mapview throws ClassCastException

...I really don't understand how something this simple (and I have
done it before) doesn't work. I'm pretty sure it will turn out that I
am missing something obvious.

I just created a MapView, all it does is show the map and when I
allocate mapView to it's layout, there's a ClassCastException:

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

import android.app.Activity;
import android.os.Bundle;



public class PPMMap extends MapActivity {

        public MapView mapView;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mapView =  (MapView) findViewById(R.id.mapview); // THROWS
CLASSCASTEXCEPTION
        mapView.setBuiltInZoomControls(true);


    }

        @Override
        protected boolean isRouteDisplayed() {
                // TODO Auto-generated method stub
                return false;
        }

}

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:id="@+id/mapview"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

     <com.google.android.maps.MapView
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:apiKey="****************"
                 />

</RelativeLayout>

09-22 17:16:03.676: ERROR/AndroidRuntime(730):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{....patyo.PPMMap}: java.lang.ClassCastException:
android.widget.RelativeLayout
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.os.Handler.dispatchMessage(Handler.java:99)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.os.Looper.loop(Looper.java:123)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
java.lang.reflect.Method.invokeNative(Native Method)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
java.lang.reflect.Method.invoke(Method.java:521)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
dalvik.system.NativeStart.main(Native Method)
09-22 17:16:03.676: ERROR/AndroidRuntime(730): Caused by:
java.lang.ClassCastException: android.widget.RelativeLayout
09-22 17:16:03.676: ERROR/AndroidRuntime(730):
at ....PPMMap.onCreate(PPMMap.java:21)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
09-22 17:16:03.676: ERROR/AndroidRuntime(730):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)

Call me an idiot, but I just don't get it.


--~--~---------~--~----~------------~-------~--~----~

2. making a (java) shared library

Hello everyone,

I am trying to build a separate shared library (based on parts of the
Jackson JSON library) for fast and efficient parsing of large JSON
files/streams, but I could not find any docs (or posts on the inet) as
to how one could do this.

If anyone had some relevant pointers, I would be grateful to see them.

NOTE: I am NOT trying to build a native library (NDK), just a regular
JAVA library to be published separately on the market (like the TTS
library).

Thank you for your help,

-szabolcs

What I have tried so far:
[I.]
1. created a separate project/APK with package="org.codehouse.jackson"
in the manifest, containing my JSON library classes and installed it
in the emulator (installed ok)

2. created a new project/APK with a <uses-library
android:name="org.codehouse.jackson" /> in the manifest and tried
installing it. However, this resulted in: Installation error:
INSTALL_FAILED_MISSING_SHARED_LIBRARY

I have no idea how I can declare/register my package from (1.) as a
shared library under a specific name. ;(

[II.]
I have looked at the source of the TextToSpeech lib, but they seem to
be registering a service, along with intents the 'client' activity can
call. The same is being done everywhere else I looked (e.g. the radar
app).

[III.]
I figured the Maps library would be a good example (no need to call
services/intents there, as far as I know), but after I unzipped the
APK pulled from the emulator, I found binary files only (even the
AndroidManifest.xml file).

--~--~---------~--~----~------------~-------~--~----~

3. How to upgrade the ant build.xml file from 1.1 project to 1.5

4. Widget and views

5. fit text on 1 line

6. Can i test barcode scanning task on emulator ??

7. Alphanumeric Input in an EditText View (how to use "digits")