peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Good article, but I would suggest to rename some of imageViewas it is not good practice to have multiple of same name in the the project ;)

dimitrilc commented: Thanks for the reminder. There is only one imageView View in this project though? +1
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@rproffitt @Naheedmir sorry guys but you failed for cheapest trick in online spam.

OP did not really cared about development outsourcing, cons and pros. He just wanted to use his signature that goes to "drums roll" ta-da to some outsourcing company. Classic forum link click advertising. Few years back this would be deleted, not sure about recent rules... Looks like signature link is OK

rproffitt commented: Dani wrote it was OK. Why? Log out and you don't see the tagline as well as it's not seen by SEO robots. +15
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The idea of testing your code is to have some method that has a return and that is what you want to test. So to get testing going on above code you would have to change return type to String

public String methodToCheckStr(int testVar)
    {
        String str="";
        if(testVar==5)
        {
             return "Success";
        }
        else
        {
            return "fail";
        }
    }

And then you can have tests as

@Test
public void testSuccess() {
   StringChecker checker = new StringChecker();
   assertEquals("Success", checker.methodToCheckStr(5));
}

@Test
public void testFail() 
   StringChecker checker = new StringChecker();
   assertEquals("fail", checker.methodToCheckStr(4));
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Centorpe you should have posted also error message...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Some code by you would been good start, since you did not provide one I can only suggest you to read http://android-developers.blogspot.co.uk/2011/11/new-layout-widgets-space-and-gridlayout.html and http://developer.android.com/guide/topics/ui/layout/gridview.html

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please share code

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I ordered Thunderbolt 2 to DisplayPort cable now. Will see if that works. Nevertheless rather weird that HDMI from Asus laptop did not worked either...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I bought Iiyama XB2783HSU-B1DP monitor. However I'm not able to connect my MacBook Pro 2015 from HDMI with DisplayPort to HDMI cable. From monitor menu I am able to select DisplayPort, but monitor will fail to receive any signal from laptop. I tried to connect monitor with Asus laptop, DisplayPort no signal again, while connection through VGA port works fine. Any advice?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Ehmmm silly question will
"SELECT *FROM students"

actually work?
Shouldn't it be with space?
"SELECT * FROM students"

I haven't touched DBs in ages :P

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Also good starting point would be NetBeans documentation here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. There is only one Bundle so no point for creating second (first snippet line 5 & 6)
  2. Use containsKey(String key) to see if bundle contains mode or logo and avoid getting NPE because bundle will return null if mode not found withgetString("mode")
  3. Since I didn't see rest of the code I can only asume given above that Bundle value for mode will be null as never set, hence failing condition
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Is your MyFirstClasssome sort of map? Please share that class or we will not be able to help...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Not sure what you are trying to do in this layout but I would suggest to look on this setup http://ivankocijan.xyz/android-nestedscrollview/
You use power of LinearLayout and its option of weight distribution...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I would strongly suggest to get at least 8GB RAM before trying to do any developemtn or it will be very slow. Optimal is 16GB or above. And just side note, do not even think of moving to Eclipse, which is no longer activelly supported by Google

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Gson and Jackson are most commonly used JSON parsing libraries.

You will create your POJO classes, as you did for PromotionAdapter, fetch JSON and then use either of the libraries to parse it based on your POJO class. Then you only provide collection (List, Array) to your adapter and let it do its job

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As anything in Android with Log class

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@alaad here you can find many samples

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Same here, bunch of devices, tests on Genymotion emulator, you can get free version and we have two tester that do manual tests, but also writes lot of Calabash tests for automation purposes

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There are cross-platform tools like Titanium(C#), Cordova(HTML5 and jQuery). Also possible with Python, Scala or Kotlin. However these will be always slower than native implementation...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hard to say without seeing more of the code. Often the problem is how you inflate components or how you are discharging views once not need it. I would have to see more of the code, sorry

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well the other options can be [startActivityForResult()](http://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)) which would be my preffered choice given that you have some field and you want user to change value/s and then you will lsiten for result [onActivityResult()](http://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent))

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well for the future it will be better if you can post small sample where you can demonstrate issue as above problem description obviously was not clear

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. Install Java
  2. Add Java to your PATH (https://docs.oracle.com/javase/tutorial/essential/environment/paths.html)
  3. Install AndroidStudio
  4. Run AndroidStudio- Update Android SDK (you will need at least API 14 and api 22, latest build tools, from extras install Android Support Repository, Android Support Library, Google Play Services, Google Repository, Intel HAXM)

Optional if not using actual device

  1. Start AVD manager and setup at at least AVD so emmulator can run

If you have machine with less than 8GB RAM it will be very slow...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

PS: "I am using nebeans ide." You do not need to tell us what IDE you are using, it is code that matters...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

though I do wonder what he's done that makes his eclipse project's compiling dependent on the order of dependencies in the project settings window :)

I do remember NetBeans being funny back in the day while building JME app and you messed up order ;)
But hey then I been student and had no clue about building tools, and been happy IDE did it for me :D

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Above description wouldn't help in solving your issue. If your build is dependent on JRE System Library above/below JUnit.jar it is plainly obvious you are dependent on IDE and your project will not build sucessfuly from command line, therefore cannot be run from CI. I do strongly suggest to check out Gradle or Maven

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Deprecated doesn't mena you cannot use it. Just learn how to do it later you can swap it for custom library like Retrofit, OkHttp or Volley

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

i wish the admins could create a tutorial on how to develop a mobile app for the different platforms

Because it is unreasonable thing to do on forum given the way how development moves and the number of platforms. Besides only very few developers do cross platform development and then it will be Android and iOS nativelly or cross platform tools like Cordova, Titanium, Xalmarin etc.

For learning Android you can start here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Slavi Eclipse usage is discouraged as Android Studio is these days prefered and reccomended tool even by Google. Eclipse Gradle implementation lags behind AS and it will be evntually dropped https://developer.android.com/sdk/index.html

As for your question @serenagrace this is what you need

  1. Knowledge of Java and basics of XML
  2. Installation of Java SDK 7 (8 and higher is not recommended as Android is not fully compatible).
  3. Android Studio, 1.3 is latest

Optional

  • Android SDK download - you will get one with Android Studio but I prefer a copy that I'm in control in regards of location of instalation
  • Stand alone installation of Gradle download - you may stick with Gradle wrapper provided by default by Android Studio wizard it will do all
  • Genymotion download - a faster emulator than the one that is part of Android SDK. Provided link is to free version. See comparision between free and busines copy here https://www.genymotion.com/#!/store
Slavi commented: Ah, gotcha! (Been awhile since I left Android world =[) +6
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You should have gone with Map and there would be no need for switch ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

The question is too braod. You cannot expect people to fill you on

  1. Android development
  2. Design
  3. UX
  4. Business logic of the app
    X. item on the list to do or learn

Try to be more specific

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That thing is way too old and not used anymore. Cyril post it back in 2011 (http://www.androiduipatterns.com/2011/03/greendroid-library-for-implementing.html) you should not use it.

So what exactly you trying to achieve? Maybe we can come up with appropriate flow and right components to use...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What about free cloud services?

You can do it, but these have limitations on size and number of downloads etc (Example Amazon S3 Google Cloud) So one way or another you will end up paying for it

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can share it through Google Drive, you just need to expose the folder as web content https://support.google.com/drive/answer/2881970?hl=en but as rubberman said data consumption is to keep in mind. You should consider implementing some warning message if user not on wifi or user will show no love to your app

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

8GB is reasonable start, but with 2GB is just no go. And eclipse will not solve your problem, and IDE abandoned by Google more then 2 years back

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to to provide better problem description not just bunch of keywords. Secondly I do suggest you to read forum rules to be clear on posting rules

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Use jackson-dataformat-csv, it is ratther simple to map CSV and generate JSON, than send it in response to user

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sorry your question is rather confusing
1. Quickaction bar to parse contact address??? Explain please. There is no such thing as quick action bar. Perhaps you ment search in action bar???
2. You have forward data from fragment to activity which will then pass it down to other fragment through Bundle arguments

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Is it so hard to use Google search these days???? "java itext create hyperlink" and first link is http://itextpdf.com/examples/iia.php?id=131

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Take my advise and use ActiveAndroid library or it new brother Ollie Simple object to object transactions, no need to SQLite boilerplate.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I would suggest to debug, because two parameters before this one are fine. It does look like you are actually pushing NULL instead of some value for book_ref

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Possibilities
1. You are querying database on localhost, installed on your own machine. Check some tutorials how to set it properly
2. You did not provide network permissions for the app
3. Check the logs for possible error messages

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well you have to work out some logic that will find out in which location proximity you are in. Once you identify location it should not be hard either have Map<Location, StringResources> where StringResource is only id to the strings new StringResources(R.string.resource_1, R.string_resource_2). However this is only short term solution, it would be better to send data to server that should return you these data that you want to show user

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Your question is very generic, therefore there are two outcomes:

  1. If you do not know Android then better lear it first
  2. You know Android, be more specific where you have problem (UI, data sets, handling response etc)
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please explain more in detail what you are trying to do as above is not exactly clear...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@James he did actually felt in the need to share it with other websites too http://www.geeksforgeeks.org/multiply-two-numbers-without-using-multiply-division-bitwise-operators-and-no-loops/#comment-2063336220

@Abhishek_22

"Once you start down the dark path, forever will it dominate your destiny."
-- Yoda

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Are you sure to posted whole code? Transport (According to Java 6 API, as this class does not exists in API 7 or 8) have to be first initialized from [constructor](http://docs.oracle.com/javaee/6/api/javax/mail/Transport.html#Transport(javax.mail.Session, javax.mail.URLName)) and only after that you can call send(message). I'm surprised you are no getting exception on compile. You should use clean build option on your project

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You will need to provide more details. Traditional approach would be that first JSP has some table where you edit fields and submit and then second JSP with fetch updates and show it as read only (no editing available)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Isn't android used on mobile devices?

Yes it is used

Aren't jdeveloper and eclipse development environments?

Yes they are

How could this question possibly NOT be relevant to mobile development?

As far I'm aware there is no support for Jdeveloper for Android with Gradle. Eclipse has partial support for Gradle but lagging way behind. Google strongly recommends use of Android Studio.

So dear @thirumoorthym please in future make sure you post meaningful questions not sort of, "Should I today wear red or pink t-shirt?"

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

How is this question relevant to mobile development?