Anyone interested in trading and N1 for Droid

by lordjoe » Thu, 22 Apr 2010 12:12:07 GMT


Sponsored Links
 I have my entire family on an ATT family plan with a couple of members
using iPhones so I have little
desire to switch to Verizon - shoot me an mail smlewis at lordjoe.com
- Google sent me a Verizon Droid
which

--



Other Threads

1. Using Opencore from console appl

I wrote a very simple console C++ application that attempts to mimic
part of the functionality of android_media_MediaPlayer JNI layer. I
have added it to the toolbox by modifying the toolbox Android.mk file.
The idea is to have a command line utility which supports a
rudimentary media player. The appl uses PV framework for the playback
engine (just as JNI does). It's based on Android 1.0.

The following C++ code snippet shows that the MediaPlayer class is
used to create an instance, setDataSource, prepare, and start based on
a URL (i.e. local file). I've trimmed it to what I think is the
minimum to achieve my desired result of playing a media file for a
short period of time. I can run the Android APIDemo appl to playback a
local audio file and the log traces show that these methods are all
that's needed to hear a clip play (ignore cleanup and such for now -
I'm only trying to hear the clip play). In fact, I have compared the
log traces of both the console appl and the java appl (which always
successfully plays the clip), and they are very nearly the same. The
key difference is during the notify callbacks when executing the
console appl. The remote()->transact() method doesn't appear to behave
the same. The onTransact() method is not invoked in the console
environment. Please see the log snippet of the java appl included
below. I indicated the primary differences between the java and
console logs with "<===missing" tokens.

Do the framework experts have any insight as to what's wrong/missing?
Am I incorrect to think that a console appl can use the PV framework
in such a simple form?

playmedia.cpp:
#include <media/mediaplayer.h>

using namespace android;

static int do_it(const char * url)
{
    MediaPlayer * mp = new MediaPlayer();

    mp->setDataSource(url);
    mp->prepare();
    mp->start();

    sleep(30);

    return 0;
}

extern "C" int playmedia_main(int argc, char *argv[])
{
    if(argc > 1) return do_it(argv[1]);

    return do_it("/data/test_aud.mp3");
}

Logcat from java API Demo.media_Audio (I've added some extra LOGI
entries into the code):

I/MediaPlayer-JNI(  170): native_setup <===missing from console (not
an issue - included for completeness)
I/MediaPlayer(  170): constructor
I/MediaPlayer(  170): setDataSource(/data/test_aud.mp3)
I/MediaPlayer(  170): creating service w/url=/data/test_aud.mp3
I/MediaPlayerService(   35): Client(1) constructor pid=170
I/MediaPlayerService(   35): Create new client(1) from pid 170, url=/
data/test_aud.mp3, connId=1
I/MediaPlayerService(   35): Client::setDataSource(/data/test_aud.mp3)
I/MediaPlayerService(   35):  create PVPlayer
I/PlayerDriver(   35): constructor
I/PlayerDriver(   35): start player thread
I/MediaPlayerService(   35): Setting Notify callback 0xe200
I/MediaPlayerService(   35):  setDataSource
I/MediaPlayerService(   35): create(url) out
I/MediaPlayer-JNI(  170): Calling mp->prepare
I/MediaPlayer(  170): prepare
I/MediaPlayer(  170): prepareAsync_l
I/MediaPlayerService(   35): prepareAsync(1)
I/MediaPlayerService(   35): prepareAsync out
I/MediaPlayer(  170): prepare wait for done
I/PlayerDriver(   35): handlePrepare
I/PVPlayerEng(   35): PVPlayerEngine::DoPrepare() In
I/PVPlayerEng(   35): PVPlayerEngine::DoPrepare() Out
E/QC_OMX_CORE(   35): Dynamically Loading the library : libmm-adec-
omxmp3.so.1.0.0
E/QC_OMX_CORE(   35): Dynamically Loading the library : libmm-adec-
omxmp3.so.1.0.0
I/PlayerDriver(   35): PLAYER_PREPARE complete
mDownloadContextData=0x0, mDataReadyReceived=0
I/MediaPlayerService(   35): (1) notify (0xe200, 1, 0, 0)
I/IMediaPlayerClient(   35): Client::notify()
I/IPCThreadState(   35): transact start 2
I/IPCThreadState(  170): >>>> TRANSACT from pid 0 uid 1013
I/IMediaPlayerClient(  170): onTransact
<==========missing from console appl start
I/MediaPlayer(  170): notify() message received msg=1, ext1=0, ext2=0
I/MediaPlayer(  170): prepared
I/MediaPlayer(  170): signal application thread
I/MediaPlayer(  170): prepare complete - status=0
<===========missing end
I/MediaPlayerService(   35): done calling client->notify callback

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

2. Attn Google - How does licensing work in transitioning from a free app to a paid app?

How about charging for the apps using a "service model"

You could name you apps like

com.foobar.theapp2009q1
 com.foobar.theapp2009q2
 com.foobar.theapp2009q3 com.foobar.theapp2009q4

When version X expires, the app can launch an Intent to point the user to
the newer version. This way it should be seamless.

This model should work for some apps (the "service" type, such as
dating/matchmaking, accessing real state info database, etc) but not others
(such as games, which people think once they paid they own the right to it
forever).

If you provide a good service, I think people won't mind paying $0.49 per
quarter for it ...








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

3. ImageView.setColorFilter and/or LightingColorFilter- how to use them?

4. ImageView centering/ rotating issue

5. How to custom my own home screen?

6. Attn Google - How does licensing work in transitioning from a free app to a paid app?

7. is there a way to read the screen text