android,jmdnsRelated issues-Collection of common programming errors
Bjarke Freund-Hansen
android android-source
If you have downloaded any android source code, you would see a test folder present for almost all applications and base framework.I wanted to know whether we build the test code too while building the sdk from source code, or is it just for our reference.If it is for the latter, what is the best way to use it? Please post me the exact use of tests present in android source code.
ReallyGoodPie
android
Hi i basically just started building apps for android, and i have been following some tutorials just to get started, but my apps won’t run in 4.2. I get the message “Unfrotunatley, your app has closed…”. So i created a android 2.2 emulator, and ran it fine, but in eclipse, it just shows “x” next to the 2.2 emulator, yet the 4.2 emulator displays perfectly.How do i get the 2.2 emulator to work on eclipse, i have the SDK and all that, it just won’t give me the option to run it. It works fine whe
mkyong
java android button countdown
Quick question here, I have the following code working for the most part, but I would like for the button to go back to it’s original state if it is clicked during the countdown. Any suggestions?button.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {new CountDownTimer(4000, 1000) {@Overridepublic void onFinish() {button.setText(“SENT”); }@Overridepublic void onTick(long sec) {button.setText(“CANCEL (” + sec / 1000 + “)”);button.setOnClickListener(n
Hadi Eskandari
android preferences
I have a PreferencesScreen, that has some Preferences and a sub-screen. It looks like this:<PreferenceScreen android:key=”root”><Preference android:key=”first” /><PreferenceScreen android:key=”subScreen” /><Preference android:key=”second” /><Preference android:key=”third” /></PreferenceScreen></PreferenceScreen>When user clicks the subscreen, he is moved to the subscreen view. Now I want to redirect the user to “root” preference screen when he clicks on
Matija Lukic
android xml layout
Iam developing a HTML5 Android app, and Iam stucked at basic xml layout of Android app. When I run my app in emulator and on my Android smartphone I have unexpected blank space on the right side.http://i.stack.imgur.com/c3emH.pngHere is code form activity_main.xml file <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” &
hoss
android tree project gradle android-studio
I can’t seem to find the project files in to the newer version of Android Studio. In the screenshot below you can see that it doesn’t display the entire project tree. http://i.stack.imgur.com/ts172.pngThe solution offered in this post doesn’t fix my problem.
ThinkDo
android android-layout android-xml android-studio
After doing a lot of research, and not finding anything… quick question, does anybody has an idea why Android Studio is not taking the Map tag? The code below is a fragment of the maps sample in the SDK. Already added google play services lib and support, but nothing. It’s showing the errorUnexpected namespace prefix “map” found for tag fragment.Thanks a lot in advance!<fragmentxmlns:map=”http://schemas.android.com/apk/res-auto”android:id=”@+id/map”android:layout_width=”match_parent”androi
Arthur
android activity android-manifest android-button
I’ve built a test app to demonstrate the problem.I have an Android app which has a couple of buttons with semi-transparent gradient background.The problem is – when the button is pressed, the space under the button turns black (screenshot provided).After a long time of searching for the cause i’ve found, that the problem is caused by this entry in the AndroidManifest.xml:<supports-screensandroid:anyDensity=”false”android:largeScreens=”true”android:normalScreens=”true”android:resizeable=”true”
Vituel
android webview android-webview android-viewpager pager
My pager has one webview inside each fragment. The webviews themselves don’t scroll, i.e. their content fit entirely in them.The problem is the scrolling of the pager doesn’t behave as expected. The webview content only follows the scrolling when going through the right edge of the screen (i.e. moving out/in to/from the right). When a webview is going through the left edge though it’s content stays still (so that it looks like the next page is sliding over it, like cards).I tried having other co
Yanny
android xml centering horizontalscrollview
I need create something like this in xml, but it is not possible to center inner object in scrollView with child horizontalScrollView.here is code example:<ScrollViewandroid:id=”@+id/scrollView1″android:layout_width=”fill_parent”android:layout_height=”0dp”android:layout_weight=”5″android:fillViewport=”true” ><HorizontalScrollViewandroid:id=”@+id/horizontalScrollView1″android:layout_width=”fill_parent”android:layout_height=”fill_parent” ><RelativeLayoutandroid:layout_width=”fill_pa
Hyunwoo Nam
android eclipse jmdns
My code worked but it does not work suddenly. The code is as follows.public class AndroidDnssdDiscoveryTestActivity extends Activity { /** Called when the activity is first created. */android.net.wifi.WifiManager.MulticastLock lock; android.os.Handler handler = new android.os.Handler(); final Context context = this; AlertDialog alert=null;public void onCreate(Bundle savedInstanceState) {/** StrictMode.ThreadPolicy was introduced since API Level 9 and the default thread policy had been changed si
user268397
android jmdns
I’m trying to list some JmDNS services that I discover in my Android app and whenever I call this method my app crashes in the emulator? I tried commenting out blocks of code and code inside methods and it still crashes on the emulator. Anybody have any ideas? import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.
yorkw
java android jar classpath jmdns
Hopefully my issue isn’t too silly but I’m having the following problem…I’m importing a jar which contains the library JmDNS into my project. My project sets up to handle JmDNS like this…setUp();try {peer = new PublicPeer(“Aidan”,6666,6667,this);} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}private void setUp(){android.net.wifi.WifiManager wifi =(android.net.wifi.WifiManager)getSystemService(android.content.Context.WIFI_SERVICE);lock = wifi.createMulticastLo
mizo
android jmdns
For some reason it doesn’t like the getInetAddresses() method in the lines:Enumeration additions = (Enumeration) ev.getInfo().getInetAddresses(); if (ev.getInfo().getInetAddresses() != null && ev.getInfo().getInetAddresses().length > 0) {additions = ev.getInfo().getInetAddresses()[0].getHostAddress(); }import java.io.IOException; import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration;import javax.jmdns.JmDNS; import javax.jmdns.ServiceEvent; impor
Seva Alekseyev
android dependency-management jmdns
I’ve added jmDNS 3.4.1 to my Android project. Copied the JAR under lib, then under “Java BuildPath”/Libraries added a reference.Now my build fails with the following message in Console:[2012-07-27 22:59:07 – Yarxi] Dx UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lcom/strangeberry/jmdns/tools/Browser$1; at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)at com.android.dx.dex.file.DexFile.add(DexFile.java:163)at com.android.dx.command.d
Web site is in building