[android-developers] Record phonecall over Bluetooth

2013-07-10 Thread amey523
I want to record a phone call on Android when a Bluetooth headset is connected. I'm able to record a Phone call normally when no headsets are connected. When I connect a Bluetooth headset the API records the phone call but there is no audio. Do I need to route the call via Bluetooth and if yes

[android-developers] Re: how to fire intent when net is connected

2013-07-05 Thread amey523
Hi-register a BroadcastReceiver to listen to the change in network connectivity. You'll need to register this receiver in the Manifest file since you want it to be active even when the Application is not in the foreground. Then in your onReceive you can do something like this: ConnectivityManag

[android-developers] Re: Files saved in internal memory getting cleared when application closed from multitask window

2013-07-05 Thread amey523
If you want your data to persist even when the Application is sent to background, it is better to save the data on the external SD Card. It might be that your data is getting cleared when you are swiping it off from the running Applications or recently running Applications. Try using SharedPref

[android-developers] Re: HTC One V "getExternalStorageState"

2013-06-27 Thread amey523
Try installing a File Manager from the Play Store. I haven't developed on HTC devices for a while now. The last one I used was the HTC Desire HD. It didn't come with a built-in File Manager like on the Samsung phones. I installed a free File Manager from the Play Store and used it to debug my A

[android-developers] Re: Android testing

2013-06-27 Thread amey523
Best way is giving it away to Users to test. That way they will try and break the Application and give you the appropriate feedback Thanks. Ameya On Thursday, June 27, 2013 12:54:50 PM UTC+1, vani wrote: > > > Dear All, > > What is the best and optimistic way to test Android applications,My >

[android-developers] Auto-start Application doesn't register BroadcastReceivers and doesn't start Services

2013-06-27 Thread amey523
have an Application that starts running as soon as it is installed, i.e. the BroadcastReceivers and Services are register as soon as the Application is installed on the handset. I've removed the action MAIN and category LAUNCHER from the main Activity class. This used to work in the Android OS

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-26 Thread amey523
okButton.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN | KeyEvent.FLAG_VIRTUAL_HARD_KEY |KeyEvent.FLAG_KEEP_TOUCH_MODE,KeyEvent.KEYCODE_POWER)); doesn't work so I guess the API's are built to accept the Power key events from 3rd party Applications On Tuesday, June 25, 2013 12:42:46 PM UTC

Re: [android-developers] Programmatically rebooting

2013-06-26 Thread amey523
Thanks. Tried it, I won't be able to do it on my Handset since its not rooted On Wednesday, June 26, 2013 12:58:04 AM UTC+1, TreKing wrote: > > > On Tue, Jun 25, 2013 at 11:20 AM, >wrote: > >> Hi everyone, is it possible to programmatically reboot an Android device? >> I'm currently working on

[android-developers] Programmatically rebooting

2013-06-25 Thread amey523
Hi everyone, is it possible to programmatically reboot an Android device? I'm currently working on Samsung Galaxy S3 and it doesn't seem to work. The PowerManager.reboot(null) throws an exception during Runtime. Does this work on rooted devices only? Thanks. Ameya -- -- You received this mess

[android-developers] Re: Detect if an outgoing call has been answered

2013-06-25 Thread amey523
Use a BroadcastReceiver to register fr Phone call events. Use TelephonyManager to actually check the Call states. TelephonyManager.EXTRA_STATE_OFFHOOK means the call is active. Use android.intent.action.NEW_OUTGOING_CALL for another BroadcastReceiver to receive events when outgoing calls are ma

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread amey523
dispatchKeyEvent(); has been deprecated in 4.1. Will need to figure that out On Tuesday, June 25, 2013 12:53:07 PM UTC+1, Piren wrote: > > this is not what he asked. > > OP: Try sending events using > > http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_

[android-developers] Re: Displaying the long Press Power off screen/dialog

2013-06-25 Thread amey523
Yes, if forcing it through key code events work its fine with me. On Tuesday, June 25, 2013 12:53:07 PM UTC+1, Piren wrote: > > this is not what he asked. > > OP: Try sending events using > > http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER > > (this thread deals wi

[android-developers] Displaying the long Press Power off screen/dialog

2013-06-24 Thread amey523
Hey everyone, is there a way in Android to show the Phone Options screen that gets popped up when a user long presses on the Power button. On my Samsung Galaxy S3 it has the following options: 1. Power Off 2. Airplane Mode 3. Restart 4. Mute - Vibrate - Sound Is this possible to sh

[android-developers] Stop an Application after trial period

2013-06-13 Thread amey523
Hey guys, I have an Application that I would like to stop after a trial period of say 30 days. How could I achieve this? Basically I have Broadcast Receivers that are registered in the Android Manifest file. Can I stop them or De-register them programmatically? If yes, how could this be done?

[android-developers] Getting an exception while looking for a contact match through a phone number

2013-04-02 Thread amey523
Hey guy, I'm trying to get the First Name, Last name and the Company of a contact from a phone number. But unfortunately while doing so I'm getting an exception. My Code is as follows: *Uri NameUri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, Uri.encode(number)); Str