[android-developers] mapview overlay with button like googlemap

2009-06-27 Thread chouman82

i am having a hard time figuring out how in the google map
application, it is able to have buttons on the mapview.  I am talking
about the textbox and the two arrow buttons that show up after you do
a search.  The textbox and the two arrows also does not stay on screen
when you pan the map.  anyone has any idea or know where to look for
info please shed some light.

i have spent a few days looking around for answers and end up with
nothing still.

thanks!
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] problem with webview - unable to open database file HELP

2009-03-27 Thread chouman82

I am having problem using webview in my application.  When ever the
webviewclient and webview is trying to load, it will throw me and
uncaugh exception

here is the log
E/Database(  515): sqlite3_open_v2("/data/data/#package name#/
databases/webview.db", &handle, 6, NULL) failed
W/dalvikvm(  515): threadid=13: thread exiting with uncaught exception
(group=0x4000fe68)
E/AndroidRuntime(  515): Uncaught handler: thread WebViewCoreThread
exiting due to uncaught exception
E/AndroidRuntime(  515): android.database.sqlite.SQLiteException:
unable to open database file
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:
1421)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.openDatabase
(SQLiteDatabase.java:537)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:558)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:551)
E/AndroidRuntime(  515):at
android.app.ApplicationContext.openOrCreateDatabase
(ApplicationContext.java:427)
E/AndroidRuntime(  515):at
android.content.ContextWrapper.openOrCreateDatabase
(ContextWrapper.java:181)
E/AndroidRuntime(  515):at
android.webkit.WebViewDatabase.getInstance(WebViewDatabase.java:167)
E/AndroidRuntime(  515):at android.webkit.CacheManager.init
(CacheManager.java:153)
E/AndroidRuntime(  515):at android.webkit.BrowserFrame.
(BrowserFrame.java:113)
E/AndroidRuntime(  515):at
android.webkit.WebViewCore.initialize(WebViewCore.java:168)
E/AndroidRuntime(  515):at android.webkit.WebViewCore.access
$400(WebViewCore.java:43)
E/AndroidRuntime(  515):at android.webkit.WebViewCore
$WebCoreThread$1.handleMessage(WebViewCore.java:425)
E/AndroidRuntime(  515):at android.os.Handler.dispatchMessage
(Handler.java:88)
E/AndroidRuntime(  515):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  515):at android.webkit.WebViewCore
$WebCoreThread.run(WebViewCore.java:468)
E/AndroidRuntime(  515):at java.lang.Thread.run(Thread.java:
935)
I/Process (   57): Sending signal. PID: 515 SIG: 3
I/dalvikvm(  515): threadid=7: reacting to signal 3
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] problem with webview - unable to open database file HELP

2009-03-27 Thread chouman82

I am having problem using webview in my application.  When ever the
webviewclient and webview is trying to load, it will throw me and
uncaugh exception

here is the log
E/Database(  515): sqlite3_open_v2("/data/data/#package name#/
databases/webview.db", &handle, 6, NULL) failed
W/dalvikvm(  515): threadid=13: thread exiting with uncaught exception
(group=0x4000fe68)
E/AndroidRuntime(  515): Uncaught handler: thread WebViewCoreThread
exiting due to uncaught exception
E/AndroidRuntime(  515): android.database.sqlite.SQLiteException:
unable to open database file
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:
1421)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.openDatabase
(SQLiteDatabase.java:537)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:558)
E/AndroidRuntime(  515):at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase
(SQLiteDatabase.java:551)
E/AndroidRuntime(  515):at
android.app.ApplicationContext.openOrCreateDatabase
(ApplicationContext.java:427)
E/AndroidRuntime(  515):at
android.content.ContextWrapper.openOrCreateDatabase
(ContextWrapper.java:181)
E/AndroidRuntime(  515):at
android.webkit.WebViewDatabase.getInstance(WebViewDatabase.java:167)
E/AndroidRuntime(  515):at android.webkit.CacheManager.init
(CacheManager.java:153)
E/AndroidRuntime(  515):at android.webkit.BrowserFrame.
(BrowserFrame.java:113)
E/AndroidRuntime(  515):at
android.webkit.WebViewCore.initialize(WebViewCore.java:168)
E/AndroidRuntime(  515):at android.webkit.WebViewCore.access
$400(WebViewCore.java:43)
E/AndroidRuntime(  515):at android.webkit.WebViewCore
$WebCoreThread$1.handleMessage(WebViewCore.java:425)
E/AndroidRuntime(  515):at android.os.Handler.dispatchMessage
(Handler.java:88)
E/AndroidRuntime(  515):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  515):at android.webkit.WebViewCore
$WebCoreThread.run(WebViewCore.java:468)
E/AndroidRuntime(  515):at java.lang.Thread.run(Thread.java:
935)
I/Process (   57): Sending signal. PID: 515 SIG: 3
I/dalvikvm(  515): threadid=7: reacting to signal 3
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Two different views with CursorAdapter

2009-01-15 Thread chouman82

I am not sure if you can do this, but essentially what I am trying to
do is to use a CursorAdapter with a list that has two different
views.  To be more specific, I am trying to have a different view for
an item in the list that's selected than the rest of the items in the
list that's not selected.  Is this possible?

If so how? some code snippet would help greatly.  thanks
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] drawing markers on the overlay for the map

2008-12-16 Thread chouman82

I have quite some trouble to get the markers to show up for some
reasons.

This is what i have done:

public void addOverlayBusinessItems()
{
Drawable defaultMarker = getResources().getDrawable
(R.drawable.pin);
defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(),
defaultMarker.getIntrinsicHeight());

myMapView.getOverlays().add(new MyItemizedOverlay
(defaultMarker));
myMapView.postInvalidate();
}

 class MyItemizedOverlay extends ItemizedOverlay
{
//create a list of overlay items from the JSON response we get
from Yelp
private List mItemList = new ArrayList
()

public MyItemizedOverlay(Drawable defaultMarker)
{
super(defaultMarker);

GeoPoint gp = new GeoPoint(5309691, 8851933);
mItemList.add(gp, "test", "first marker");

populate();
}

@Override
protected OverlayItem createItem(int index)
{
return mItemList.get(index);
}

@Override
public int size()
{
return mItemList.size();
}
}

yet nothing shows up on the my mapview.  Are there more that i need to
do?
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: progress dialog

2008-11-11 Thread chouman82

Hi Christine,

Thanks for your help. That seems to only work in the initial loading
screen.  How do I go about doing the same when the user scroll to an
image that I am still loading and then show the loading progress bar.
Is there an example somewhere that i can follow?

thanks

On Nov 11, 4:45 am, Christine <[EMAIL PROTECTED]> wrote:
> At the start of your program, do
>         requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
>
> Then when you want to display a rotating little circle in the title
> bar, do
>                 setProgressBarIndeterminateVisibility(true);
>
> When updating or whatever is done, do
>                 setProgressBarIndeterminateVisibility(false);
>
> Of course, you can use other types of progress bars in pretty much the
> same way.
>
> On Nov 11, 9:00 am, chouman82 <[EMAIL PROTECTED]> wrote:
>
> > I am having a little problem of using progress dialog. Trying to
> > figure out how and the optimal way of using the progress dialog. My
> > application needs to grab information from different servers, so I am
> > trying to show the progress dialog at the appropriate moment.
>
> > I am trying to use a gallery to grab different images. At the start of
> > the activity, I will have a pop up that says loading, and then spin
> > off a different thread to start retrieving images in the background
> > and store the images in a bitmap array. And once I get the first few
> > images, the thread would send a message to the activity to let it know
> > that it can set up the adapter and start displaying the first few
> > images. The user then can start flipping through different images. In
> > the adapter getView method, I will check the bitmap array from the
> > thread to see if the image in the specific position that the user is
> > trying to view is loaded yet. If the bitmap array for the position is
> > null then the adapter will send a message to the activity and asks the
> > activity to display the progress dialog and at the same time the
> > adapter will tell the thread that the user is trying to view the image
> > at that specific position. Then the thread will then send a message to
> > the activity to dismiss the progress dialog once the image of that
> > specific position has been loaded.
>
> > That's the general idea, but for some reason the message been sent
> > from the adapter to the activity for showing the progress dialog is
> > not working. I can see the message been send because the logging is
> > been printed out in the message handler but the dialog is not showing
> > up. Anyone has a clue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] progress dialog

2008-11-11 Thread chouman82

I am having a little problem of using progress dialog. Trying to
figure out how and the optimal way of using the progress dialog. My
application needs to grab information from different servers, so I am
trying to show the progress dialog at the appropriate moment.

I am trying to use a gallery to grab different images. At the start of
the activity, I will have a pop up that says loading, and then spin
off a different thread to start retrieving images in the background
and store the images in a bitmap array. And once I get the first few
images, the thread would send a message to the activity to let it know
that it can set up the adapter and start displaying the first few
images. The user then can start flipping through different images. In
the adapter getView method, I will check the bitmap array from the
thread to see if the image in the specific position that the user is
trying to view is loaded yet. If the bitmap array for the position is
null then the adapter will send a message to the activity and asks the
activity to display the progress dialog and at the same time the
adapter will tell the thread that the user is trying to view the image
at that specific position. Then the thread will then send a message to
the activity to dismiss the progress dialog once the image of that
specific position has been loaded.

That's the general idea, but for some reason the message been sent
from the adapter to the activity for showing the progress dialog is
not working. I can see the message been send because the logging is
been printed out in the message handler but the dialog is not showing
up. Anyone has a clue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] progress dialog

2008-11-11 Thread chouman82

I am having a little problem of using progress dialog. Trying to
figure out how and the optimal way of using the progress dialog. My
application needs to grab information from different servers, so I am
trying to show the progress dialog at the appropriate moment.

I am trying to use a gallery to grab different images. At the start of
the activity, I will have a pop up that says loading, and then spin
off a different thread to start retrieving images in the background
and store the images in a bitmap array. And once I get the first few
images, the thread would send a message to the activity to let it know
that it can set up the adapter and start displaying the first few
images. The user then can start flipping through different images. In
the adapter getView method, I will check the bitmap array from the
thread to see if the image in the specific position that the user is
trying to view is loaded yet. If the bitmap array for the position is
null then the adapter will send a message to the activity and asks the
activity to display the progress dialog and at the same time the
adapter will tell the thread that the user is trying to view the image
at that specific position. Then the thread will then send a message to
the activity to dismiss the progress dialog once the image of that
specific position has been loaded.

That's the general idea, but for some reason the message been sent
from the adapter to the activity for showing the progress dialog is
not working. I can see the message been send because the logging is
been printed out in the message handler but the dialog is not showing
up. Anyone has a clue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] phoneStateListener

2008-10-09 Thread chouman82

Can anyone give a simple example of the usage of PhoneStateListener?

I have tried to overwrite the listener and register it with the
TelephonyManager with the Context.TELEPHONY_SERVICE.

But i only saw my logging statement printed out right when I started
to run the application.  The logging showed the PhoneState as IDLE.
But then after that when I use telnet to emulate an incoming call, I
don't see the logging statement been printed for PhoneState - RINGING
or PhoneState - OFFHOOK.

here is my code snippet:
TelephonyManager tm =
(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(this, CallStateListener.LISTEN_CALL_STATE);

public void onCallStateChanged(int state, String incomingNumber)
{
switch(state)
{
  case TelephonyManager.CALL_STATE_DLE:
   Log.d(DEBUG, "PHONE STATE - IDLE");
   break;
  case TelephonyManager.CALL_STATE_OFFHOOK:
   Log.d(DEBUG, "PHONE STATE - OFFHOOK");
   break;
  case TelephonyManager.CALL_STATE_RINGING:
   Log.d(DEBUG, "PHONE STATE - RINGING");
   break;
 }
}
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BroadCastReceiver with PhoneStateListener

2008-09-29 Thread chouman82

you actually saw the logging statement when you make a call to the
emulator through telnet?

On Sep 28, 1:19 am, legerb <[EMAIL PROTECTED]> wrote:
> I changed the xml accordingly, and it worked :)
>
> On Sep 27, 2:53 am, Nayr <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Did you describe the StartServicesAtStartUp in your
> > AndroidManifest.xml? for example,
>
> >         
> >             
> >                  > android:name="android.intent.action.BOOT_COMPLETED" />
> >             
> >         
>
> > And you should request user-permission
> > "android.permission.RECEIVE_BOOT_COMPLETED" like
> >  > android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
> > in the AndroidManifest.xml.
>
> > Cheers,
> > Nayr
>
> > On Sep 27, 9:01 am, chouman82 <[EMAIL PROTECTED]> wrote:
>
> > > I am trying to register the PhoneStateListener right when the phone
> > > boots up so I have 2 classes.  One is StartAtStartUp which extends
> > > BroadcastReceiver that listens for the COMPLETE_BOOT_UP and then this
> > > will then register the CallStateListener which extends
> > > PhoneStateListener.  It doesn't seem to work out all that well.
>
> > > I am not seeing any logging statements that I have put in
> > > CallStateListener.  Any help would be greatly appreciated!!!
>
> > > Here is my code:
>
> > > import android.content.BroadcastReceiver;
> > > import android.content.Context;
> > > import android.content.Intent;
> > > import android.telephony.PhoneStateListener;
> > > import android.telephony.TelephonyManager;
> > > import android.util.Log;
>
> > > import com.lumitrend.netlogger.Logger;
>
> > > public class StartServicesAtStartUp extends BroadcastReceiver
> > > {
> > >         public void onReceive(Context context, Intent intent)
> > >         {
> > >                 Log.d("DEBUG",
> > > "")
> > >  ;
> > >                 //Intent phoneStateListener = new Intent(context,
> > > CallStateListener.class);
> > >                 
> > > //phoneStateListener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> > >                 //context.startService(phoneStateListener);
> > >                 Log.d("DEBUG", context.getPackageName());
> > >                 Log.d("DEBUG", context.toString());
> > >                 TelephonyManager tManager =
> > > (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
> > >                 CallStateListener callStateListener = new 
> > > CallStateListener();
> > >                 tManager.listen(callStateListener,
> > > PhoneStateListener.LISTEN_CALL_STATE);
> > >         }
>
> > > }
>
> > > ~~~
>
> > > import android.telephony.PhoneStateListener;
> > > import android.telephony.TelephonyManager;
> > > import android.util.Log;
>
> > > import com.lumitrend.netlogger.Logger;
>
> > > public class CallStateListener extends PhoneStateListener
> > > {
> > >         public void onCallStateChanged(int state, String incomingNumber)
> > >         {
> > >                 Log.d("DEBUG", "addding this here");
> > >                 super.onCallStateChanged(state, incomingNumber);
> > >                 Log.d("DEBUG", TelephonyManager.CALL_STATE_OFFHOOK + "
> > > we are def in
> > > here: " + state);
>
> > >                 switch(state)
> > >                 {
> > >                         case TelephonyManager.CALL_STATE_IDLE:
> > >                                 Log.d("DEBUG", 
> > > "phhhone is idle");
> > >                                 break;
> > >                         case TelephonyManager.CALL_STATE_OFFHOOK:
> > >                                 Log.d("DEBUG", 
> > > "phoon is off
> > > hook");
> > >                                 break;
> > >                         case TelephonyManager.CALL_STATE_RINGING:
> > >                                 Log.d("DEBUG",
> > > "phoonnnee
> > > is ringing");
> > >                                 break;
> > >                         default:
> > >                                 Log.d("DEBUG", "The 
> > > staate is " +
> > > state);
>
> > >                 }
> > >         }
>
> > > }- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: BroadCastReceiver with PhoneStateListener

2008-09-29 Thread chouman82

yea i do have that permission in my xml but still not working.

On Sep 26, 7:53 pm, Nayr <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Did you describe the StartServicesAtStartUp in your
> AndroidManifest.xml? for example,
>
>         
>             
>                  android:name="android.intent.action.BOOT_COMPLETED" />
>             
>         
>
> And you should request user-permission
> "android.permission.RECEIVE_BOOT_COMPLETED" like
>  android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
> in the AndroidManifest.xml.
>
> Cheers,
> Nayr
>
> On Sep 27, 9:01 am, chouman82 <[EMAIL PROTECTED]> wrote:
>
> > I am trying to register the PhoneStateListener right when the phone
> > boots up so I have 2 classes.  One is StartAtStartUp which extends
> > BroadcastReceiver that listens for the COMPLETE_BOOT_UP and then this
> > will then register the CallStateListener which extends
> > PhoneStateListener.  It doesn't seem to work out all that well.
>
> > I am not seeing any logging statements that I have put in
> > CallStateListener.  Any help would be greatly appreciated!!!
>
> > Here is my code:
>
> > import android.content.BroadcastReceiver;
> > import android.content.Context;
> > import android.content.Intent;
> > import android.telephony.PhoneStateListener;
> > import android.telephony.TelephonyManager;
> > import android.util.Log;
>
> > import com.lumitrend.netlogger.Logger;
>
> > public class StartServicesAtStartUp extends BroadcastReceiver
> > {
> >         public void onReceive(Context context, Intent intent)
> >         {
> >                 Log.d("DEBUG",
> > "") 
> > ;
> >                 //Intent phoneStateListener = new Intent(context,
> > CallStateListener.class);
> >                 
> > //phoneStateListener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> >                 //context.startService(phoneStateListener);
> >                 Log.d("DEBUG", context.getPackageName());
> >                 Log.d("DEBUG", context.toString());
> >                 TelephonyManager tManager =
> > (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
> >                 CallStateListener callStateListener = new 
> > CallStateListener();
> >                 tManager.listen(callStateListener,
> > PhoneStateListener.LISTEN_CALL_STATE);
> >         }
>
> > }
>
> > ~~~
>
> > import android.telephony.PhoneStateListener;
> > import android.telephony.TelephonyManager;
> > import android.util.Log;
>
> > import com.lumitrend.netlogger.Logger;
>
> > public class CallStateListener extends PhoneStateListener
> > {
> >         public void onCallStateChanged(int state, String incomingNumber)
> >         {
> >                 Log.d("DEBUG", "addding this here");
> >                 super.onCallStateChanged(state, incomingNumber);
> >                 Log.d("DEBUG", TelephonyManager.CALL_STATE_OFFHOOK + "
> > we are def in
> > here: " + state);
>
> >                 switch(state)
> >                 {
> >                         case TelephonyManager.CALL_STATE_IDLE:
> >                                 Log.d("DEBUG", 
> > "phhhone is idle");
> >                                 break;
> >                         case TelephonyManager.CALL_STATE_OFFHOOK:
> >                                 Log.d("DEBUG", 
> > "phoon is off
> > hook");
> >                                 break;
> >                         case TelephonyManager.CALL_STATE_RINGING:
> >                                 Log.d("DEBUG",
> > "phoonnnee
> > is ringing");
> >                                 break;
> >                         default:
> >                                 Log.d("DEBUG", "The 
> > staate is " +
> > state);
>
> >                 }
> >         }
>
> > }
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] BroadCastReceiver with PhoneStateListener

2008-09-26 Thread chouman82

I am trying to register the PhoneStateListener right when the phone
boots up so I have 2 classes.  One is StartAtStartUp which extends
BroadcastReceiver that listens for the COMPLETE_BOOT_UP and then this
will then register the CallStateListener which extends
PhoneStateListener.  It doesn't seem to work out all that well.

I am not seeing any logging statements that I have put in
CallStateListener.  Any help would be greatly appreciated!!!

Here is my code:

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;

import com.lumitrend.netlogger.Logger;

public class StartServicesAtStartUp extends BroadcastReceiver
{
public void onReceive(Context context, Intent intent)
{
Log.d("DEBUG",
"");
//Intent phoneStateListener = new Intent(context,
CallStateListener.class);
//phoneStateListener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//context.startService(phoneStateListener);
Log.d("DEBUG", context.getPackageName());
Log.d("DEBUG", context.toString());
TelephonyManager tManager =
(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
CallStateListener callStateListener = new CallStateListener();
tManager.listen(callStateListener,
PhoneStateListener.LISTEN_CALL_STATE);
}
}

~~~

import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;

import com.lumitrend.netlogger.Logger;


public class CallStateListener extends PhoneStateListener
{
public void onCallStateChanged(int state, String incomingNumber)
{
Log.d("DEBUG", "addding this here");
super.onCallStateChanged(state, incomingNumber);
Log.d("DEBUG", TelephonyManager.CALL_STATE_OFFHOOK + "
we are def in
here: " + state);

switch(state)
{
case TelephonyManager.CALL_STATE_IDLE:
Log.d("DEBUG", 
"phhhone is idle");
break;
case TelephonyManager.CALL_STATE_OFFHOOK:
Log.d("DEBUG", 
"phoon is off
hook");
break;
case TelephonyManager.CALL_STATE_RINGING:
Log.d("DEBUG",
"phoonnnee
is ringing");
break;
default:
Log.d("DEBUG", "The 
staate is " +
state);

}
}
}
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] PhoneStateListener - onCallStateChanged

2008-09-26 Thread chouman82

I have a class CallStateListener extends PhoneStateListener
then i overwrite onCallStateChanged(int state, String incomingNumber)
which i have some logging statements but for some reason when i call
the emulator from telnet.  the logging statement doesn't show up any
idea ?

 here is my code:

public class CallStateListener extends PhoneStateListener
{
public void onCallStateChanged(int state, String incomingNumber)
{
Log.d("DEBUG", "hllo there");

if(state == TelephonyManager.CALL_STATE_OFFHOOK)
Log.d("DEBUG", "we here we are 
");
}
}
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] intercept incoming and outgoing calls and have customized screen

2008-09-25 Thread chouman82

Is it possible to intercept the intent of calling and answering and by
doing that replacing the calling/answering screen.
I see from the logcat that right now com.android.phone.InCallScreen
activity is been started.  Anyway to overwrite that to have my own
activity to show up?


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] switch between activities

2008-09-22 Thread chouman82

this should be something simple but yet i can't seem to find the
answer anywhere.

I have a parent activity that starts a sub activity.  From the sub
activity, i want to be able to go back to the parent activity without
terminating the child activity.  Both activities will have UI so i
don't think service will work here.

So basically, is there a way for me to put the child activity to the
background by calling the parent activity and then from the parent
activity to get the child activity back without creating a new
instance of the sub activity (do i just call startSubActivity(new
instance())?

Thanks in advance for your help
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] problem with verifier

2008-08-27 Thread chouman82

Anyone know the bases on what the verifier allows and now?  I am
having problem with verifyError on certain classes.  Anyone else have
faced this issue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] anyone has problem with verifyError?

2008-08-27 Thread chouman82

Anyone has problem using third party JAR file? I can't use external
JAR, running into VerifyError.

08-27 00:08:20.312: WARN/dalvikvm(444): VFY: unable to find class
referenced in signature (Lorg/jivesoftware/smack/Roster;)
08-27 00:08:20.312: WARN/dalvikvm(444): VFY: unable to resolve virtual
method 976: Lorg/jivesoftware/smack/packet/Presence;.setMode (Lorg/
jivesoftware/smack/packet/Presence$Mode;)V
08-27 00:08:20.312: WARN/dalvikvm(444): VFY:  rejecting opcode 0x6e at
0x0002
08-27 00:08:20.312: WARN/dalvikvm(444): VFY:  rejected Lcom/asurion/
android/instantmessaging/AndroidChat;.changePresence (Lorg/
jivesoftware/smack/packet/Presence$Mode;)V
08-27 00:08:20.312: WARN/dalvikvm(444): Verifier rejected class Lcom/
asurion/android/instantmessaging/AndroidChat;
08-27 00:08:20.312: DEBUG/AndroidRuntime(444): Shutting down VM
08-27 00:08:20.312: WARN/dalvikvm(444): threadid=3: thread exiting
with uncaught exception (group=0x40010e28)
08-27 00:08:20.333: ERROR/AndroidRuntime(444): Uncaught handler:
thread main exiting due to uncaught exception
08-27 00:08:20.353: ERROR/AndroidRuntime(444): java.lang.VerifyError:
com.asurion.android.instantmessaging.AndroidChat
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.asurion.android.activity.AddressBook.initChat(AddressBook.java:
374)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.asurion.android.activity.AddressBook.onCreate(AddressBook.java:
165)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1121)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2094)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2147)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.os.Handler.dispatchMessage(Handler.java:88)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.os.Looper.loop(Looper.java:123)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
android.app.ActivityThread.main(ActivityThread.java:3708)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
java.lang.reflect.Method.invokeNative(Native Method)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
java.lang.reflect.Method.invoke(Method.java:492)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:734)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:492)
08-27 00:08:20.353: ERROR/AndroidRuntime(444): at
dalvik.system.NativeStart.main(Native Method)


anyone has a clue?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] java.lang.VerifyError

2008-08-26 Thread chouman82

does the jvm in 0.9 not allowed the usage of external jar any more?
This used to work in m5 and now i am running into
java.lang.VerifyError.  Is there some sort of signing that i can do?

I am trying to load the smack.jar
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---