I am porting Android to a real hardware device. I have written an ALSA driver and it works well. But I don't know how to add it to Android. Can you give me some suggestions? Thanks very much.( I can not endure the muted world any more[?])
Today i get the master code. when I compile ALSA, and it says external/alsa-lib/src/shmarea.c:27:21: error: sys/shm.h: No such file or directory what should I do now? now i copy the shm.h from the former version android. can be ok?
We have a webpage which include two different CSS: portrait.css and landscape.css. We want load this page only once and enable the right CSS according to phone's orientation. We have a plan to develop a chrome plugin by c++ to make it which got us to have to change firmware. I just wonder whether there is more elegant way to do it by Java.
I was wondering if there is a way of enabling the GPS programmatically through an application without going to the menu Settings > Security & location > Enable GPS satellites. Please let me know if there is a way, I've seen this asked a million times in this group but there are never any replies.
I have a question about WAP PUSH SMS on Android. In Mobile device, if you want to receive a WAP PUSH SMS, you need to degrade the SMS security policy level. Then you can acturally receive it. But I have no idea about how to do this on Android? I try to modify the androidmanifest.xml that contains "android.permission.RECEIVE_WAP_PUSH" and change the permission from dangerous to normal. But there is too many androidmanifest.xml, I don't know where the exact path I should be modify? Does any one know how to do that or my thought is wrong?
I got back to the widget development after upgrading to the latest SDK and all of the sudden my widget is failing on startup with this message:
ERROR/AndroidRuntime(5296): java.lang.RuntimeException: Unable to start receiver topjob.widget.SearchWidget: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=5296, uid=10057, package uid=10048
Here's two lines of code where exception occurs:..................
I'm currently writing an app in Android that works with the GPS, at the moment I'm able to work out whether the GPS is enabled, my problem is that I want to enable the GPS on app startup if it is disabled, how can I do this programmaticaly?
Is it possible to enable usb debugging (under settings/applications/development) programatically from within my app? I was looking at Permission.WRITE_SETTINGS and http://developer.android.com/reference/android/provider/Settings.System.html but couldn't find anything appropriate.
I find that the UI "Enable GPS satellites" is used to enable receiving GPS data, but not to start GPS. Which UI is used to start GPS? I am not clearly understand why android to designed GPS so. If GPS is not started, then you can't use "Enable GPS satellites" to receive any data and it is useless. I think that if the UI "Enable GPS satellites" is used to start GPS and also run the GPS thread is better? What is the trigger to start GPS?
I'am looking for a way to have a webview content selectable in the very same way as the stock browser does. I should note that Dolphin HD shows exactly the same text select functionality as the default browser (same icons, animation, etc), so it really should be possible. But I can't figure out how.Until now, all i found was this function, which kind of work, but doesn't allow the user to expand/shrink the selection.I just discovered that long touch copy/paste is part of HTC Sense, not Stock android. Still, it'd be useful to find out how to enable that on a webview, even just for HTC users. Anybody knows ?
In my application it is necessary to have internet connection. Therefore i check while starting if a Internet connection is available. If not I ask the user if he would establish an Internet Connection, and what type (wifi oder mobile). The wifi connection i can establish with the following code WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); wifiManager.setWifiEnabled(true); But how do i establish a mobile connection? Couldn't find a single code snippet at Google.
How can I enable assert statement on Android? I have referred to a url: http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=d... and done what it said: adb shell setprop dalvik.vm.enableassertions all but nothing happen! The test code is: Log.v("assert 1","1"); assert false; Log.v("assert 2","2"); No matter what I did, "assert 2" will be printed, which means "assert false" does nothing! What should I do? BTW, I use eclipse as IDE.
How does the "Allow automatic updating" works? I notice that my apps have "A manual update is required." when I try to enable it. Is it anything I need to do in my codes to enable this to work? Or is it depending on the permissions required by the apps?
Does anyone know if there's an app to automatically change the WIFI state (on/off) based on whether the power is plugged in? I'd like to set mine up to turn on wifi whenever I'm plugged in to a power source.
I was fooling around with Android and my Java knowledge is limited at best (for instance, I'm perplexed by the fact that it allows inline classes!?).I have a layout where there are three dropdown menus. I initialise all three of them inside onCreate().The first one takes its values from a string-array. The second one, however, depends on the choice of the first one and the third one depends on the choice of the second one in turn.I have a few string-arrays for the second Spinner but I was wondering what would be the correct way to implement a list of successively enabled Spinners. I'm tempted to just hack into it and make it work but I don't want to run the risk of it being malformed and unstable.