i m new in android i want to create application that gives option for create new profile (like meeting,outdore etc),manage profile(not location base it's manually)
plz help me
If I understand you correctly, you want to quickly switch between several profiles that change certain settings like Wifi On/Off, mutes all sounds, etc. right?
If that's what you want then your best bet would be to not re-invent the wheel and - depending on what phone you have - to install a custom ROM like CyanogenMOD which already features profile management. This would void your warranty though.
Otherwise, you could possibly achieve this with either an Xposed module (will most likely only work if you have a Nexus device, since it requires a pure "AOSP" version of Android and Root permissions) or the app "Tasker" which also requires Root access.
Related
I am hoping to implement some security for an Android app to prevent people from using the code unless it was installed on the correct device by the company. My first choice would be to make sure the app was installed through the Google Play Store, but this app will not be available there.
I have determined that one security measure that will work for my use case is checking some of the information in the Build class. I am concerned that there could be the possibility that some of the fields in the class may not stay the same, even if the same model of device is always used.
What portions of the Build class are subject to change for a specific model of device and what fields should never change?
In the end all of these system configs are just .xml files residing on the device somewhere around /data/system/sysconfig which you can modify in any way you want if you have write access (aka root) so I would recommend starting from making sure that the user running your app does not have root privileges. There are some FOSS libraries for it, you can start from there.
Is there any way to force the android camera to see a specific thing, like an image?
I have an app called FakeGPS, and basically, any system that tries to use Android's GPS methods will get the fake coordinates that I setup using that app.
I want to do the exact same thing, except with the camera.
Any app using the camera will get the image that I put in.
The camera implementation is completely native, everything works with IPC calls between the system and the camera driver (that are provided by the different manufactor).
There is no way to intercept this chain without recompiling the entire OS.
You can find more info here.
as #dmarcato said - if you want to manipulate anything with the camera that would be relevant to every camera application - only way is to change android's native source code somehow - something that can be done only when compiling android OS image containing this changes.
so, if you are not going to provide to each one of your user a custom OS firmware (for each device you want to support - it's different image containing the specific binaries drivers..) you can forget about that.
if that's not enough, there is also the issue that native core camera code is not necessarily android code, but vendor specific code which probably entirely different on each device. this means that you probably need to implement your "hack" different for each device image to make it work.
Its quite unclear what you are trying to say. I guess you want to force setting some app to be used for specific files or content type. Setting default app from your code is impossible. Only user can choose their default apps for specific operation or content type.
But still you can run specific system app, BUT only from your application, like launching any system camera, regardless of the phone manufacturer:
Intent systemCamera = null;
PackageManager pm = getPackageManager();
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for(ApplicationInfo packageInfo:packages){
Intent i = pm.getLaunchIntentForPackage(packageInfo.packageName);
if(i != null && i.getAction().equals(MediaStore.ACTION_IMAGE_CAPTURE)){
if((packageInfo.flags & ApplicationInfo.FLAG_SYSTEM)!= 0){ //check if system app
systemCamera = i;
break;
}
}
}
startActivityForResult(systemCamera, MY_POSITIVE_INTEGER_REQUEST_CODE);
I got this to work on rooted devices. You can use things like xposed http://repo.xposed.info/module/de.robv.android.xposed.installer to modify the methods used by normal apps to grab camera images. This won't work for recording or system native apps thought.
There you need other tools. If you want to do it globally and right at the camera source, you might need to build your own android kernel. But that's not that hard either. The issue there is that you will have to build another kernel for each device and firmware version.
At first glance, what you are wanting to do seems unethical.
Unless you are willing to modify kernel or system libraries, it is also impossible.
i want to make an application or more like a tweak for android
i want to write some code that's gonna work on an android device and will do curtain actions based on an input from a Bluetooth device
this application needs to run in the background at all times (as if it was part of the device's operation system)
and be getting input every second
i need it to be able to bring up i custom keyboard i am gonna design and to set up a courser just like in a desktop which can be controlled by the application.
i read about something called a ROM and i dont know if thats what i am looking for.
i also know that the android operation system can be modified or replaced with another operation systems like the one called cyanogen .
i am a beginner and i have got some background in java
i tried creating an android app but i dont know how to make this thing work on the OS
i need someone to give me a very detailed explanation cause i know nothing about these stuff
It sound like your trying to make an App that takes Bluetooth input...
It doesn't sound like you need to edit the OS itself...
You need to set up the Android SDK to start development...
http://developer.android.com/sdk/installing/index.html
1. Download the SDK
2. Install the Eclipse Plugin
3. Write the code, and run it on the emulator or your connected device(make sure debugging is enabled under Setting->Applications->Developer)
Here's some info on getting started w/ Bluetooth...
http://developer.android.com/guide/topics/connectivity/bluetooth.html
Since you want this to run all the time, I would look into Android Services also...
http://developer.android.com/reference/android/app/Service.html
You may want to also take a look at the Sample Projects included w/ the SDK after you download the SDK and set up your IDE and Emulator(or phone)...
http://developer.android.com/tools/samples/index.html
Hope this helps clear some stuff up...
I am just wondering how to enable/disable 3G/2G using the Android SDK and not just intenting to the 3G settings page. Thanks. Also is there a way to do the same thing, but with GPS. Thanks!
There is no exported to the SDK functionality to switch between 2G and 3G. For a given device you could probably figure out the private functionality, but it wouldn't work unless the app was signed with the system key.
You can disable the radios though, by turning on airplane mode.
And you might be able to make a shortcut to open the appropriate settings activity directly, instead of going through a few levels of menus to get there.
If you make your own build, you can presumably add the capability you really want, but that's likely not useful to anyone but yourself.
Edit: further detail - to understand how it works, look at the settings menu code (default version, a given device will differ):
http://android.git.kernel.org/?p=platform/packages/apps/Phone.git;a=blob;f=src/com/android/phone/Settings.java;hb=HEAD
Edit: AOSP is no longer served from kernel.org. A browsable mirror of
the current phone repository is at
https://github.com/android/platform_packages_apps_phone however due to
evolution of code organization there is no longer a Settings.java
there. One might either use git to reconstruct the version above from
this repository, or else try to figure out where the code has migrated
to in current releases.
You would need to find out the implementation specific set of NT_MODE_ constants you wish to toggle between. And you need to be able to write to secure settings, which requires being signed with the system key. Unless it's a custom build, you probably don't have access to that.
You cannot enable or disable any of these from an SDK application.
I want to customize the android OS for my specific needs.What i want to do exactly is eg:-
remove the access to android market, remove contacts, calendar.etc.
basically I want to have apps that I permit.
Even if removing the icon is all right.
If you do so you will have create a new custom ROM and only you will be able to install...
Not every one would prefer to install without default features like Market etc..