Android :: IPhone OS - Programmatically Enabling / Disabling Certain Functionality
Sep 17, 2010
I asked this a while back and didn't get anything useful. I'm hoping now that Android has advanced a few releases, that there will be more options. Here are the things I'm trying to accomplish: Prompt for a PIN when you uninstall a particular app. This would have been set at install time by the user. Disable certain services (text, phone). What would be even better is if I could be selective about it instead of just turning the radios off. For example:
a. intercept outgoing call, is it to one of a few allowed numbers?, yes
=> allow it, no => deny
b. intercept incoming call, is it from one of a few allowed numbers, yes =>...........................
View 1 Replies
Feb 1, 2010
I have written code to enable and disable various things programatically like Wifi, Ringer modes, Airplane modes. All things that you would see in a power toggle widget. The one that I have not found out how to do is bluetooth. It appears that in SDK level 3 (OS 1.5) there is no pretty bluetooth manager class. Has anyone pinpointed any good source examples on enabling and disabling bluetooth that will also be forwards compatible with users running 2.0 (Droid) / 2.1 (Nexus)? I have found a few partial examples in my google searches that I could not get to actually run.
View 1 Replies
View Related
Aug 5, 2010
I have an app which displays a large amount of text for the user to read. I've found that when reading while lying down, I get annoyed that the screen rotates even though my head and the screen are aligned. I do not want to set this to be permanently in portrait mode, so I think this would preclude an approach of setting the android:screenOrientation="portrait" in the manifest. Ideally, I would like to enable/disable automatic orientation changes via a preference page.
View 1 Replies
View Related
Jul 6, 2010
I am new to Android development and have trouble enabling / disabling the wifi & audio services. I get the appropriate manager instance using the getSystemService method. But I don't get any error when enabling wifi using:
wifiMgr.setWifiEnabled(true);
But the wifi is simply not turned on! Similarly I use
mAudio.setRingerMode(AudioManager.RINGER_MODE_SILENT);
or
mAudio.setRingerMode(AudioManager.RINGER_MODE_NORMAL);.....................
View 1 Replies
View Related
Aug 3, 2009
I have an application that has multiple activities with the intent action.MAIN (category LAUNCHER), so that multiple shortcuts appear in the "Applications" list. Is it possible to disable some of these activities at run-time (so that the corresponding shortcuts disappear from the "Applications" list)?
View 3 Replies
View Related
Feb 3, 2010
We would like to enable or disable widgets via code. When we say "disable" we mean that a widget which is registered in an application should not show up in the list of widgets available to the user when they try to add a widget to their home screen. This question has been asked, unfortunately, many times without answer. There was one response by Dianne Hackborn to a separate widget question which suggested that it was possible to use the package manager to disable widgets.
View 2 Replies
View Related
Feb 6, 2010
We would like to enable or disable widgets via code. When we say "disable" we mean that a widget which is registered in an application should not show up in the list of widgets available to the user when they try to add a widget to their home screen. This question has been asked, unfortunately, many times without
answer.
View 1 Replies
View Related
Nov 24, 2010
how to prevent the Android Activity from sleep mode programatically. Or can we declare something related to this in Android Manifest file.
View 2 Replies
View Related
Jun 8, 2010
can anybody please give me example of using similar functionality like uitableview in iphone to in android?
View 3 Replies
View Related
Jan 21, 2010
give me example of using similar functionality like uitableview in iphone to in android?
View 4 Replies
View Related
Oct 30, 2013
When a group message is sent between my co-workers, who are all iphone users, and myself (Note 3), one person in the exchange does not receive the text. This is not the common iMessage issue that was plaguing me when I made the switch from Apple to Android. This is specifically affecting one iphone user. When I send her a text individually it is not a problem. The other iPhone users don't have a problem receiving or sending to me.
View 3 Replies
View Related
Sep 20, 2010
How do you turn on sync in the emulator. I'm already using Google APIs level 8 and I've already created a Google account. But under "Manage Accounts", my Google account says "Sync is OFF".
View 4 Replies
View Related
Jun 19, 2009
I've just noticed that launching the Camera and Camcorder (in the emulator) would result in a black screen (instead of the famous moving small boxes), i've looked for why this happening on the net, apparently that the camera is disabled by default when you create an AVD. Decided to create another AVD with the camera enabled and launched it and still getting that black screen. Anyone has any idea how to fix this ?
My problem in the first place is that my application is using the default camera application using intents just like in the following: Intent imageCaptureIntent = new Intent (MediaStore.ACTION_IMAGE_CAPTURE); imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File("/sdcard/imageCaptureIntent.jpg"))); startActivityForResult(imageCaptureIntent, WHATEVER_REQ_CODE); I thought that there's a problem in my intent request but like i said before, running the camera on the emulator itself is the problem. By the way, You can run the "camera preview" in the API demos with no problems, how come!
View 5 Replies
View Related
Aug 2, 2010
I have facing problem in scrolling webview in vertically, actually I have scroll view with in the layout have defined webview in layout so when I scroll the webview vertically it scroll whole layout,so i want to enable scroll for webview.
View 1 Replies
View Related
Jul 25, 2010
I like being able to listen to music as I'm falling asleep never having to shut it off later.Is there like some way to enable like a way for my Android phone to shut itself off at like a specific time?
View 1 Replies
View Related
Aug 18, 2010
I need to enable a MenuItem when a previous screen (Activity) returns. I tried this code:
...
((MenuItem)findViewById(R.id.menu_how)).setEnabled(true);
...
but a null pointer exception is launched. BTW, the menu_how is set to false in xml; and the code is part of onActivityResult(int requestCode, int resultCode, Intent data) call.
View 1 Replies
View Related
Apr 20, 2010
I have used PreferenceActivity to have preference in my android application. I want one preference say "pref 2" to be enabled when other preference say "pref 1" is not checked and "pref 2" to be disabled when "pref 1" is checked. i.e. exactly opposite of the android: dependency attribute. How can I do that?
View 3 Replies
View Related
Jan 25, 2009
In one of my applications I am dynamically enabling the GPS system setting based on a user's request. My problem is that I also have a LocationListener which doesn't pick up this change. If the device is restarted or the system settings Activity is brought up the LocationListener kicks in -- the onProviderEnabled() method is called. So.. it seems pretty obvious that I'm not notifying the system correctly of my changes. I have tried sending a broadcast from both the normal context and the application context. I thought this would be fairly straight forward, but it has proven to be rather frustrating. I put together a small test activity to demonstrate my problem.
Here is my test Activity: package com.example;
import android.app.Activity; import android.content.Context;
import android.content.Intent; import android.location.Location;
import android.location.LocationListener; import android.location.LocationManager;
import android.os.Bundle; import android.provider.Settings; import android.util.Log;
public class TestActivity extends Activity {
LocationListener locListener; LocationManager locManager;
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.test_activity); locListener = new MyLocationListener();
locManager = (LocationManager)getSystemService (Context.LOCATION_SERVICE);
locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locListener);
if(!locManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
Settings.System.putString(getContentResolver (),
Settings.System.LOCATION_PROVIDERS_ALLOWED, LocationManager.GPS_PROVIDER);
Intent intent = new Intent(Intent.ACTION_PROVIDER_CHANGED);
sendBroadcast(intent); } }
private class MyLocationListener implements LocationListener {
public MyLocationListener() { Log.d("test", "MyLocationListener()");
} public void onLocationChanged(Location loc) {
Log.d("test", loc.getLatitude() + "/" + loc.getLongitude());
} public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub Log.d("test", "*** onProviderDisabled (" + provider + ") ***");
} public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub Log.d("test", "*** onProviderEnabled (" + provider + ") ***");
} public void onStatusChanged(String provider, int status, Bundle extras) {
// TODO Auto-generated method stub Log.d("test", "*** onStatusChanged ***");
Log.d("test", "provider = " + provider + " status = " + status);
} } }
View 5 Replies
View Related
Mar 14, 2010
Under the 2.1 SDK, is there a way to test for the phone's OS version within the app, and to enable or disable features based on this OS version? In other words, I'd like to do the moral equivalent of this...
if (os_level < 1.6) {// code goes here}
View 2 Replies
View Related
Aug 30, 2010
I am not seeing WiFi tethering app in my phone. I enabled WiFi in froyo build. But it is not showing tethering app? What do I need to enable the app?
View 2 Replies
View Related
Sep 2, 2009
I would like to know how to dynamically change the my option menu items status from disable to enabled.at first all my menu items are set to disabled and when click the menu key , they are shown as gray and disabled.when my other task finished, i want to enable all the menu items, change them from gray to dark color from the screen.do you know how can i implement this?
View 8 Replies
View Related
Mar 20, 2009
All, How can we enable LOG messages in Webkit.
I wanted to enable some debug prints using log utility of Android in Webkit I added the following statements in my code.
#define LOG_TAG "webkit" include <utils/Log.h>
And the following line to test LOGV("Constructor CachedImage.cpp");
I am unable to get the logs. Should I enable with the following define. I even added liblog as one of the shared libraries during compilation.
#define LOG_NDEBUG 0 /* Is this required to get logs? */
View 3 Replies
View Related
Nov 24, 2010
I know you can set fastScroll for listViews, but currently I would like to use a ListActivity with a simplecursoradapter instead. Is there no way to make such a view fast scroll?
View 1 Replies
View Related
Jun 30, 2010
ok, its the Apple Fanbois turn to try and outdo the funniest video on the web..check out their lame attempt to copy it. Code...
View 12 Replies
View Related
Jun 29, 2010
I have a very hard time with the slide to answer feature. It frequently takes me 3-5 tries to answer a call. I would much rather be able to touch to answer. I do realize that there's a slim chance of answering calls while in my pocket, but I'd rather that then fight with the phone. Does anyone know of an application for this? I've searched various forums and there are no current threads regarding this.
View 8 Replies
View Related
Nov 11, 2010
I'm just getting started with mobile development, and after considerable searching I'm still confused about sending a message from my iPhone to another or an Android.For instance, in building a simple Tic-Tac-Toe game, if I want to notify the other phone of a move, what is the best way to do so? Wifi, bluetooth, 3G? And how? Many methods seem to point to communicating through a web server, but I'd rather send them directly from phone to phone if possible.
View 4 Replies
View Related
Jan 24, 2010
Seems to me that Lock 2.0 is the best Screen Lock I've found. Only Issue is, even with the security code enabled, all one has to do is power on/off the phone and your in with no need for the code. What I am looking for is a locking app that doesn't get disabled when powering the phone off/on. Looking for something secure much like every BB has where no matter what you do, to proceed into the phone you need to type in the Lock Code.
View 1 Replies
View Related
Jul 30, 2010
In an application I have a Spinner that has tens of items.When the user taps on the spinner, a popup dialog appears that shows the list of possible selections. However, since there are (sorted) tens of items, I want the user to be able to use the fast-scroll thumb (like fastScrollEnabled attribute on ListView), similar to the one enabled in Contacts application.I tried to get the ListView that is used in that pop-up dialog, but I didn't find any methods to do that.
View 1 Replies
View Related
Jan 9, 2010
I just recently got an android phone and found that the drag and drop on my site doesn't work! I understand why it wouldn't, but has anyone found a solution to this? I'm using JQuery to implement the D & D...
View 1 Replies
View Related
Nov 22, 2010
I come from using a blackberry and am now using the samsun fascinate. I have my work email set up but one thing i haven't found the ability to do is to perform a search for my emails. On my blackberry I was able to search by subject, person's name and read/unread and i was looking to do the same thing but i have not found where i can do that or an app that will assist me with this.
View 2 Replies
View Related