[android-developers] How to go back to previous page if back button is pressed in WebView?

2016-11-11 Thread sri sai kamal
I have created an webbiew android app. Im not expert on app development I have 
just followed procedure from internet. Here is my app link:- 

http://www24.zippyshare.com/v/crg4OaRc/file.html

It works, clicking a link in the webpage goes to the next page in the website 
inside my app. But when I click the phone's back button, it takes me straight 
into my app. I want to go back to the previous page in the website instead. How 
can I do this?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/e57ea68f-3045-4f2a-9f69-f0a14ff1ba87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] How to root android phone

2012-05-30 Thread Fadil Kamal
What does root for? Im using 2.3.3 version

-- 
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] dynamic change of layout with xml files

2012-05-15 Thread kamal kamal
Hi Guys,

Is it possible to for android to dynamically change its layout?
Like I have 2 files ont has a linear layout, and other file has tabt
layout.

on the button click i want to change linear layout with tabtlayout.

is this possible without creating seprate activity for each layout ?

Thanks
Kamal

-- 
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] how to set opacity of background image

2012-05-15 Thread kamal kamal
Hi Friends

Can you please let me know how to set opacity of background image?

Thank you in advance.

Kamal

-- 
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 while integrating Facebook in android application

2012-04-15 Thread Kamal Kambe
Hi,

I'm trying to integrate facebook in my android application. I followed the 
guidelines provided in facebook developers page - 
http://developers.facebook.com/docs/mobile/android/build/

I was getting an exception while executing the following code:

if (!facebook.isSessionValid()) {
System.out.println(Facebook:: session invalid);
facebook.authorize((GameActivity) ctx, new String[] {
read_friendlists, user_likes, email, friends_likes,
user_interests, friends_interests },
new DialogListener() {

@Override
public void onCancel() {
// Function to handle cancel event
System.out.println(Facebook:: event cancelled);

}

@Override
public void onComplete(Bundle values) {
// Function to handle complete event
// Edit Preferences and update facebook acess_token
System.out
.println(Facebook:: setting access token and expire time in preferences);
User user = User.getUser();
if (user != null) {
accessToken = facebook.getAccessToken();
accessExpires = facebook.getAccessExpires();
user.setAccessToken(accessToken);
user.setAccessExpires(accessExpires);
user.updatePrefs();
mPrefs.flush();
getFacebookFriends();
getUserInfo();
}

@Override
public void onError(DialogError error) {
// Function to handle error
System.out.println(Facebook:: Error - 
+ error.getLocalizedMessage());

}

@Override
public void onFacebookError(FacebookError fberror) {
// Function to handle Facebook errors
System.out.println(Facebook:: fbError - code: 
+ fberror.getErrorCode() +   message: 
+ fberror.getLocalizedMessage());

}

});

Exception is:   

Can't create handler inside thread that has not called Looper.prepare()
...
...
...


I went through net for this and added Looper.prepare(), Looper.loop() on 
either side of the above code like this

Looper.prepare();
FACEBOOK_AUTHORIZATION_CODE;
Looper.loop();

Sometimes it gives the following exception but sometimes it runs fine but 
the application freezes (I tried quit() method but it leads to some other 
error) 

Exception that comes sometimes is:

I/ExceptionHandler( 2504): java.lang.NullPointerException
I/ExceptionHandler( 2504): at 
android.webkit.WebView.onWindowFocusChanged(WebView.java:4177)
I/ExceptionHandler( 2504): at 
android.view.View.dispatchWindowFocusChanged(View.java:3788)
I/ExceptionHandler( 2504): at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:658)
I/ExceptionHandler( 2504): at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662)
I/ExceptionHandler( 2504): at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662)
I/ExceptionHandler( 2504): at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662)
I/ExceptionHandler( 2504): at 
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:662)
I/ExceptionHandler( 2504): at 
android.view.ViewRoot.handleMessage(ViewRoot.java:1921)
I/ExceptionHandler( 2504): at 
android.os.Handler.dispatchMessage(Handler.java:99)
I/ExceptionHandler( 2504): at android.os.Looper.loop(Looper.java:123)
I/ExceptionHandler( 2504): at 
com.kiwi.monstercastle.facebook.MCAndroidFBIntegration.loginToFacebook(MCAndroidFBIntegration.java:151)



Can someone please help on this?


Thanks,
Kamal



-- 
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] facebook authorization onActivityResult() always getting called with data as null and resultCode is 0 (zero/RESULT_CANCELED)

2012-04-12 Thread Kamal Kambe
I'm trying to integrate facebook into an android application. I have added 
the code the facebook authorization (followed all the steps as per 
guidelines from here
http://developers.facebook.com/docs/mobile/android/build/). Whenever the 
facebook authorization happens, onActivityResult will be called back but 
with data as null and resultCode as 0 (zero/RESULT_CANCELED).

Here's my code:

Main Activity class

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {

super.onActivityResult(requestCode, resultCode, data);
MCAndroidFBIntegration.authorizeCallback(requestCode, resultCode, data);
}

MCAndroidFBIntegration.java

public class MCAndroidFBIntegration implements IFacebookIntegration {

private static final String APP_ID = APP_ID_NUMBER;
private static Facebook facebook;
private AsyncFacebookRunner mAsyncFBRunner;
public Preferences mPrefs;
private Context ctx;
private static MCAndroidFBIntegration mcAndroidFBIntegration;

public MCAndroidFBIntegration(Context ctx) {
this.ctx = ctx;
}

@Override
public void integrate() {
// Integrate with Facebook
facebook = new Facebook(APP_ID);
mAsyncFBRunner = new AsyncFacebookRunner(facebook);
loginToFacebook();  
}

private void loginToFacebook() {
mPrefs = GamePreference.getPreferences();
String accessToken = mPrefs.getString(Config.ACCESS_TOKEN, null);
long expires = mPrefs.getLong(Config.ACCESS_EXPIRES, 0);

if (accessToken != null) {
facebook.setAccessToken(accessToken);
}

if (expires != 0) {
facebook.setAccessExpires(expires);
}

if (!facebook.isSessionValid()) {
facebook.authorize((Activity) ctx, new String[] { publish_stream,
read_stream, offline_access}, new DialogListener() {

@Override
public void onCancel() {
// Function to handle cancel event
System.out.println(Facebook:: event cancelled);
}

@Override
public void onComplete(Bundle values) {
// Function to handle complete event
// Edit Preferences and update facebook acess_token
System.out
.println(Facebook:: setting access token and expire 
time in preferences);
User user = User.getUser();
if (user != null) {
user.setAccessToken(facebook.getAccessToken());
user.setAccessExpires(facebook.getAccessExpires());
user.updatePrefs();
mPrefs.flush();
}
}

@Override
public void onError(DialogError error) {
// Function to handle error
System.out.println(Facebook:: Error - 
+ error.getLocalizedMessage());

}

@Override
public void onFacebookError(FacebookError fberror) {
// Function to handle Facebook errors
System.out.println(Facebook:: fbError - code: 
+ fberror.getErrorCode() +   message: 
+ fberror.getLocalizedMessage());
}

});
}
}

public static void authorizeCallback(int requestCode, int resultCode,
Intent data) {
if (data != null) {
String error = data.getStringExtra(error);
if (error != null) {
String description = data.getStringExtra(error_description);
System.out.println(Facebook:: error desc -  + description);
} else {
String token = data.getStringExtra(access_token);
String expires = data.getStringExtra(expires_in);
System.out.println(Facebook:: call back access token - 
+ token);
System.out.println(Facebook:: call back expires -  + expires);
}
}
facebook.authorizeCallback(requestCode, resultCode, data);
}


Cam someone please tell me what is the mistake that I'm doing here.


Thanks, 

Kamal






-- 
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: facebook authorization onActivityResult() always getting called with data as null and resultCode is 0 (zero/RESULT_CANCELED)

2012-04-12 Thread Kamal Kambe
I get this in log always.***Activity is launching as a new task, so 
cancelling activity result***. What does this mean? I searched in this 
forum about this and found that this has something to do with *
android:launchMode=singleInstance*. But when I removed this, I got some 
other errors like Authentication failed because of invalid android app key. 
What do I do? I'm so confused and exhausted

On Thursday, April 12, 2012 11:34:40 AM UTC+5:30, Kamal Kambe wrote:

 I'm trying to integrate facebook into an android application. I have added 
 the code the facebook authorization (followed all the steps as per 
 guidelines from here
 http://developers.facebook.com/docs/mobile/android/build/). Whenever the 
 facebook authorization happens, onActivityResult will be called back but 
 with data as null and resultCode as 0 (zero/RESULT_CANCELED).

 Here's my code:

 Main Activity class

 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent data) {  
   
 super.onActivityResult(requestCode, resultCode, data);
 MCAndroidFBIntegration.authorizeCallback(requestCode, resultCode, data);
 }

 MCAndroidFBIntegration.java

 public class MCAndroidFBIntegration implements IFacebookIntegration {

 private static final String APP_ID = APP_ID_NUMBER;
 private static Facebook facebook;
 private AsyncFacebookRunner mAsyncFBRunner;
 public Preferences mPrefs;
 private Context ctx;
 private static MCAndroidFBIntegration mcAndroidFBIntegration;

 public MCAndroidFBIntegration(Context ctx) {
 this.ctx = ctx;
 }

 @Override
 public void integrate() {
 // Integrate with Facebook
 facebook = new Facebook(APP_ID);
 mAsyncFBRunner = new AsyncFacebookRunner(facebook);
 loginToFacebook();  
 }

 private void loginToFacebook() {
 mPrefs = GamePreference.getPreferences();
 String accessToken = mPrefs.getString(Config.ACCESS_TOKEN, null);
 long expires = mPrefs.getLong(Config.ACCESS_EXPIRES, 0);

 if (accessToken != null) {
 facebook.setAccessToken(accessToken);
 }

 if (expires != 0) {
 facebook.setAccessExpires(expires);
 }

 if (!facebook.isSessionValid()) {
 facebook.authorize((Activity) ctx, new String[] { publish_stream,
 read_stream, offline_access}, new DialogListener() {

 @Override
 public void onCancel() {
 // Function to handle cancel event
 System.out.println(Facebook:: event cancelled);
 }

 @Override
 public void onComplete(Bundle values) {
 // Function to handle complete event
 // Edit Preferences and update facebook acess_token
 System.out
 .println(Facebook:: setting access token and expire 
 time in preferences);
 User user = User.getUser();
 if (user != null) {
 user.setAccessToken(facebook.getAccessToken());
 user.setAccessExpires(facebook.getAccessExpires());
 user.updatePrefs();
 mPrefs.flush();
 }
 }

 @Override
 public void onError(DialogError error) {
 // Function to handle error
 System.out.println(Facebook:: Error - 
 + error.getLocalizedMessage());

 }

 @Override
 public void onFacebookError(FacebookError fberror) {
 // Function to handle Facebook errors
 System.out.println(Facebook:: fbError - code: 
 + fberror.getErrorCode() +   message: 
 + fberror.getLocalizedMessage());
 }

 });
 }
 }

 public static void authorizeCallback(int requestCode, int resultCode,
 Intent data) {
 if (data != null) {
 String error = data.getStringExtra(error);
 if (error != null) {
 String description = data.getStringExtra(error_description);
 System.out.println(Facebook:: error desc -  + description);
 } else {
 String token = data.getStringExtra(access_token);
 String expires = data.getStringExtra(expires_in);
 System.out.println(Facebook:: call back access token - 
 + token);
 System.out.println(Facebook:: call back expires -  + expires);
 }
 }
 facebook.authorizeCallback(requestCode, resultCode, data);
 }


 Cam someone please tell me what is the mistake that I'm doing here.


 Thanks, 

 Kamal








-- 
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

Re: [android-developers] retrieve minSdkVersion from manifest file programmatically

2012-04-09 Thread Kamal Kambe
Hi Mark,

Thanks a lot. I interpreted it in a wrong way. 

Kamal

On Friday, April 6, 2012 7:18:16 PM UTC+5:30, Mark Murphy (a Commons Guy) 
wrote:

 On Fri, Apr 6, 2012 at 9:42 AM, Kamal Kambe kka...@kiwiup.com wrote:
  I am actually trying to add C2DM ability to the application which is
  possible only if the application's minSdkVersion is = 8.

 No. It is only possible if the *device* is *running* API Level 8 or
 higher. minSdkVersion has nothing to do with it. Use
 android.os.Build.VERSION.SDK_INT to determine what API level the
 device is running.

 -- 
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 4.1 Available!



-- 
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

Re: [android-developers] retrieve minSdkVersion from manifest file programmatically

2012-04-06 Thread Kamal Kambe
I am actually trying to add C2DM ability to the application which is 
possible only if the application's minSdkVersion is = 8. I don't want to 
manually check my manifest file and then add C2DM feature while 
development. I would like to have my application check for the 
minSdkVersion and then behave accordingly (whether to enable C2DM or not)

Can you suggest a way?

Thanks,
Kamal

On Thursday, April 5, 2012 8:15:55 PM UTC+5:30, MagouyaWare wrote:

 I need to retrieve the minSdkVersion value from AndroidManifest.xml from a 
 java class.

 AFAIK there is no way to get that...

 I need to enable a flag based on its value.

 What is the end result of what you are trying to acocmplish?  Perhaps we 
 can suggest some other ways to get similar behavior...

 Is there any way to do it? 

 Not that I am aware of... At least not using the public API 

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Wed, Apr 4, 2012 at 10:24 AM, Kamal Kambe kka...@kiwiup.com wrote:

 Hi,

 I need to retrieve the minSdkVersion value from AndroidManifest.xml from 
 a java class. I need to enable a flag based on its value. Is there any way 
 to do it? All I can get is targetSdkVersion from ApplicationInfo but not 
 the minSdkVersion. 

 Thanks,
 Kamal

 -- 
 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




-- 
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] retrieve minSdkVersion from manifest file programmatically

2012-04-05 Thread Kamal Kambe
Hi,

I need to retrieve the minSdkVersion value from AndroidManifest.xml from a 
java class. I need to enable a flag based on its value. Is there any way to 
do it? All I can get is targetSdkVersion from ApplicationInfo but not the 
minSdkVersion. 

Thanks,
Kamal

-- 
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

Re: [android-developers] Get an app's api level programmatically

2012-04-05 Thread Kamal Kambe
I need to retrieve minSdkVersion from AndroidManifest.xml programmatically. 
I need to enable a flag based on its value. Is there no way to do it?


On Saturday, March 24, 2012 2:50:22 AM UTC+5:30, Chris Stratton wrote:

 On Friday, March 23, 2012 2:50:13 PM UTC-4, Kostya Vasilyev wrote:

 Perhaps a better test would be to check for undocumented APIs that are 
 known to have disappeared in a particular Andorid version, but just 
 collecting the data for this type of checking is going to be a large task.


 Statically cataloging the utilized APIs sounds difficult.  Or impossible, 
 if reflection is used (as it sometimes has been for hidden APIs).  Then 
 there are native code issues, places where developers have resorted to 
 underlying linuxisms to accomplish things that are poorly or intentionally 
 unsupported by the platform, etc.  In total, predicting if a given APK will 
 fail on a given version (/build/device) sounds pretty hard.


-- 
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

Re: [android-developers] Re: Android is worst os mobile is this true

2011-09-22 Thread Fadil Kamal
Learn it more dude

-- 
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 GT-I9000

2011-09-22 Thread Fadil Kamal
How to faster my GT-I9000? It always lag
Please help me

-- 
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] what is the problem؟

2011-07-21 Thread Asmaa Kamal
peace be upon you

iam beginner in android developing

when writing an application that deal with sqlite i found thid problem

http://www.4shared.com/photo/ffMPYWic/android_events_problem.html


the source code:


http://www.4shared.com/document/D6ZXC0Q8/default.html
http://www.4shared.com/file/S81x9u0e/proguard.html
http://www.4shared.com/file/HgRUockz/classpath.html
http://www.4shared.com/file/86U2mdSO/project.html
http://www.4shared.com/document/6PaOOBOV/AndroidManifest.html

what is the problem?
any one can help me

-- 
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] Bluetooth voice chat

2011-07-19 Thread kamal g.c
I need to develop the Bluetooth functionality in my app, but no idea
that how to implement it, any guidelines and example from u will be
greatly helpfull.

-- 
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] custom spinner

2011-07-19 Thread kamal g.c
I need to design spinner the spinner item will be populating in the
width of spinner and starting from the spinner view where instead of
populating the spinner item  in whole screen. so, anyone suggestion
will be greatly Thank full.

-- 
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] how to accelerate the performance of my phone?

2011-05-02 Thread Fadil Kamal
how to accelerate the performance of my phone?
sometimes my phone lags even force close
how to fix it?

-- 
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] Lag problem

2011-05-02 Thread Fadil Kamal
how to accelerate the performance of my phone?
sometimes my phone lags
how to fix it?

-- 
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] java.lang.NullPointerException

2011-04-20 Thread Kamal
Hi

I am a beginner. I wrote an application for Android 2.3  which was
running alright. I need to modify it to make it work for 2.2 as well.
I know apps are not backward compatible. When I made a new project for
API 2.2 and copy-pasted java files from my original app, it shows run-
time error (on emulator) - java.lang.NullPointerException right from
the beginning of first activity.

Can someone give me any idea how to proceed?

Thanks
Kamal

-- 
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] local and remote database synchronization

2011-04-08 Thread kamal g.c
I need to write the application where the application should be able
to provide full functionality in offline mode(Internet dis-
connection). so, I am going fetch the required data at once and use it
for the offline mode.. and the save data from my application will be
store in the local mobile database and send to web service when the
internet connection provide... so, I think about the database
synchronization, but no idea that how to implement it..

-- 
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] Adding Java JCE provider statically as part of Android

2010-09-29 Thread Kamal
Hi,
Is there a way to load Java JCE provider statically as part of
Android.

Regards,
Kamal.

-- 
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] regarding signing the JCE provider jar file for Android

2010-09-22 Thread Kamal
I am developing a sample JCE service provider that implements a
encryption algorithm. When i tried to test it in android emulator it
is failing. I want to know whether  this JCE provider jar file needs
to be signed for using this encryption method. Who should sign this
jar file for using it in Android platform.

Regards,
Kamal.

-- 
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] Can I include Jar file build using SUN JDK in Android application

2010-08-30 Thread Kamal
Hi,
I am new to Android.
I have a JAR file built using SUN JDK. I want to use it in my Android
application. I have added jar file in android application project as
mentioned in
http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary

But the application closes when I tried to run the application in
emulator. Exactly it take place when I tried to instantiate the class
in Jar file.

I want to know whether we can use these Jar files in Android
application.

Regards,
Kamal.

-- 
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: How to detect orientation change in home screen widget?

2010-05-13 Thread Kamal Hasan
Hi ,

Did you get idea about the orientation change in widgets ?

Kamal

On Mar 16, 2:32 am, kknight pan...@gmail.com wrote:
 I am writing a home screenwidgetand want to update (modify) the home
 screenwidgetwhen the deviceorientationchanges from portrait to
 landscape or the other way. How can I make it?

 Currently, I tried to register to CONFIGURATION_CHANGED action like
 the code below, but the Android didn't allow me to do that by saying
 IntentReceiver components are not allowed to register to receive
 intents.
 The reason that I register to CONFIGURATION_CHANGED is that, the
 Android spec said about ACTION_CONFIGURATION_CHANGED: You can not
 receive this through components declared in manifests, only by
 explicitly registering for it with Context.registerReceiver(). 

 Can someone help me? Thanks.

 public class MyWidget extends AppWidgetProvider {

     @Override
     public void onEnabled(Context context) {
         super.onEnabled(context);
         this.registerReceiver(this, new
 IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED));
     }

-- 
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] Out of Memory for Large Images

2010-04-14 Thread Kamal Hasan
  I want to display an image which is around 4 MB,It is giving
Out of Memory while loading the image.It is working fine for small
images. Is there any alternative method using which I can display
large size images.


FileInputStream fin = new FileInputStream(new
File(sdcard/DSC00712.jpg));
BufferedInputStream bis =  new BufferedInputStream(fin);
byte[] data = new byte[bis.available()];
bis.read(data, 0, data.length);
Bitmap bitmap = 
BitmapFactory.decodeByteArray(data,0,data.length);
if(bitmap!=null)
img.setImageBitmap(bitmap);
else
Log.e(Bitmap , Not Created);

Please suggest me a method to display large images or its not possible
to display large images !!

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Out of Memory for Large Images

2010-04-14 Thread Kamal Hasan
Even after passing the inputstream to the decode function, it is
giving OOM error. Is there any alternative solution to display large
images ?

Kamal

On Apr 14, 12:53 pm, Mario Zechner badlogicga...@gmail.com wrote:
 Try not to load the image into a byte array before passing it to the
 BitmapFactory but rather pass the InputStream directly to the
 BitmapFactory. There is a limit for the size of an image, however, 4mb
 should work.

 On 14 Apr., 09:25, Kamal Hasan kamal.hasa...@gmail.com wrote:



            I want to display an image which is around 4 MB,It is giving
  Out of Memory while loading the image.It is working fine for small
  images. Is there any alternative method using which I can display
  large size images.

                          FileInputStream fin = new FileInputStream(new
  File(sdcard/DSC00712.jpg));
                          BufferedInputStream bis =  new 
  BufferedInputStream(fin);
                          byte[] data = new byte[bis.available()];
                          bis.read(data, 0, data.length);
                          Bitmap bitmap = 
  BitmapFactory.decodeByteArray(data,0,data.length);
                          if(bitmap!=null)
                          img.setImageBitmap(bitmap);
                          else
                          Log.e(Bitmap , Not Created);

  Please suggest me a method to display large images or its not possible
  to display large images !!

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: onLowMemory not getting called

2010-04-14 Thread Kamal Hasan
Hi,
When I am trying to load even a image of 4 MB the application is
giving OOM error.Is there any alternative way to create bitmap from
large images? What is the maximum heap for an application?

FileInputStream fin = new FileInputStream(new
File(sdcard/DSC00712.jpg));
if(fin!=null){
Bitmap bitmap = BitmapFactory.decodeStream(fin);
if(bitmap!=null)
img.setImageBitmap(bitmap);
else
Log.e(Bitmap , Not Created);

Thanks and Regards
Kamal

On Apr 13, 11:47 pm, Romain Guy romain...@android.com wrote:
 onLowMemory() is called when the entire system is runningoutofmemory, not 
 when your process is runningoutofmemory. Each app is
 limited to a fixed amount of RAM (24 MB on a Nexus One for instance).
 If you use up these 24 MB but the system still has more RAM available,
 you will get an OutOfMemoryError but not onLowMemory().





 On Tue, Apr 6, 2010 at 12:27 AM, Atul Moglewar atulmogle...@gmail.com wrote:
  Hi,

  I'm working on an application which allocates lot ofmemoryand hence
  I'm bound to get OutOfMemory. I want a way to get notified when system
  is running short ofmemoryso that I can stop processing further,
  notify user and release as muchmemoryas possible.

  According to official Android documentation there is a callback
  onLowMemory from the system. I have a class which extends
  android.app.Application and I have overridden onLowMemory() method.
  This class has entry in the in the application tag of AndroidManifest.
  However it never gets called in my case.  Do I need to register for
  this event using AndroidManifest or any other means?

  Thanks,
  Atul

  --
  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

  To unsubscribe, reply using remove me as the subject.

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them

-- 
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] Streaming of Wav Files using Native Player

2010-04-05 Thread Kamal Hasan
Hi,
Our application needs streaming of audio files.I have done with
streaming of mp3 files by calling the native player and passing the
url to it. Whereas the default player is not able to play the wav
format files from remote server.



The following code worked for mp3 files.

Intent intent = new
Intent(android.content.Intent.ACTION_VIEW);
Uri data = 
Uri.parse(http://myserverurl/voice.mp3;);
String type = audio/mp3;
intent.setDataAndType(data, type);
startActivity(intent)

I changed the mime type for wav format but it didn't worked

Intent intent = new
Intent(android.content.Intent.ACTION_VIEW);
Uri data = 
Uri.parse(http://myserverurl/voice.wav;);
String type = audio/wav;  // tried String 
type = audio/x-wav;
intent.setDataAndType(data, type);
startActivity(intent)

Anyone suggestions ?

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the amount of Audio data buffered in the device

2010-04-05 Thread Kamal Hasan
Hi KK,
Can you please tell me how to decode mp3 to wav ? working with libmad
but not able to fix it.

Thanks and Regards,
Kamal

On Apr 5, 3:00 pm, KK krishnakumar.ramachand...@gmail.com wrote:
 I am trying to write a streaming application. I have my own decoder
 and I am playing PCM audio using AudioTrack. At any point in time I
 want to know how much data is buffered with the device. I want to use
 this so that if the data with the device go below a level, I want to
 go into a buffering mode where I will buffer 2-3 seconds of data
 before continuing playback again. Can someone please tell me how to do
 this?

 Thanks in advance
 KK

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Getting the amount of Audio data buffered in the device

2010-04-05 Thread Kamal Hasan
Hi Kavitha,
  Did you got any decoder information ?I am also looking similar
one.Can you please share with me.

Kamal

On Apr 5, 3:06 pm, kavitha kavith...@gmail.com wrote:
 could you please tell how to decode audio?

 On Mon, Apr 5, 2010 at 3:30 PM, KK krishnakumar.ramachand...@gmail.comwrote:



  I am trying to write a streaming application. I have my own decoder
  and I am playing PCM audio using AudioTrack. At any point in time I
  want to know how much data is buffered with the device. I want to use
  this so that if the data with the device go below a level, I want to
  go into a buffering mode where I will buffer 2-3 seconds of data
  before continuing playback again. Can someone please tell me how to do
  this?

  Thanks in advance
  KK

  --
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe, reply using remove me as the subject.

-- 
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: Streaming of Wav Files using Native Player

2010-04-05 Thread Kamal Hasan
Hi Any one has any idea ?

Kamal

On Apr 5, 12:27 pm, Kamal Hasan kamal.hasa...@gmail.com wrote:
 Hi,
 Our application needs streaming of audio files.I have done with
 streaming of mp3 files by calling the native player and passing the
 url to it. Whereas the default player is not able to play the wav
 format files from remote server.

 The following code worked for mp3 files.

                             Intent intent = new
 Intent(android.content.Intent.ACTION_VIEW);
                                 Uri data = 
 Uri.parse(http://myserverurl/voice.mp3;);
                                 String type = audio/mp3;
                                 intent.setDataAndType(data, type);
                                 startActivity(intent)

 I changed the mime type for wav format but it didn't worked

                                 Intent intent = new
 Intent(android.content.Intent.ACTION_VIEW);
                                 Uri data = 
 Uri.parse(http://myserverurl/voice.wav;);
                                 String type = audio/wav;  // tried String 
 type = audio/x-wav;
                                 intent.setDataAndType(data, type);
                                 startActivity(intent)

 Anyone suggestions ?

-- 
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Media Player not working on HTTPS as Data source

2010-02-15 Thread Kamal Hasan
Hi,

I am able to play mp3 files from a HTTP server.I have given the link
as Datasource and it is working fine.When I

replaced the link with HTTPS then media player is not working.Please
help to resolve this issue.

Thanks in advance.


Cheers,
Kamal

-- 
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: Media Player not working on HTTPS as Data source

2010-02-15 Thread Kamal Hasan
Hi ,

Whether Android Media Player supports HTTPS protocol ?

Kamal

On Feb 15, 7:34 pm, Kamal Hasan kamal.hasa...@gmail.com wrote:
 Hi,

 I am able to play mp3 files from a HTTP server.I have given the link
 as Datasource and it is working fine.When I

 replaced the link with HTTPS then media player is not working.Please
 help to resolve this issue.

 Thanks in advance.

 Cheers,
 Kamal

-- 
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: PVMFFailure when using MediaPlayer for radio streams

2010-02-15 Thread Kamal Hasan
Hi,

 Any one has tried with HTTPS on media player

I am getting Command PLAYER_SET_DATA_SOURCE completed with an error
or info PVMFErrNotSupported Error.

I am able to play the file on http but failed to play on HTTPS. Can
you help me in this regard.

Kamal




On Feb 11, 10:42 pm, Steve steveoliv...@gmail.com wrote:
 I can make this work on 1.6 with this 
 linkhttp://www.colorado.edu/AmStudies/lewis/Design/blue.mp3

 What is the url you are trying to connect to?

 On Jan 29, 6:08 am, David trend...@gmail.com wrote:



  ps-I am using version 1.5 on a HTC phone

  On Jan 14, 9:48 pm, Tanmay tanm...@gmail.com wrote:

   I tried doing this in 1.6 but still gave me the Prepare Failed 0x1
   error along with thePVMFFailurein the log.
   Has there been any solution to this one developed yet?

   On Dec 14 2009, 10:13 pm, YaushiIizuka vse5...@gmail.com wrote:

Hi.

String url = http://your.url;;
MediaPlayer mp = new MediaPlayer();
mp.setDataSource(url);
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
mp.prepare();
mp.start();

On 10月23日, 午後3:28, dede dede830...@126.com wrote:

 Hi,
 In 1.6,I also try to play stream through setDataSource(http://
 xxx/.mp3),
 but also it return IOException: prepare failed, status=0x1.
 If set the url into windowsmediaplayer, it can play correctly, I
 wanna know your problem whether be resolved?
 If yes, can u tell me the solution,thanks very much.

 On 10月7日, 上午5时41分, iwhoyt wallace...@hotmail.com wrote:

  In 1.5 I was able to stream an mp3 over http by passing the url to
  setDataSource(). However I started gettingPVMFFailures in 1.6. For
  me the issue was the Content-Type http header. If the header was set
  correctly (Content-Type: audio/mpeg), the stream played. Otherwise 
  if
  failed during PLAYER_INIT.

  On Sep 2, 2:32 am, siliconeagle rrmu...@gmail.com wrote:

   Also the URl is a http (MP3) stream URL - as opposed tioo other 
   opost
   where RTSP is being tried. It looks like it should just work. Has
   anyone else got streaming working via a streaming URL?

   On Sep 1, 1:24 pm, siliconeagle rrmu...@gmail.com wrote:

I am trying to build streaming radio into my app, which works 
fines
streaming files over the internet, but when i try to use a 
shoutcast
url in get the error below, which from the soruce code looks 
liek the
mediaPlayer is looking for the duration in the header. Does 
anyone
know if shoutcast urls will work withthe defaultmediaplayer? Or 
do i
have to download chunks into a ping-pong buffer sor something? 
The url
has no porblems downloading via the browser.

the error is:-

09-01 11:53:25.634 E/MediaPlayer(16972): stop called in state 1
09-01 11:53:27.324 D/BatteryWidget(15623): Updating Views
09-01 11:53:30.445 E/PlayerDriver(   35): Command PLAYER_INIT
completed with an error or infoPVMFFailure
09-01 11:53:30.445 E/MediaPlayer(16972): error (1, -1)
09-01 11:53:30.504 I/NotificationService(   55): enqueueToast
pkg=net.robmunro.mypod 
callback=android.app.ITransientNotification$Stub
$pr...@4323b8f8 duration=1000
09-01 11:53:30.514 W/System.err(16972): java.io.IOException: 
Prepare
failed.: status=0x1
09-01 11:53:30.644 W/System.err(16972): at
android.media.MediaPlayer.prepare(Native Method)
09-01 11:53:30.644 W/System.err(16972): at
net.robmunro.mypod.util.MediaPlayerWrapper.playMedia
(MediaPlayerWrapper.java:111)

the code i use is:-
try {
mPlayer.stop();
mPlayer.reset();} catch (Exception e) {

e.printStackTrace();}

this.source=source;
if (source.equals(Globals.SOURCE_LOCAL)) {
 mPlayer.setDataSource(f.path);
 buffered = 0;} else if 
(source.equals(Globals.SOURCE_STREAM)) {

mPlayer.setDataSource(f.remoteUrl);
 buffered = 100;}

mPlayer.prepare();
mPlayer.start();- 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] developer.android.com is not opening..

2009-07-29 Thread kamal

Hi,
developer.android.com not opening for me.. Is it happening to every
one?
I am trying to read some documentation related to testing Automation
in this site..
Any workaround is available ?

Thanks  Regards,
kamal

--~--~-~--~~~---~--~~
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] Differentia bussiness contacts and personnel contacts

2009-05-26 Thread Kamal Hasan

Hi ,

Can anyone tell me how to differentiate Business Contacts and
Personnel Contacts ? I  am able to access contacts(using Content_URI)
but , not able to get all details of a contact. I want to join the
cursors to get one record per person / contact.Please help me joining
the cursors.

Thanks and Regards
Kamal
--~--~-~--~~~---~--~~
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] On Destroy Notification

2009-05-13 Thread Kamal Hasan

Hi All,

Any one can please tell me, How to get a notification on dead of my
application.Android is killing my app after every 40 mins.
Is there any way to restart the App programatically again ?

Thanks and Regards
Kamal
--~--~-~--~~~---~--~~
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: conversion to dalvik format failed with error 1

2009-05-08 Thread Kamal Hasan

Hi

My project was running perfectly and when I cleaned the project then
It started to give the following error.

[2009-05-08 12:47:24 - MobilChek] no classfiles specified
[2009-05-08 12:47:24 - MobilChek] Conversion to Dalvik format failed
with error 1

Pls help me in resolving this issue.

Kamal


On May 4, 2:53 am, Justin (Google Employee) j...@google.com wrote:
 Did you update your plugin? If so, did you create either a 1.1 AVD or
 a 1.5 w/Google Maps AVD?

 Cheers,
 Justin
 Android Team @ Google

 On May 2, 10:59 am, Berlin Brown berlin.br...@gmail.com wrote:

  On May 2,1:05 pm, CnmJbm cnm...@gmail.com wrote:

   ok, it seems i fixed it on my environment.

   just delete the R.java (by refreshing the project) and rebuild the
   project.

   On May 2, 9:57 am, CnmJbm cnm...@gmail.com wrote:

i got the sameerror, TOO!!!

May Day

On Apr 28, 3:57 pm, chris.cap...@gmail.com chris.cap...@gmail.com
wrote:

 Hi,

 I just updated to SDK 1.5 and all of my projects are failing to build
 with the followingerror:

 [2009-04-28 15:53:23 - Utilities] no classfiles specified
 [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed
 witherror1

 (Utilities is the name of this specific project.)

 Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5
 everything worked fine. Thanks.

 Chris

  I got rid of thaterrorand get thiserror, any ideas.  I have a
  similar configuration:

  [2009-05-02 14:22:39 - HelloWorld]Failedto find an AVD compatible
  with target 'Android 1.1'. Launch aborted.
--~--~-~--~~~---~--~~
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] Radio Off

2009-02-04 Thread Kamal Hasan

Hi,

Programatically how to switch off Radio, bluetooth and wifi in
android  ?
Can I enable airplane mode ?

Kamal


--~--~-~--~~~---~--~~
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: How to hang up outgoing call?

2009-02-03 Thread Kamal Hasan

You can abort a call using BroadcastReceiver in your application.

Kamal

On Feb 3, 1:31 am, Tilekus tile...@gmail.com wrote:
 Hi everyone,

 We are new to Android and creating an application where one of the
 things we need is to control the outgoing call,
 at least to be able to stop it from our application.

 For now we tried using Intent.ACTION_CALL to use existing activity:

         Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse
 (tel: + phoneNumber));
         startActivity(callIntent);

 But we can't figure out whether it's possible to stop launched by this
 default Call activity. Is it possible? If yes, how?

 If not, what should we use to write our own Call activity to make a
 very simple call?
 We would want this activity only to be used by our application, not
 for all outgoing calls.

 Million thanks in advance,

 Tilek
--~--~-~--~~~---~--~~
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] Abort Http URL

2009-02-03 Thread Kamal Hasan

Hi

Anyone knows how to block or abort a http url request in android ?

Thanks and Regards
Kamal
--~--~-~--~~~---~--~~
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: Delete SMS from Inbox

2009-01-29 Thread Kamal Hasan


Hi All,

I am answering myself.

we can delete sms using the following code.

ContentResolver cr = getContentResolver();

Uri url =  Uri.parse(content://sms/);

// get the _id of the message which you want to delete.

int numRecs = cr.delete(url,_id=+id, null);

//numRecs will give you number of records deleted.

Kamal



On Jan 15, 2:55 pm, Kamal Hasan kamal.hasa...@gmail.com wrote:
 Hi,

 Anybody knows how todeletesmsfrom inbox.
 I have tried using the following format but its giving Illegal
 argument Exception : Unknown URL

 getContentResolver().delete(Uri.parse(content://sms/
 inbox),null,null);

 Anybody knows the format todeletesms?

 Thanks a lot

 Kamal
--~--~-~--~~~---~--~~
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: unable to delete sms from inbox

2009-01-29 Thread Kamal Hasan

Hi All,



we can delete sms using the following code.

ContentResolver cr = getContentResolver();

Uri url =  Uri.parse(content://sms/);

// get the _id of the message which you want to delete.

int numRecs = cr.delete(url,_id=+id, null);

//numRecs will give you number of records deleted.

Kamal

On Jan 23, 3:46 pm, ipeg.stud...@gmail.com wrote:
 Hi,

 I am trying todeletesmsfrom inbox

    getContentResolver().delete(Uri.parse(content://sms/conversations/
 9), null, null);

 the above statement does not work. gives error.

 Please help me
--~--~-~--~~~---~--~~
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: Help!!!! How do I delete sms from inbox?

2009-01-29 Thread Kamal Hasan

Hi All,

I am answering myself.

we can delete sms using the following code.

ContentResolver cr = getContentResolver();

Uri url =  Uri.parse(content://sms/);

// get the _id of the message which you want to delete.

int numRecs = cr.delete(url,_id=+id, null);

//numRecs will give you number of records deleted.

Kamal

On Jan 23, 3:31 pm, ipeg.stud...@gmail.com wrote:
 I need to know the code for  deleting anSMSfrom the inbox.

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



[android-developers] Delete SMS from Inbox

2009-01-15 Thread Kamal Hasan

Hi,

Anybody knows how to delete sms from inbox.
I have tried using the following format but its giving Illegal
argument Exception : Unknown URL

getContentResolver().delete(Uri.parse(content://sms/
inbox),null,null);


Anybody knows the format to delete sms ?

Thanks a lot

Kamal
--~--~-~--~~~---~--~~
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] Intercept Outgoing Calls

2009-01-12 Thread Kamal Hasan

Hi,

Any body know, how to intercept out going call. I just want to block
the out going calls using my code.
I have tried to dispatch key event, which is not working.Is there any
way to inject Key events globally ?

Thanks a lot
Kamal
--~--~-~--~~~---~--~~
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] Dispatch Key Event

2009-01-08 Thread Kamal Hasan

Hi,
I want to inject a Global Key Event.In previous version of SDK it was
supported by injectKeyEvent method which is removed later.
Please help me to inject a new KeyEvent to the device.

Kamal

--~--~-~--~~~---~--~~
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: Parse JSON

2008-09-21 Thread Kamal

Check out http://www.json.org/java/index.html

http://www.json.org/java/simple.txt

On Sep 20, 7:51 am, Nemat [EMAIL PROTECTED] wrote:
 Hi

 Can anyone tell me the way I can parse JSON???

 Thanks in advance...
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---